1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir# 5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir# 7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# This file is part of OpenOffice.org. 10*cdf0e10cSrcweir# 11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir# 15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir# 26*cdf0e10cSrcweir#***********************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweirSource Overview 29*cdf0e10cSrcweir=============== 30*cdf0e10cSrcweir 31*cdf0e10cSrcweirconfigurationprovider.cxx 32*cdf0e10cSrcweirconfigurationregistry.cxx 33*cdf0e10cSrcweirdefaultprovider.cxx 34*cdf0e10cSrcweirservices.cxx 35*cdf0e10cSrcweir UNO service implementations. 36*cdf0e10cSrcweir 37*cdf0e10cSrcweiraccess.cxx 38*cdf0e10cSrcweirchildaccess.cxx 39*cdf0e10cSrcweirrootaccess.cxx 40*cdf0e10cSrcweir UNO objects passed to clients. 41*cdf0e10cSrcweir 42*cdf0e10cSrcweircomponents.cxx 43*cdf0e10cSrcweir Central singleton that aggregates all data (reads in the XML files, manages 44*cdf0e10cSrcweir modifications and global notifications). 45*cdf0e10cSrcweir 46*cdf0e10cSrcweirgroupnode.cxx 47*cdf0e10cSrcweirlocalizedpropertynode.cxx 48*cdf0e10cSrcweirlocalizedvaluenode.cxx 49*cdf0e10cSrcweirnode.cxx 50*cdf0e10cSrcweirpropertynode.cxx 51*cdf0e10cSrcweirsetnode.cxx 52*cdf0e10cSrcweir Internal representations of data nodes. 53*cdf0e10cSrcweir 54*cdf0e10cSrcweirparsemanager.cxx 55*cdf0e10cSrcweirparser.hxx 56*cdf0e10cSrcweirvalueparser.cxx 57*cdf0e10cSrcweirxcdparser.cxx 58*cdf0e10cSrcweirxcsparser.cxx 59*cdf0e10cSrcweirxcuparser.cxx 60*cdf0e10cSrcweirxmldata.cxx 61*cdf0e10cSrcweir XML file reading. 62*cdf0e10cSrcweir 63*cdf0e10cSrcweirmodifications.cxx 64*cdf0e10cSrcweirwritemodfile.cxx 65*cdf0e10cSrcweir Modification management. 66*cdf0e10cSrcweir 67*cdf0e10cSrcweirbroadcaster.cxx 68*cdf0e10cSrcweir Notification management. 69*cdf0e10cSrcweir 70*cdf0e10cSrcweiradditions.hxx 71*cdf0e10cSrcweirupdate.cxx 72*cdf0e10cSrcweir Extension manager interface. 73*cdf0e10cSrcweir 74*cdf0e10cSrcweirdata.cxx 75*cdf0e10cSrcweirlock.cxx 76*cdf0e10cSrcweirnodemap.cxx 77*cdf0e10cSrcweirpartial.cxx 78*cdf0e10cSrcweirpath.hxx 79*cdf0e10cSrcweirtype.cxx 80*cdf0e10cSrcweir Utilities. 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir 83*cdf0e10cSrcweirMandatory Set Members 84*cdf0e10cSrcweir===================== 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir- A set member can be marked as "mandatory," meaning that a member of that name 87*cdf0e10cSrcweirmust always be present in a set. 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir- The above definition implies that calling replaceByName on a mandatory set 90*cdf0e10cSrcweirmember is OK. 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir- The XCU format can contain oor:mandatory attributes on nodes. (The XCS format 93*cdf0e10cSrcweirdoes not support them. In the registrymodifications file, oor:mandatory 94*cdf0e10cSrcweirattributes should never be needed, as being mandatory cannot be controlled via 95*cdf0e10cSrcweirthe UNO API.) The XCU reading code only evaluates the oor:mandatory attribute 96*cdf0e10cSrcweirfor set members, and ignores it everywhere else. 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir- Only true sets support mandatory members. A localized property for the "*" 99*cdf0e10cSrcweirlocale, though acting much like a set, does not support mandatory members. 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir- The OpenOffice.org Registry Format document claims that group extension 102*cdf0e10cSrcweirproperties are implicitly mandatory, but at least the new configmgr code does 103*cdf0e10cSrcweirnot treat them like that (i.e., they can be removed again). 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir- For simplicity, setMandatory/getMandatory are available as virtual functions 106*cdf0e10cSrcweirat the base Node, even though they can only make sense for GroupNodes and 107*cdf0e10cSrcweirSetNodes that are set members. The default getMandatory implementation returns 108*cdf0e10cSrcweirNO_LAYER, meaning oor:mandatory is not set to true in any layer. (Returning 109*cdf0e10cSrcweirNO_LAYER simplifies the code, e.g., removeByName does not have to check whether 110*cdf0e10cSrcweirgetMandatory is called on a member of a true set to decide whether to forbid 111*cdf0e10cSrcweirremoval.) 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir- When committing changes (made through the UNO API), the "mandatory" status of 114*cdf0e10cSrcweirinserted nodes must be updated (in case the insert is due to a replaceByName, or 115*cdf0e10cSrcweirthe "mandatory" flag was added by a concurrent modification of a lower layer). 116*cdf0e10cSrcweirAlso, for to-be-removed nodes, removal is ignored for (newly; due to concurrent 117*cdf0e10cSrcweirmodification of a lower layer) mandatory nodes (but still recorded in 118*cdf0e10cSrcweirregistrymodifications, so may take effect once the lower layer addition is 119*cdf0e10cSrcweirremoved again---whether or not that is a good idea). 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir 122*cdf0e10cSrcweirXcuParser Modification Recording 123*cdf0e10cSrcweir================================ 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir- XcuParser records modifications when reading user layer data 126*cdf0e10cSrcweir(valueParser_.getLayer() == Data::NO_LAYER). 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir- oor:finalized and oor:mandatory attributes cannot be set via the UNO API, so 129*cdf0e10cSrcweirit is assumed that user layer data does not contain them (for one, they are not 130*cdf0e10cSrcweirwritten by writeModFile; for another, the logic to record modifications expects 131*cdf0e10cSrcweira locprop(modify,fuse) to be followed by one or more value(fuse,remove), which 132*cdf0e10cSrcweirwould not necessarily be true if the locprop were only present in the user layer 133*cdf0e10cSrcweirdata to flag it as finalized). 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir- The logic to record modifications considers the top of the XML element stack. 136*cdf0e10cSrcweirIn the following list of all possible cases, items marked with an asterisk are 137*cdf0e10cSrcweirrecorded: 138*cdf0e10cSrcweir ... group(modify,fuse) - group(modify,fuse) - ... 139*cdf0e10cSrcweir ... group(modify,fuse) - set(modify,fuse) - ... 140*cdf0e10cSrcweir ... group(modify,fuse) - *prop(modify,fuse,replace) - value(fuse) 141*cdf0e10cSrcweir ... group(modify,fuse) - *prop(remove) 142*cdf0e10cSrcweir ... group(modify,fuse) - locprop(modify,fuse) - *value(fuse) 143*cdf0e10cSrcweir ... group(modify,fuse) - locprop(modify,fuse) - *value(remove) 144*cdf0e10cSrcweir ... group(modify,fuse) - *locprop(replace) ... 145*cdf0e10cSrcweir ... set(modify,fuse,replace) - group(modify/fuse) - ... 146*cdf0e10cSrcweir ... set(modify,fuse,replace) - *group(replace/fuse) - ... 147*cdf0e10cSrcweir ... set(modify,fuse,replace) - *group(remove) 148*cdf0e10cSrcweir ... set(modify,fuse,replace) - set(modify/fuse) - ... 149*cdf0e10cSrcweir ... set(modify,fuse,replace) - *set(replace/fuse) - ... 150*cdf0e10cSrcweir ... set(modify,fuse,replace) - *set(remove) 151*cdf0e10cSrcweirLegend: "...": zero or more further items 152*cdf0e10cSrcweir "- ...": one or more further items 153*cdf0e10cSrcweir "modify,fuse" etc.: any of those operations 154*cdf0e10cSrcweir "modify/fuse": a modify or a fuse on an existing member 155*cdf0e10cSrcweir "replace/fuse": a replace or a fuse on a non-existing member 156