Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


The patch simplifies two source files: cui/source/options/optgenrl.cxx and
unotools/source/config/useroptions.cxx.
The problem was similar to the Tools -> Options -> Appearance (see
https://bugs.freedesktop.org/show_bug.cgi?id=47957 ).

Most important changes:

cui/source/options/optgenrl.cxx:
1.
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.
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.
2.
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 )".
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).
3.
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.
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.

In unotools/source/config/useroptions.cxx:
4.
There are 18 properties in SvtUserOptions like company, first name etc.
In the old code, all properties were handled by repeated long codes in
exactly the same way (except a single identifier).
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.
Note: the GetToken() and SetToken() functions are now used also in
optgenrl.cxx to simplify that file too.
5.
Manual reference counting was implemented in useroptions.cxx by global
variables.
Now boost::shared_ptr is used.
6.
The implementation classes for SvtUserOptions were global classes:
SvtUserOptions_Impl and SvtUserConfigChangeListener_Impl.
Now they are private nested classes: SvtUserOptions::Impl and
SvtUserOptions::ChangeListener.

I hope that these changes were useful.

Uray M. János
From e0c8d8390128d0317ec4cc03a23f72260758aa75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Uray=20M.=20J=C3=A1nos"?= <uray.janos@gmail.com>
Date: Thu, 26 Jul 2012 19:18:51 +0200
Subject: [PATCH] Cleanup in Tools > Options > User Data

Change-Id: If89f19e22b6efeb0fdd811ff8afe2cb6c0b0bf4e
---
 cui/source/inc/cuioptgenrl.hxx         |   87 +--
 cui/source/options/optgenrl.cxx        |  772 +++++++++----------
 cui/source/options/optgenrl.hrc        |   23 +-
 cui/source/options/optgenrl.src        |   76 +--
 unotools/inc/unotools/useroptions.hxx  |  102 ++--
 unotools/source/config/useroptions.cxx | 1350 +++++---------------------------
 6 files changed, 672 insertions(+), 1738 deletions(-)

diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index e6e3803..4c54f88 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -16,42 +16,23 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SVX_CUIOPTGENRL_HXX
-#define _SVX_CUIOPTGENRL_HXX
+#ifndef SVX_CUIOPTGENRL_HXX
+#define SVX_CUIOPTGENRL_HXX
 
 // include ---------------------------------------------------------------
 
 #include <svx/optgenrl.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <vcl/fixed.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/group.hxx>
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
 
 // forward ---------------------------------------------------------------
 
-struct GeneralTabPage_Impl;
+class Edit;
 
 #define SfxGeneralTabPage   SvxGeneralTabPage
-#define INDEX_NOTSET        ((sal_Int16)-1)
-
-// class SvxUserEdit -----------------------------------------------------
-
-class SvxUserEdit : public Edit
-{
-private:
-    sal_Int16   m_nIndex;
-    FixedText*  m_pLabel;
-
-public:
-    SvxUserEdit( Window* pParent, const ResId& rResId,
-                 sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) :
-        Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {}
-
-    inline void         SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; }
-    inline sal_Int16    GetIndex() const { return m_nIndex; }
-    inline void         SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; }
-    inline FixedText*   GetLabel() const { return m_pLabel; }
-};
 
 // class SvxGeneralTabPage -----------------------------------------------
 
@@ -59,62 +40,44 @@ class SvxGeneralTabPage : public SfxTabPage
 {
     using TabPage::DeactivatePage;
 private:
+    // the horizontal line "Address"
     FixedLine           aAddrFrm;
-    FixedText           aCompanyLbl;
-    SvxUserEdit         aCompanyEdit;
-    FixedText           aNameLbl;
-    FixedText           aNameLblRuss;
-    FixedText           aNameLblEastern;
-    SvxUserEdit         aFirstName;
-    SvxUserEdit         aFatherName;
-    SvxUserEdit         aName;
-    SvxUserEdit         aShortName;
-    FixedText           aStreetLbl;
-    FixedText           aStreetLblRuss;
-    SvxUserEdit         aStreetEdit;
-    SvxUserEdit         aApartmentNrEdit;
-    FixedText           aCityLbl;
-    SvxUserEdit         aPLZEdit;
-    SvxUserEdit         aCityEdit;
-    SvxUserEdit         aUsCityEdit;
-    SvxUserEdit         aUsStateEdit;
-    SvxUserEdit         aUsZipEdit;
-    FixedText           aCountryLbl;
-    SvxUserEdit         aCountryEdit;
-    FixedText           aTitlePosLbl;
-    SvxUserEdit         aTitleEdit;
-    SvxUserEdit         aPositionEdit;
-    FixedText           aPhoneLbl;
-    SvxUserEdit         aTelPrivEdit;
-    SvxUserEdit         aTelCompanyEdit;
-    FixedText           aFaxMailLbl;
-    SvxUserEdit         aFaxEdit;
-    SvxUserEdit         aEmailEdit;
+    // the "Use data for document properties" checkbox (but where is it?)
     CheckBox            aUseDataCB;
+    // rows
+    class Row;
+    std::vector<boost::shared_ptr<Row> > vRows;
+    // fields
+    class Field;
+    std::vector<boost::shared_ptr<Field> > vFields;
+    // "name" fields
+    unsigned nNameRow;
+    unsigned nShortNameField;
 
-    GeneralTabPage_Impl*    pImpl;
-
-#ifdef _SVX_OPTGENRL_CXX
     DECL_LINK( ModifyHdl_Impl, Edit * );
 
     sal_Bool            GetAddress_Impl();
     void                SetAddress_Impl();
-#endif
+
+    void CreateControls ();
+    void PositionControls ();
+    void SetLinks ();
+    void SetAccessibleNames ();
 
 protected:
     virtual int         DeactivatePage( SfxItemSet* pSet );
 
 public:
     SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
-    ~SvxGeneralTabPage();
+    ~SvxGeneralTabPage ();
 
     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rAttrSet );
 
-    virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
+    virtual sal_Bool    FillItemSet( SfxItemSet& rSet );
     virtual void        Reset( const SfxItemSet& rSet );
 };
 
-#endif // #ifndef _SVX_CUIOPTGENRL_HXX
+#endif // #ifndef SVX_CUIOPTGENRL_HXX
 
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 6645a2e..e8d031d 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -33,8 +33,9 @@
 #include <vcl/msgbox.hxx>
 #include <unotools/saveopt.hxx>
 #include <svl/intitem.hxx>
+#include <vcl/edit.hxx>
 
-#define _SVX_OPTGENRL_CXX
+#define SVX_OPTGENRL_CXX
 
 #include <cuires.hrc>
 #include "optgenrl.hrc"
@@ -42,29 +43,173 @@
 #include "cuioptgenrl.hxx"
 #include <dialmgr.hxx>
 #include <svx/dlgutil.hxx>
-#include <svx/strarray.hxx>
 #include <svx/svxids.hrc> // SID_FIELD_GRABFOCUS
 
-#define TRIM(s) comphelper::string::strip(s, ' ')
+#include <boost/make_shared.hpp>
 
-// struct GeneralTabPage_Impl --------------------------------------------
+namespace
+{
+
+// rows
+enum RowType
+{
+    Row_Company,
+    Row_Name,
+    Row_Name_Russian,
+    Row_Name_Eastern,
+    Row_Street,
+    Row_Street_Russian,
+    Row_City,
+    Row_City_US,
+    Row_Country,
+    Row_TitlePos,
+    Row_Phone,
+    Row_FaxMail,
+
+    nRowCount
+};
+
+// language flags
+namespace Lang
+{
+    unsigned const Others = 1;
+    unsigned const Russian = 2;
+    unsigned const Eastern = 4;
+    unsigned const US = 8;
+    unsigned const All = -1;
+}
+
+//
+// vRowInfo[] -- rows (text + one or more edit boxes)
+// The order is the same as in RowType above, which is up to down.
+//
+struct
+{
+    // id of the text
+    int nTextId;
+    // language flags (see Lang above):
+    // which language is this row for?
+    unsigned nLangFlags;
+}
+const vRowInfo[] =
+{
+    { FT_COMPANY,      Lang::All },
+    { FT_NAME,         Lang::All & ~Lang::Russian & ~Lang::Eastern },
+    { FT_NAME_RUSS,    Lang::Russian },
+    { FT_NAME_EASTERN, Lang::Eastern },
+    { FT_STREET,       Lang::All & ~Lang::Russian },
+    { FT_STREET_RUSS,  Lang::Russian },
+    { FT_CITY,         Lang::All & ~Lang::US },
+    { FT_CITY_US,      Lang::US },
+    { FT_COUNTRY,      Lang::All },
+    { FT_TITLEPOS,     Lang::All },
+    { FT_PHONE,        Lang::All },
+    { FT_FAXMAIL,      Lang::All },
+};
 
-struct GeneralTabPage_Impl
+//
+// vFieldInfo[] -- edit boxes
+// The order is up to down, and then left to right.
+//
+struct
 {
-    sal_Bool    mbStreetEnabled;
-    sal_Bool    mbPLZEnabled;
-    sal_Bool    mbCityEnabled;
-    sal_Bool    mbUsCityEnabled;
-    sal_Bool    mbUsZipEnabled;
+    // in which row?
+    RowType eRow;
+    // id of the edit box
+    int nEditId;
+    // relative width
+    // The actual width is calculated from the relative width to fill
+    // the entire row. See PositionControls() below.
+    float fRelativeWidth;
+    // id for SvtUserOptions in unotools/useroptions.hxx
+    int nUserOptionsId;
+    // id for settings the focus (defined in svx/optgenrl.hxx)
+    int nGrabFocusId;
+}
+const vFieldInfo[] =
+{
+    // Company
+    { Row_Company,  ED_COMPANY, 1,  USER_OPT_COMPANY,  COMPANY_EDIT },
+    // Name
+    { Row_Name,         ED_FIRSTNAME,  5,  USER_OPT_FIRSTNAME, FIRSTNAME_EDIT },
+    { Row_Name,         ED_NAME,       5,  USER_OPT_LASTNAME,  LASTNAME_EDIT  },
+    { Row_Name,         ED_SHORTNAME,  2,  USER_OPT_ID,        SHORTNAME_EDIT },
+    // Name (russian)
+    { Row_Name_Russian, ED_NAME,       5,  USER_OPT_LASTNAME,  LASTNAME_EDIT  },
+    { Row_Name_Russian, ED_FIRSTNAME,  5,  USER_OPT_FIRSTNAME, FIRSTNAME_EDIT },
+    { Row_Name_Russian, ED_FATHERNAME, 5,  USER_OPT_FATHERSNAME, 0 },
+    { Row_Name_Russian, ED_SHORTNAME,  2,  USER_OPT_ID,        SHORTNAME_EDIT },
+    // Name (eastern: reversed name order)
+    { Row_Name_Eastern, ED_NAME,       5,  USER_OPT_LASTNAME,  LASTNAME_EDIT  },
+    { Row_Name_Eastern, ED_FIRSTNAME,  5,  USER_OPT_FIRSTNAME, FIRSTNAME_EDIT },
+    { Row_Name_Eastern, ED_SHORTNAME,  2,  USER_OPT_ID,        SHORTNAME_EDIT },
+    // Street
+    { Row_Street,          ED_STREET,      1,  USER_OPT_STREET, STREET_EDIT },
+    // Street (russian)
+    { Row_Street_Russian,  ED_STREET,      8,  USER_OPT_STREET, STREET_EDIT },
+    { Row_Street_Russian,  ED_APARTMENTNR, 1,  USER_OPT_APARTMENT, 0 },
+    // City
+    { Row_City,     ED_PLZ,        1,  USER_OPT_ZIP,   PLZ_EDIT },
+    { Row_City,     ED_CITY,       5,  USER_OPT_CITY,  CITY_EDIT },
+    // City (US)
+    { Row_City_US,  ED_US_CITY,   15,  USER_OPT_CITY,  CITY_EDIT },
+    { Row_City_US,  ED_US_STATE,   5,  USER_OPT_STATE, STATE_EDIT },
+    { Row_City_US,  ED_US_ZIPCODE, 4,  USER_OPT_ZIP,   PLZ_EDIT },
+    // Country
+    { Row_Country,  ED_COUNTRY,    1,  USER_OPT_COUNTRY, COUNTRY_EDIT },
+    // Title/Position
+    { Row_TitlePos, ED_TITLE,      1,  USER_OPT_TITLE,    TITLE_EDIT },
+    { Row_TitlePos, ED_POSITION,   1,  USER_OPT_POSITION, POSITION_EDIT },
+    // Phone
+    { Row_Phone,    ED_TELPRIVAT,  1,  USER_OPT_TELEPHONEHOME, TELPRIV_EDIT },
+    { Row_Phone,    ED_TELCOMPANY, 1,  USER_OPT_TELEPHONEWORK, TELCOMPANY_EDIT },
+    // Fax/Mail
+    { Row_FaxMail,  ED_FAX,        1,  USER_OPT_FAX,   FAX_EDIT },
+    { Row_FaxMail,  ED_EMAIL,      1,  USER_OPT_EMAIL, EMAIL_EDIT },
+};
+
+
+} // namespace
+
+// -----------------------------------------------------------------------
+
+//
+// Row
+//
+struct SvxGeneralTabPage::Row
+{
+    // which row is it?
+    RowType eRow;
+    // row label
+    FixedText aLabel;
+    // first and last field in the row (last is exclusive)
+    unsigned nFirstField, nLastField;
+
+public:
+    Row (Window& rParent, int nResId, RowType eRow_) :
+        eRow(eRow_),
+        aLabel(&rParent, CUI_RES(nResId), true),
+        nFirstField(0), nLastField(0)
+    { }
+};
+
+// -----------------------------------------------------------------------
 
-    String  maQueryStr;
+//
+// Field
+//
+struct SvxGeneralTabPage::Field
+{
+    // which field is this? (in vFieldInfo[] above)
+    unsigned iField;
+    // edit box
+    Edit aEdit;
 
-    GeneralTabPage_Impl() :
-        mbStreetEnabled ( sal_False ),
-        mbPLZEnabled    ( sal_False ),
-        mbCityEnabled   ( sal_False ),
-        mbUsCityEnabled ( sal_False ),
-        mbUsZipEnabled  ( sal_False ) {}
+public:
+    Field (Window& rParent, int nResId, unsigned iField_) :
+        iField(iField_),
+        aEdit(&rParent, CUI_RES(nResId), true)
+    { }
 };
 
 // -----------------------------------------------------------------------
@@ -74,160 +219,176 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& 
rCoreSe
     SfxTabPage( pParent, CUI_RES(RID_SFXPAGE_GENERAL), rCoreSet ),
 
     aAddrFrm        ( this, CUI_RES( GB_ADDRESS ) ),
-    aCompanyLbl     ( this, CUI_RES( FT_COMPANY ), true ),
-    aCompanyEdit    ( this, CUI_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ),
-    aNameLbl        ( this, CUI_RES( FT_NAME ), true ),
-    aNameLblRuss    ( this, CUI_RES( FT_NAME_RUSS ), true ),
-    aNameLblEastern ( this, CUI_RES( FT_NAME_EASTERN ), true ),
-    aFirstName      ( this, CUI_RES( ED_FIRSTNAME ), 0, &aNameLbl ),
-    aFatherName     ( this, CUI_RES( ED_FATHERNAME ) ),
-    aName           ( this, CUI_RES( ED_NAME ), 1, &aNameLbl ),
-    aShortName      ( this, CUI_RES( ED_SHORTNAME ), 2, &aNameLbl ),
-    aStreetLbl      ( this, CUI_RES( FT_STREET ), true ),
-    aStreetLblRuss  ( this, CUI_RES( FT_STREET_RUSS ), true ),
-    aStreetEdit     ( this, CUI_RES( ED_STREET ), 0, &aStreetLbl ),
-    aApartmentNrEdit( this, CUI_RES( ED_APARTMENTNR ), 1, &aStreetLblRuss ),
-    aCityLbl        ( this, CUI_RES( FT_CITY ), true ),
-    aPLZEdit        ( this, CUI_RES( ED_PLZ ), 0, &aCityLbl ),
-    aCityEdit       ( this, CUI_RES( ED_CITY ), 1, &aCityLbl ),
-    aUsCityEdit     ( this, CUI_RES( ED_US_CITY ), 0, &aCityLbl ),
-    aUsStateEdit    ( this, CUI_RES( ED_US_STATE ), 1, &aCityLbl ),
-    aUsZipEdit      ( this, CUI_RES( ED_US_ZIPCODE ), 2, &aCityLbl ),
-    aCountryLbl     ( this, CUI_RES( FT_COUNTRY ), true ),
-    aCountryEdit    ( this, CUI_RES( ED_COUNTRY ), INDEX_NOTSET, &aCountryLbl ),
-    aTitlePosLbl    ( this, CUI_RES( FT_TITLEPOS ), true ),
-    aTitleEdit      ( this, CUI_RES( ED_TITLE ), 0, &aTitlePosLbl ),
-    aPositionEdit   ( this, CUI_RES( ED_POSITION ), 1, &aTitlePosLbl ),
-    aPhoneLbl       ( this, CUI_RES( FT_PHONE ), true ),
-    aTelPrivEdit    ( this, CUI_RES( ED_TELPRIVAT ), 0, &aPhoneLbl ),
-    aTelCompanyEdit ( this, CUI_RES( ED_TELCOMPANY ), 1, &aPhoneLbl ),
-    aFaxMailLbl     ( this, CUI_RES( FT_FAXMAIL ), true ),
-    aFaxEdit        ( this, CUI_RES( ED_FAX ), 0, &aFaxMailLbl ),
-    aEmailEdit      ( this, CUI_RES( ED_EMAIL ), 1, &aFaxMailLbl ),
-    aUseDataCB      ( this, CUI_RES( CB_USEDATA ) ),
-    pImpl           ( new GeneralTabPage_Impl )
-
+    aUseDataCB      ( this, CUI_RES( CB_USEDATA ) )
 {
-    LanguageType eLang = Application::GetSettings().GetUILanguage();
-    pImpl->maQueryStr = String( CUI_RES( STR_QUERY_REG ) );
+    CreateControls();
+    PositionControls();
+    SetExchangeSupport(); // this page needs ExchangeSupport
+    SetLinks();
+    SetAccessibleNames();
+}
 
-    if ( LANGUAGE_ENGLISH_US == eLang )
-    {
-        // construct American post/mail address
-        aPLZEdit.Hide();
-        aCityEdit.Hide();
-        aCityLbl.SetText( CUI_RES( STR_US_STATE ) );
-    }
-    else if ( LANGUAGE_RUSSIAN == eLang )
-    {
-        aUsCityEdit.Hide();
-        aUsStateEdit.Hide();
-        aUsZipEdit.Hide();
-        aNameLbl.Hide();
-        aNameLblRuss.Show();
-        aStreetLbl.Hide();
-        aStreetLblRuss.Show();
-        aFatherName.Show();
-        aName.SetIndex( 0 );
-        aName.SetLabel( &aNameLblRuss );
-        aFirstName.SetIndex( 1 );
-        aFirstName.SetLabel( &aNameLblRuss );
-        aFatherName.SetIndex( 2 );
-        aFatherName.SetLabel( &aNameLblRuss );
-        aShortName.SetIndex( 3 );
-        aShortName.SetLabel( &aNameLblRuss );
+//------------------------------------------------------------------------
 
-        Point aEditPoint = LogicToPixel( Point( MID, LINE(1) ), MAP_APPFONT );
-        Point aRightPoint = LogicToPixel( Point( RIGHT, LINE(1) ), MAP_APPFONT );
-        Size aEditSize = LogicToPixel( Size( 42, 12 ), MAP_APPFONT );
-        Size a2Size = LogicToPixel( Size( 2, 2 ), MAP_APPFONT );
-        long nDelta = aEditSize.Width() + a2Size.Width();
-        aName.SetPosSizePixel( aEditPoint, aEditSize );
-        aEditPoint.X() = aEditPoint.X() + nDelta;
-        aFirstName.SetPosSizePixel( aEditPoint, aEditSize );
-        aEditPoint.X() = aEditPoint.X() + nDelta;
-        aFatherName.SetPosSizePixel( aEditPoint, aEditSize );
-        aEditPoint.X() = aEditPoint.X() + nDelta;
-        aEditSize.Width() = aRightPoint.X() - aEditPoint.X();
-        aShortName.SetPosSizePixel( aEditPoint, aEditSize );
+SvxGeneralTabPage::~SvxGeneralTabPage ()
+{ }
 
-        Size aStreetSize = aStreetEdit.GetSizePixel();
-        aStreetSize.Width() = aStreetSize.Width() - aEditSize.Width() - a2Size.Width();
-        aStreetEdit.SetSizePixel( aStreetSize );
-        aApartmentNrEdit.Show();
-        Point aApartmentPoint = LogicToPixel( Point( MID, LINE(2) ), MAP_APPFONT );
-        aApartmentPoint.X() = aEditPoint.X();
-        aApartmentNrEdit.SetPosSizePixel( aApartmentPoint, aEditSize );
+//------------------------------------------------------------------------
 
-        aName.SetZOrder( &aNameLblRuss, WINDOW_ZORDER_BEHIND );
-        aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
-        aFatherName.SetZOrder( &aFirstName, WINDOW_ZORDER_BEHIND );
-    }
-    else if (MsLangId::isFamilyNameFirst(eLang))
+// Creates and initializes the titles and the edit boxes,
+// according to vRowInfo[] and vFieldInfo[] above.
+void SvxGeneralTabPage::CreateControls ()
+{
+    // which language bit do we use? (see Lang and vRowInfo[] above)
+    unsigned LangBit;
+    switch (LanguageType const eLang = Application::GetSettings().GetUILanguage())
     {
-        aUsCityEdit.Hide();
-        aUsStateEdit.Hide();
-        aUsZipEdit.Hide();
-        aNameLbl.Hide();
-        aNameLblEastern.Show();
-
-        // swap "first name" field and "last name" field
-        Point aPosTmp = aFirstName.GetPosPixel();
-        aFirstName.SetPosPixel( aName.GetPosPixel() );
-        aName.SetPosPixel( aPosTmp );
-        aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND );
+        case LANGUAGE_ENGLISH_US:
+            LangBit = Lang::US;
+            break;
+        case LANGUAGE_RUSSIAN:
+            LangBit = Lang::Russian;
+            break;
+        default:
+            if (MsLangId::isFamilyNameFirst(eLang))
+                LangBit = Lang::Eastern;
+            else
+                LangBit = Lang::Others;
+            break;
     }
-    else
+
+    // creating rows
+    unsigned iField = 0;
+    for (unsigned iRow = 0; iRow != nRowCount; ++iRow)
     {
-        aUsCityEdit.Hide();
-        aUsStateEdit.Hide();
-        aUsZipEdit.Hide();
+        RowType const eRow = static_cast<RowType>(iRow);
+        // is the row visible?
+        if (!(vRowInfo[iRow].nLangFlags & LangBit))
+            continue;
+        // creating row
+        vRows.push_back(boost::make_shared<Row>(
+            *this, vRowInfo[iRow].nTextId, eRow
+        ));
+        Row& rRow = *vRows.back();
+        // fields in the row
+        static unsigned const nFieldCount = sizeof vFieldInfo / sizeof vFieldInfo[0];
+        // skipping other (invisible) rows
+        while (iField != nFieldCount && vFieldInfo[iField].eRow != eRow)
+            ++iField;
+        // fields in the row
+        rRow.nFirstField = vFields.size();
+        for ( ; iField != nFieldCount && vFieldInfo[iField].eRow == eRow; ++iField)
+        {
+            // creating edit field
+            vFields.push_back(boost::make_shared<Field>(
+                *this, vFieldInfo[iField].nEditId, iField
+            ));
+            // "short name" field?
+            if (vFieldInfo[iField].nEditId == ED_SHORTNAME)
+            {
+                nNameRow = vRows.size() - 1;
+                nShortNameField = vFields.size() - 1;
+            }
+        }
+        rRow.nLastField = vFields.size();
     }
 
     FreeResource();
+}
 
-    // this page needs ExchangeSupport
-    SetExchangeSupport();
+//------------------------------------------------------------------------
 
-    Link aLink = LINK( this, SvxGeneralTabPage, ModifyHdl_Impl );
-    aFirstName.SetModifyHdl( aLink );
-    aName.SetModifyHdl( aLink );
+// sets the size and the position of the controls
+void SvxGeneralTabPage::PositionControls ()
+{
+    // sizes and locations
+    int const nLeft = 12, nMid = 100, nRight = 250;
+    int const nTop = 14;
+    unsigned const nHSpace = 2, nVSpace = 3;
+    unsigned const nRowHeight = 15, nTextVMargin = 2;
 
-    // because some labels have text for more than one edit field we have to split these texts
-    // and set these texts as accessible name of the corresponding edit fields
-    SvxUserEdit* pEdits[] =
-    {
-        &aCompanyEdit, &aFirstName, &aFatherName, &aName, &aShortName, &aStreetEdit,
-        &aApartmentNrEdit, &aPLZEdit, &aCityEdit, &aUsCityEdit, &aUsStateEdit, &aUsZipEdit,
-        &aCountryEdit, &aTitleEdit, &aPositionEdit, &aTelPrivEdit, &aTelCompanyEdit,
-        &aFaxEdit, &aEmailEdit, NULL
-    };
-    SvxUserEdit** pCurrent = pEdits;
-    while ( *pCurrent )
+    Point aLabelPos(nLeft, nTop + nTextVMargin);
+    Size aLabelSize(nMid - nLeft - nHSpace, nRowHeight - nVSpace - 2*nTextVMargin);
+    for (unsigned iRow = 0; iRow != vRows.size(); ++iRow, aLabelPos.Y() += nRowHeight)
     {
-        Window* pLabel = (*pCurrent)->GetLabel();
-        if ( pLabel )
+        Row& rRow = *vRows[iRow];
+        // label
+        rRow.aLabel.SetPosSizePixel(
+            LogicToPixel(aLabelPos,  MAP_APPFONT),
+            LogicToPixel(aLabelSize, MAP_APPFONT)
+        );
+        // field position
+        Point aFieldPos(nMid, aLabelPos.Y() - nTextVMargin);
+        Size aFieldSize(0, nRowHeight - nVSpace);
+        // sum of the relative widths
+        float fRelWidthSum = 0;
+        for (unsigned iField = rRow.nFirstField; iField != rRow.nLastField; ++iField)
+            fRelWidthSum += vFieldInfo[vFields[iField]->iField].fRelativeWidth;
+        // sum of the actual widths (total width - spaces)
+        unsigned const nActWidthSum =
+            (nRight - nMid) - nHSpace*(rRow.nLastField - rRow.nFirstField);
+        // calculating the actual widths
+        float X = nMid; // starting position
+        for (unsigned iField = rRow.nFirstField; iField != rRow.nLastField; ++iField)
         {
-            String sName, sText = pLabel->GetDisplayText();
-            sal_Int16 nIndex = (*pCurrent)->GetIndex();
-            if ( INDEX_NOTSET == nIndex )
-                sName = sText;
-            else
-                sName = sText.GetToken( nIndex, '/' );
-            sName = comphelper::string::remove(sName, '(');
-            sName = comphelper::string::remove(sName, ')');
-            if ( sName.Len() > 0 )
-                (*pCurrent)->SetAccessibleName( sName );
+            // calculating position and size
+            Field& rField = *vFields[iField];
+            aFieldPos.X() = X;
+            X += vFieldInfo[rField.iField].fRelativeWidth * nActWidthSum / fRelWidthSum;
+            aFieldSize.Width() = X - aFieldPos.X();
+            X += 2;
+            // setting size
+            rField.aEdit.SetPosSizePixel(
+                LogicToPixel(aFieldPos,  MAP_APPFONT),
+                LogicToPixel(aFieldSize, MAP_APPFONT)
+            );
         }
-        pCurrent++;
     }
 }
 
 //------------------------------------------------------------------------
 
-SvxGeneralTabPage::~SvxGeneralTabPage()
+void SvxGeneralTabPage::SetLinks ()
 {
-    delete pImpl;
+    // link for updating the initials
+    Link aLink = LINK( this, SvxGeneralTabPage, ModifyHdl_Impl );
+    Row& rNameRow = *vRows[nNameRow];
+    for (unsigned i = rNameRow.nFirstField; i != rNameRow.nLastField - 1; ++i)
+        vFields[i]->aEdit.SetModifyHdl(aLink);
+}
+
+//------------------------------------------------------------------------
+
+void SvxGeneralTabPage::SetAccessibleNames ()
+{
+    // Because some labels have text for more than one edit field we have to
+    // split these texts and set these texts as accessible name
+    // of the corresponding edit fields.
+    // E.g. "City/State/Zip" -> "City", "State", "Zip" or
+    // "Tel. (Home/Work)" -> "Tel. (Home)", "Tel. (Work)"
+    for (unsigned i = 0; i != vRows.size(); ++i)
+    {
+        Row& rRow = *vRows[i];
+        rtl::OUString const sLabel = rRow.aLabel.GetDisplayText();
+        rtl::OUString sList = sLabel; // between brackets or the whole label
+        // brackets?
+        int iBracket = sLabel.indexOf('(');
+        if (iBracket != -1)
+            sList = sList.copy(iBracket + 1, sLabel.lastIndexOf(')') - iBracket - 1);
+        // cutting at '/'s
+        int nIndex = 0;
+        for (unsigned iField = rRow.nFirstField; iField != rRow.nLastField; ++iField)
+        {
+            // the token
+            rtl::OUString sPart = sList.getToken(0, '/', nIndex).trim();
+            Edit& rEdit = vFields[iField]->aEdit;
+            // creating the accessible name
+            if (iBracket != -1)
+                rEdit.SetAccessibleName(sLabel.copy(0, iBracket) + "(" + sPart + ")");
+            else
+                rEdit.SetAccessibleName(sPart);
+        }
+    }
 }
 
 //------------------------------------------------------------------------
@@ -242,23 +403,8 @@ SfxTabPage* SvxGeneralTabPage::Create( Window* pParent, const SfxItemSet& 
rAttrS
 sal_Bool SvxGeneralTabPage::FillItemSet( SfxItemSet& )
 {
     // remove leading and trailing whitespaces
-    aCompanyEdit.SetText( TRIM(aCompanyEdit.GetText()) );
-    aFirstName.SetText( TRIM(aFirstName.GetText()) );
-    aName.SetText( TRIM(aName.GetText()) );
-    aShortName.SetText( TRIM(aShortName.GetText()) );
-    aStreetEdit.SetText( TRIM(aStreetEdit.GetText()) );
-    aCountryEdit.SetText( TRIM(aCountryEdit.GetText()) );
-    aPLZEdit.SetText( TRIM(aPLZEdit.GetText()) );
-    aCityEdit.SetText( TRIM(aCityEdit.GetText()) );
-    aUsCityEdit.SetText( TRIM(aUsCityEdit.GetText()) );
-    aUsStateEdit.SetText( TRIM(aUsStateEdit.GetText()) );
-    aUsZipEdit.SetText( TRIM(aUsZipEdit.GetText()) );
-    aTitleEdit.SetText( TRIM(aTitleEdit.GetText()) );
-    aPositionEdit.SetText( TRIM(aPositionEdit.GetText()) );
-    aTelPrivEdit.SetText( TRIM(aTelPrivEdit.GetText()) );
-    aTelCompanyEdit.SetText( TRIM(aTelCompanyEdit.GetText()) );
-    aFaxEdit.SetText( TRIM(aFaxEdit.GetText()) );
-    aEmailEdit.SetText( TRIM(aEmailEdit.GetText()) );
+    for (unsigned i = 0; i != vFields.size(); ++i)
+        vFields[i]->aEdit.SetText( comphelper::string::strip(vFields[i]->aEdit.GetText(), ' ') );
 
     sal_Bool bModified = sal_False;
     bModified |= GetAddress_Impl();
@@ -277,45 +423,18 @@ void SvxGeneralTabPage::Reset( const SfxItemSet& rSet )
 {
     SetAddress_Impl();
 
-    sal_uInt16 nWhich = GetWhich( SID_FIELD_GRABFOCUS );
-    if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
-    {
-        sal_uInt16 nField = ( (SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue();
+    sal_uInt16 const nWhich = GetWhich(SID_FIELD_GRABFOCUS);
 
-        switch ( nField )
+    if (rSet.GetItemState(nWhich) == SFX_ITEM_SET)
+    {
+        if (sal_uInt16 const nField = ((SfxUInt16Item&)rSet.Get(nWhich)).GetValue())
         {
-            case COMPANY_EDIT:      aCompanyEdit.GrabFocus(); break;
-            case FIRSTNAME_EDIT:    aFirstName.GrabFocus(); break;
-            case LASTNAME_EDIT:     aName.GrabFocus(); break;
-            case STREET_EDIT:       aStreetEdit.GrabFocus(); break;
-            case COUNTRY_EDIT:      aCountryEdit.GrabFocus(); break;
-            case PLZ_EDIT:
-                if ( aPLZEdit.IsVisible() )
-                    aPLZEdit.GrabFocus();
-                else
-                    aUsZipEdit.GrabFocus();
-                break;
-            case CITY_EDIT:
-                if ( aCityEdit.IsVisible() )
-                    aCityEdit.GrabFocus();
-                else
-                    aUsCityEdit.GrabFocus();
-                break;
-            case STATE_EDIT:
-                if ( aUsStateEdit.IsVisible() )
-                    aUsStateEdit.GrabFocus();
-                else
-                    aCityEdit.GrabFocus();
-                break;
-            case TITLE_EDIT:        aTitleEdit.GrabFocus(); break;
-            case POSITION_EDIT:     aPositionEdit.GrabFocus(); break;
-            case SHORTNAME_EDIT:    aShortName.GrabFocus(); break;
-            case TELPRIV_EDIT:      aTelPrivEdit.GrabFocus(); break;
-            case TELCOMPANY_EDIT:   aTelCompanyEdit.GrabFocus(); break;
-            case FAX_EDIT:          aFaxEdit.GrabFocus(); break;
-            case EMAIL_EDIT:        aEmailEdit.GrabFocus(); break;
-            default:                aCompanyEdit.GrabFocus();
+            for (unsigned i = 0; i != vFields.size(); ++i)
+                if (nField == vFieldInfo[vFields[i]->iField].nGrabFocusId)
+                    vFields[i]->aEdit.GrabFocus();
         }
+        else
+            vFields.front()->aEdit.GrabFocus();
     }
 
     aUseDataCB.Check( SvtSaveOptions().IsUseUserData() );
@@ -323,27 +442,30 @@ void SvxGeneralTabPage::Reset( const SfxItemSet& rSet )
 
 //------------------------------------------------------------------------
 
+// ModifyHdl_Impl()
+// This handler updates the initials (short name)
+// when one of the name fields was updated.
 IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
 {
-    if ( aShortName.IsEnabled() )
+    // short name field and row
+    Field& rShortName = *vFields[nShortNameField];
+    Row& rNameRow = *vRows[nNameRow];
+    // number of initials
+    unsigned const nInits = rNameRow.nLastField - rNameRow.nFirstField - 1;
+    // which field was updated? (in rNameRow)
+    unsigned nField = nInits;
+    for (unsigned i = 0; i != nInits; ++i)
+        if (&vFields[rNameRow.nFirstField + i]->aEdit == pEdit)
+            nField = i;
+    // updating the initial
+    if (nField < nInits && rShortName.aEdit.IsEnabled())
     {
-        String aShortStr( aShortName.GetText() );
-        switch ( aShortStr.Len() )
-        {
-            case 0:
-                aShortStr = String( RTL_CONSTASCII_USTRINGPARAM("  ") );
-                break;
-
-            case 1:
-                aShortStr += ' ';
-                break;
-        }
-
-        sal_uInt16 nPos = ( pEdit == &aFirstName ) ? 0 : 1;
-        String aTxt = pEdit->GetText();
-        sal_Unicode cChar = ( aTxt.Len() > 0 ) ? aTxt.GetChar(0) : ' ';
-        aShortStr.SetChar( nPos, cChar );
-        aShortName.SetText(comphelper::string::stripEnd(aShortStr, ' '));
+        rtl::OUString sShortName = rShortName.aEdit.GetText();
+        while ((unsigned)sShortName.getLength() < nInits)
+            sShortName += rtl::OUString(' ');
+        rtl::OUString sName = pEdit->GetText();
+        rtl::OUString sLetter = rtl::OUString(sName.getLength() ? sName.toChar() : ' ');
+        rShortName.aEdit.SetText(sShortName.replaceAt(nField, 1, sLetter).trim());
     }
     return 0;
 }
@@ -352,205 +474,57 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit )
 
 sal_Bool SvxGeneralTabPage::GetAddress_Impl()
 {
-    sal_Bool bRet =
-    (   aCompanyEdit.GetSavedValue()  !=        aCompanyEdit.GetText()  ||
-        aFirstName.GetSavedValue()  !=          aFirstName.GetText()  ||
-        aFatherName.GetSavedValue()  !=         aFatherName.GetText()  ||
-        aName.GetSavedValue()  !=               aName.GetText()  ||
-        aShortName.GetSavedValue()  !=          aShortName.GetText()  ||
-        aStreetEdit.GetSavedValue()  !=         aStreetEdit.GetText()  ||
-        aApartmentNrEdit.GetSavedValue()  !=    aApartmentNrEdit.GetText()  ||
-        aPLZEdit.GetSavedValue()  !=            aPLZEdit.GetText()  ||
-        aCityEdit.GetSavedValue()  !=           aCityEdit.GetText()  ||
-        aUsCityEdit.GetSavedValue()  !=         aUsCityEdit.GetText()  ||
-        aUsStateEdit.GetSavedValue()  !=        aUsStateEdit.GetText()  ||
-        aUsZipEdit.GetSavedValue()  !=          aUsZipEdit.GetText()  ||
-        aCountryEdit.GetSavedValue()  !=        aCountryEdit.GetText()  ||
-        aTitleEdit.GetSavedValue()  !=          aTitleEdit.GetText()  ||
-        aPositionEdit.GetSavedValue()  !=       aPositionEdit.GetText()  ||
-        aTelPrivEdit.GetSavedValue()  !=        aTelPrivEdit.GetText()  ||
-        aTelCompanyEdit.GetSavedValue()  !=     aTelCompanyEdit.GetText()  ||
-        aFaxEdit.GetSavedValue()  !=            aFaxEdit.GetText()  ||
-        aEmailEdit.GetSavedValue()  !=          aEmailEdit.GetText() );
-
-    LanguageType eLang = Application::GetSettings().GetUILanguage();
-    sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang );
-
+    // updating
     SvtUserOptions aUserOpt;
-    aUserOpt.SetCompany(aCompanyEdit.GetText());
-    aUserOpt.SetFirstName(aFirstName.GetText());
-    aUserOpt.SetLastName(aName.GetText());
-    aUserOpt.SetID( aShortName.GetText());
-
-    aUserOpt.SetStreet(aStreetEdit.GetText() );
-
-    aUserOpt.SetCountry(aCountryEdit.GetText() );
-
-    aUserOpt.SetZip(bUS ? aUsZipEdit.GetText() : aPLZEdit.GetText() );
-    aUserOpt.SetCity(bUS ? aUsCityEdit.GetText() : aCityEdit.GetText() );
+    for (unsigned i = 0; i != vFields.size(); ++i)
+        aUserOpt.SetToken(
+            vFieldInfo[vFields[i]->iField].nUserOptionsId,
+            vFields[i]->aEdit.GetText()
+        );
 
-    aUserOpt.SetTitle( aTitleEdit.GetText() );
-    aUserOpt.SetPosition(aPositionEdit.GetText() );
-    aUserOpt.SetTelephoneHome( aTelPrivEdit.GetText() );
-    aUserOpt.SetTelephoneWork( aTelCompanyEdit.GetText() );
-    aUserOpt.SetFax( aFaxEdit.GetText() );
-    aUserOpt.SetEmail( aEmailEdit.GetText() );
-    aUserOpt.SetState( bUS ? aUsStateEdit.GetText() : String() );
-
-    if ( LANGUAGE_RUSSIAN == eLang )
-    {
-        aUserOpt.SetFathersName( aFatherName.GetText() );
-        aUserOpt.SetApartment( aApartmentNrEdit.GetText() );
-    }
-    return bRet;
+    // modified?
+    for (unsigned i = 0; i != vFields.size(); ++i)
+        if (vFields[i]->aEdit.GetSavedValue() != vFields[i]->aEdit.GetText())
+            return true;
+    return false;
 }
 
 //------------------------------------------------------------------------
 
 void SvxGeneralTabPage::SetAddress_Impl()
 {
-    LanguageType eLang = Application::GetSettings().GetUILanguage();
-    sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang );
+    // updating and disabling edit boxes
     SvtUserOptions aUserOpt;
-    aCompanyEdit.SetText( aUserOpt.GetCompany() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_COMPANY ) )
-    {
-        aCompanyLbl.Disable();
-        aCompanyEdit.Disable();
-    }
-    sal_Int16 nEditCount = 0;
-    aFirstName.SetText( aUserOpt.GetFirstName() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_FIRSTNAME ) )
-    {
-        aFirstName.Disable();
-        nEditCount++;
-    }
-    aName.SetText( aUserOpt.GetLastName() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_LASTNAME ) )
-    {
-        aName.Disable();
-        nEditCount++;
-    }
-    aShortName.SetText( aUserOpt.GetID() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_ID ) )
+    for (unsigned iRow = 0; iRow != vRows.size(); ++iRow)
     {
-        aShortName.Disable();
-        nEditCount++;
-    }
-    aNameLbl.Enable( ( nEditCount != 3 ) );
-    aStreetEdit.SetText( aUserOpt.GetStreet() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_STREET ) )
-    {
-        aStreetLbl.Disable();
-        aStreetEdit.Disable();
-    }
-    Edit* pPLZEdit = bUS ? &aUsZipEdit : &aPLZEdit;
-    Edit* pCityEdit = bUS ? &aUsCityEdit : &aCityEdit;
-    pPLZEdit->SetText( aUserOpt.GetZip() );
-    pCityEdit->SetText( aUserOpt.GetCity() );
-    nEditCount = 0;
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_ZIP ) )
-    {
-        pPLZEdit->Disable();
-        nEditCount++;
-    }
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_CITY ) )
-    {
-        pCityEdit->Disable();
-        nEditCount++;
-    }
-    if ( bUS )
-    {
-        aUsStateEdit.SetText( aUserOpt.GetState() );
-        if ( aUserOpt.IsTokenReadonly( USER_OPT_STATE ) )
+        Row& rRow = *vRows[iRow];
+        // the label is enabled if any of its edit fields are enabled
+        bool bEnableLabel = false;
+        for (unsigned iField = rRow.nFirstField; iField != rRow.nLastField; ++iField)
         {
-            aUsStateEdit.Disable();
-            nEditCount++;
+            Field& rField = *vFields[iField];
+            // updating content
+            unsigned const nToken = vFieldInfo[rField.iField].nUserOptionsId;
+            rField.aEdit.SetText(aUserOpt.GetToken(nToken));
+            // is enabled?
+            bool const bEnableEdit = !aUserOpt.IsTokenReadonly(nToken);
+            rField.aEdit.Enable(bEnableEdit);
+            bEnableLabel = bEnableLabel || bEnableEdit;
         }
-    }
-    aCityLbl.Enable( ( nEditCount != ( bUS ? 3 : 2 ) ) );
-    aCountryEdit.SetText( aUserOpt.GetCountry() );
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_COUNTRY ) )
-    {
-        aCountryLbl.Disable();
-        aCountryEdit.Disable();
-    }
-    aTitleEdit.SetText( aUserOpt.GetTitle() );
-    aPositionEdit.SetText( aUserOpt.GetPosition() );
-    nEditCount = 0;
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_TITLE ) )
-    {
-        aTitleEdit.Disable();
-        nEditCount++;
-    }
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_POSITION ) )
-    {
-        aPositionEdit.Disable();
-        nEditCount++;
-    }
-    aTitlePosLbl.Enable( ( nEditCount != 2 ) );
-    aTelPrivEdit.SetText( aUserOpt.GetTelephoneHome() );
-    aTelCompanyEdit.SetText( aUserOpt.GetTelephoneWork() );
-    nEditCount = 0;
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_TELEPHONEHOME ) )
-    {
-        aTelPrivEdit.Disable();
-        nEditCount++;
-    }
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_TELEPHONEWORK ) )
-    {
-        aTelCompanyEdit.Disable();
-        nEditCount++;
-    }
-    aPhoneLbl.Enable( ( nEditCount != 2 ) );
-    aFaxEdit.SetText( aUserOpt.GetFax() );
-    aEmailEdit.SetText( aUserOpt.GetEmail() );
-    nEditCount = 0;
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_FAX ) )
-    {
-        aFaxEdit.Disable();
-        nEditCount++;
-    }
-    if ( aUserOpt.IsTokenReadonly( USER_OPT_EMAIL ) )
-    {
-        aEmailEdit.Disable();
-        nEditCount++;
-    }
-    aFaxMailLbl.Enable( ( nEditCount != 2 ) );
-
-    if ( LANGUAGE_RUSSIAN == eLang )
-    {
-        aFatherName.SetText( aUserOpt.GetFathersName() );
-        aApartmentNrEdit.SetText( aUserOpt.GetApartment() );
+        rRow.aLabel.Enable(bEnableLabel);
     }
 
-    aCompanyEdit.SaveValue();
-    aFirstName.SaveValue();
-    aFatherName.SaveValue();
-    aName.SaveValue();
-    aShortName.SaveValue();
-    aStreetEdit.SaveValue();
-    aApartmentNrEdit.SaveValue();
-    aPLZEdit.SaveValue();
-    aCityEdit.SaveValue();
-    aUsCityEdit.SaveValue();
-    aUsStateEdit.SaveValue();
-    aUsZipEdit.SaveValue();
-    aCountryEdit.SaveValue();
-    aTitleEdit.SaveValue();
-    aPositionEdit.SaveValue();
-    aTelPrivEdit.SaveValue();
-    aTelCompanyEdit.SaveValue();
-    aFaxEdit.SaveValue();
-    aEmailEdit.SaveValue();
+    // saving
+    for (unsigned i = 0; i != vFields.size(); ++i)
+        vFields[i]->aEdit.SaveValue();
 }
 
 // -----------------------------------------------------------------------
 
-int SvxGeneralTabPage::DeactivatePage( SfxItemSet* _pSet )
+int SvxGeneralTabPage::DeactivatePage( SfxItemSet* pSet_ )
 {
-    if ( _pSet )
-        FillItemSet( *_pSet );
+    if ( pSet_ )
+        FillItemSet( *pSet_ );
     return LEAVE_PAGE;
 }
 
diff --git a/cui/source/options/optgenrl.hrc b/cui/source/options/optgenrl.hrc
index c708d0a..8b52a08 100644
--- a/cui/source/options/optgenrl.hrc
+++ b/cui/source/options/optgenrl.hrc
@@ -15,8 +15,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _SVX_OPTGENRL_HRC
-#define _SVX_OPTGENRL_HRC
+#ifndef SVX_OPTGENRL_HRC
+#define SVX_OPTGENRL_HRC
 
 // defines ------------------------------------------------------------------
 
@@ -51,26 +51,13 @@
 #define ED_EMAIL        38
 #define GB_ADDRESS      39
 #define CB_USEDATA      40
-#define FT_NAME_EASTERN     41
+#define FT_NAME_EASTERN 41
+#define FT_CITY_US      42
 
 #define STR_US_STATE    10
 #define STR_QUERY_REG   11
 
-// positioning help for the dialog
-
-#define HSPACE      2
-#define VSPACE      3
-#define LINEH       12
-#define FLINEH      8
-#define LEFT        12
-#define MID         100
-#define RIGHT       248
-#define TOP         10
-#define LINE(y)     (14+y*15)
-#define FLINE(y)    (16+y*15)
-#define NAMELEN     74
-
-#endif // #ifndef _SVX_OPTGENRL_HRC
+#endif // #ifndef SVX_OPTGENRL_HRC
 
 // ******************************************************************* EOF
 
diff --git a/cui/source/options/optgenrl.src b/cui/source/options/optgenrl.src
index c3b194a..545205d 100644
--- a/cui/source/options/optgenrl.src
+++ b/cui/source/options/optgenrl.src
@@ -45,8 +45,6 @@ TabPage RID_SFXPAGE_GENERAL
     Text [ en-US ] = "User Data" ;
     FixedText FT_COMPANY
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 0 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "~Company" ;
     };
@@ -54,95 +52,64 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_COMPANY";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 0 ) ) ;
-        Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
     };
     FixedText FT_NAME
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "First/Last ~name/Initials" ;
     };
     FixedText FT_NAME_RUSS
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
-        Hide = TRUE;
         Text [ en-US ] = "Last Name/First name/Father's name/Initials";
     };
     FixedText FT_NAME_EASTERN
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
-        Hide = TRUE;
         Text [ en-US ] = "Last/First ~name/Initials" ;
     };
     Edit ED_FATHERNAME
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_FATHERNAME";
         Border = TRUE ;
-        Hide = TRUE;
-        Pos = MAP_APPFONT ( MID , LINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
     };
     Edit ED_FIRSTNAME
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_FIRSTNAME";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
     };
     Edit ED_NAME
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_NAME";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID+NAMELEN-8+HSPACE , LINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
     };
     Edit ED_SHORTNAME
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_SHORTNAME";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID+2* ( NAMELEN-8+HSPACE ) , LINE ( 1 ) ) ;
-        Size = MAP_APPFONT ( RIGHT- ( MID+2* ( NAMELEN-8+HSPACE ) ) , LINEH ) ;
     };
     FixedText FT_STREET
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 2 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "~Street" ;
     };
     FixedText FT_STREET_RUSS
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 2 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
-        Hide = TRUE;
         Text [ en-US ] = "Street/Apartment number";
     };
     Edit ED_STREET
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_STREET";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 2 ) ) ;
-        Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
     };
     Edit ED_APARTMENTNR
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_APARTMENTNR";
         Border = TRUE ;
-        Hide = TRUE;
-        Pos = MAP_APPFONT ( MID , LINE ( 2 ) ) ;
-        Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
     };
     FixedText FT_CITY
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "Zip/City";
     };
@@ -150,41 +117,34 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_PLZ";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( 24 , LINEH ) ;
     };
     Edit ED_CITY
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_CITY";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID + 24 + HSPACE , LINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( RIGHT - ( MID + 24 + HSPACE ) , LINEH ) ;
+    };
+    FixedText FT_CITY_US
+    {
+        LeftLabel = TRUE ;
+        Text [ en-US ] = "City/State/Zip";
     };
     Edit ED_US_CITY
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_US_CITY";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( 90 , LINEH ) ;
     };
     Edit ED_US_STATE
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_US_STATE";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID + 90 + HSPACE, LINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( 30 , LINEH ) ;
     };
     Edit ED_US_ZIPCODE
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_US_ZIPCODE";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID + 90 + HSPACE + 30 + HSPACE, LINE ( 3 ) ) ;
-        Size = MAP_APPFONT ( RIGHT - ( MID + 90 + HSPACE + 30 + HSPACE ) , LINEH ) ;
     };
     FixedText FT_COUNTRY
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 4 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "Country/Region";
     };
@@ -192,13 +152,9 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_COUNTRY";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 4 ) ) ;
-        Size = MAP_APPFONT ( RIGHT - MID , LINEH ) ;
     };
     FixedText FT_TITLEPOS
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 5 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "~Title/Position" ;
     };
@@ -206,20 +162,14 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_TITLE";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 5 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
     };
     Edit ED_POSITION
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_POSITION";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 5 ) ) ;
-        Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
     };
     FixedText FT_PHONE
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 6 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         Text [ en-US ] = "Tel. (Home/Work)" ;
         LeftLabel = TRUE ;
     };
@@ -227,20 +177,14 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_TELPRIVAT";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 6 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
     };
     Edit ED_TELCOMPANY
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_TELCOMPANY";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 6 ) ) ;
-        Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
     };
     FixedText FT_FAXMAIL
     {
-        Pos = MAP_APPFONT ( LEFT , FLINE ( 7 ) ) ;
-        Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ;
         LeftLabel = TRUE ;
         Text [ en-US ] = "Fa~x / E-mail" ;
     };
@@ -248,15 +192,11 @@ TabPage RID_SFXPAGE_GENERAL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_FAX";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID , LINE ( 7 ) ) ;
-        Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
     };
     Edit ED_EMAIL
     {
         HelpID = "cui:Edit:RID_SFXPAGE_GENERAL:ED_EMAIL";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 7 ) ) ;
-        Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
     };
     FixedLine GB_ADDRESS
     {
@@ -273,11 +213,7 @@ TabPage RID_SFXPAGE_GENERAL
         Text [ en-US ] = "Use data for document properties";
     };
 
-     // extra Resourcen f"ur die amerikanische Postadresse
-    String STR_US_STATE
-    {
-        Text [ en-US ] = "City/State/Zip";
-    };
+    // extra resource for US addresses
     String STR_QUERY_REG
     {
         Text [ en-US ] = "Note that street, Zip code and city are used to generate the 
registration key. You will not be able to change the user data again until the registration has 
been carried out. Do you want to modify the user data now?";
diff --git a/unotools/inc/unotools/useroptions.hxx b/unotools/inc/unotools/useroptions.hxx
index 97e50c4..6dc8bc6 100644
--- a/unotools/inc/unotools/useroptions.hxx
+++ b/unotools/inc/unotools/useroptions.hxx
@@ -23,6 +23,8 @@
 #include <unotools/configitem.hxx>
 #include <osl/mutex.hxx>
 #include <unotools/options.hxx>
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
 
 // define ----------------------------------------------------------------
 
@@ -43,66 +45,70 @@
 #define USER_OPT_ZIP                ((sal_uInt16)14)
 #define USER_OPT_FATHERSNAME        ((sal_uInt16)15)
 #define USER_OPT_APARTMENT          ((sal_uInt16)16)
+#define USER_OPT_CUSTOMERNUMBER     ((sal_uInt16)17)
 
 // class SvtUserOptions --------------------------------------------------
 
-class SvtUserOptions_Impl;
-
-class UNOTOOLS_DLLPUBLIC SvtUserOptions: public utl::detail::Options
+class UNOTOOLS_DLLPUBLIC SvtUserOptions : public utl::detail::Options
 {
-private:
-    SvtUserOptions_Impl*    pImp;
-
 public:
-    SvtUserOptions();
-    virtual ~SvtUserOptions();
+    SvtUserOptions ();
+    virtual ~SvtUserOptions ();
 
-    static ::osl::Mutex&    GetInitMutex();
+    static osl::Mutex& GetInitMutex ();
 
     // get the address token
-     ::rtl::OUString    GetCompany() const;
-     ::rtl::OUString    GetFirstName() const;
-     ::rtl::OUString    GetLastName() const;
-     ::rtl::OUString    GetID() const;
-     ::rtl::OUString    GetStreet() const;
-     ::rtl::OUString    GetCity() const;
-     ::rtl::OUString    GetState() const;
-     ::rtl::OUString    GetZip() const;
-     ::rtl::OUString    GetCountry() const;
-     ::rtl::OUString    GetPosition() const;
-     ::rtl::OUString    GetTitle() const;
-     ::rtl::OUString    GetTelephoneHome() const;
-     ::rtl::OUString    GetTelephoneWork() const;
-     ::rtl::OUString    GetFax() const;
-     ::rtl::OUString    GetEmail() const;
-     ::rtl::OUString    GetCustomerNumber() const;
-     ::rtl::OUString    GetFathersName() const;
-     ::rtl::OUString    GetApartment() const;
+    rtl::OUString GetCompany        () const;
+    rtl::OUString GetFirstName      () const;
+    rtl::OUString GetLastName       () const;
+    rtl::OUString GetID             () const;
+    rtl::OUString GetStreet         () const;
+    rtl::OUString GetCity           () const;
+    rtl::OUString GetState          () const;
+    rtl::OUString GetZip            () const;
+    rtl::OUString GetCountry        () const;
+    rtl::OUString GetPosition       () const;
+    rtl::OUString GetTitle          () const;
+    rtl::OUString GetTelephoneHome  () const;
+    rtl::OUString GetTelephoneWork  () const;
+    rtl::OUString GetFax            () const;
+    rtl::OUString GetEmail          () const;
+    rtl::OUString GetCustomerNumber () const;
+    rtl::OUString GetFathersName    () const;
+    rtl::OUString GetApartment      () const;
 
-     ::rtl::OUString    GetFullName() const;
+    rtl::OUString GetFullName       () const;
 
     // set the address token
-    void            SetCompany( const ::rtl::OUString& rNewToken );
-    void            SetFirstName( const ::rtl::OUString& rNewToken );
-    void            SetLastName( const ::rtl::OUString& rNewToken );
-    void            SetID( const ::rtl::OUString& rNewToken );
-    void            SetStreet( const ::rtl::OUString& rNewToken );
-    void            SetCity( const ::rtl::OUString& rNewToken );
-    void            SetState( const ::rtl::OUString& rNewToken );
-    void            SetZip( const ::rtl::OUString& rNewToken );
-    void            SetCountry( const ::rtl::OUString& rNewToken );
-    void            SetPosition( const ::rtl::OUString& rNewToken );
-    void            SetTitle( const ::rtl::OUString& rNewToken );
-    void            SetTelephoneHome( const ::rtl::OUString& rNewToken );
-    void            SetTelephoneWork( const ::rtl::OUString& rNewToken );
-    void            SetFax( const ::rtl::OUString& rNewToken );
-    void            SetEmail( const ::rtl::OUString& rNewToken );
-    void            SetCustomerNumber( const ::rtl::OUString& rNewToken );
-    void            SetFathersName( const ::rtl::OUString& rNewToken );
-    void            SetApartment( const ::rtl::OUString& rNewToken );
+    void SetCompany        (rtl::OUString const&);
+    void SetFirstName      (rtl::OUString const&);
+    void SetLastName       (rtl::OUString const&);
+    void SetID             (rtl::OUString const&);
+    void SetStreet         (rtl::OUString const&);
+    void SetCity           (rtl::OUString const&);
+    void SetState          (rtl::OUString const&);
+    void SetZip            (rtl::OUString const&);
+    void SetCountry        (rtl::OUString const&);
+    void SetPosition       (rtl::OUString const&);
+    void SetTitle          (rtl::OUString const&);
+    void SetTelephoneHome  (rtl::OUString const&);
+    void SetTelephoneWork  (rtl::OUString const&);
+    void SetFax            (rtl::OUString const&);
+    void SetEmail          (rtl::OUString const&);
+    void SetCustomerNumber (rtl::OUString const&);
+    void SetFathersName    (rtl::OUString const&);
+    void SetApartment      (rtl::OUString const&);
 
-    sal_Bool        IsTokenReadonly( sal_uInt16 nToken ) const;
-    ::rtl::OUString GetToken(sal_uInt16 nToken) const;
+    sal_Bool      IsTokenReadonly (sal_uInt16 nToken) const;
+    rtl::OUString GetToken (sal_uInt16 nToken) const;
+    void          SetToken (sal_uInt16 nToken, rtl::OUString const& rNewToken);
+
+private:
+    class Impl;
+    boost::shared_ptr<Impl> pImpl;
+    static boost::weak_ptr<Impl> pSharedImpl;
+private:
+    class ChangeListener;
 };
 
 #endif // #ifndef INCLUDED_unotools_USEROPTIONS_HXX
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index a84d0cc..adb5db0 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -43,170 +43,127 @@
 
 using namespace utl;
 using namespace com::sun::star;
-using namespace com::sun::star::uno;
-using ::rtl::OUString;
+//using namespace com::sun::star::uno;
+using rtl::OUString;
 
-namespace css = ::com::sun::star;
+//namespace css = ::com::sun::star;
 
 namespace
 {
-    const char s_sData[] = "org.openoffice.UserProfile/Data";
-    const char s_so[] = "o"; // USER_OPT_COMPANY
-    const char s_sgivenname[] = "givenname"; // USER_OPT_FIRSTNAME
-    const char s_ssn[] = "sn"; // USER_OPT_LASTNAME
-    const char s_sinitials[] = "initials"; // USER_OPT_ID
-    const char s_sstreet[] = "street"; // USER_OPT_STREET
-    const char s_sl[] = "l"; // USER_OPT_CITY
-    const char s_sst[] = "st"; // USER_OPT_STATE
-    const char s_spostalcode[] = "postalcode"; // USER_OPT_ZIP
-    const char s_sc[] = "c"; // USER_OPT_COUNTRY
-    const char s_stitle[] = "title"; // USER_OPT_TITLE
-    const char s_sposition[] = "position"; // USER_OPT_POSITION
-    const char s_shomephone[] = "homephone"; // USER_OPT_TELEPHONEHOME
-    const char s_stelephonenumber[] = "telephonenumber"; // USER_OPT_TELEPHONEWORK
-    const char s_sfacsimiletelephonenumber[] = "facsimiletelephonenumber"; // USER_OPT_FAX
-    const char s_smail[] = "mail"; // USER_OPT_EMAIL
-    const char s_scustomernumber[] = "customernumber"; // USER_OPT_CUSTOMERNUMBER
-    const char s_sfathersname[] = "fathersname"; // USER_OPT_FATHERSNAME
-    const char s_sapartment[] = "apartment"; // USER_OPT_APARTMENT
-}
 
-// class SvtUserOptions_Impl ---------------------------------------------
-class SvtUserOptions_Impl;
-class SvtUserConfigChangeListener_Impl : public cppu::WeakImplHelper1
-<
-    com::sun::star::util::XChangesListener
->
-{
-        SvtUserOptions_Impl&    m_rParent;
-    public:
-        SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent);
-        ~SvtUserConfigChangeListener_Impl();
+OUString const sData = "org.openoffice.UserProfile/Data";
 
-    //XChangesListener
-    virtual void SAL_CALL changesOccurred( const util::ChangesEvent& Event ) 
throw(RuntimeException);
-    //XEventListener
-    virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw(RuntimeException);
+// vOptionNames[] -- names of the user option entries
+// The order corresponds to the #define USER_OPT_* list in useroptions.hxx.
+OUString const vOptionNames[] = {
+    "l",                         // USER_OPT_CITY
+    "o",                         // USER_OPT_COMPANY
+    "c",                         // USER_OPT_COUNTRY
+    "mail",                      // USER_OPT_EMAIL
+    "facsimiletelephonenumber",  // USER_OPT_FAX
+    "givenname",                 // USER_OPT_FIRSTNAME
+    "sn",                        // USER_OPT_LASTNAME
+    "position",                  // USER_OPT_POSITION
+    "st",                        // USER_OPT_STATE
+    "street",                    // USER_OPT_STREET
+    "homephone",                 // USER_OPT_TELEPHONEHOME
+    "telephonenumber",           // USER_OPT_TELEPHONEWORK
+    "title",                     // USER_OPT_TITLE
+    "initials",                  // USER_OPT_ID
+    "postalcode",                // USER_OPT_ZIP
+    "fathersname",               // USER_OPT_FATHERSNAME
+    "apartment",                 // USER_OPT_APARTMENT
+    "customernumber",            // USER_OPT_CUSTOMERNUMBER
 };
+unsigned const nOptionNameCount = sizeof vOptionNames / sizeof vOptionNames[0];
 
-class SvtUserOptions_Impl : public utl::ConfigurationBroadcaster
-{
-public:
-    SvtUserOptions_Impl();
-    ~SvtUserOptions_Impl();
+} // namespace
 
-    // get the user token
-    ::rtl::OUString   GetCompany() const;
-    ::rtl::OUString   GetFirstName() const;
-    ::rtl::OUString   GetLastName() const;
-    ::rtl::OUString   GetID() const;
-    ::rtl::OUString   GetStreet() const;
-    ::rtl::OUString   GetCity() const;
-    ::rtl::OUString   GetState() const;
-    ::rtl::OUString   GetZip() const;
-    ::rtl::OUString   GetCountry() const;
-    ::rtl::OUString   GetPosition() const;
-    ::rtl::OUString   GetTitle() const;
-    ::rtl::OUString   GetTelephoneHome() const;
-    ::rtl::OUString   GetTelephoneWork() const;
-    ::rtl::OUString   GetFax() const;
-    ::rtl::OUString   GetEmail() const;
-    ::rtl::OUString   GetCustomerNumber() const;
-    ::rtl::OUString   GetFathersName() const;
-    ::rtl::OUString   GetApartment() const;
+boost::weak_ptr<SvtUserOptions::Impl> SvtUserOptions::pSharedImpl;
 
-    ::rtl::OUString   GetFullName() const;
+// class ChangeListener --------------------------------------------------
 
-    // set the address token
-    void              SetCompany( const ::rtl::OUString& rNewToken );
-    void              SetFirstName( const ::rtl::OUString& rNewToken );
-    void              SetLastName( const ::rtl::OUString& rNewToken );
-    void              SetID( const ::rtl::OUString& rNewToken );
-    void              SetStreet( const ::rtl::OUString& rNewToken );
-    void              SetCity( const ::rtl::OUString& rNewToken );
-    void              SetState( const ::rtl::OUString& rNewToken );
-    void              SetZip( const ::rtl::OUString& rNewToken );
-    void              SetCountry( const ::rtl::OUString& rNewToken );
-    void              SetPosition( const ::rtl::OUString& rNewToken );
-    void              SetTitle( const ::rtl::OUString& rNewToken );
-    void              SetTelephoneHome( const ::rtl::OUString& rNewToken );
-    void              SetTelephoneWork( const ::rtl::OUString& rNewToken );
-    void              SetFax( const ::rtl::OUString& rNewToken );
-    void              SetEmail( const ::rtl::OUString& rNewToken );
-    void              SetCustomerNumber( const ::rtl::OUString& rNewToken );
-    void              SetFathersName( const ::rtl::OUString& rNewToken );
-    void              SetApartment( const ::rtl::OUString& rNewToken );
+class SvtUserOptions::ChangeListener : public cppu::WeakImplHelper1<util::XChangesListener>
+{
+public:
+    ChangeListener (Impl& rParent): m_rParent(rParent) { }
 
-    sal_Bool          IsTokenReadonly( sal_uInt16 nToken ) const;
-    ::rtl::OUString   GetToken(sal_uInt16 nToken) const;
-    void              Notify();
+    // XChangesListener
+    virtual void SAL_CALL changesOccurred (util::ChangesEvent const& Event) 
throw(uno::RuntimeException);
+    // XEventListener
+    virtual void SAL_CALL disposing (lang::EventObject const& Source) throw(uno::RuntimeException);
 
 private:
-    uno::Reference< util::XChangesListener >           m_xChangeListener;
-    css::uno::Reference< css::container::XNameAccess > m_xCfg;
-    css::uno::Reference< css::beans::XPropertySet >    m_xData;
+    Impl& m_rParent;
 };
 
-// global ----------------------------------------------------------------
+// class Impl ------------------------------------------------------------
+
+class SvtUserOptions::Impl : public utl::ConfigurationBroadcaster
+{
+public:
+    Impl ();
 
-static SvtUserOptions_Impl* pOptions = NULL;
-static sal_Int32            nRefCount = 0;
+    OUString GetFullName () const;
 
-#define READONLY_DEFAULT    sal_False
+    sal_Bool IsTokenReadonly (sal_uInt16 nToken) const;
+    OUString GetToken (sal_uInt16 nToken) const;
+    void     SetToken (sal_uInt16 nToken, OUString const& rNewToken);
+    void     Notify ();
 
-SvtUserConfigChangeListener_Impl::SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent) :
-    m_rParent( rParent )
-{
-}
+private:
+    uno::Reference<util::XChangesListener> m_xChangeListener;
+    uno::Reference<container::XNameAccess> m_xCfg;
+    uno::Reference<beans::XPropertySet>    m_xData;
+};
 
-SvtUserConfigChangeListener_Impl::~SvtUserConfigChangeListener_Impl()
-{
-}
+// class SvtUserOptions::ChangeListener ----------------------------------
 
-void SvtUserConfigChangeListener_Impl::changesOccurred( const util::ChangesEvent& rEvent ) 
throw(RuntimeException)
+void SvtUserOptions::ChangeListener::changesOccurred (util::ChangesEvent const& rEvent) 
throw(uno::RuntimeException)
 {
-    if(rEvent.Changes.getLength())
+    if (rEvent.Changes.getLength())
         m_rParent.Notify();
 }
 
-void SvtUserConfigChangeListener_Impl::disposing( const lang::EventObject& rSource ) 
throw(RuntimeException)
+void SvtUserOptions::ChangeListener::disposing (lang::EventObject const& rSource) 
throw(uno::RuntimeException)
 {
     try
     {
-        uno::Reference< util::XChangesNotifier > xChgNot( rSource.Source, UNO_QUERY_THROW);
+        uno::Reference<util::XChangesNotifier> xChgNot(rSource.Source, uno::UNO_QUERY_THROW);
         xChgNot->removeChangesListener(this);
     }
-    catch(Exception& )
+    catch (uno::Exception&)
     {
     }
 }
 
-// class SvtUserOptions_Impl ---------------------------------------------
+// class SvtUserOptions::Impl --------------------------------------------
 
-// -----------------------------------------------------------------------
-SvtUserOptions_Impl::SvtUserOptions_Impl() :
-    m_xChangeListener( new SvtUserConfigChangeListener_Impl(*this) )
+SvtUserOptions::Impl::Impl() :
+    m_xChangeListener( new ChangeListener(*this) )
 {
     try
     {
-        m_xCfg = Reference< css::container::XNameAccess > (
-            ::comphelper::ConfigurationHelper::openConfig(
-            ::comphelper::getProcessServiceFactory(),
-            rtl::OUString(s_sData),
-            ::comphelper::ConfigurationHelper::E_STANDARD),
-            css::uno::UNO_QUERY );
+        m_xCfg = uno::Reference<container::XNameAccess>(
+            comphelper::ConfigurationHelper::openConfig(
+                comphelper::getProcessServiceFactory(),
+                sData,
+                comphelper::ConfigurationHelper::E_STANDARD
+            ),
+            uno::UNO_QUERY
+        );
 
-        m_xData = css::uno::Reference< css::beans::XPropertySet >(m_xCfg, css::uno::UNO_QUERY);
-        uno::Reference< util::XChangesNotifier > xChgNot( m_xCfg, UNO_QUERY);
+        m_xData = uno::Reference<beans::XPropertySet>(m_xCfg, uno::UNO_QUERY);
+        uno::Reference<util::XChangesNotifier> xChgNot(m_xCfg, uno::UNO_QUERY);
         try
         {
-            xChgNot->addChangesListener( m_xChangeListener );
+            xChgNot->addChangesListener(m_xChangeListener);
         }
-        catch(RuntimeException& )
+        catch (uno::RuntimeException&)
         {
         }
     }
-    catch(const css::uno::Exception& ex)
+    catch (uno::Exception const& ex)
     {
         m_xCfg.clear();
         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
@@ -215,1091 +172,202 @@ SvtUserOptions_Impl::SvtUserOptions_Impl() :
 
 // -----------------------------------------------------------------------
 
-SvtUserOptions_Impl::~SvtUserOptions_Impl()
+OUString SvtUserOptions::Impl::GetToken (sal_uInt16 nToken) const
 {
-}
-
-::rtl::OUString SvtUserOptions_Impl::GetCompany() const
-{
-    ::rtl::OUString sCompany;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_so)) >>= sCompany;
-    }
-    catch ( const css::uno::Exception& ex )
+    OUString sToken;
+    if (nToken < nOptionNameCount)
     {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        try
+        {
+            if (m_xData.is())
+                m_xData->getPropertyValue(vOptionNames[nToken]) >>= sToken;
+        }
+        catch (uno::Exception const& ex)
+        {
+            SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        }
     }
-
-    return sCompany;
+    else
+        SAL_WARN("unotools.config", "SvtUserOptions::Impl::GetToken(): invalid token");
+    return sToken;
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetFirstName() const
-{
-    ::rtl::OUString sFirstName;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sgivenname)) >>= sFirstName;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sFirstName;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetLastName() const
+void SvtUserOptions::Impl::SetToken (sal_uInt16 nToken, OUString const& sToken)
 {
-    ::rtl::OUString sLastName;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_ssn)) >>= sLastName;
-    }
-    catch ( const css::uno::Exception& ex )
+    if (nToken < nOptionNameCount)
     {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        try
+        {
+            if (m_xData.is())
+                m_xData->setPropertyValue(vOptionNames[nToken], uno::makeAny(sToken));
+            comphelper::ConfigurationHelper::flush(m_xCfg);
+        }
+        catch (uno::Exception const& ex)
+        {
+            SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        }
     }
-
-    return  sLastName;
+    else
+        SAL_WARN("unotools.config", "SvtUserOptions::Impl::GetToken(): invalid token");
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetID() const
-{
-    ::rtl::OUString sID;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sinitials)) >>= sID;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sID;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetStreet() const
+OUString SvtUserOptions::Impl::GetFullName () const
 {
-    ::rtl::OUString sStreet;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sstreet)) >>= sStreet;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sStreet;
+    // TODO international name
+    OUString sFullName = GetToken(USER_OPT_FIRSTNAME).trim();
+    if (!sFullName.isEmpty())
+        sFullName += " ";
+    sFullName += GetToken(USER_OPT_LASTNAME).trim();
+    return sFullName;
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetCity() const
-{
-    ::rtl::OUString sCity;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sl)) >>= sCity;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sCity;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetState() const
+void SvtUserOptions::Impl::Notify ()
 {
-    ::rtl::OUString sState;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sst)) >>= sState;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sState;
+    NotifyListeners(0);
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetZip() const
-{
-    ::rtl::OUString sZip;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_spostalcode)) >>= sZip;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sZip;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetCountry() const
+sal_Bool SvtUserOptions::Impl::IsTokenReadonly (sal_uInt16 nToken) const
 {
-    ::rtl::OUString sCountry;
-
-    try
+    if (nToken < nOptionNameCount)
     {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sc)) >>= sCountry;
+        uno::Reference<beans::XPropertySet> xData(m_xCfg, uno::UNO_QUERY);
+        uno::Reference<beans::XPropertySetInfo> xInfo = xData->getPropertySetInfo();
+        beans::Property aProp = xInfo->getPropertyByName(vOptionNames[nToken]);
+        return ((aProp.Attributes & beans::PropertyAttribute::READONLY) ==
+            beans::PropertyAttribute::READONLY);
     }
-    catch ( const css::uno::Exception& ex )
+    else
     {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        SAL_WARN("unotools.config", "SvtUserOptions::Impl::IsTokenReadonly(): invalid token");
+        return sal_False;
     }
-
-    return  sCountry;
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetPosition() const
-{
-    ::rtl::OUString sPosition;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sposition)) >>= sPosition;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sPosition;
-}
+// class SvtUserOptions --------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetTitle() const
+SvtUserOptions::SvtUserOptions ()
 {
-    ::rtl::OUString sTitle;
+    // Global access, must be guarded (multithreading)
+    osl::MutexGuard aGuard(GetInitMutex());
 
-    try
+    if (pSharedImpl.expired())
     {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_stitle)) >>= sTitle;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
+        RTL_LOGFILE_CONTEXT(aLog, "unotools ( ??? ) SvtUserOptions::Impl::ctor()");
+        pImpl.reset(new Impl);
+        pSharedImpl = pImpl;
+        ItemHolder1::holdConfigItem(E_USEROPTIONS);
     }
-
-    return  sTitle;
+    pImpl = pSharedImpl.lock();
+    pImpl->AddListener(this);
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetTelephoneHome() const
-{
-    ::rtl::OUString sTelephoneHome;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_shomephone)) >>= sTelephoneHome;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sTelephoneHome;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetTelephoneWork() const
+SvtUserOptions::~SvtUserOptions()
 {
-    ::rtl::OUString sTelephoneWork;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_stelephonenumber)) >>= sTelephoneWork;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sTelephoneWork;
+    // Global access, must be guarded (multithreading)
+    osl::MutexGuard aGuard( GetInitMutex() );
+    pImpl->RemoveListener(this);
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetFax() const
-{
-    ::rtl::OUString sFax;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber)) >>= sFax;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sFax;
-}
+// -----------------------------------------------------------------------
 
-::rtl::OUString SvtUserOptions_Impl::GetEmail() const
+namespace
 {
-    ::rtl::OUString sEmail;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_smail)) >>= sEmail;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sEmail;
+    class theUserOptionsMutex : public rtl::Static<osl::Mutex, theUserOptionsMutex>{};
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetCustomerNumber() const
+osl::Mutex& SvtUserOptions::GetInitMutex()
 {
-    ::rtl::OUString sCustomerNumber;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_scustomernumber)) >>= sCustomerNumber;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-
-    return  sCustomerNumber;
+    return theUserOptionsMutex::get();
 }
 
-::rtl::OUString SvtUserOptions_Impl::GetFathersName() const
-{
-    ::rtl::OUString sFathersName;
-
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sfathersname)) >>= sFathersName;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
+// -----------------------------------------------------------------------
 
-    return  sFathersName;
-}
+//
+// getters
+//
+OUString SvtUserOptions::GetCompany        () const { return GetToken(USER_OPT_COMPANY); }
+OUString SvtUserOptions::GetFirstName      () const { return GetToken(USER_OPT_FIRSTNAME); }
+OUString SvtUserOptions::GetLastName       () const { return GetToken(USER_OPT_LASTNAME); }
+OUString SvtUserOptions::GetID             () const { return GetToken(USER_OPT_ID); }
+OUString SvtUserOptions::GetStreet         () const { return GetToken(USER_OPT_STREET); }
+OUString SvtUserOptions::GetCity           () const { return GetToken(USER_OPT_CITY); }
+OUString SvtUserOptions::GetState          () const { return GetToken(USER_OPT_STATE); }
+OUString SvtUserOptions::GetZip            () const { return GetToken(USER_OPT_ZIP); }
+OUString SvtUserOptions::GetCountry        () const { return GetToken(USER_OPT_COUNTRY); }
+OUString SvtUserOptions::GetPosition       () const { return GetToken(USER_OPT_POSITION); }
+OUString SvtUserOptions::GetTitle          () const { return GetToken(USER_OPT_TITLE); }
+OUString SvtUserOptions::GetTelephoneHome  () const { return GetToken(USER_OPT_TELEPHONEHOME); }
+OUString SvtUserOptions::GetTelephoneWork  () const { return GetToken(USER_OPT_TELEPHONEWORK); }
+OUString SvtUserOptions::GetFax            () const { return GetToken(USER_OPT_FAX); }
+OUString SvtUserOptions::GetEmail          () const { return GetToken(USER_OPT_EMAIL); }
+OUString SvtUserOptions::GetCustomerNumber () const { return GetToken(USER_OPT_CUSTOMERNUMBER); }
+OUString SvtUserOptions::GetFathersName    () const { return GetToken(USER_OPT_FATHERSNAME); }
+OUString SvtUserOptions::GetApartment      () const { return GetToken(USER_OPT_APARTMENT); }
 
-::rtl::OUString SvtUserOptions_Impl::GetApartment() const
-{
-    ::rtl::OUString sApartment;
+// -----------------------------------------------------------------------
 
-    try
-    {
-        if (m_xData.is())
-            m_xData->getPropertyValue(rtl::OUString(s_sapartment)) >>= sApartment;
-    }
-    catch ( const css::uno::Exception& ex )
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
+//
+// setters
+//
+void SvtUserOptions::SetCompany   (OUString const& sToken) { SetToken(USER_OPT_COMPANY,   sToken); 
}
+void SvtUserOptions::SetFirstName (OUString const& sToken) { SetToken(USER_OPT_FIRSTNAME, sToken); 
}
+void SvtUserOptions::SetLastName  (OUString const& sToken) { SetToken(USER_OPT_LASTNAME,  sToken); 
}
+void SvtUserOptions::SetID        (OUString const& sToken) { SetToken(USER_OPT_ID,        sToken); 
}
+void SvtUserOptions::SetStreet    (OUString const& sToken) { SetToken(USER_OPT_STREET,    sToken); 
}
+void SvtUserOptions::SetCity      (OUString const& sToken) { SetToken(USER_OPT_CITY,      sToken); 
}
+void SvtUserOptions::SetState     (OUString const& sToken) { SetToken(USER_OPT_STATE,     sToken); 
}
+void SvtUserOptions::SetZip       (OUString const& sToken) { SetToken(USER_OPT_ZIP,       sToken); 
}
+void SvtUserOptions::SetCountry   (OUString const& sToken) { SetToken(USER_OPT_COUNTRY,   sToken); 
}
+void SvtUserOptions::SetPosition  (OUString const& sToken) { SetToken(USER_OPT_POSITION,  sToken); 
}
+void SvtUserOptions::SetTitle     (OUString const& sToken) { SetToken(USER_OPT_TITLE,     sToken); 
}
+void SvtUserOptions::SetFax       (OUString const& sToken) { SetToken(USER_OPT_FAX,       sToken); 
}
+void SvtUserOptions::SetEmail     (OUString const& sToken) { SetToken(USER_OPT_EMAIL,     sToken); 
}
+void SvtUserOptions::SetTelephoneHome  (OUString const& sToken) { SetToken(USER_OPT_TELEPHONEHOME, 
 sToken); }
+void SvtUserOptions::SetTelephoneWork  (OUString const& sToken) { SetToken(USER_OPT_TELEPHONEWORK, 
 sToken); }
+void SvtUserOptions::SetCustomerNumber (OUString const& sToken) { 
SetToken(USER_OPT_CUSTOMERNUMBER, sToken); }
+void SvtUserOptions::SetFathersName    (OUString const& sToken) { SetToken(USER_OPT_FATHERSNAME,   
 sToken); }
+void SvtUserOptions::SetApartment      (OUString const& sToken) { SetToken(USER_OPT_APARTMENT,     
 sToken); }
 
-    return  sApartment;
-}
+// -----------------------------------------------------------------------
 
-void SvtUserOptions_Impl::SetCompany( const ::rtl::OUString& sCompany )
+sal_Bool SvtUserOptions::IsTokenReadonly (sal_uInt16 nToken) const
 {
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_so), 
css::uno::makeAny(::rtl::OUString(sCompany)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
+    osl::MutexGuard aGuard(GetInitMutex());
+    return pImpl->IsTokenReadonly(nToken);
 }
 
-void SvtUserOptions_Impl::SetFirstName( const ::rtl::OUString& sFirstName )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sgivenname), 
css::uno::makeAny(::rtl::OUString(sFirstName)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
+// -----------------------------------------------------------------------
 
-void SvtUserOptions_Impl::SetLastName( const ::rtl::OUString& sLastName )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_ssn), 
css::uno::makeAny(::rtl::OUString(sLastName)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-void SvtUserOptions_Impl::SetID( const ::rtl::OUString& sID )
+OUString SvtUserOptions::GetToken (sal_uInt16 nToken) const
 {
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sinitials), 
css::uno::makeAny(::rtl::OUString(sID)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
+    osl::MutexGuard aGuard(GetInitMutex());
+    return pImpl->GetToken(nToken);
 }
 
-void SvtUserOptions_Impl::SetStreet( const ::rtl::OUString& sStreet )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sstreet), 
css::uno::makeAny(::rtl::OUString(sStreet)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
+// -----------------------------------------------------------------------
 
-void SvtUserOptions_Impl::SetCity( const ::rtl::OUString& sCity )
+void SvtUserOptions::SetToken (sal_uInt16 nToken, OUString const& rNewToken)
 {
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sl), 
css::uno::makeAny(::rtl::OUString(sCity)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
+    osl::MutexGuard aGuard(GetInitMutex());
+    pImpl->SetToken(nToken, rNewToken);
 }
 
-void SvtUserOptions_Impl::SetState( const ::rtl::OUString& sState )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sst), 
css::uno::makeAny(::rtl::OUString(sState)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
+// -----------------------------------------------------------------------
 
-void SvtUserOptions_Impl::SetZip( const ::rtl::OUString& sZip )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_spostalcode), 
css::uno::makeAny(::rtl::OUString(sZip)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetCountry( const ::rtl::OUString& sCountry )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sc), 
css::uno::makeAny(::rtl::OUString(sCountry)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetPosition( const ::rtl::OUString& sPosition )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sposition), 
css::uno::makeAny(::rtl::OUString(sPosition)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetTitle( const ::rtl::OUString& sTitle )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_stitle), 
css::uno::makeAny(::rtl::OUString(sTitle)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetTelephoneHome( const ::rtl::OUString& sTelephoneHome )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_shomephone), 
css::uno::makeAny(::rtl::OUString(sTelephoneHome)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetTelephoneWork( const ::rtl::OUString& sTelephoneWork )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_stelephonenumber), 
css::uno::makeAny(::rtl::OUString(sTelephoneWork)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetFax( const ::rtl::OUString& sFax )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber), 
css::uno::makeAny(::rtl::OUString(sFax)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetEmail( const ::rtl::OUString& sEmail )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_smail), 
css::uno::makeAny(::rtl::OUString(sEmail)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetCustomerNumber( const ::rtl::OUString& sCustomerNumber )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_scustomernumber), 
css::uno::makeAny(::rtl::OUString(sCustomerNumber)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetFathersName( const ::rtl::OUString& sFathersName )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sfathersname), 
css::uno::makeAny(::rtl::OUString(sFathersName)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
-{
-    try
-    {
-        if (m_xData.is())
-            m_xData->setPropertyValue(rtl::OUString(s_sapartment), 
css::uno::makeAny(::rtl::OUString(sApartment)));
-        ::comphelper::ConfigurationHelper::flush(m_xCfg);
-    }
-    catch ( const css::uno::Exception& ex)
-    {
-        SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
-    }
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions_Impl::GetFullName() const
-{
-    ::rtl::OUString sFullName;
-
-    sFullName = GetFirstName();
-    sFullName.trim();
-    if ( !sFullName.isEmpty() )
-        sFullName += ::rtl::OUString(" ");
-    sFullName += GetLastName();
-    sFullName.trim();
-
-    return sFullName;
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions_Impl::Notify()
-{
-    NotifyListeners(0);
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SvtUserOptions_Impl::IsTokenReadonly( sal_uInt16 nToken ) const
-{
-    css::uno::Reference< css::beans::XPropertySet >     xData(m_xCfg, css::uno::UNO_QUERY);
-    css::uno::Reference< css::beans::XPropertySetInfo > xInfo = xData->getPropertySetInfo();
-    css::beans::Property aProp;
-    sal_Bool             bRet = sal_False;
-
-    switch ( nToken )
-    {
-        case USER_OPT_COMPANY:
-        {
-            aProp = xInfo->getPropertyByName(rtl::OUString(s_so));
-            bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-            break;
-        }
-        case USER_OPT_FIRSTNAME:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sgivenname));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_LASTNAME:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_ssn));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_ID:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sinitials));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_STREET:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sstreet));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_CITY:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sl));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_STATE:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sst));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_ZIP:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_spostalcode));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_COUNTRY:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sc));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_POSITION:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sposition));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_TITLE:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_stitle));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_TELEPHONEHOME:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_shomephone));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_TELEPHONEWORK:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_stelephonenumber));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_FAX:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sfacsimiletelephonenumber));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_EMAIL:
-        {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_smail));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-        }
-        case USER_OPT_FATHERSNAME:
-            {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sfathersname));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-            }
-        case USER_OPT_APARTMENT:
-            {
-                aProp = xInfo->getPropertyByName(rtl::OUString(s_sapartment));
-                bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == 
css::beans::PropertyAttribute::READONLY);
-                break;
-            }
-        default:
-            SAL_WARN( "unotools.config", "SvtUserOptions_Impl::IsTokenReadonly(): invalid token" );
-    }
-
-    return bRet;
-}
-
-//------------------------------------------------------------------------
-::rtl::OUString SvtUserOptions_Impl::GetToken(sal_uInt16 nToken) const
-{
-    ::rtl::OUString pRet;
-    switch(nToken)
-    {
-        case USER_OPT_COMPANY:        pRet = GetCompany();     break;
-        case USER_OPT_FIRSTNAME:      pRet = GetFirstName();   break;
-        case USER_OPT_LASTNAME:       pRet = GetLastName();    break;
-        case USER_OPT_ID:             pRet = GetID();          break;
-        case USER_OPT_STREET:         pRet = GetStreet();      break;
-        case USER_OPT_CITY:           pRet = GetCity();        break;
-        case USER_OPT_STATE:          pRet = GetState();       break;
-        case USER_OPT_ZIP:            pRet = GetZip();         break;
-        case USER_OPT_COUNTRY:        pRet = GetCountry();     break;
-        case USER_OPT_POSITION:       pRet = GetPosition();    break;
-        case USER_OPT_TITLE:          pRet = GetTitle();       break;
-        case USER_OPT_TELEPHONEHOME:  pRet = GetTelephoneHome(); break;
-        case USER_OPT_TELEPHONEWORK:  pRet = GetTelephoneWork(); break;
-        case USER_OPT_FAX:            pRet = GetFax();           break;
-        case USER_OPT_EMAIL:          pRet = GetEmail();         break;
-        case USER_OPT_FATHERSNAME:    pRet = GetFathersName();   break;
-        case USER_OPT_APARTMENT:      pRet = GetApartment();     break;
-        default:
-            SAL_WARN( "unotools.config", "SvtUserOptions_Impl::GetToken(): invalid token" );
-    }
-    return pRet;
-}
-
-// class SvtUserOptions --------------------------------------------------
-
-SvtUserOptions::SvtUserOptions()
-{
-    // Global access, must be guarded (multithreading)
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-
-    if ( !pOptions )
-    {
-        RTL_LOGFILE_CONTEXT(aLog, "unotools ( ??? ) ::SvtUserOptions_Impl::ctor()");
-        pOptions = new SvtUserOptions_Impl;
-
-        ItemHolder1::holdConfigItem(E_USEROPTIONS);
-    }
-    ++nRefCount;
-    pImp = pOptions;
-    pImp->AddListener(this);
-}
-
-// -----------------------------------------------------------------------
-
-SvtUserOptions::~SvtUserOptions()
-{
-    // Global access, must be guarded (multithreading)
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->RemoveListener(this);
-    if ( !--nRefCount )
-    {
-        //if ( pOptions->IsModified() )
-        //  pOptions->Commit();
-        DELETEZ( pOptions );
-    }
-}
-
-// -----------------------------------------------------------------------
-
-namespace
-{
-    class theUserOptionsMutex : public rtl::Static<osl::Mutex, theUserOptionsMutex>{};
-}
-
-::osl::Mutex& SvtUserOptions::GetInitMutex()
-{
-    return theUserOptionsMutex::get();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetCompany() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetCompany();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetFirstName() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetFirstName();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetLastName() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetLastName();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetID() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetID();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetStreet() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetStreet();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetCity() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetCity();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetState() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetState();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetZip() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetZip();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetCountry() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetCountry();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetPosition() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetPosition();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetTitle() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetTitle();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetTelephoneHome() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetTelephoneHome();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetTelephoneWork() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetTelephoneWork();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetFax() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetFax();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetEmail() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetEmail();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetCustomerNumber() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetCustomerNumber();
-}
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetFathersName() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetFathersName() ;
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetApartment() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetApartment();
-}
-
-// -----------------------------------------------------------------------
-
-::rtl::OUString SvtUserOptions::GetFullName() const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetFullName();
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetCompany( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetCompany( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetFirstName( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetFirstName( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetLastName( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetLastName( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetID( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetID( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetStreet( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetStreet( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetCity( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetCity( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetState( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetState( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetZip( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetZip( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetCountry( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetCountry( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetPosition( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetPosition( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetTitle( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetTitle( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetTelephoneHome( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetTelephoneHome( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetTelephoneWork( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetTelephoneWork( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetFax( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetFax( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetEmail( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetEmail( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetCustomerNumber( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetCustomerNumber( rNewToken );
-}
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetFathersName( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetFathersName( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-void SvtUserOptions::SetApartment( const ::rtl::OUString& rNewToken )
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    pImp->SetApartment( rNewToken );
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SvtUserOptions::IsTokenReadonly( sal_uInt16 nToken ) const
-{
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->IsTokenReadonly( nToken );
-}
-//------------------------------------------------------------------------
-::rtl::OUString   SvtUserOptions::GetToken(sal_uInt16 nToken) const
+OUString SvtUserOptions::GetFullName () const
 {
-    ::osl::MutexGuard aGuard( GetInitMutex() );
-    return pImp->GetToken( nToken );
+    osl::MutexGuard aGuard(GetInitMutex());
+    return pImpl->GetFullName();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.7


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.