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
d2c2ab1c
Kaydet (Commit)
d2c2ab1c
authored
Ock 21, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tidy up OTableTreeListBox to make it easier to .ui-ify
Change-Id: I2463d665c857425bc4cf9df89338a0aab89f0a90
üst
9eebbbcb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
28 deletions
+18
-28
AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
+2
-3
tabletree.cxx
dbaccess/source/ui/control/tabletree.cxx
+8
-12
tabletree.hxx
dbaccess/source/ui/inc/tabletree.hxx
+8
-13
No files found.
dbaccess/source/ui/app/AppDetailPageHelper.cxx
Dosyayı görüntüle @
d2c2ab1c
...
@@ -589,9 +589,8 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
...
@@ -589,9 +589,8 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
if
(
!
m_pLists
[
E_TABLE
]
)
if
(
!
m_pLists
[
E_TABLE
]
)
{
{
OTableTreeListBox
*
pTreeView
=
new
OTableTreeListBox
(
this
OTableTreeListBox
*
pTreeView
=
new
OTableTreeListBox
(
this
,
,
WB_HASLINES
|
WB_SORT
|
WB_HASBUTTONS
|
WB_HSCROLL
|
WB_HASBUTTONSATROOT
|
WB_TABSTOP
WB_HASLINES
|
WB_SORT
|
WB_HASBUTTONS
|
WB_HSCROLL
|
WB_HASBUTTONSATROOT
|
WB_TABSTOP
);
,
sal_False
);
pTreeView
->
SetHelpId
(
HID_APP_TABLE_TREE
);
pTreeView
->
SetHelpId
(
HID_APP_TABLE_TREE
);
m_pLists
[
E_TABLE
]
=
pTreeView
;
m_pLists
[
E_TABLE
]
=
pTreeView
;
...
...
dbaccess/source/ui/control/tabletree.cxx
Dosyayı görüntüle @
d2c2ab1c
...
@@ -64,10 +64,10 @@ namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
...
@@ -64,10 +64,10 @@ namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
namespace
DatabaseObjectContainer
=
::
com
::
sun
::
star
::
sdb
::
application
::
DatabaseObjectContainer
;
namespace
DatabaseObjectContainer
=
::
com
::
sun
::
star
::
sdb
::
application
::
DatabaseObjectContainer
;
// OTableTreeListBox
// OTableTreeListBox
OTableTreeListBox
::
OTableTreeListBox
(
Window
*
pParent
,
WinBits
nWinStyle
,
sal_Bool
_bVirtualRoot
)
OTableTreeListBox
::
OTableTreeListBox
(
Window
*
pParent
,
WinBits
nWinStyle
)
:
OMarkableTreeListBox
(
pParent
,
nWinStyle
)
:
OMarkableTreeListBox
(
pParent
,
nWinStyle
)
,
m_
p
ImageProvider
(
new
ImageProvider
)
,
m_
x
ImageProvider
(
new
ImageProvider
)
,
m_bVirtualRoot
(
_bVirtualRoot
)
,
m_bVirtualRoot
(
false
)
,
m_bNoEmptyFolders
(
false
)
,
m_bNoEmptyFolders
(
false
)
{
{
implSetDefaultImages
();
implSetDefaultImages
();
...
@@ -75,17 +75,13 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, WinBits nWinStyle, sal_Bo
...
@@ -75,17 +75,13 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, WinBits nWinStyle, sal_Bo
OTableTreeListBox
::
OTableTreeListBox
(
Window
*
pParent
,
const
ResId
&
rResId
,
sal_Bool
_bVirtualRoot
)
OTableTreeListBox
::
OTableTreeListBox
(
Window
*
pParent
,
const
ResId
&
rResId
,
sal_Bool
_bVirtualRoot
)
:
OMarkableTreeListBox
(
pParent
,
rResId
)
:
OMarkableTreeListBox
(
pParent
,
rResId
)
,
m_
p
ImageProvider
(
new
ImageProvider
)
,
m_
x
ImageProvider
(
new
ImageProvider
)
,
m_bVirtualRoot
(
_bVirtualRoot
)
,
m_bVirtualRoot
(
_bVirtualRoot
)
,
m_bNoEmptyFolders
(
false
)
,
m_bNoEmptyFolders
(
false
)
{
{
implSetDefaultImages
();
implSetDefaultImages
();
}
}
OTableTreeListBox
::~
OTableTreeListBox
()
{
}
void
OTableTreeListBox
::
implSetDefaultImages
()
void
OTableTreeListBox
::
implSetDefaultImages
()
{
{
ImageProvider
aImageProvider
;
ImageProvider
aImageProvider
;
...
@@ -122,12 +118,12 @@ void OTableTreeListBox::notifyHiContrastChanged()
...
@@ -122,12 +118,12 @@ void OTableTreeListBox::notifyHiContrastChanged()
Image
aImage
;
Image
aImage
;
if
(
isFolderEntry
(
pEntryLoop
)
)
if
(
isFolderEntry
(
pEntryLoop
)
)
{
{
aImage
=
m_
p
ImageProvider
->
getFolderImage
(
DatabaseObject
::
TABLE
);
aImage
=
m_
x
ImageProvider
->
getFolderImage
(
DatabaseObject
::
TABLE
);
}
}
else
else
{
{
OUString
sCompleteName
(
getQualifiedTableName
(
pEntryLoop
)
);
OUString
sCompleteName
(
getQualifiedTableName
(
pEntryLoop
)
);
m_
p
ImageProvider
->
getImages
(
sCompleteName
,
DatabaseObject
::
TABLE
,
aImage
);
m_
x
ImageProvider
->
getImages
(
sCompleteName
,
DatabaseObject
::
TABLE
,
aImage
);
}
}
pContextBitmapItem
->
SetBitmap1
(
aImage
);
pContextBitmapItem
->
SetBitmap1
(
aImage
);
...
@@ -142,7 +138,7 @@ void OTableTreeListBox::notifyHiContrastChanged()
...
@@ -142,7 +138,7 @@ void OTableTreeListBox::notifyHiContrastChanged()
void
OTableTreeListBox
::
implOnNewConnection
(
const
Reference
<
XConnection
>&
_rxConnection
)
void
OTableTreeListBox
::
implOnNewConnection
(
const
Reference
<
XConnection
>&
_rxConnection
)
{
{
m_xConnection
=
_rxConnection
;
m_xConnection
=
_rxConnection
;
m_
p
ImageProvider
.
reset
(
new
ImageProvider
(
m_xConnection
)
);
m_
x
ImageProvider
.
reset
(
new
ImageProvider
(
m_xConnection
)
);
}
}
void
OTableTreeListBox
::
UpdateTableList
(
const
Reference
<
XConnection
>&
_rxConnection
)
throw
(
SQLException
)
void
OTableTreeListBox
::
UpdateTableList
(
const
Reference
<
XConnection
>&
_rxConnection
)
throw
(
SQLException
)
...
@@ -469,7 +465,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
...
@@ -469,7 +465,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
pRet
=
InsertEntry
(
sName
,
pParentEntry
,
sal_False
,
LIST_APPEND
);
pRet
=
InsertEntry
(
sName
,
pParentEntry
,
sal_False
,
LIST_APPEND
);
Image
aImage
;
Image
aImage
;
m_
p
ImageProvider
->
getImages
(
_rTableName
,
DatabaseObject
::
TABLE
,
aImage
);
m_
x
ImageProvider
->
getImages
(
_rTableName
,
DatabaseObject
::
TABLE
,
aImage
);
SetExpandedEntryBmp
(
pRet
,
aImage
);
SetExpandedEntryBmp
(
pRet
,
aImage
);
SetCollapsedEntryBmp
(
pRet
,
aImage
);
SetCollapsedEntryBmp
(
pRet
,
aImage
);
...
...
dbaccess/source/ui/inc/tabletree.hxx
Dosyayı görüntüle @
d2c2ab1c
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_TABLETREE_HXX
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_TABLETREE_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_INC_TABLETREE_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_INC_TABLETREE_HXX
#include "imageprovider.hxx"
#include "marktree.hxx"
#include "marktree.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
...
@@ -28,38 +29,32 @@
...
@@ -28,38 +29,32 @@
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
#include <boost/scoped_ptr.hpp>
#include <memory>
namespace
dbaui
namespace
dbaui
{
{
class
ImageProvider
;
// OTableTreeListBox
// OTableTreeListBox
class
OTableTreeListBox
:
public
OMarkableTreeListBox
class
OTableTreeListBox
:
public
OMarkableTreeListBox
{
{
protected
:
protected
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
m_xConnection
;
// the connection we're working for, set in implOnNewConnection, called by UpdateTableList
m_xConnection
;
// the connection we're working for, set in implOnNewConnection, called by UpdateTableList
::
std
::
auto
_ptr
<
ImageProvider
>
boost
::
scoped
_ptr
<
ImageProvider
>
m_
p
ImageProvider
;
// provider for our images
m_
x
ImageProvider
;
// provider for our images
sal_Bool
m_bVirtualRoot
;
// should the first entry be visible
sal_Bool
m_bVirtualRoot
;
// should the first entry be visible
bool
m_bNoEmptyFolders
;
// should empty catalogs/schematas be prevented from being displayed?
bool
m_bNoEmptyFolders
;
// should empty catalogs/schematas be prevented from being displayed?
public
:
public
:
OTableTreeListBox
(
OTableTreeListBox
(
Window
*
pParent
,
WinBits
nWinStyle
);
Window
*
pParent
,
WinBits
nWinStyle
,
void
init
(
bool
bVirtualRoot
)
{
m_bVirtualRoot
=
bVirtualRoot
;
}
sal_Bool
_bVirtualRoot
);
OTableTreeListBox
(
OTableTreeListBox
(
Window
*
pParent
,
Window
*
pParent
,
const
ResId
&
rResId
,
const
ResId
&
rResId
,
sal_Bool
_bVirtualRoot
);
sal_Bool
_bVirtualRoot
);
~
OTableTreeListBox
();
typedef
::
std
::
pair
<
OUString
,
sal_Bool
>
TTableViewName
;
typedef
::
std
::
pair
<
OUString
,
sal_Bool
>
TTableViewName
;
typedef
::
std
::
vector
<
TTableViewName
>
TNames
;
typedef
::
std
::
vector
<
TTableViewName
>
TNames
;
...
...
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