The patch simplifies two source files: cui/source/options/optgenrl.cxx and unotools/source/config/useroptions.cxx.<br>The problem was similar to the Tools -> Options -> Appearance (see <a href="https://bugs.freedesktop.org/show_bug.cgi?id=47957" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=47957</a> ).<br>
<br>Most important changes:<br><br>cui/source/options/optgenrl.cxx:<br>1.<br>SvxGeneralTabPage had 30 data members for the labels and the edit boxes.
 The member functions had lots of code to handle each item by name.<br>Now they are stored in an std::vector, and constructed dynamically. In the beginning of the file, there are two static arrays that contain information about the rows and the edit boxes. The member functions use loops to handle the items.<br>
2.<br>In the resource file (optgenrl.src), the size and position values were given in each control by #define-constants like "RIGHT- ( MID+2* ( NAMELEN-8+HSPACE 
)".<br>Now the position and size are calculated automatically. The static array in optgenrl.cxx contains relative widths of the fields in the same row (like 5:5:2).<br>3.<br>Some languages need 
different fields in some rows. For example, the "name" row in russian also contains a "Father's name" field. In the old code, the constructor manually 
resized/moved/hided/renamed the appropriate controls to meet the special needs of the special languages. Other member functions also had some complicated code to handle the different languages.<br>Now the language information is stored in the static arrays: some row has a flag "only russian", some has "anything except russian", and so on. Only those controls are contructed that are needed by the current 
language, so the language problem need to be handled only once.<br><br>In unotools/source/config/useroptions.cxx:<br>4.<br>There are 18 properties in SvtUserOptions like company, first name etc.<br>In the old code, all properties were handled by repeated long codes in exactly the same way (except a single identifier).<br>
Now the repeated long function bodies are removed, and the getters/setters (e.g. GetCompany(), GetStreet()) call two general functions: GetToken() and SetToken(). The differenct names are handled by a single array.<br>Note: the GetToken() and SetToken() functions are now used also in optgenrl.cxx to simplify that file too.<br>
5.<br>Manual reference counting was implemented in useroptions.cxx by global variables.<br>Now boost::shared_ptr is used.<br>6.<br>The implementation classes for SvtUserOptions were global classes: SvtUserOptions_Impl and SvtUserConfigChangeListener_Impl.<br>
Now they are private nested classes: SvtUserOptions::Impl and SvtUserOptions::ChangeListener.<br><br>I hope that these changes were useful.<br><br>Uray M. János<br><br>