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
f3add702
Kaydet (Commit)
f3add702
authored
Ara 22, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: more rtl::Reference cleanup
Change-Id: Idef6b4259d784120a06d2a6c51b77029566da59f
üst
b72c6feb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
150 additions
and
2 deletions
+150
-2
fixed.hxx
include/vcl/fixed.hxx
+1
-0
layout.hxx
include/vcl/layout.hxx
+1
-0
CppunitTest_vcl_lifecycle.mk
vcl/CppunitTest_vcl_lifecycle.mk
+52
-0
Module_vcl.mk
vcl/Module_vcl.mk
+1
-0
lifecycle.cxx
vcl/qa/cppunit/lifecycle.cxx
+64
-0
fixed.cxx
vcl/source/control/fixed.cxx
+6
-0
layout.cxx
vcl/source/window/layout.cxx
+21
-1
window.cxx
vcl/source/window/window.cxx
+4
-1
No files found.
include/vcl/fixed.hxx
Dosyayı görüntüle @
f3add702
...
@@ -62,6 +62,7 @@ public:
...
@@ -62,6 +62,7 @@ public:
explicit
FixedText
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
=
0
);
explicit
FixedText
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
=
0
);
explicit
FixedText
(
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
);
explicit
FixedText
(
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
);
virtual
~
FixedText
();
virtual
~
FixedText
();
virtual
void
dispose
()
SAL_OVERRIDE
;
virtual
void
Paint
(
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Paint
(
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
)
SAL_OVERRIDE
;
virtual
void
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
)
SAL_OVERRIDE
;
...
...
include/vcl/layout.hxx
Dosyayı görüntüle @
f3add702
...
@@ -742,6 +742,7 @@ public:
...
@@ -742,6 +742,7 @@ public:
void
set_primary_text
(
const
OUString
&
rPrimaryString
);
void
set_primary_text
(
const
OUString
&
rPrimaryString
);
void
set_secondary_text
(
const
OUString
&
rSecondaryString
);
void
set_secondary_text
(
const
OUString
&
rSecondaryString
);
virtual
~
MessageDialog
();
virtual
~
MessageDialog
();
virtual
void
dispose
()
SAL_OVERRIDE
;
static
void
SetMessagesWidths
(
vcl
::
Window
*
pParent
,
VclMultiLineEdit
*
pPrimaryMessage
,
static
void
SetMessagesWidths
(
vcl
::
Window
*
pParent
,
VclMultiLineEdit
*
pPrimaryMessage
,
VclMultiLineEdit
*
pSecondaryMessage
);
VclMultiLineEdit
*
pSecondaryMessage
);
...
...
vcl/CppunitTest_vcl_lifecycle.mk
0 → 100644
Dosyayı görüntüle @
f3add702
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,vcl_lifecycle))
$(eval $(call gb_CppunitTest_set_include,vcl_lifecycle,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_lifecycle, \
vcl/qa/cppunit/lifecycle \
))
$(eval $(call gb_CppunitTest_use_externals,vcl_lifecycle,boost_headers))
$(eval $(call gb_CppunitTest_use_libraries,vcl_lifecycle, \
comphelper \
cppu \
cppuhelper \
sal \
svt \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,vcl_lifecycle,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,vcl_lifecycle))
$(eval $(call gb_CppunitTest_use_vcl,vcl_lifecycle))
$(eval $(call gb_CppunitTest_use_components,vcl_lifecycle,\
configmgr/source/configmgr \
i18npool/util/i18npool \
ucb/source/core/ucb1 \
))
$(eval $(call gb_CppunitTest_use_configuration,vcl_lifecycle))
# vim: set noet sw=4 ts=4:
vcl/Module_vcl.mk
Dosyayı görüntüle @
f3add702
...
@@ -103,6 +103,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
...
@@ -103,6 +103,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_fontcharmap \
CppunitTest_vcl_fontcharmap \
CppunitTest_vcl_complextext \
CppunitTest_vcl_complextext \
CppunitTest_vcl_filters_test \
CppunitTest_vcl_filters_test \
CppunitTest_vcl_lifecycle \
CppunitTest_vcl_outdev \
CppunitTest_vcl_outdev \
CppunitTest_vcl_app_test \
CppunitTest_vcl_app_test \
CppunitTest_vcl_wmf_test \
CppunitTest_vcl_wmf_test \
...
...
vcl/qa/cppunit/lifecycle.cxx
0 → 100644
Dosyayı görüntüle @
f3add702
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/button.hxx>
class
LifecycleTest
:
public
test
::
BootstrapFixture
{
void
testWidgets
(
vcl
::
Window
*
pParent
);
public
:
LifecycleTest
()
:
BootstrapFixture
(
true
,
false
)
{}
void
testIsolatedWidgets
();
void
testParentedWidgets
();
CPPUNIT_TEST_SUITE
(
LifecycleTest
);
CPPUNIT_TEST
(
testIsolatedWidgets
);
CPPUNIT_TEST
(
testParentedWidgets
);
CPPUNIT_TEST_SUITE_END
();
};
void
LifecycleTest
::
testWidgets
(
vcl
::
Window
*
pParent
)
{
{
PushButtonPtr
aPtr
(
new
PushButton
(
pParent
));
}
{
OKButtonPtr
aPtr
(
new
OKButton
(
pParent
));
}
{
CancelButtonPtr
aPtr
(
new
CancelButton
(
pParent
));
}
{
HelpButtonPtr
aPtr
(
new
HelpButton
(
pParent
));
}
// Some widgets really insist on adoption.
if
(
pParent
)
{
{
CheckBoxPtr
aPtr
(
new
CheckBox
(
pParent
));
}
}
// { RadioButtonPtr aPtr(new RadioButton(pParent)); }
}
void
LifecycleTest
::
testIsolatedWidgets
()
{
testWidgets
(
NULL
);
}
void
LifecycleTest
::
testParentedWidgets
()
{
VclReference
<
WorkWindow
>
xWin
(
new
WorkWindow
((
vcl
::
Window
*
)
NULL
,
WB_APP
|
WB_STDWORK
));
CPPUNIT_ASSERT
(
xWin
.
get
()
!=
NULL
);
testWidgets
(
xWin
.
get
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
LifecycleTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/control/fixed.cxx
Dosyayı görüntüle @
f3add702
...
@@ -459,8 +459,14 @@ void FixedText::set_mnemonic_widget(vcl::Window *pWindow)
...
@@ -459,8 +459,14 @@ void FixedText::set_mnemonic_widget(vcl::Window *pWindow)
}
}
FixedText
::~
FixedText
()
FixedText
::~
FixedText
()
{
dispose
();
}
void
FixedText
::
dispose
()
{
{
set_mnemonic_widget
(
NULL
);
set_mnemonic_widget
(
NULL
);
Control
::
dispose
();
}
}
SelectableFixedText
::
SelectableFixedText
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
SelectableFixedText
::
SelectableFixedText
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
...
...
vcl/source/window/layout.cxx
Dosyayı görüntüle @
f3add702
...
@@ -1992,16 +1992,36 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUS
...
@@ -1992,16 +1992,36 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUS
{
{
}
}
MessageDialog
::~
MessageDialog
()
void
MessageDialog
::
dispose
()
{
{
for
(
size_t
i
=
0
;
i
<
m_aOwnedButtons
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
m_aOwnedButtons
.
size
();
++
i
)
delete
m_aOwnedButtons
[
i
];
delete
m_aOwnedButtons
[
i
];
m_aOwnedButtons
.
clear
();
delete
m_pSecondaryMessage
;
delete
m_pSecondaryMessage
;
m_pSecondaryMessage
=
NULL
;
delete
m_pPrimaryMessage
;
delete
m_pPrimaryMessage
;
m_pSecondaryMessage
=
NULL
;
delete
m_pImage
;
delete
m_pImage
;
m_pImage
=
NULL
;
delete
m_pGrid
;
delete
m_pGrid
;
m_pGrid
=
NULL
;
delete
m_pOwnedActionArea
;
delete
m_pOwnedActionArea
;
m_pOwnedActionArea
=
NULL
;
delete
m_pOwnedContentArea
;
delete
m_pOwnedContentArea
;
m_pOwnedContentArea
=
NULL
;
Dialog
::
dispose
();
}
MessageDialog
::~
MessageDialog
()
{
dispose
();
}
}
void
MessageDialog
::
response
(
short
nResponseId
)
void
MessageDialog
::
response
(
short
nResponseId
)
...
...
vcl/source/window/window.cxx
Dosyayı görüntüle @
f3add702
...
@@ -551,6 +551,8 @@ void Window::dispose()
...
@@ -551,6 +551,8 @@ void Window::dispose()
vcl
::
Window
*
pSysWin
=
pSVData
->
maWinData
.
mpFirstFrame
;
vcl
::
Window
*
pSysWin
=
pSVData
->
maWinData
.
mpFirstFrame
;
while
(
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
!=
this
)
while
(
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
!=
this
)
pSysWin
=
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
;
pSysWin
=
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
;
assert
(
mpWindowImpl
->
mpFrameData
->
mpNextFrame
!=
pSysWin
);
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
=
mpWindowImpl
->
mpFrameData
->
mpNextFrame
;
pSysWin
->
mpWindowImpl
->
mpFrameData
->
mpNextFrame
=
mpWindowImpl
->
mpFrameData
->
mpNextFrame
;
}
}
mpWindowImpl
->
mpFrame
->
SetCallback
(
NULL
,
NULL
);
mpWindowImpl
->
mpFrame
->
SetCallback
(
NULL
,
NULL
);
...
@@ -565,7 +567,7 @@ void Window::dispose()
...
@@ -565,7 +567,7 @@ void Window::dispose()
Window
::~
Window
()
Window
::~
Window
()
{
{
vcl
::
LazyDeletor
<
vcl
::
Window
>::
Undelete
(
this
);
vcl
::
LazyDeletor
<
vcl
::
Window
>::
Undelete
(
this
);
dispose
();
DBG_ASSERT
(
!
mpWindowImpl
->
mbInDtor
,
"~Window - already in DTOR!"
);
DBG_ASSERT
(
!
mpWindowImpl
->
mbInDtor
,
"~Window - already in DTOR!"
);
}
}
...
@@ -990,6 +992,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
...
@@ -990,6 +992,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
mpWindowImpl
->
mpOverlapWindow
=
this
;
mpWindowImpl
->
mpOverlapWindow
=
this
;
// set frame data
// set frame data
assert
(
pSVData
->
maWinData
.
mpFirstFrame
!=
this
);
mpWindowImpl
->
mpFrameData
->
mpNextFrame
=
pSVData
->
maWinData
.
mpFirstFrame
;
mpWindowImpl
->
mpFrameData
->
mpNextFrame
=
pSVData
->
maWinData
.
mpFirstFrame
;
pSVData
->
maWinData
.
mpFirstFrame
=
this
;
pSVData
->
maWinData
.
mpFirstFrame
=
this
;
mpWindowImpl
->
mpFrameData
->
mpFirstOverlap
=
NULL
;
mpWindowImpl
->
mpFrameData
->
mpFirstOverlap
=
NULL
;
...
...
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