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
ca7fa9bd
Kaydet (Commit)
ca7fa9bd
authored
Nis 14, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use VclPtr in VclBuilder to get construction referencing right.
Change-Id: I2100de7c599c3d2c241e336d369fc5998e23af16
üst
df103589
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
22 deletions
+23
-22
builder.hxx
include/vcl/builder.hxx
+4
-3
lstbox.cxx
vcl/source/control/lstbox.cxx
+4
-4
builder.cxx
vcl/source/window/builder.cxx
+15
-15
No files found.
include/vcl/builder.hxx
Dosyayı görüntüle @
ca7fa9bd
...
...
@@ -45,6 +45,7 @@ class VCL_DLLPUBLIC VclBuilder
{
public
:
typedef
std
::
map
<
OString
,
OString
>
stringmap
;
/// These functions return a vcl::Window with a reference count of one.
typedef
vcl
::
Window
*
(
*
customMakeWidget
)(
vcl
::
Window
*
pParent
,
stringmap
&
rVec
);
public
:
...
...
@@ -340,12 +341,12 @@ private:
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
m_xFrame
;
private
:
vcl
::
Window
*
insertObject
(
vcl
::
Window
*
pParent
,
VclPtr
<
vcl
::
Window
>
insertObject
(
vcl
::
Window
*
pParent
,
const
OString
&
rClass
,
const
OString
&
rID
,
stringmap
&
rProps
,
stringmap
&
rPangoAttributes
,
stringmap
&
rAtkProps
);
vcl
::
Window
*
makeObject
(
vcl
::
Window
*
pParent
,
VclPtr
<
vcl
::
Window
>
makeObject
(
vcl
::
Window
*
pParent
,
const
OString
&
rClass
,
const
OString
&
rID
,
stringmap
&
rVec
);
...
...
@@ -364,7 +365,7 @@ private:
void
handleTranslations
(
xmlreader
::
XmlReader
&
reader
);
void
handleChild
(
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
vcl
::
Window
*
handleObject
(
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
VclPtr
<
vcl
::
Window
>
handleObject
(
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
handlePacking
(
vcl
::
Window
*
pCurrent
,
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
applyPackingProperty
(
vcl
::
Window
*
pCurrent
,
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
collectProperty
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
stringmap
&
rVec
);
...
...
vcl/source/control/lstbox.cxx
Dosyayı görüntüle @
ca7fa9bd
...
...
@@ -132,19 +132,19 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
}
mpFloatWin
=
new
ImplListBoxFloatingWindow
(
this
);
mpFloatWin
=
VclPtr
<
ImplListBoxFloatingWindow
>::
Create
(
this
);
mpFloatWin
->
SetAutoWidth
(
true
);
mpFloatWin
->
SetPopupModeEndHdl
(
LINK
(
this
,
ListBox
,
ImplPopupModeEndHdl
)
);
mpFloatWin
->
GetDropTarget
()
->
addDropTargetListener
(
xDrop
);
mpImplWin
=
new
ImplWin
(
this
,
(
nStyle
&
(
WB_LEFT
|
WB_RIGHT
|
WB_CENTER
))
|
WB_NOBORDER
);
mpImplWin
=
VclPtr
<
ImplWin
>::
Create
(
this
,
(
nStyle
&
(
WB_LEFT
|
WB_RIGHT
|
WB_CENTER
))
|
WB_NOBORDER
);
mpImplWin
->
buttonDownSignal
.
connect
(
boost
::
bind
(
&
ListBox
::
ImplClickButtonHandler
,
this
,
_1
));
mpImplWin
->
userDrawSignal
.
connect
(
boost
::
bind
(
&
ListBox
::
ImplUserDrawHandler
,
this
,
_1
)
);
mpImplWin
->
Show
();
mpImplWin
->
GetDropTarget
()
->
addDropTargetListener
(
xDrop
);
mpImplWin
->
SetEdgeBlending
(
GetEdgeBlending
());
mpBtn
=
new
ImplBtn
(
this
,
WB_NOLIGHTBORDER
|
WB_RECTSTYLE
);
mpBtn
=
VclPtr
<
ImplBtn
>::
Create
(
this
,
WB_NOLIGHTBORDER
|
WB_RECTSTYLE
);
ImplInitDropDownButton
(
mpBtn
);
mpBtn
->
buttonDownSignal
.
connect
(
boost
::
bind
(
&
ListBox
::
ImplClickButtonHandler
,
this
,
_1
));
mpBtn
->
Show
();
...
...
@@ -154,7 +154,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
vcl
::
Window
*
pLBParent
=
this
;
if
(
mpFloatWin
)
pLBParent
=
mpFloatWin
;
mpImplLB
=
new
ImplListBox
(
pLBParent
,
nStyle
&
(
~
WB_BORDER
)
);
mpImplLB
=
VclPtr
<
ImplListBox
>::
Create
(
pLBParent
,
nStyle
&
(
~
WB_BORDER
)
);
mpImplLB
->
SetSelectHdl
(
LINK
(
this
,
ListBox
,
ImplSelectHdl
)
);
mpImplLB
->
SetScrollHdl
(
LINK
(
this
,
ListBox
,
ImplScrollHdl
)
);
mpImplLB
->
SetCancelHdl
(
LINK
(
this
,
ListBox
,
ImplCancelHdl
)
);
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
ca7fa9bd
...
...
@@ -1266,7 +1266,7 @@ void VclBuilder::cleanupWidgetOwnScrolling(vcl::Window *pScrollParent, vcl::Wind
extern
"C"
{
static
void
SAL_CALL
thisModule
()
{}
}
#endif
vcl
::
Window
*
VclBuilder
::
makeObject
(
vcl
::
Window
*
pParent
,
const
OString
&
name
,
const
OString
&
id
,
VclPtr
<
vcl
::
Window
>
VclBuilder
::
makeObject
(
vcl
::
Window
*
pParent
,
const
OString
&
name
,
const
OString
&
id
,
stringmap
&
rMap
)
{
bool
bIsPlaceHolder
=
name
.
isEmpty
();
...
...
@@ -1308,7 +1308,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
}
if
(
bIsPlaceHolder
||
name
==
"GtkTreeSelection"
)
return
NULL
;
return
nullptr
;
extractButtonImage
(
id
,
rMap
,
name
==
"GtkRadioButton"
);
...
...
@@ -1703,7 +1703,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
m_pParserState
->
m_nLastToolbarId
=
nItemId
;
return
NULL
;
// no widget to be created
return
nullptr
;
// no widget to be created
}
}
else
if
(
name
==
"GtkSeparatorToolItem"
)
...
...
@@ -1712,7 +1712,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
if
(
pToolBox
)
{
pToolBox
->
InsertSeparator
();
return
NULL
;
// no widget to be created
return
nullptr
;
// no widget to be created
}
}
else
if
(
name
==
"GtkWindow"
)
...
...
@@ -1780,7 +1780,7 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
pWindow
->
GetHelpId
().
getStr
());
m_aChildren
.
push_back
(
WinAndId
(
id
,
xWindow
,
bVertical
));
}
return
pWindow
;
return
VclPtr
<
vcl
::
Window
>
(
pWindow
,
SAL_NO_ACQUIRE
)
;
}
namespace
...
...
@@ -1815,10 +1815,10 @@ void VclBuilder::set_properties(vcl::Window *pWindow, const stringmap &rProps)
}
}
vcl
::
Window
*
VclBuilder
::
insertObject
(
vcl
::
Window
*
pParent
,
const
OString
&
rClass
,
VclPtr
<
vcl
::
Window
>
VclBuilder
::
insertObject
(
vcl
::
Window
*
pParent
,
const
OString
&
rClass
,
const
OString
&
rID
,
stringmap
&
rProps
,
stringmap
&
rPango
,
stringmap
&
rAtk
)
{
vcl
::
Window
*
pCurrentChild
=
NULL
;
VclPtr
<
vcl
::
Window
>
pCurrentChild
;
if
(
m_pParent
&&
!
isConsideredGtkPseudo
(
m_pParent
)
&&
!
m_sID
.
isEmpty
()
&&
rID
.
equals
(
m_sID
))
{
...
...
@@ -1829,13 +1829,13 @@ vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClas
//initialize the dialog.
if
(
pParent
&&
pParent
->
IsSystemWindow
())
{
SystemWindow
*
pSysWin
=
static_cast
<
SystemWindow
*>
(
pCurrentChild
);
SystemWindow
*
pSysWin
=
static_cast
<
SystemWindow
*>
(
pCurrentChild
.
get
()
);
pSysWin
->
doDeferredInit
(
extractDeferredBits
(
rProps
));
m_bToplevelHasDeferredInit
=
false
;
}
else
if
(
pParent
&&
pParent
->
IsDockingWindow
())
{
DockingWindow
*
pDockWin
=
static_cast
<
DockingWindow
*>
(
pCurrentChild
);
DockingWindow
*
pDockWin
=
static_cast
<
DockingWindow
*>
(
pCurrentChild
.
get
()
);
pDockWin
->
doDeferredInit
(
extractDeferredBits
(
rProps
));
m_bToplevelHasDeferredInit
=
false
;
}
...
...
@@ -2843,7 +2843,7 @@ template<typename T> bool insertItems(vcl::Window *pWindow, VclBuilder::stringma
return
true
;
}
vcl
::
Window
*
VclBuilder
::
handleObject
(
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
)
VclPtr
<
vcl
::
Window
>
VclBuilder
::
handleObject
(
vcl
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
)
{
OString
sClass
;
OString
sID
;
...
...
@@ -2875,22 +2875,22 @@ vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader
if
(
sClass
==
"GtkListStore"
)
{
handleListStore
(
reader
,
sID
);
return
NULL
;
return
nullptr
;
}
else
if
(
sClass
==
"GtkMenu"
)
{
handleMenu
(
reader
,
sID
);
return
NULL
;
return
nullptr
;
}
else
if
(
sClass
==
"GtkSizeGroup"
)
{
handleSizeGroup
(
reader
,
sID
);
return
NULL
;
return
nullptr
;
}
else
if
(
sClass
==
"AtkObject"
)
{
handleAtkObject
(
reader
,
sID
,
pParent
);
return
NULL
;
return
nullptr
;
}
int
nLevel
=
1
;
...
...
@@ -2901,7 +2901,7 @@ vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader
if
(
!
sCustomProperty
.
isEmpty
())
aProperties
[
OString
(
"customproperty"
)]
=
sCustomProperty
;
vcl
::
Window
*
pCurrentChild
=
NULL
;
VclPtr
<
vcl
::
Window
>
pCurrentChild
;
while
(
true
)
{
xmlreader
::
XmlReader
::
Result
res
=
reader
.
nextItem
(
...
...
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