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
7b45dfe0
Kaydet (Commit)
7b45dfe0
authored
Eki 25, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert Mnemonic markup automatically
Change-Id: I55b6bf11468ce958aea7c98894d3a76343b53a9a
üst
c7bac4da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
21 deletions
+37
-21
builder.cxx
vcl/source/window/builder.cxx
+1
-7
window2.cxx
vcl/source/window/window2.cxx
+36
-14
No files found.
vcl/source/window/builder.cxx
Dosyayı görüntüle @
7b45dfe0
...
...
@@ -1528,13 +1528,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
if
(
!
sProperty
.
isEmpty
())
{
sProperty
=
sProperty
.
replace
(
'_'
,
'-'
);
//replace '_' with '-' except for property values that
//refer to widget ids themselves. TO-DO, drop conversion
//and just use foo_bar properties throughout ?
if
(
sProperty
==
"group"
)
rMap
[
sProperty
]
=
sValue
;
else
rMap
[
sProperty
]
=
sValue
.
replace
(
'_'
,
'-'
);
rMap
[
sProperty
]
=
sValue
;
}
}
...
...
vcl/source/window/window2.cxx
Dosyayı görüntüle @
7b45dfe0
...
...
@@ -1284,22 +1284,22 @@ Window* Window::ImplGetTopmostFrameWindow()
return
pTopmostParent
->
mpWindowImpl
->
mpFrameWindow
;
}
void
Window
::
SetHelpId
(
const
rtl
::
OString
&
rHelpId
)
void
Window
::
SetHelpId
(
const
OString
&
rHelpId
)
{
mpWindowImpl
->
maHelpId
=
rHelpId
;
}
const
rtl
::
OString
&
Window
::
GetHelpId
()
const
const
OString
&
Window
::
GetHelpId
()
const
{
return
mpWindowImpl
->
maHelpId
;
}
void
Window
::
SetUniqueId
(
const
rtl
::
OString
&
rUniqueId
)
void
Window
::
SetUniqueId
(
const
OString
&
rUniqueId
)
{
mpWindowImpl
->
maUniqId
=
rUniqueId
;
}
const
rtl
::
OString
&
Window
::
GetUniqueId
()
const
const
OString
&
Window
::
GetUniqueId
()
const
{
return
mpWindowImpl
->
maUniqId
;
}
...
...
@@ -1938,7 +1938,7 @@ void Window::take_properties(Window &rOther)
namespace
{
VclAlign
toAlign
(
const
rtl
::
OString
&
rValue
)
VclAlign
toAlign
(
const
OString
&
rValue
)
{
VclAlign
eRet
=
VCL_ALIGN_FILL
;
...
...
@@ -1954,12 +1954,36 @@ namespace
}
}
bool
Window
::
set_property
(
const
rtl
::
OString
&
rKey
,
const
rtl
::
OString
&
rValue
)
namespace
{
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"label"
)))
SetText
(
rtl
::
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"title"
)))
SetText
(
rtl
::
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
OString
convertMnemonicMarkup
(
const
OString
&
rIn
)
{
OStringBuffer
aRet
(
rIn
);
for
(
sal_Int32
nI
=
0
;
nI
<
aRet
.
getLength
();
++
nI
)
{
if
(
aRet
[
nI
]
==
'_'
)
{
if
(
aRet
[
nI
+
1
]
!=
'_'
)
aRet
[
nI
]
=
'~'
;
else
aRet
.
remove
(
nI
,
1
);
++
nI
;
}
}
return
aRet
.
makeStringAndClear
();
}
}
bool
Window
::
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
)
{
if
(
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"label"
)))
||
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"title"
)))
||
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"text"
)))
)
{
SetText
(
OStringToOUString
(
convertMnemonicMarkup
(
rValue
),
RTL_TEXTENCODING_UTF8
));
}
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"visible"
)))
Show
(
toBool
(
rValue
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"sensitive"
)))
...
...
@@ -2010,8 +2034,6 @@ bool Window::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
nBits
|=
WB_WORDBREAK
;
SetStyle
(
nBits
);
}
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"text"
)))
SetText
(
rtl
::
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"height-request"
)))
set_height_request
(
rValue
.
toInt32
());
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"width-request"
)))
...
...
@@ -2025,9 +2047,9 @@ bool Window::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"valign"
)))
set_valign
(
toAlign
(
rValue
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"tooltip-markup"
)))
SetQuickHelpText
(
rtl
::
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
SetQuickHelpText
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"tooltip-text"
)))
SetQuickHelpText
(
rtl
::
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
SetQuickHelpText
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"border-width"
)))
set_border_width
(
rValue
.
toInt32
());
else
if
(
rKey
.
equalsL
(
RTL_CONSTASCII_STRINGPARAM
(
"margin-left"
)))
...
...
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