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
0d7eb3ed
Kaydet (Commit)
0d7eb3ed
authored
Nis 19, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Elide macros used once
Change-Id: I5d5c916c966c9e9f2c77c9655f3e8d13a7032117
üst
c977def4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
22 deletions
+11
-22
acceleratorconst.h
framework/inc/acceleratorconst.h
+0
-14
acceleratorconfigurationwriter.cxx
framework/source/xml/acceleratorconfigurationwriter.cxx
+11
-8
No files found.
framework/inc/acceleratorconst.h
Dosyayı görüntüle @
0d7eb3ed
...
...
@@ -30,20 +30,6 @@ namespace framework{
#define AL_ELEMENT_ACCELERATORLIST "accel:acceleratorlist"
#define AL_ELEMENT_ITEM "accel:item"
#define AL_XMLNS_ACCEL "xmlns:accel"
#define AL_XMLNS_XLINK "xmlns:xlink"
#define AL_ATTRIBUTE_URL "xlink:href"
#define AL_ATTRIBUTE_KEYCODE "accel:code"
#define AL_ATTRIBUTE_MOD_SHIFT "accel:shift"
#define AL_ATTRIBUTE_MOD_MOD1 "accel:mod1"
#define AL_ATTRIBUTE_MOD_MOD2 "accel:mod2"
#define AL_ATTRIBUTE_MOD_MOD3 "accel:mod3"
// same items with full qualified name space
#define NS_XMLNS_ACCEL "http://openoffice.org/2001/accel"
#define NS_XMLNS_XLINK "http://www.w3.org/1999/xlink"
}
// namespace framework
#endif // INCLUDED_FRAMEWORK_INC_ACCELERATORCONST_H
...
...
framework/source/xml/acceleratorconfigurationwriter.cxx
Dosyayı görüntüle @
0d7eb3ed
...
...
@@ -54,8 +54,11 @@ void AcceleratorConfigurationWriter::flush()
::
comphelper
::
AttributeList
*
pAttribs
=
new
::
comphelper
::
AttributeList
;
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XAttributeList
>
xAttribs
(
static_cast
<
css
::
xml
::
sax
::
XAttributeList
*
>
(
pAttribs
),
css
::
uno
::
UNO_QUERY
);
pAttribs
->
AddAttribute
(
AL_XMLNS_ACCEL
,
ATTRIBUTE_TYPE_CDATA
,
NS_XMLNS_ACCEL
);
pAttribs
->
AddAttribute
(
AL_XMLNS_XLINK
,
ATTRIBUTE_TYPE_CDATA
,
NS_XMLNS_XLINK
);
pAttribs
->
AddAttribute
(
"xmlns:accel"
,
ATTRIBUTE_TYPE_CDATA
,
"http://openoffice.org/2001/accel"
);
pAttribs
->
AddAttribute
(
"xmlns:xlink"
,
ATTRIBUTE_TYPE_CDATA
,
"http://www.w3.org/1999/xlink"
);
// generate xml
xExtendedCFG
->
startDocument
();
...
...
@@ -102,20 +105,20 @@ void AcceleratorConfigurationWriter::impl_ts_writeKeyCommandPair(const css::awt:
OUString
sKey
=
KeyMapping
::
get
().
mapCodeToIdentifier
(
aKey
.
KeyCode
);
// TODO check if key is empty!
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_KEYCODE
,
ATTRIBUTE_TYPE_CDATA
,
sKey
);
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_URL
,
ATTRIBUTE_TYPE_CDATA
,
sCommand
);
pAttribs
->
AddAttribute
(
"accel:code"
,
ATTRIBUTE_TYPE_CDATA
,
sKey
);
pAttribs
->
AddAttribute
(
"xlink:href"
,
ATTRIBUTE_TYPE_CDATA
,
sCommand
);
if
((
aKey
.
Modifiers
&
css
::
awt
::
KeyModifier
::
SHIFT
)
==
css
::
awt
::
KeyModifier
::
SHIFT
)
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_MOD_SHIFT
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
pAttribs
->
AddAttribute
(
"accel:shift"
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
if
((
aKey
.
Modifiers
&
css
::
awt
::
KeyModifier
::
MOD1
)
==
css
::
awt
::
KeyModifier
::
MOD1
)
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_MOD_MOD1
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
pAttribs
->
AddAttribute
(
"accel:mod1"
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
if
((
aKey
.
Modifiers
&
css
::
awt
::
KeyModifier
::
MOD2
)
==
css
::
awt
::
KeyModifier
::
MOD2
)
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_MOD_MOD2
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
pAttribs
->
AddAttribute
(
"accel:mod2"
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
if
((
aKey
.
Modifiers
&
css
::
awt
::
KeyModifier
::
MOD3
)
==
css
::
awt
::
KeyModifier
::
MOD3
)
pAttribs
->
AddAttribute
(
AL_ATTRIBUTE_MOD_MOD3
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
pAttribs
->
AddAttribute
(
"accel:mod3"
,
ATTRIBUTE_TYPE_CDATA
,
"true"
);
xConfig
->
ignorableWhitespace
(
OUString
());
xConfig
->
startElement
(
AL_ELEMENT_ITEM
,
xAttribs
);
...
...
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