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
fab2a35d
Kaydet (Commit)
fab2a35d
authored
Mar 19, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Access safe members directly
Change-Id: I048bc4ba4e1fc3c7b0dab55cc8e5818086cb70c7
üst
f02e6d3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
21 deletions
+11
-21
acceleratorconfigurationwriter.hxx
framework/inc/xml/acceleratorconfigurationwriter.hxx
+1
-2
acceleratorconfigurationwriter.cxx
framework/source/xml/acceleratorconfigurationwriter.cxx
+10
-19
No files found.
framework/inc/xml/acceleratorconfigurationwriter.hxx
Dosyayı görüntüle @
fab2a35d
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include <accelerators/acceleratorcache.hxx>
#include <accelerators/acceleratorcache.hxx>
#include <accelerators/keymapping.hxx>
#include <accelerators/keymapping.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <general.h>
#include <general.h>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
...
@@ -32,7 +31,7 @@
...
@@ -32,7 +31,7 @@
namespace
framework
{
namespace
framework
{
class
AcceleratorConfigurationWriter
:
private
ThreadHelpBase
class
AcceleratorConfigurationWriter
{
{
// member
// member
...
...
framework/source/xml/acceleratorconfigurationwriter.cxx
Dosyayı görüntüle @
fab2a35d
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include <xml/acceleratorconfigurationwriter.hxx>
#include <xml/acceleratorconfigurationwriter.hxx>
#include <acceleratorconst.h>
#include <acceleratorconst.h>
#include <threadhelp/guard.hxx>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
...
@@ -38,8 +37,7 @@ namespace framework{
...
@@ -38,8 +37,7 @@ namespace framework{
AcceleratorConfigurationWriter
::
AcceleratorConfigurationWriter
(
const
AcceleratorCache
&
rContainer
,
AcceleratorConfigurationWriter
::
AcceleratorConfigurationWriter
(
const
AcceleratorCache
&
rContainer
,
const
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XDocumentHandler
>&
xConfig
)
const
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XDocumentHandler
>&
xConfig
)
:
ThreadHelpBase
(
&
Application
::
GetSolarMutex
())
:
m_xConfig
(
xConfig
)
,
m_xConfig
(
xConfig
)
,
m_rContainer
(
rContainer
)
,
m_rContainer
(
rContainer
)
{
{
}
}
...
@@ -52,15 +50,8 @@ AcceleratorConfigurationWriter::~AcceleratorConfigurationWriter()
...
@@ -52,15 +50,8 @@ AcceleratorConfigurationWriter::~AcceleratorConfigurationWriter()
void
AcceleratorConfigurationWriter
::
flush
()
void
AcceleratorConfigurationWriter
::
flush
()
{
{
// SAFE -> ----------------------------------
Guard
aReadLock
(
m_aLock
);
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XDocumentHandler
>
xCFG
=
m_xConfig
;
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XExtendedDocumentHandler
>
xExtendedCFG
(
m_xConfig
,
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XExtendedDocumentHandler
>
xExtendedCFG
(
m_xConfig
,
css
::
uno
::
UNO_QUERY_THROW
);
aReadLock
.
unlock
();
// <- SAFE ----------------------------------
// prepare attribute list
// prepare attribute list
::
comphelper
::
AttributeList
*
pAttribs
=
new
::
comphelper
::
AttributeList
;
::
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
);
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XAttributeList
>
xAttribs
(
static_cast
<
css
::
xml
::
sax
::
XAttributeList
*
>
(
pAttribs
),
css
::
uno
::
UNO_QUERY
);
...
@@ -69,13 +60,13 @@ void AcceleratorConfigurationWriter::flush()
...
@@ -69,13 +60,13 @@ void AcceleratorConfigurationWriter::flush()
pAttribs
->
AddAttribute
(
AL_XMLNS_XLINK
,
ATTRIBUTE_TYPE_CDATA
,
NS_XMLNS_XLINK
);
pAttribs
->
AddAttribute
(
AL_XMLNS_XLINK
,
ATTRIBUTE_TYPE_CDATA
,
NS_XMLNS_XLINK
);
// generate xml
// generate xml
xCFG
->
startDocument
();
x
Extended
CFG
->
startDocument
();
xExtendedCFG
->
unknown
(
DOCTYPE_ACCELERATORS
);
xExtendedCFG
->
unknown
(
DOCTYPE_ACCELERATORS
);
xCFG
->
ignorableWhitespace
(
OUString
());
x
Extended
CFG
->
ignorableWhitespace
(
OUString
());
xCFG
->
startElement
(
AL_ELEMENT_ACCELERATORLIST
,
xAttribs
);
x
Extended
CFG
->
startElement
(
AL_ELEMENT_ACCELERATORLIST
,
xAttribs
);
xCFG
->
ignorableWhitespace
(
OUString
());
x
Extended
CFG
->
ignorableWhitespace
(
OUString
());
// TODO think about threadsafe using of cache
// TODO think about threadsafe using of cache
AcceleratorCache
::
TKeyList
lKeys
=
m_rContainer
.
getAllKeys
();
AcceleratorCache
::
TKeyList
lKeys
=
m_rContainer
.
getAllKeys
();
...
@@ -86,7 +77,7 @@ void AcceleratorConfigurationWriter::flush()
...
@@ -86,7 +77,7 @@ void AcceleratorConfigurationWriter::flush()
{
{
const
css
::
awt
::
KeyEvent
&
rKey
=
*
pKey
;
const
css
::
awt
::
KeyEvent
&
rKey
=
*
pKey
;
const
OUString
&
rCommand
=
m_rContainer
.
getCommandByKey
(
rKey
);
const
OUString
&
rCommand
=
m_rContainer
.
getCommandByKey
(
rKey
);
impl_ts_writeKeyCommandPair
(
rKey
,
rCommand
,
xCFG
);
impl_ts_writeKeyCommandPair
(
rKey
,
rCommand
,
x
Extended
CFG
);
}
}
/* TODO write key-command list
/* TODO write key-command list
...
@@ -95,10 +86,10 @@ void AcceleratorConfigurationWriter::flush()
...
@@ -95,10 +86,10 @@ void AcceleratorConfigurationWriter::flush()
WriteAcceleratorItem( *p );
WriteAcceleratorItem( *p );
*/
*/
xCFG
->
ignorableWhitespace
(
OUString
());
x
Extended
CFG
->
ignorableWhitespace
(
OUString
());
xCFG
->
endElement
(
AL_ELEMENT_ACCELERATORLIST
);
x
Extended
CFG
->
endElement
(
AL_ELEMENT_ACCELERATORLIST
);
xCFG
->
ignorableWhitespace
(
OUString
());
x
Extended
CFG
->
ignorableWhitespace
(
OUString
());
xCFG
->
endDocument
();
x
Extended
CFG
->
endDocument
();
}
}
...
...
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