diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-19 17:26:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-19 18:17:05 +0100 |
commit | fab2a35de66230b799194b8dbbdc314b0cff296d (patch) | |
tree | 1d31f57bafa6b3e91e3df0ba4592025bfc8b2f35 /framework/source | |
parent | f02e6d3de7d26d4ac3fe6cfcb0d75aafeb5466d2 (diff) |
Access safe members directly
Change-Id: I048bc4ba4e1fc3c7b0dab55cc8e5818086cb70c7
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/xml/acceleratorconfigurationwriter.cxx | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/framework/source/xml/acceleratorconfigurationwriter.cxx b/framework/source/xml/acceleratorconfigurationwriter.cxx index 82f98c1a5bb6..c495c29053a9 100644 --- a/framework/source/xml/acceleratorconfigurationwriter.cxx +++ b/framework/source/xml/acceleratorconfigurationwriter.cxx @@ -20,7 +20,6 @@ #include <xml/acceleratorconfigurationwriter.hxx> #include <acceleratorconst.h> -#include <threadhelp/guard.hxx> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> @@ -38,8 +37,7 @@ namespace framework{ AcceleratorConfigurationWriter::AcceleratorConfigurationWriter(const AcceleratorCache& rContainer, const css::uno::Reference< css::xml::sax::XDocumentHandler >& xConfig ) - : ThreadHelpBase(&Application::GetSolarMutex()) - , m_xConfig (xConfig ) + : m_xConfig (xConfig ) , m_rContainer (rContainer ) { } @@ -52,15 +50,8 @@ AcceleratorConfigurationWriter::~AcceleratorConfigurationWriter() 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); - aReadLock.unlock(); - // <- SAFE ---------------------------------- - // prepare attribute list ::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); @@ -69,13 +60,13 @@ void AcceleratorConfigurationWriter::flush() pAttribs->AddAttribute(AL_XMLNS_XLINK, ATTRIBUTE_TYPE_CDATA, NS_XMLNS_XLINK); // generate xml - xCFG->startDocument(); + xExtendedCFG->startDocument(); xExtendedCFG->unknown(DOCTYPE_ACCELERATORS); - xCFG->ignorableWhitespace(OUString()); + xExtendedCFG->ignorableWhitespace(OUString()); - xCFG->startElement(AL_ELEMENT_ACCELERATORLIST, xAttribs); - xCFG->ignorableWhitespace(OUString()); + xExtendedCFG->startElement(AL_ELEMENT_ACCELERATORLIST, xAttribs); + xExtendedCFG->ignorableWhitespace(OUString()); // TODO think about threadsafe using of cache AcceleratorCache::TKeyList lKeys = m_rContainer.getAllKeys(); @@ -86,7 +77,7 @@ void AcceleratorConfigurationWriter::flush() { const css::awt::KeyEvent& rKey = *pKey; const OUString& rCommand = m_rContainer.getCommandByKey(rKey); - impl_ts_writeKeyCommandPair(rKey, rCommand, xCFG); + impl_ts_writeKeyCommandPair(rKey, rCommand, xExtendedCFG); } /* TODO write key-command list @@ -95,10 +86,10 @@ void AcceleratorConfigurationWriter::flush() WriteAcceleratorItem( *p ); */ - xCFG->ignorableWhitespace(OUString()); - xCFG->endElement(AL_ELEMENT_ACCELERATORLIST); - xCFG->ignorableWhitespace(OUString()); - xCFG->endDocument(); + xExtendedCFG->ignorableWhitespace(OUString()); + xExtendedCFG->endElement(AL_ELEMENT_ACCELERATORLIST); + xExtendedCFG->ignorableWhitespace(OUString()); + xExtendedCFG->endDocument(); } |