summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configmgr/source/components.cxx29
-rw-r--r--configmgr/source/components.hxx8
-rw-r--r--configmgr/source/update.cxx16
-rw-r--r--configmgr/source/xcdparser.cxx2
-rw-r--r--configmgr/source/xcuparser.cxx58
-rw-r--r--configmgr/source/xcuparser.hxx4
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Chart.xcs3
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs8
8 files changed, 79 insertions, 49 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 8553bc8bd88c..219a5210d0a0 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -84,22 +84,27 @@ struct UnresolvedListItem {
typedef std::list< UnresolvedListItem > UnresolvedList;
-void parseXcsFile(rtl::OUString const & url, int layer, Data * data)
+void parseXcsFile(rtl::OUString const & url, int layer, Data * data,
+ Modifications * modifications)
SAL_THROW((
css::container::NoSuchElementException, css::uno::RuntimeException))
{
+ OSL_ASSERT(modifications == 0); (void) modifications;
OSL_VERIFY(
rtl::Reference< ParseManager >(
new ParseManager(url, new XcsParser(layer, data)))->parse());
}
-void parseXcuFile(rtl::OUString const & url, int layer, Data * data)
+void parseXcuFile(
+ rtl::OUString const & url, int layer, Data * data,
+ Modifications * modifications)
SAL_THROW((
css::container::NoSuchElementException, css::uno::RuntimeException))
{
OSL_VERIFY(
rtl::Reference< ParseManager >(
- new ParseManager(url, new XcuParser(layer, data)))->parse());
+ new ParseManager(url, new XcuParser(layer, data, modifications)))->
+ parse());
}
rtl::OUString expand(rtl::OUString const & str) {
@@ -208,7 +213,7 @@ void Components::insertExtensionXcsFile(
bool shared, rtl::OUString const & fileUri)
{
try {
- parseXcsFile(fileUri, shared ? 9 : 13, &data_);
+ parseXcsFile(fileUri, shared ? 9 : 13, &data_, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -220,10 +225,11 @@ void Components::insertExtensionXcsFile(
}
void Components::insertExtensionXcuFile(
- bool shared, rtl::OUString const & fileUri)
+ bool shared, rtl::OUString const & fileUri, Modifications * modifications)
{
+ OSL_ASSERT(modifications != 0);
try {
- parseXcuFile(fileUri, shared ? 10 : 14, &data_);
+ parseXcuFile(fileUri, shared ? 10 : 14, &data_, modifications);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -391,7 +397,7 @@ Components::~Components() {}
void Components::parseFiles(
int layer, rtl::OUString const & extension,
- void (* parseFile)(rtl::OUString const &, int, Data *),
+ void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *),
rtl::OUString const & url, bool recursive)
{
osl::Directory dir(url);
@@ -441,7 +447,7 @@ void Components::parseFiles(
file.match(extension, file.getLength() - extension.getLength()))
{
try {
- (*parseFile)(stat.getFileURL(), layer, &data_);
+ (*parseFile)(stat.getFileURL(), layer, &data_, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -456,7 +462,8 @@ void Components::parseFiles(
}
void Components::parseFileList(
- int layer, void (* parseFile)(rtl::OUString const &, int, Data *),
+ int layer,
+ void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *),
rtl::OUString const & urls, rtl::Bootstrap const & ini)
{
for (sal_Int32 i = 0;;) {
@@ -464,7 +471,7 @@ void Components::parseFileList(
if (url.getLength() != 0) {
ini.expandMacrosFrom(url); //TODO: detect failure
try {
- (*parseFile)(url, layer, &data_);
+ (*parseFile)(url, layer, &data_, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
(rtl::OUString(
@@ -623,7 +630,7 @@ rtl::OUString Components::getModificationFileUrl() const {
void Components::parseModificationLayer() {
try {
- parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, &data_);
+ parseXcuFile(getModificationFileUrl(), Data::NO_LAYER, &data_, 0);
} catch (css::container::NoSuchElementException &) {
OSL_TRACE(
"configmgr user registrymodifications.xcu does not (yet) exist");
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index c37d44701d61..ad7c227a9bc6 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -94,7 +94,9 @@ public:
void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri);
- void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri);
+ void insertExtensionXcuFile(
+ bool shared, rtl::OUString const & fileUri,
+ Modifications * modifications);
com::sun::star::beans::Optional< com::sun::star::uno::Any >
getExternalValue(rtl::OUString const & descriptor);
@@ -108,12 +110,12 @@ private:
void parseFiles(
int layer, rtl::OUString const & extension,
- void (* parseFile)(rtl::OUString const &, int, Data *),
+ void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *),
rtl::OUString const & url, bool recursive);
void parseFileList(
int layer,
- void (* parseFile)(rtl::OUString const &, int, Data *),
+ void (* parseFile)(rtl::OUString const &, int, Data *, Modifications *),
rtl::OUString const & urls, rtl::Bootstrap const & ini);
void parseXcdFiles(int layer, rtl::OUString const & url);
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 52df4f25eca7..dafd8148b504 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -32,10 +32,14 @@
#include "configmgr/update.hxx"
#include "osl/mutex.hxx"
+#include "rtl/ref.hxx"
#include "rtl/ustring.hxx"
+#include "broadcaster.hxx"
#include "components.hxx"
#include "lock.hxx"
+#include "modifications.hxx"
+#include "rootaccess.hxx"
namespace configmgr {
@@ -47,8 +51,16 @@ void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri) {
}
void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) {
- osl::MutexGuard g(lock);
- Components::getSingleton().insertExtensionXcuFile(shared, fileUri);
+ Broadcaster bc;
+ {
+ osl::MutexGuard g(lock);
+ Modifications mods;
+ Components::getSingleton().insertExtensionXcuFile(
+ shared, fileUri, &mods);
+ Components::getSingleton().initGlobalBroadcaster(
+ mods, rtl::Reference< RootAccess >(), &bc);
+ }
+ bc.send();
}
}
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index 1acd81b2cbac..b72f8df33d7c 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -139,7 +139,7 @@ bool XcdParser::startElement(
if (ns == XmlReader::NAMESPACE_OOR &&
name.equals(RTL_CONSTASCII_STRINGPARAM("component-data")))
{
- nestedParser_ = new XcuParser(layer_ + 1, data_);
+ nestedParser_ = new XcuParser(layer_ + 1, data_, 0);
nesting_ = 1;
return nestedParser_->startElement(reader, ns, name);
}
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 948ebffcdaeb..13b61e0a4e68 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -67,8 +67,14 @@ namespace css = com::sun::star;
}
-XcuParser::XcuParser(int layer, Data * data): valueParser_(layer), data_(data)
-{}
+XcuParser::XcuParser(int layer, Data * data, Modifications * modifications):
+ valueParser_(layer), data_(data), modifications_(modifications)
+{
+ if (layer == Data::NO_LAYER) {
+ OSL_ASSERT(modifications_ == 0);
+ modifications_ = &data_->modifications;
+ }
+}
XcuParser::~XcuParser() {}
@@ -352,7 +358,7 @@ void XcuParser::handleComponentData(XmlReader & reader) {
node->getFinalized());
node->setFinalized(finalizedLayer);
state_.push(State(node, finalizedLayer < valueParser_.getLayer()));
- if (valueParser_.getLayer() == Data::NO_LAYER) {
+ if (modifications_ != 0) {
OSL_ASSERT(modificationPath_.empty());
modificationPath_.push_back(componentName_);
}
@@ -393,7 +399,7 @@ void XcuParser::handleItem(XmlReader & reader) {
}
OSL_ASSERT(!modificationPath_.empty());
componentName_ = modificationPath_.front();
- if (valueParser_.getLayer() != Data::NO_LAYER) {
+ if (modifications_ == 0) {
modificationPath_.clear();
}
state_.push(State(node, finalizedLayer < valueParser_.getLayer()));
@@ -564,9 +570,9 @@ void XcuParser::handleLocpropValue(
valueParser_.separator_ = separator;
valueParser_.start(locprop, name);
}
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
modificationPath_.pop_back();
}
break;
@@ -577,9 +583,9 @@ void XcuParser::handleLocpropValue(
locprop->getMembers().erase(i);
}
state_.push(State());
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
modificationPath_.pop_back();
}
break;
@@ -689,9 +695,9 @@ void XcuParser::handleUnknownGroupProp(
prop->setFinalized(valueParser_.getLayer());
}
state_.push(State(prop, name, state_.top().locked));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
}
}
break;
@@ -739,9 +745,9 @@ void XcuParser::handlePlainGroupProp(
property,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
}
break;
case OPERATION_REMOVE:
@@ -756,9 +762,9 @@ void XcuParser::handlePlainGroupProp(
}
group->getMembers().erase(propertyIndex);
state_.push(State()); // ignore children
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
modificationPath_.pop_back();
}
break;
@@ -796,7 +802,7 @@ void XcuParser::handleLocalizedGroupProp(
property,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
}
break;
@@ -812,9 +818,9 @@ void XcuParser::handleLocalizedGroupProp(
replacement, name,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
}
}
break;
@@ -889,7 +895,7 @@ void XcuParser::handleGroupNode(
State(
child,
state_.top().locked || finalizedLayer < valueParser_.getLayer()));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
}
}
@@ -996,7 +1002,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
i->second,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
}
}
@@ -1010,9 +1016,9 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
state_.push(State(member, name, false));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
}
}
break;
@@ -1027,9 +1033,9 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
state_.push(State(member, name, false));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
}
}
} else {
@@ -1038,7 +1044,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
i->second,
(state_.top().locked ||
finalizedLayer < valueParser_.getLayer())));
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
}
}
@@ -1053,9 +1059,9 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
set->getMembers().erase(i);
}
state_.push(State());
- if (!modificationPath_.empty()) {
+ if (modifications_ != 0) {
modificationPath_.push_back(name);
- data_->modifications.add(modificationPath_);
+ modifications_->add(modificationPath_);
modificationPath_.pop_back();
}
break;
diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx
index 169ce1deeda8..fb27d3573032 100644
--- a/configmgr/source/xcuparser.hxx
+++ b/configmgr/source/xcuparser.hxx
@@ -50,6 +50,7 @@ namespace configmgr {
class GroupNode;
class LocalizedPropertyNode;
+class Modifications;
class PropertyNode;
class SetNode;
struct Data;
@@ -57,7 +58,7 @@ struct Span;
class XcuParser: public Parser {
public:
- XcuParser(int layer, Data * data);
+ XcuParser(int layer, Data * data, Modifications * modifications);
private:
virtual ~XcuParser();
@@ -131,6 +132,7 @@ private:
ValueParser valueParser_;
Data * data_;
+ Modifications * modifications_;
rtl::OUString componentName_;
StateStack state_;
Path modificationPath_;
diff --git a/officecfg/registry/schema/org/openoffice/Office/Chart.xcs b/officecfg/registry/schema/org/openoffice/Office/Chart.xcs
index 5680a89f8a11..9c125b2f1a68 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Chart.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Chart.xcs
@@ -48,7 +48,8 @@
<desc>Specifies a list of color values to be used for the first n series, where n is the size of the list. For i &gt; n the color used is equal to entry number i modulo n in the list. You should keep the size of the list at 12. Also note that the values are interpreted as unsigned 32bit values, although it is possible to get negative (signed) numbers in this list when being displayed in decimal.</desc>
<label>Chart colors</label>
</info>
- <value>0x004586 0xff420e 0xffd320 0x579d1c 0x7e0021 0x83caff 0x314004 0xaecf00 0x4b1f6f 0xff950e 0xc5000b 0x0084d1</value>
+ <value>17798 16728590 16765728 5741852 8257569 8637183 3227652 11456256 4923247 16749838 12910603 34001</value>
+ <!-- 0x004586 0xff420e 0xffd320 0x579d1c 0x7e0021 0x83caff 0x314004 0xaecf00 0x4b1f6f 0xff950e 0xc5000b 0x0084d1 -->
</prop>
</group>
</component>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index cb22883eba09..33ac1c8adf7b 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -4810,22 +4810,22 @@
<label>Accept with</label>
</info>
<constraints>
- <enumeration oor:value="0x405">
+ <enumeration oor:value="1029"> <!-- 0x405 -->
<info>
<desc>KeyEnd</desc>
</info>
</enumeration>
- <enumeration oor:value="0x500">
+ <enumeration oor:value="1280"> <!-- 0x500 -->
<info>
<desc>KeyReturn</desc>
</info>
</enumeration>
- <enumeration oor:value="0x403">
+ <enumeration oor:value="1027"> <!-- 0x403 -->
<info>
<desc>KeyRight</desc>
</info>
</enumeration>
- <enumeration oor:value="0x504">
+ <enumeration oor:value="1284"> <!-- 0x504 -->
<info>
<desc>KeySpace</desc>
</info>