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
7ca3ac7f
Kaydet (Commit)
7ca3ac7f
authored
Ock 30, 2001
tarafından
Frank Schönheit
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
'wildcard checking'
üst
fa132ce6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
155 additions
and
11 deletions
+155
-11
tabletree.cxx
dbaccess/source/ui/control/tabletree.cxx
+107
-7
tabletree.src
dbaccess/source/ui/control/tabletree.src
+23
-2
tabletree.hxx
dbaccess/source/ui/inc/tabletree.hxx
+25
-2
No files found.
dbaccess/source/ui/control/tabletree.cxx
Dosyayı görüntüle @
7ca3ac7f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: tabletree.cxx,v $
* $RCSfile: tabletree.cxx,v $
*
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
*
* last change: $Author:
oj $ $Date: 2001-01-15 10:55
:43 $
* last change: $Author:
fs $ $Date: 2001-01-30 08:29
:43 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -104,6 +104,9 @@
...
@@ -104,6 +104,9 @@
#ifndef _DBAUI_COMMON_TYPES_HXX_
#ifndef _DBAUI_COMMON_TYPES_HXX_
#include "commontypes.hxx"
#include "commontypes.hxx"
#endif
#endif
#ifndef _DBAUI_LISTVIEWITEMS_HXX_
#include "listviewitems.hxx"
#endif
//.........................................................................
//.........................................................................
namespace
dbaui
namespace
dbaui
...
@@ -362,6 +365,16 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -362,6 +365,16 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
try
try
{
{
// the root entry saying "all objects"
String
sRootEntryText
;
if
(
!
_rViews
.
getLength
())
sRootEntryText
=
String
(
ModuleRes
(
STR_ALL_TABLES
));
else
if
(
!
_rTables
.
getLength
())
sRootEntryText
=
String
(
ModuleRes
(
STR_ALL_VIEWS
));
else
sRootEntryText
=
String
(
ModuleRes
(
STR_ALL_TABLES_AND_VIEWS
));
SvLBoxEntry
*
pAllObjects
=
InsertEntry
(
sRootEntryText
);
// get the table/view names
// get the table/view names
const
::
rtl
::
OUString
*
pTables
=
NULL
;
const
::
rtl
::
OUString
*
pTables
=
NULL
;
const
::
rtl
::
OUString
*
pViews
=
NULL
;
const
::
rtl
::
OUString
*
pViews
=
NULL
;
...
@@ -371,6 +384,7 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -371,6 +384,7 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
::
rtl
::
OUString
sCatalog
,
sSchema
,
sName
;
::
rtl
::
OUString
sCatalog
,
sSchema
,
sName
;
SvLBoxEntry
*
pCat
=
NULL
;
SvLBoxEntry
*
pCat
=
NULL
;
SvLBoxEntry
*
pSchema
=
NULL
;
SvLBoxEntry
*
pSchema
=
NULL
;
SvLBoxEntry
*
pParent
=
pAllObjects
;
// loop through both sequences
// loop through both sequences
const
::
rtl
::
OUString
*
pSwitchSequences
=
(
pTables
&&
pViews
)
?
pTables
+
_rTables
.
getLength
()
-
1
:
NULL
;
const
::
rtl
::
OUString
*
pSwitchSequences
=
(
pTables
&&
pViews
)
?
pTables
+
_rTables
.
getLength
()
-
1
:
NULL
;
...
@@ -388,6 +402,8 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -388,6 +402,8 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
)
)
{
{
pCat
=
pSchema
=
NULL
;
pCat
=
pSchema
=
NULL
;
pParent
=
pAllObjects
;
// the image : table or view
// the image : table or view
Image
&
aImage
=
bIsView
?
m_aViewImage
:
m_aTableImage
;
Image
&
aImage
=
bIsView
?
m_aViewImage
:
m_aTableImage
;
// split the complete name into it's components
// split the complete name into it's components
...
@@ -396,18 +412,20 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -396,18 +412,20 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
if
(
sCatalog
.
getLength
())
if
(
sCatalog
.
getLength
())
{
{
pCat
=
GetEntryPosByName
(
sCatalog
);
pCat
=
GetEntryPosByName
(
sCatalog
);
if
(
!
pCat
)
if
(
!
pCat
)
pCat
=
InsertEntry
(
sCatalog
);
pCat
=
InsertEntry
(
sCatalog
,
pParent
);
pParent
=
pCat
;
}
}
if
(
sSchema
.
getLength
())
if
(
sSchema
.
getLength
())
{
{
pSchema
=
GetEntryPosByName
(
sSchema
);
pSchema
=
GetEntryPosByName
(
sSchema
);
if
(
!
pSchema
)
if
(
!
pSchema
)
pSchema
=
InsertEntry
(
sSchema
,
pCat
);
pSchema
=
InsertEntry
(
sSchema
,
pParent
);
pParent
=
pSchema
;
}
}
InsertEntry
(
sName
,
aImage
,
aImage
,
p
Schema
?
pSchema
:
pCa
t
);
InsertEntry
(
sName
,
aImage
,
aImage
,
p
Paren
t
);
}
}
}
}
catch
(
RuntimeException
&
)
catch
(
RuntimeException
&
)
...
@@ -416,6 +434,85 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -416,6 +434,85 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
}
}
}
}
//------------------------------------------------------------------------
sal_Bool
OTableTreeListBox
::
isWildcardChecked
(
SvLBoxEntry
*
_pEntry
)
const
{
if
(
_pEntry
)
{
OBoldListboxString
*
pTextItem
=
static_cast
<
OBoldListboxString
*>
(
_pEntry
->
GetFirstItem
(
SV_ITEM_ID_BOLDLBSTRING
));
if
(
pTextItem
)
return
pTextItem
->
isEmphasized
();
}
return
sal_False
;
}
//------------------------------------------------------------------------
void
OTableTreeListBox
::
checkWildcard
(
SvLBoxEntry
*
_pEntry
)
{
SetCheckButtonState
(
_pEntry
,
SV_BUTTON_CHECKED
);
checkedButton_noBroadcast
(
_pEntry
);
}
//------------------------------------------------------------------------
SvLBoxEntry
*
OTableTreeListBox
::
getAllObjectsEntry
()
const
{
return
First
();
}
//------------------------------------------------------------------------
void
OTableTreeListBox
::
checkedButton_noBroadcast
(
SvLBoxEntry
*
_pEntry
)
{
OMarkableTreeListBox
::
checkedButton_noBroadcast
(
_pEntry
);
// if an entry has children, it makes a difference if the entry is checked because alls children are checked
// or if the user checked it explicitly.
// So we track explicit (un)checking
SvButtonState
eState
=
GetCheckButtonState
(
_pEntry
);
DBG_ASSERT
(
SV_BUTTON_TRISTATE
!=
eState
,
"OTableTreeListBox::CheckButtonHdl: user action which lead to TRISTATE?"
);
implEmphasize
(
_pEntry
,
SV_BUTTON_CHECKED
==
eState
);
}
//------------------------------------------------------------------------
void
OTableTreeListBox
::
implEmphasize
(
SvLBoxEntry
*
_pEntry
,
sal_Bool
_bChecked
,
sal_Bool
_bUpdateRelatives
)
{
DBG_ASSERT
(
_pEntry
,
"OTableTreeListBox::implEmphasize: invalid entry (NULL)!"
);
if
(
GetModel
()
->
HasChilds
(
_pEntry
))
{
OBoldListboxString
*
pTextItem
=
static_cast
<
OBoldListboxString
*>
(
_pEntry
->
GetFirstItem
(
SV_ITEM_ID_BOLDLBSTRING
));
if
(
pTextItem
)
pTextItem
->
emphasize
(
_bChecked
);
}
if
(
_bUpdateRelatives
)
{
// remove the mark for all children of the checked entry
SvLBoxEntry
*
pChildLoop
=
FirstChild
(
_pEntry
);
while
(
pChildLoop
)
{
if
(
GetModel
()
->
HasChilds
(
pChildLoop
))
implEmphasize
(
pChildLoop
,
sal_False
,
sal_False
);
pChildLoop
=
NextSibling
(
pChildLoop
);
}
// remove the mark for all ancestors of the entry
if
(
GetModel
()
->
HasParent
(
_pEntry
))
implEmphasize
(
GetParent
(
_pEntry
),
sal_False
,
sal_False
);
}
}
//------------------------------------------------------------------------
void
OTableTreeListBox
::
InitEntry
(
SvLBoxEntry
*
_pEntry
,
const
XubString
&
_rString
,
const
Image
&
_rCollapsedBitmap
,
const
Image
&
_rExpandedBitmap
)
{
OMarkableTreeListBox
::
InitEntry
(
_pEntry
,
_rString
,
_rCollapsedBitmap
,
_rExpandedBitmap
);
// replace the text item with our own one
SvLBoxItem
*
pTextItem
=
_pEntry
->
GetFirstItem
(
SV_ITEM_ID_LBOXSTRING
);
DBG_ASSERT
(
pTextItem
,
"OTableTreeListBox::InitEntry: no text item!?"
);
sal_uInt16
nTextPos
=
_pEntry
->
GetPos
(
pTextItem
);
DBG_ASSERT
(((
sal_uInt16
)
-
1
)
!=
nTextPos
,
"OTableTreeListBox::InitEntry: no text item pos!"
);
_pEntry
->
ReplaceItem
(
new
OBoldListboxString
(
_pEntry
,
0
,
_rString
),
nTextPos
);
}
//.........................................................................
//.........................................................................
}
// namespace dbaui
}
// namespace dbaui
//.........................................................................
//.........................................................................
...
@@ -423,6 +520,9 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
...
@@ -423,6 +520,9 @@ void OTableTreeListBox::UpdateTableList(const Reference< XDatabaseMetaData >& _r
/*************************************************************************
/*************************************************************************
* history:
* history:
* $Log: not supported by cvs2svn $
* $Log: not supported by cvs2svn $
* Revision 1.6 2001/01/15 10:55:43 oj
* wrong image for table used
*
* Revision 1.5 2000/10/30 15:37:48 fs
* Revision 1.5 2000/10/30 15:37:48 fs
* #79816# no need for a XDataDefinitionSupplier anymore - collect table/view names from the meta data
* #79816# no need for a XDataDefinitionSupplier anymore - collect table/view names from the meta data
*
*
...
...
dbaccess/source/ui/control/tabletree.src
Dosyayı görüntüle @
7ca3ac7f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: tabletree.src,v $
* $RCSfile: tabletree.src,v $
*
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
*
* last change: $Author:
kz $ $Date: 2000-11-29 09:47
:43 $
* last change: $Author:
fs $ $Date: 2001-01-30 08:29
:43 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -258,10 +258,31 @@ String STR_NOTABLEINFO
...
@@ -258,10 +258,31 @@ String STR_NOTABLEINFO
Text[ turkish ] = "A connection was established sucessfully, but no informations about tables and/or views could be gathered.";
Text[ turkish ] = "A connection was established sucessfully, but no informations about tables and/or views could be gathered.";
Text[ arabic ] = " ͡ .";
Text[ arabic ] = " ͡ .";
};
};
String STR_ALL_TABLES
{
Text = "Alle Tabellen";
Text [ english ] = "All tables";
Text [ english_us ] = "All tables";
};
String STR_ALL_VIEWS
{
Text = "Alle Tabellensichten";
Text [ english ] = "All views";
Text [ english_us ] = "All views";
};
String STR_ALL_TABLES_AND_VIEWS
{
Text = "Alle Tabellen und Tabellensichten";
Text [ english ] = "All tables and views";
Text [ english_us ] = "All tables and views";
};
/*************************************************************************
/*************************************************************************
* history:
* history:
* $Log: not supported by cvs2svn $
* $Log: not supported by cvs2svn $
* Revision 1.5 2000/11/29 09:47:43 kz
* Merge SRC614: 29.11.00 - 10:46:56 (NoBranch)
*
* Revision 1.4 2000/10/30 15:23:23 fs
* Revision 1.4 2000/10/30 15:23:23 fs
* #79816# STR_INVALID_REGISTEREDDRIVER is obsolete
* #79816# STR_INVALID_REGISTEREDDRIVER is obsolete
*
*
...
...
dbaccess/source/ui/inc/tabletree.hxx
Dosyayı görüntüle @
7ca3ac7f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: tabletree.hxx,v $
* $RCSfile: tabletree.hxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: fs $ $Date: 200
0-10-30 15:20:02
$
* last change: $Author: fs $ $Date: 200
1-01-30 08:28:15
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -130,8 +130,28 @@ public:
...
@@ -130,8 +130,28 @@ public:
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
_rTables
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
_rTables
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
_rViews
);
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
_rViews
);
SvLBoxEntry
*
getAllObjectsEntry
()
const
;
/** does a wildcard check of the given entry
<p>There are two different 'checked' states: If the user checks all children of an entry, this is different
from checking the entry itself. The second is called 'wildcard' checking, 'cause in the resulting
table filter it's represented by a wildcard.</p>
*/
void
checkWildcard
(
SvLBoxEntry
*
_pEntry
);
/** determine if the given entry is 'wildcard checked'
@see checkWildcard
*/
sal_Bool
isWildcardChecked
(
SvLBoxEntry
*
_pEntry
)
const
;
protected
:
protected
:
virtual
void
InitEntry
(
SvLBoxEntry
*
_pEntry
,
const
XubString
&
_rString
,
const
Image
&
_rCollapsedBitmap
,
const
Image
&
_rExpandedBitmap
);
virtual
void
Command
(
const
CommandEvent
&
rEvt
);
virtual
void
Command
(
const
CommandEvent
&
rEvt
);
virtual
void
checkedButton_noBroadcast
(
SvLBoxEntry
*
_pEntry
);
void
implEmphasize
(
SvLBoxEntry
*
_pEntry
,
sal_Bool
_bChecked
,
sal_Bool
_bUpdateRelatives
=
sal_True
);
};
};
//.........................................................................
//.........................................................................
...
@@ -143,6 +163,9 @@ protected:
...
@@ -143,6 +163,9 @@ protected:
/*************************************************************************
/*************************************************************************
* history:
* history:
* $Log: not supported by cvs2svn $
* $Log: not supported by cvs2svn $
* Revision 1.2 2000/10/30 15:20:02 fs
* #79816# second UpdateTableList got other parameters
*
* Revision 1.1 2000/10/05 10:09:23 fs
* Revision 1.1 2000/10/05 10:09:23 fs
* initial checkin
* initial checkin
*
*
...
...
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