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
9f53172a
Kaydet (Commit)
9f53172a
authored
Ock 22, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement loading Mnemonic Widgets via VclBuilder
Change-Id: I62677c1140e58fbf4f27750389200eca78c9ba7e
üst
9975c632
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
builder.hxx
vcl/inc/vcl/builder.hxx
+4
-0
builder.cxx
vcl/source/window/builder.cxx
+22
-0
No files found.
vcl/inc/vcl/builder.hxx
Dosyayı görüntüle @
9f53172a
...
@@ -98,6 +98,7 @@ private:
...
@@ -98,6 +98,7 @@ private:
typedef
StringPair
TextBufferMap
;
typedef
StringPair
TextBufferMap
;
typedef
StringPair
WidgetAdjustmentMap
;
typedef
StringPair
WidgetAdjustmentMap
;
typedef
StringPair
ButtonMenuMap
;
typedef
StringPair
ButtonMenuMap
;
typedef
StringPair
MnemonicWidgetMap
;
struct
ComboBoxModelMap
struct
ComboBoxModelMap
{
{
...
@@ -180,6 +181,8 @@ private:
...
@@ -180,6 +181,8 @@ private:
std
::
vector
<
SizeGroup
>
m_aSizeGroups
;
std
::
vector
<
SizeGroup
>
m_aSizeGroups
;
AtkMap
m_aAtkInfo
;
AtkMap
m_aAtkInfo
;
std
::
vector
<
MnemonicWidgetMap
>
m_aMnemonicWidgetMaps
;
};
};
void
loadTranslations
(
const
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
,
const
OUString
&
rUri
);
void
loadTranslations
(
const
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
,
const
OUString
&
rUri
);
...
@@ -262,6 +265,7 @@ private:
...
@@ -262,6 +265,7 @@ private:
bool
extractScrollAdjustment
(
const
OString
&
id
,
stringmap
&
rVec
);
bool
extractScrollAdjustment
(
const
OString
&
id
,
stringmap
&
rVec
);
bool
extractButtonImage
(
const
OString
&
id
,
stringmap
&
rMap
,
bool
bRadio
);
bool
extractButtonImage
(
const
OString
&
id
,
stringmap
&
rMap
,
bool
bRadio
);
bool
extractStock
(
const
OString
&
id
,
stringmap
&
rMap
);
bool
extractStock
(
const
OString
&
id
,
stringmap
&
rMap
);
void
extractMnemonicWidget
(
const
OString
&
id
,
stringmap
&
rMap
);
void
handleTranslations
(
xmlreader
::
XmlReader
&
reader
);
void
handleTranslations
(
xmlreader
::
XmlReader
&
reader
);
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
9f53172a
...
@@ -160,6 +160,17 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
...
@@ -160,6 +160,17 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
handleChild
(
pParent
,
reader
);
handleChild
(
pParent
,
reader
);
//Set Mnemonic widgets when everything has been imported
for
(
std
::
vector
<
MnemonicWidgetMap
>::
iterator
aI
=
m_pParserState
->
m_aMnemonicWidgetMaps
.
begin
(),
aEnd
=
m_pParserState
->
m_aMnemonicWidgetMaps
.
end
();
aI
!=
aEnd
;
++
aI
)
{
FixedText
*
pOne
=
get
<
FixedText
>
(
aI
->
m_sID
);
Window
*
pOther
=
get
<
Window
>
(
aI
->
m_sValue
);
SAL_WARN_IF
(
!
pOne
||
!
pOther
,
"vcl"
,
"missing member of Mnemonic Widget Mapping"
);
if
(
pOne
&&
pOther
)
pOne
->
set_mnemonic_widget
(
pOther
);
}
//Set a11y relations when everything has been imported
//Set a11y relations when everything has been imported
for
(
AtkMap
::
iterator
aI
=
m_pParserState
->
m_aAtkInfo
.
begin
(),
for
(
AtkMap
::
iterator
aI
=
m_pParserState
->
m_aAtkInfo
.
begin
(),
aEnd
=
m_pParserState
->
m_aAtkInfo
.
end
();
aI
!=
aEnd
;
++
aI
)
aEnd
=
m_pParserState
->
m_aAtkInfo
.
end
();
aI
!=
aEnd
;
++
aI
)
...
@@ -781,6 +792,16 @@ bool VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRa
...
@@ -781,6 +792,16 @@ bool VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRa
return
false
;
return
false
;
}
}
void
VclBuilder
::
extractMnemonicWidget
(
const
OString
&
id
,
stringmap
&
rMap
)
{
VclBuilder
::
stringmap
::
iterator
aFind
=
rMap
.
find
(
OString
(
"mnemonic-widget"
));
if
(
aFind
!=
rMap
.
end
())
{
m_pParserState
->
m_aMnemonicWidgetMaps
.
push_back
(
MnemonicWidgetMap
(
id
,
aFind
->
second
));
rMap
.
erase
(
aFind
);
}
}
Window
*
VclBuilder
::
prepareWidgetOwnScrolling
(
Window
*
pParent
,
WinBits
&
rWinStyle
)
Window
*
VclBuilder
::
prepareWidgetOwnScrolling
(
Window
*
pParent
,
WinBits
&
rWinStyle
)
{
{
//For Widgets that manage their own scrolling, if one appears as a child of
//For Widgets that manage their own scrolling, if one appears as a child of
...
@@ -1011,6 +1032,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
...
@@ -1011,6 +1032,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
}
else
if
(
name
==
"GtkLabel"
)
else
if
(
name
==
"GtkLabel"
)
{
{
extractMnemonicWidget
(
id
,
rMap
);
if
(
extractSelectable
(
rMap
))
if
(
extractSelectable
(
rMap
))
pWindow
=
new
SelectableFixedText
(
pParent
,
WB_CENTER
|
WB_VCENTER
|
WB_3DLOOK
);
pWindow
=
new
SelectableFixedText
(
pParent
,
WB_CENTER
|
WB_VCENTER
|
WB_3DLOOK
);
else
else
...
...
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