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
3a3b64a9
Kaydet (Commit)
3a3b64a9
authored
Nis 30, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
retain references to loaded modules for builders lifetime
Change-Id: Iab8b53dc50d69ba781978e1e7fd9b9c5a19c6d59
üst
1b14676b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
builder.hxx
include/vcl/builder.hxx
+7
-0
builder.cxx
vcl/source/window/builder.cxx
+14
-7
No files found.
include/vcl/builder.hxx
Dosyayı görüntüle @
3a3b64a9
...
...
@@ -11,6 +11,7 @@
#define _VCLBUILDER_HXX
#include <typeinfo>
#include <osl/module.hxx>
#include <tools/resmgr.hxx> //for poxy ResHookProc typedef
#include <vcl/dllapi.h>
#include <vcl/window.hxx>
...
...
@@ -19,6 +20,7 @@
#include <set>
#include <stack>
#include <vector>
#include <boost/ptr_container/ptr_map.hpp>
class
ListBox
;
class
NumericFormatter
;
...
...
@@ -34,6 +36,11 @@ public:
typedef
std
::
map
<
OString
,
OString
>
stringmap
;
typedef
Window
*
(
*
customMakeWidget
)(
Window
*
pParent
,
stringmap
&
rVec
);
private
:
typedef
boost
::
ptr_map
<
OUString
,
osl
::
Module
>
ModuleMap
;
//We store these until the builder is deleted, that way we can use the
//ui-previewer on custom widgets and guarantee the modules they are from
//exist for the duration of the dialog
ModuleMap
m_aModuleMap
;
struct
PackingData
{
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
3a3b64a9
...
...
@@ -1203,20 +1203,27 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
if
(
nDelim
!=
-
1
)
{
#ifndef DISABLE_DYNLOADING
OUStringBuffer
sModule
;
OUStringBuffer
sModule
Buf
;
#ifdef SAL_DLLPREFIX
sModule
.
append
(
SAL_DLLPREFIX
);
sModule
Buf
.
append
(
SAL_DLLPREFIX
);
#endif
sModule
.
append
(
OStringToOUString
(
name
.
copy
(
0
,
nDelim
),
RTL_TEXTENCODING_UTF8
));
sModule
Buf
.
append
(
OStringToOUString
(
name
.
copy
(
0
,
nDelim
),
RTL_TEXTENCODING_UTF8
));
#ifdef SAL_DLLEXTENSION
sModule
.
append
(
SAL_DLLEXTENSION
);
sModule
Buf
.
append
(
SAL_DLLEXTENSION
);
#endif
#endif
OUString
sFunction
(
OStringToOUString
(
OString
(
"make"
)
+
name
.
copy
(
nDelim
+
1
),
RTL_TEXTENCODING_UTF8
));
#ifndef DISABLE_DYNLOADING
osl
::
Module
aModule
;
aModule
.
loadRelative
(
&
thisModule
,
sModule
.
makeStringAndClear
());
customMakeWidget
pFunction
=
(
customMakeWidget
)
aModule
.
getFunctionSymbol
(
sFunction
);
OUString
sModule
=
sModuleBuf
.
makeStringAndClear
();
ModuleMap
::
iterator
aI
=
m_aModuleMap
.
find
(
sModule
);
osl
::
Module
*
pModule
=
NULL
;
if
(
aI
==
m_aModuleMap
.
end
())
{
pModule
=
new
osl
::
Module
;
pModule
->
loadRelative
(
&
thisModule
,
sModule
);
aI
=
m_aModuleMap
.
insert
(
sModule
,
pModule
).
first
;
}
customMakeWidget
pFunction
=
(
customMakeWidget
)
aI
->
second
->
getFunctionSymbol
(
sFunction
);
#else
customMakeWidget
pFunction
=
(
customMakeWidget
)
osl_getFunctionSymbol
((
oslModule
)
RTLD_DEFAULT
,
sFunction
.
pData
);
#endif
...
...
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