LCOV - code coverage report
Current view: top level - unotools/source/config - useroptions.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 165 487 33.9 %
Date: 2012-08-25 Functions: 38 91 41.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 148 938 15.8 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*
       3                 :            :  * This file is part of the LibreOffice project.
       4                 :            :  *
       5                 :            :  * This Source Code Form is subject to the terms of the Mozilla Public
       6                 :            :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7                 :            :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8                 :            :  *
       9                 :            :  * This file incorporates work covered by the following license notice:
      10                 :            :  *
      11                 :            :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12                 :            :  *   contributor license agreements. See the NOTICE file distributed
      13                 :            :  *   with this work for additional information regarding copyright
      14                 :            :  *   ownership. The ASF licenses this file to you under the Apache
      15                 :            :  *   License, Version 2.0 (the "License"); you may not use this file
      16                 :            :  *   except in compliance with the License. You may obtain a copy of
      17                 :            :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18                 :            :  */
      19                 :            : 
      20                 :            : 
      21                 :            : #include <unotools/useroptions.hxx>
      22                 :            : 
      23                 :            : #include <unotools/configmgr.hxx>
      24                 :            : #include <com/sun/star/uno/Any.hxx>
      25                 :            : #include <com/sun/star/uno/Sequence.hxx>
      26                 :            : #include <tools/solar.h>
      27                 :            : #include <osl/mutex.hxx>
      28                 :            : #include <rtl/instance.hxx>
      29                 :            : #include <rtl/logfile.hxx>
      30                 :            : #include "itemholder1.hxx"
      31                 :            : 
      32                 :            : #include <com/sun/star/beans/Property.hpp>
      33                 :            : #include <com/sun/star/beans/XPropertySet.hpp>
      34                 :            : #include <com/sun/star/beans/PropertyAttribute.hpp>
      35                 :            : #include <com/sun/star/container/XNameAccess.hpp>
      36                 :            : #include <com/sun/star/container/XNameContainer.hpp>
      37                 :            : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      38                 :            : #include <com/sun/star/util/XChangesListener.hpp>
      39                 :            : #include <com/sun/star/util/XChangesNotifier.hpp>
      40                 :            : #include <com/sun/star/util/ChangesEvent.hpp>
      41                 :            : #include <comphelper/configurationhelper.hxx>
      42                 :            : #include <comphelper/processfactory.hxx>
      43                 :            : 
      44                 :            : using namespace utl;
      45                 :            : using namespace com::sun::star;
      46                 :            : using namespace com::sun::star::uno;
      47                 :            : using ::rtl::OUString;
      48                 :            : 
      49                 :            : namespace css = ::com::sun::star;
      50                 :            : 
      51                 :            : namespace
      52                 :            : {
      53                 :            :     const char s_sData[] = "org.openoffice.UserProfile/Data";
      54                 :            :     const char s_so[] = "o"; // USER_OPT_COMPANY
      55                 :            :     const char s_sgivenname[] = "givenname"; // USER_OPT_FIRSTNAME
      56                 :            :     const char s_ssn[] = "sn"; // USER_OPT_LASTNAME
      57                 :            :     const char s_sinitials[] = "initials"; // USER_OPT_ID
      58                 :            :     const char s_sstreet[] = "street"; // USER_OPT_STREET
      59                 :            :     const char s_sl[] = "l"; // USER_OPT_CITY
      60                 :            :     const char s_sst[] = "st"; // USER_OPT_STATE
      61                 :            :     const char s_spostalcode[] = "postalcode"; // USER_OPT_ZIP
      62                 :            :     const char s_sc[] = "c"; // USER_OPT_COUNTRY
      63                 :            :     const char s_stitle[] = "title"; // USER_OPT_TITLE
      64                 :            :     const char s_sposition[] = "position"; // USER_OPT_POSITION
      65                 :            :     const char s_shomephone[] = "homephone"; // USER_OPT_TELEPHONEHOME
      66                 :            :     const char s_stelephonenumber[] = "telephonenumber"; // USER_OPT_TELEPHONEWORK
      67                 :            :     const char s_sfacsimiletelephonenumber[] = "facsimiletelephonenumber"; // USER_OPT_FAX
      68                 :            :     const char s_smail[] = "mail"; // USER_OPT_EMAIL
      69                 :            :     const char s_scustomernumber[] = "customernumber"; // USER_OPT_CUSTOMERNUMBER
      70                 :            :     const char s_sfathersname[] = "fathersname"; // USER_OPT_FATHERSNAME
      71                 :            :     const char s_sapartment[] = "apartment"; // USER_OPT_APARTMENT
      72                 :            : }
      73                 :            : 
      74                 :            : // class SvtUserOptions_Impl ---------------------------------------------
      75                 :            : class SvtUserOptions_Impl;
      76                 :            : class SvtUserConfigChangeListener_Impl : public cppu::WeakImplHelper1
      77                 :            : <
      78                 :            :     com::sun::star::util::XChangesListener
      79                 :            : >
      80                 :            : {
      81                 :            :         SvtUserOptions_Impl&    m_rParent;
      82                 :            :     public:
      83                 :            :         SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent);
      84                 :            :         ~SvtUserConfigChangeListener_Impl();
      85                 :            : 
      86                 :            :     //XChangesListener
      87                 :            :     virtual void SAL_CALL changesOccurred( const util::ChangesEvent& Event ) throw(RuntimeException);
      88                 :            :     //XEventListener
      89                 :            :     virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw(RuntimeException);
      90                 :            : };
      91                 :            : 
      92                 :            : class SvtUserOptions_Impl : public utl::ConfigurationBroadcaster
      93                 :            : {
      94                 :            : public:
      95                 :            :     SvtUserOptions_Impl();
      96                 :            :     ~SvtUserOptions_Impl();
      97                 :            : 
      98                 :            :     // get the user token
      99                 :            :     ::rtl::OUString   GetCompany() const;
     100                 :            :     ::rtl::OUString   GetFirstName() const;
     101                 :            :     ::rtl::OUString   GetLastName() const;
     102                 :            :     ::rtl::OUString   GetID() const;
     103                 :            :     ::rtl::OUString   GetStreet() const;
     104                 :            :     ::rtl::OUString   GetCity() const;
     105                 :            :     ::rtl::OUString   GetState() const;
     106                 :            :     ::rtl::OUString   GetZip() const;
     107                 :            :     ::rtl::OUString   GetCountry() const;
     108                 :            :     ::rtl::OUString   GetPosition() const;
     109                 :            :     ::rtl::OUString   GetTitle() const;
     110                 :            :     ::rtl::OUString   GetTelephoneHome() const;
     111                 :            :     ::rtl::OUString   GetTelephoneWork() const;
     112                 :            :     ::rtl::OUString   GetFax() const;
     113                 :            :     ::rtl::OUString   GetEmail() const;
     114                 :            :     ::rtl::OUString   GetCustomerNumber() const;
     115                 :            :     ::rtl::OUString   GetFathersName() const;
     116                 :            :     ::rtl::OUString   GetApartment() const;
     117                 :            : 
     118                 :            :     ::rtl::OUString   GetFullName() const;
     119                 :            : 
     120                 :            :     // set the address token
     121                 :            :     void              SetCompany( const ::rtl::OUString& rNewToken );
     122                 :            :     void              SetFirstName( const ::rtl::OUString& rNewToken );
     123                 :            :     void              SetLastName( const ::rtl::OUString& rNewToken );
     124                 :            :     void              SetID( const ::rtl::OUString& rNewToken );
     125                 :            :     void              SetStreet( const ::rtl::OUString& rNewToken );
     126                 :            :     void              SetCity( const ::rtl::OUString& rNewToken );
     127                 :            :     void              SetState( const ::rtl::OUString& rNewToken );
     128                 :            :     void              SetZip( const ::rtl::OUString& rNewToken );
     129                 :            :     void              SetCountry( const ::rtl::OUString& rNewToken );
     130                 :            :     void              SetPosition( const ::rtl::OUString& rNewToken );
     131                 :            :     void              SetTitle( const ::rtl::OUString& rNewToken );
     132                 :            :     void              SetTelephoneHome( const ::rtl::OUString& rNewToken );
     133                 :            :     void              SetTelephoneWork( const ::rtl::OUString& rNewToken );
     134                 :            :     void              SetFax( const ::rtl::OUString& rNewToken );
     135                 :            :     void              SetEmail( const ::rtl::OUString& rNewToken );
     136                 :            :     void              SetCustomerNumber( const ::rtl::OUString& rNewToken );
     137                 :            :     void              SetFathersName( const ::rtl::OUString& rNewToken );
     138                 :            :     void              SetApartment( const ::rtl::OUString& rNewToken );
     139                 :            : 
     140                 :            :     sal_Bool          IsTokenReadonly( sal_uInt16 nToken ) const;
     141                 :            :     ::rtl::OUString   GetToken(sal_uInt16 nToken) const;
     142                 :            :     void              Notify();
     143                 :            : 
     144                 :            : private:
     145                 :            :     uno::Reference< util::XChangesListener >           m_xChangeListener;
     146                 :            :     css::uno::Reference< css::container::XNameAccess > m_xCfg;
     147                 :            :     css::uno::Reference< css::beans::XPropertySet >    m_xData;
     148                 :            : };
     149                 :            : 
     150                 :            : // global ----------------------------------------------------------------
     151                 :            : 
     152                 :            : static SvtUserOptions_Impl* pOptions = NULL;
     153                 :            : static sal_Int32            nRefCount = 0;
     154                 :            : 
     155                 :            : #define READONLY_DEFAULT    sal_False
     156                 :            : 
     157                 :        105 : SvtUserConfigChangeListener_Impl::SvtUserConfigChangeListener_Impl(SvtUserOptions_Impl& rParent) :
     158                 :        105 :     m_rParent( rParent )
     159                 :            : {
     160                 :        105 : }
     161                 :            : 
     162                 :         78 : SvtUserConfigChangeListener_Impl::~SvtUserConfigChangeListener_Impl()
     163                 :            : {
     164         [ -  + ]:        156 : }
     165                 :            : 
     166                 :          0 : void SvtUserConfigChangeListener_Impl::changesOccurred( const util::ChangesEvent& rEvent ) throw(RuntimeException)
     167                 :            : {
     168         [ #  # ]:          0 :     if(rEvent.Changes.getLength())
     169                 :          0 :         m_rParent.Notify();
     170                 :          0 : }
     171                 :            : 
     172                 :          0 : void SvtUserConfigChangeListener_Impl::disposing( const lang::EventObject& rSource ) throw(RuntimeException)
     173                 :            : {
     174                 :            :     try
     175                 :            :     {
     176         [ #  # ]:          0 :         uno::Reference< util::XChangesNotifier > xChgNot( rSource.Source, UNO_QUERY_THROW);
     177 [ #  # ][ #  # ]:          0 :         xChgNot->removeChangesListener(this);
         [ #  # ][ #  # ]
     178                 :            :     }
     179                 :          0 :     catch(Exception& )
     180                 :            :     {
     181                 :            :     }
     182                 :          0 : }
     183                 :            : 
     184                 :            : // class SvtUserOptions_Impl ---------------------------------------------
     185                 :            : 
     186                 :            : // -----------------------------------------------------------------------
     187                 :        105 : SvtUserOptions_Impl::SvtUserOptions_Impl() :
     188 [ +  - ][ +  - ]:        105 :     m_xChangeListener( new SvtUserConfigChangeListener_Impl(*this) )
                 [ +  - ]
     189                 :            : {
     190                 :            :     try
     191                 :            :     {
     192                 :            :         m_xCfg = Reference< css::container::XNameAccess > (
     193                 :            :             ::comphelper::ConfigurationHelper::openConfig(
     194                 :            :             ::comphelper::getProcessServiceFactory(),
     195                 :            :             rtl::OUString(s_sData),
     196                 :            :             ::comphelper::ConfigurationHelper::E_STANDARD),
     197 [ +  - ][ +  - ]:        105 :             css::uno::UNO_QUERY );
         [ +  - ][ +  - ]
     198                 :            : 
     199 [ +  - ][ #  # ]:        105 :         m_xData = css::uno::Reference< css::beans::XPropertySet >(m_xCfg, css::uno::UNO_QUERY);
                 [ +  - ]
     200         [ +  - ]:        105 :         uno::Reference< util::XChangesNotifier > xChgNot( m_xCfg, UNO_QUERY);
     201                 :            :         try
     202                 :            :         {
     203 [ +  - ][ +  - ]:        105 :             xChgNot->addChangesListener( m_xChangeListener );
     204                 :            :         }
     205         [ #  # ]:          0 :         catch(RuntimeException& )
     206                 :            :         {
     207         [ #  # ]:        105 :         }
     208                 :            :     }
     209         [ #  # ]:          0 :     catch(const css::uno::Exception& ex)
     210                 :            :     {
     211                 :          0 :         m_xCfg.clear();
     212                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     213                 :            :     }
     214                 :        105 : }
     215                 :            : 
     216                 :            : // -----------------------------------------------------------------------
     217                 :            : 
     218                 :         78 : SvtUserOptions_Impl::~SvtUserOptions_Impl()
     219                 :            : {
     220         [ -  + ]:        156 : }
     221                 :            : 
     222                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetCompany() const
     223                 :            : {
     224                 :         66 :     ::rtl::OUString sCompany;
     225                 :            : 
     226                 :            :     try
     227                 :            :     {
     228         [ +  - ]:         66 :         if (m_xData.is())
     229 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_so)) >>= sCompany;
                 [ #  # ]
     230                 :            :     }
     231         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     232                 :            :     {
     233                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     234                 :            :     }
     235                 :            : 
     236                 :         66 :     return sCompany;
     237                 :            : }
     238                 :            : 
     239                 :       2710 : ::rtl::OUString SvtUserOptions_Impl::GetFirstName() const
     240                 :            : {
     241                 :       2710 :     ::rtl::OUString sFirstName;
     242                 :            : 
     243                 :            :     try
     244                 :            :     {
     245         [ +  - ]:       2710 :         if (m_xData.is())
     246 [ +  - ][ +  - ]:       2710 :             m_xData->getPropertyValue(rtl::OUString(s_sgivenname)) >>= sFirstName;
                 [ #  # ]
     247                 :            :     }
     248         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     249                 :            :     {
     250                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     251                 :            :     }
     252                 :            : 
     253                 :       2710 :     return  sFirstName;
     254                 :            : }
     255                 :            : 
     256                 :       2765 : ::rtl::OUString SvtUserOptions_Impl::GetLastName() const
     257                 :            : {
     258                 :       2765 :     ::rtl::OUString sLastName;
     259                 :            : 
     260                 :            :     try
     261                 :            :     {
     262         [ +  - ]:       2765 :         if (m_xData.is())
     263 [ +  - ][ +  - ]:       2765 :             m_xData->getPropertyValue(rtl::OUString(s_ssn)) >>= sLastName;
                 [ #  # ]
     264                 :            :     }
     265         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     266                 :            :     {
     267                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     268                 :            :     }
     269                 :            : 
     270                 :       2765 :     return  sLastName;
     271                 :            : }
     272                 :            : 
     273                 :        378 : ::rtl::OUString SvtUserOptions_Impl::GetID() const
     274                 :            : {
     275                 :        378 :     ::rtl::OUString sID;
     276                 :            : 
     277                 :            :     try
     278                 :            :     {
     279         [ +  - ]:        378 :         if (m_xData.is())
     280 [ +  - ][ +  - ]:        378 :             m_xData->getPropertyValue(rtl::OUString(s_sinitials)) >>= sID;
                 [ #  # ]
     281                 :            :     }
     282         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     283                 :            :     {
     284                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     285                 :            :     }
     286                 :            : 
     287                 :        378 :     return  sID;
     288                 :            : }
     289                 :            : 
     290                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetStreet() const
     291                 :            : {
     292                 :         66 :     ::rtl::OUString sStreet;
     293                 :            : 
     294                 :            :     try
     295                 :            :     {
     296         [ +  - ]:         66 :         if (m_xData.is())
     297 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_sstreet)) >>= sStreet;
                 [ #  # ]
     298                 :            :     }
     299         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     300                 :            :     {
     301                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     302                 :            :     }
     303                 :            : 
     304                 :         66 :     return  sStreet;
     305                 :            : }
     306                 :            : 
     307                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetCity() const
     308                 :            : {
     309                 :         66 :     ::rtl::OUString sCity;
     310                 :            : 
     311                 :            :     try
     312                 :            :     {
     313         [ +  - ]:         66 :         if (m_xData.is())
     314 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_sl)) >>= sCity;
                 [ #  # ]
     315                 :            :     }
     316         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     317                 :            :     {
     318                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     319                 :            :     }
     320                 :            : 
     321                 :         66 :     return  sCity;
     322                 :            : }
     323                 :            : 
     324                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetState() const
     325                 :            : {
     326                 :         24 :     ::rtl::OUString sState;
     327                 :            : 
     328                 :            :     try
     329                 :            :     {
     330         [ +  - ]:         24 :         if (m_xData.is())
     331 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_sst)) >>= sState;
                 [ #  # ]
     332                 :            :     }
     333         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     334                 :            :     {
     335                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     336                 :            :     }
     337                 :            : 
     338                 :         24 :     return  sState;
     339                 :            : }
     340                 :            : 
     341                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetZip() const
     342                 :            : {
     343                 :         24 :     ::rtl::OUString sZip;
     344                 :            : 
     345                 :            :     try
     346                 :            :     {
     347         [ +  - ]:         24 :         if (m_xData.is())
     348 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_spostalcode)) >>= sZip;
                 [ #  # ]
     349                 :            :     }
     350         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     351                 :            :     {
     352                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     353                 :            :     }
     354                 :            : 
     355                 :         24 :     return  sZip;
     356                 :            : }
     357                 :            : 
     358                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetCountry() const
     359                 :            : {
     360                 :         24 :     ::rtl::OUString sCountry;
     361                 :            : 
     362                 :            :     try
     363                 :            :     {
     364         [ +  - ]:         24 :         if (m_xData.is())
     365 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_sc)) >>= sCountry;
                 [ #  # ]
     366                 :            :     }
     367         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     368                 :            :     {
     369                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     370                 :            :     }
     371                 :            : 
     372                 :         24 :     return  sCountry;
     373                 :            : }
     374                 :            : 
     375                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetPosition() const
     376                 :            : {
     377                 :         66 :     ::rtl::OUString sPosition;
     378                 :            : 
     379                 :            :     try
     380                 :            :     {
     381         [ +  - ]:         66 :         if (m_xData.is())
     382 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_sposition)) >>= sPosition;
                 [ #  # ]
     383                 :            :     }
     384         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     385                 :            :     {
     386                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     387                 :            :     }
     388                 :            : 
     389                 :         66 :     return  sPosition;
     390                 :            : }
     391                 :            : 
     392                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetTitle() const
     393                 :            : {
     394                 :         66 :     ::rtl::OUString sTitle;
     395                 :            : 
     396                 :            :     try
     397                 :            :     {
     398         [ +  - ]:         66 :         if (m_xData.is())
     399 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_stitle)) >>= sTitle;
                 [ #  # ]
     400                 :            :     }
     401         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     402                 :            :     {
     403                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     404                 :            :     }
     405                 :            : 
     406                 :         66 :     return  sTitle;
     407                 :            : }
     408                 :            : 
     409                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetTelephoneHome() const
     410                 :            : {
     411                 :         24 :     ::rtl::OUString sTelephoneHome;
     412                 :            : 
     413                 :            :     try
     414                 :            :     {
     415         [ +  - ]:         24 :         if (m_xData.is())
     416 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_shomephone)) >>= sTelephoneHome;
                 [ #  # ]
     417                 :            :     }
     418         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     419                 :            :     {
     420                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     421                 :            :     }
     422                 :            : 
     423                 :         24 :     return  sTelephoneHome;
     424                 :            : }
     425                 :            : 
     426                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetTelephoneWork() const
     427                 :            : {
     428                 :         24 :     ::rtl::OUString sTelephoneWork;
     429                 :            : 
     430                 :            :     try
     431                 :            :     {
     432         [ +  - ]:         24 :         if (m_xData.is())
     433 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_stelephonenumber)) >>= sTelephoneWork;
                 [ #  # ]
     434                 :            :     }
     435         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     436                 :            :     {
     437                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     438                 :            :     }
     439                 :            : 
     440                 :         24 :     return  sTelephoneWork;
     441                 :            : }
     442                 :            : 
     443                 :         24 : ::rtl::OUString SvtUserOptions_Impl::GetFax() const
     444                 :            : {
     445                 :         24 :     ::rtl::OUString sFax;
     446                 :            : 
     447                 :            :     try
     448                 :            :     {
     449         [ +  - ]:         24 :         if (m_xData.is())
     450 [ +  - ][ +  - ]:         24 :             m_xData->getPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber)) >>= sFax;
                 [ #  # ]
     451                 :            :     }
     452         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     453                 :            :     {
     454                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     455                 :            :     }
     456                 :            : 
     457                 :         24 :     return  sFax;
     458                 :            : }
     459                 :            : 
     460                 :         66 : ::rtl::OUString SvtUserOptions_Impl::GetEmail() const
     461                 :            : {
     462                 :         66 :     ::rtl::OUString sEmail;
     463                 :            : 
     464                 :            :     try
     465                 :            :     {
     466         [ +  - ]:         66 :         if (m_xData.is())
     467 [ +  - ][ +  - ]:         66 :             m_xData->getPropertyValue(rtl::OUString(s_smail)) >>= sEmail;
                 [ #  # ]
     468                 :            :     }
     469         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     470                 :            :     {
     471                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     472                 :            :     }
     473                 :            : 
     474                 :         66 :     return  sEmail;
     475                 :            : }
     476                 :            : 
     477                 :          0 : ::rtl::OUString SvtUserOptions_Impl::GetCustomerNumber() const
     478                 :            : {
     479                 :          0 :     ::rtl::OUString sCustomerNumber;
     480                 :            : 
     481                 :            :     try
     482                 :            :     {
     483         [ #  # ]:          0 :         if (m_xData.is())
     484 [ #  # ][ #  # ]:          0 :             m_xData->getPropertyValue(rtl::OUString(s_scustomernumber)) >>= sCustomerNumber;
                 [ #  # ]
     485                 :            :     }
     486         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     487                 :            :     {
     488                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     489                 :            :     }
     490                 :            : 
     491                 :          0 :     return  sCustomerNumber;
     492                 :            : }
     493                 :            : 
     494                 :          0 : ::rtl::OUString SvtUserOptions_Impl::GetFathersName() const
     495                 :            : {
     496                 :          0 :     ::rtl::OUString sFathersName;
     497                 :            : 
     498                 :            :     try
     499                 :            :     {
     500         [ #  # ]:          0 :         if (m_xData.is())
     501 [ #  # ][ #  # ]:          0 :             m_xData->getPropertyValue(rtl::OUString(s_sfathersname)) >>= sFathersName;
                 [ #  # ]
     502                 :            :     }
     503         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     504                 :            :     {
     505                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     506                 :            :     }
     507                 :            : 
     508                 :          0 :     return  sFathersName;
     509                 :            : }
     510                 :            : 
     511                 :          0 : ::rtl::OUString SvtUserOptions_Impl::GetApartment() const
     512                 :            : {
     513                 :          0 :     ::rtl::OUString sApartment;
     514                 :            : 
     515                 :            :     try
     516                 :            :     {
     517         [ #  # ]:          0 :         if (m_xData.is())
     518 [ #  # ][ #  # ]:          0 :             m_xData->getPropertyValue(rtl::OUString(s_sapartment)) >>= sApartment;
                 [ #  # ]
     519                 :            :     }
     520         [ #  # ]:          0 :     catch ( const css::uno::Exception& ex )
     521                 :            :     {
     522                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     523                 :            :     }
     524                 :            : 
     525                 :          0 :     return  sApartment;
     526                 :            : }
     527                 :            : 
     528                 :          0 : void SvtUserOptions_Impl::SetCompany( const ::rtl::OUString& sCompany )
     529                 :            : {
     530                 :            :     try
     531                 :            :     {
     532         [ #  # ]:          0 :         if (m_xData.is())
     533 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_so), css::uno::makeAny(::rtl::OUString(sCompany)));
         [ #  # ][ #  # ]
     534         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     535                 :            :     }
     536                 :          0 :     catch ( const css::uno::Exception& ex)
     537                 :            :     {
     538                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     539                 :            :     }
     540                 :          0 : }
     541                 :            : 
     542                 :          0 : void SvtUserOptions_Impl::SetFirstName( const ::rtl::OUString& sFirstName )
     543                 :            : {
     544                 :            :     try
     545                 :            :     {
     546         [ #  # ]:          0 :         if (m_xData.is())
     547 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sgivenname), css::uno::makeAny(::rtl::OUString(sFirstName)));
         [ #  # ][ #  # ]
     548         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     549                 :            :     }
     550                 :          0 :     catch ( const css::uno::Exception& ex)
     551                 :            :     {
     552                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     553                 :            :     }
     554                 :          0 : }
     555                 :            : 
     556                 :          0 : void SvtUserOptions_Impl::SetLastName( const ::rtl::OUString& sLastName )
     557                 :            : {
     558                 :            :     try
     559                 :            :     {
     560         [ #  # ]:          0 :         if (m_xData.is())
     561 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_ssn), css::uno::makeAny(::rtl::OUString(sLastName)));
         [ #  # ][ #  # ]
     562         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     563                 :            :     }
     564                 :          0 :     catch ( const css::uno::Exception& ex)
     565                 :            :     {
     566                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     567                 :            :     }
     568                 :          0 : }
     569                 :          0 : void SvtUserOptions_Impl::SetID( const ::rtl::OUString& sID )
     570                 :            : {
     571                 :            :     try
     572                 :            :     {
     573         [ #  # ]:          0 :         if (m_xData.is())
     574 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sinitials), css::uno::makeAny(::rtl::OUString(sID)));
         [ #  # ][ #  # ]
     575         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     576                 :            :     }
     577                 :          0 :     catch ( const css::uno::Exception& ex)
     578                 :            :     {
     579                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     580                 :            :     }
     581                 :          0 : }
     582                 :            : 
     583                 :          0 : void SvtUserOptions_Impl::SetStreet( const ::rtl::OUString& sStreet )
     584                 :            : {
     585                 :            :     try
     586                 :            :     {
     587         [ #  # ]:          0 :         if (m_xData.is())
     588 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sstreet), css::uno::makeAny(::rtl::OUString(sStreet)));
         [ #  # ][ #  # ]
     589         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     590                 :            :     }
     591                 :          0 :     catch ( const css::uno::Exception& ex)
     592                 :            :     {
     593                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     594                 :            :     }
     595                 :          0 : }
     596                 :            : 
     597                 :          0 : void SvtUserOptions_Impl::SetCity( const ::rtl::OUString& sCity )
     598                 :            : {
     599                 :            :     try
     600                 :            :     {
     601         [ #  # ]:          0 :         if (m_xData.is())
     602 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sl), css::uno::makeAny(::rtl::OUString(sCity)));
         [ #  # ][ #  # ]
     603         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     604                 :            :     }
     605                 :          0 :     catch ( const css::uno::Exception& ex)
     606                 :            :     {
     607                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     608                 :            :     }
     609                 :          0 : }
     610                 :            : 
     611                 :          0 : void SvtUserOptions_Impl::SetState( const ::rtl::OUString& sState )
     612                 :            : {
     613                 :            :     try
     614                 :            :     {
     615         [ #  # ]:          0 :         if (m_xData.is())
     616 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sst), css::uno::makeAny(::rtl::OUString(sState)));
         [ #  # ][ #  # ]
     617         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     618                 :            :     }
     619                 :          0 :     catch ( const css::uno::Exception& ex)
     620                 :            :     {
     621                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     622                 :            :     }
     623                 :          0 : }
     624                 :            : 
     625                 :          0 : void SvtUserOptions_Impl::SetZip( const ::rtl::OUString& sZip )
     626                 :            : {
     627                 :            :     try
     628                 :            :     {
     629         [ #  # ]:          0 :         if (m_xData.is())
     630 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_spostalcode), css::uno::makeAny(::rtl::OUString(sZip)));
         [ #  # ][ #  # ]
     631         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     632                 :            :     }
     633                 :          0 :     catch ( const css::uno::Exception& ex)
     634                 :            :     {
     635                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     636                 :            :     }
     637                 :          0 : }
     638                 :            : 
     639                 :          0 : void SvtUserOptions_Impl::SetCountry( const ::rtl::OUString& sCountry )
     640                 :            : {
     641                 :            :     try
     642                 :            :     {
     643         [ #  # ]:          0 :         if (m_xData.is())
     644 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sc), css::uno::makeAny(::rtl::OUString(sCountry)));
         [ #  # ][ #  # ]
     645         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     646                 :            :     }
     647                 :          0 :     catch ( const css::uno::Exception& ex)
     648                 :            :     {
     649                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     650                 :            :     }
     651                 :          0 : }
     652                 :            : 
     653                 :          0 : void SvtUserOptions_Impl::SetPosition( const ::rtl::OUString& sPosition )
     654                 :            : {
     655                 :            :     try
     656                 :            :     {
     657         [ #  # ]:          0 :         if (m_xData.is())
     658 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sposition), css::uno::makeAny(::rtl::OUString(sPosition)));
         [ #  # ][ #  # ]
     659         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     660                 :            :     }
     661                 :          0 :     catch ( const css::uno::Exception& ex)
     662                 :            :     {
     663                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     664                 :            :     }
     665                 :          0 : }
     666                 :            : 
     667                 :          0 : void SvtUserOptions_Impl::SetTitle( const ::rtl::OUString& sTitle )
     668                 :            : {
     669                 :            :     try
     670                 :            :     {
     671         [ #  # ]:          0 :         if (m_xData.is())
     672 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_stitle), css::uno::makeAny(::rtl::OUString(sTitle)));
         [ #  # ][ #  # ]
     673         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     674                 :            :     }
     675                 :          0 :     catch ( const css::uno::Exception& ex)
     676                 :            :     {
     677                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     678                 :            :     }
     679                 :          0 : }
     680                 :            : 
     681                 :          0 : void SvtUserOptions_Impl::SetTelephoneHome( const ::rtl::OUString& sTelephoneHome )
     682                 :            : {
     683                 :            :     try
     684                 :            :     {
     685         [ #  # ]:          0 :         if (m_xData.is())
     686 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_shomephone), css::uno::makeAny(::rtl::OUString(sTelephoneHome)));
         [ #  # ][ #  # ]
     687         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     688                 :            :     }
     689                 :          0 :     catch ( const css::uno::Exception& ex)
     690                 :            :     {
     691                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     692                 :            :     }
     693                 :          0 : }
     694                 :            : 
     695                 :          0 : void SvtUserOptions_Impl::SetTelephoneWork( const ::rtl::OUString& sTelephoneWork )
     696                 :            : {
     697                 :            :     try
     698                 :            :     {
     699         [ #  # ]:          0 :         if (m_xData.is())
     700 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_stelephonenumber), css::uno::makeAny(::rtl::OUString(sTelephoneWork)));
         [ #  # ][ #  # ]
     701         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     702                 :            :     }
     703                 :          0 :     catch ( const css::uno::Exception& ex)
     704                 :            :     {
     705                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     706                 :            :     }
     707                 :          0 : }
     708                 :            : 
     709                 :          0 : void SvtUserOptions_Impl::SetFax( const ::rtl::OUString& sFax )
     710                 :            : {
     711                 :            :     try
     712                 :            :     {
     713         [ #  # ]:          0 :         if (m_xData.is())
     714 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber), css::uno::makeAny(::rtl::OUString(sFax)));
         [ #  # ][ #  # ]
     715         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     716                 :            :     }
     717                 :          0 :     catch ( const css::uno::Exception& ex)
     718                 :            :     {
     719                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     720                 :            :     }
     721                 :          0 : }
     722                 :            : 
     723                 :          0 : void SvtUserOptions_Impl::SetEmail( const ::rtl::OUString& sEmail )
     724                 :            : {
     725                 :            :     try
     726                 :            :     {
     727         [ #  # ]:          0 :         if (m_xData.is())
     728 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_smail), css::uno::makeAny(::rtl::OUString(sEmail)));
         [ #  # ][ #  # ]
     729         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     730                 :            :     }
     731                 :          0 :     catch ( const css::uno::Exception& ex)
     732                 :            :     {
     733                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     734                 :            :     }
     735                 :          0 : }
     736                 :            : 
     737                 :          0 : void SvtUserOptions_Impl::SetCustomerNumber( const ::rtl::OUString& sCustomerNumber )
     738                 :            : {
     739                 :            :     try
     740                 :            :     {
     741         [ #  # ]:          0 :         if (m_xData.is())
     742 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_scustomernumber), css::uno::makeAny(::rtl::OUString(sCustomerNumber)));
         [ #  # ][ #  # ]
     743         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     744                 :            :     }
     745                 :          0 :     catch ( const css::uno::Exception& ex)
     746                 :            :     {
     747                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     748                 :            :     }
     749                 :          0 : }
     750                 :            : 
     751                 :          0 : void SvtUserOptions_Impl::SetFathersName( const ::rtl::OUString& sFathersName )
     752                 :            : {
     753                 :            :     try
     754                 :            :     {
     755         [ #  # ]:          0 :         if (m_xData.is())
     756 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sfathersname), css::uno::makeAny(::rtl::OUString(sFathersName)));
         [ #  # ][ #  # ]
     757         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     758                 :            :     }
     759                 :          0 :     catch ( const css::uno::Exception& ex)
     760                 :            :     {
     761                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     762                 :            :     }
     763                 :          0 : }
     764                 :            : 
     765                 :          0 : void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
     766                 :            : {
     767                 :            :     try
     768                 :            :     {
     769         [ #  # ]:          0 :         if (m_xData.is())
     770 [ #  # ][ #  # ]:          0 :             m_xData->setPropertyValue(rtl::OUString(s_sapartment), css::uno::makeAny(::rtl::OUString(sApartment)));
         [ #  # ][ #  # ]
     771         [ #  # ]:          0 :         ::comphelper::ConfigurationHelper::flush(m_xCfg);
     772                 :            :     }
     773                 :          0 :     catch ( const css::uno::Exception& ex)
     774                 :            :     {
     775                 :            :         SAL_WARN("unotools", "Caught unexpected: " << ex.Message);
     776                 :            :     }
     777                 :          0 : }
     778                 :            : 
     779                 :            : // -----------------------------------------------------------------------
     780                 :            : 
     781                 :       2504 : ::rtl::OUString SvtUserOptions_Impl::GetFullName() const
     782                 :            : {
     783                 :       2504 :     ::rtl::OUString sFullName;
     784                 :            : 
     785         [ +  - ]:       2504 :     sFullName = GetFirstName();
     786                 :       2504 :     sFullName.trim();
     787         [ -  + ]:       2504 :     if ( !sFullName.isEmpty() )
     788                 :          0 :         sFullName += ::rtl::OUString(" ");
     789         [ +  - ]:       2504 :     sFullName += GetLastName();
     790                 :       2504 :     sFullName.trim();
     791                 :            : 
     792                 :       2504 :     return sFullName;
     793                 :            : }
     794                 :            : 
     795                 :            : // -----------------------------------------------------------------------
     796                 :            : 
     797                 :          0 : void SvtUserOptions_Impl::Notify()
     798                 :            : {
     799                 :          0 :     NotifyListeners(0);
     800                 :          0 : }
     801                 :            : 
     802                 :            : // -----------------------------------------------------------------------
     803                 :            : 
     804                 :          0 : sal_Bool SvtUserOptions_Impl::IsTokenReadonly( sal_uInt16 nToken ) const
     805                 :            : {
     806         [ #  # ]:          0 :     css::uno::Reference< css::beans::XPropertySet >     xData(m_xCfg, css::uno::UNO_QUERY);
     807 [ #  # ][ #  # ]:          0 :     css::uno::Reference< css::beans::XPropertySetInfo > xInfo = xData->getPropertySetInfo();
     808                 :          0 :     css::beans::Property aProp;
     809                 :          0 :     sal_Bool             bRet = sal_False;
     810                 :            : 
     811   [ #  #  #  #  :          0 :     switch ( nToken )
          #  #  #  #  #  
          #  #  #  #  #  
             #  #  #  # ]
     812                 :            :     {
     813                 :            :         case USER_OPT_COMPANY:
     814                 :            :         {
     815 [ #  # ][ #  # ]:          0 :             aProp = xInfo->getPropertyByName(rtl::OUString(s_so));
     816                 :          0 :             bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     817                 :          0 :             break;
     818                 :            :         }
     819                 :            :         case USER_OPT_FIRSTNAME:
     820                 :            :         {
     821 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sgivenname));
     822                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     823                 :          0 :                 break;
     824                 :            :         }
     825                 :            :         case USER_OPT_LASTNAME:
     826                 :            :         {
     827 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_ssn));
     828                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     829                 :          0 :                 break;
     830                 :            :         }
     831                 :            :         case USER_OPT_ID:
     832                 :            :         {
     833 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sinitials));
     834                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     835                 :          0 :                 break;
     836                 :            :         }
     837                 :            :         case USER_OPT_STREET:
     838                 :            :         {
     839 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sstreet));
     840                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     841                 :          0 :                 break;
     842                 :            :         }
     843                 :            :         case USER_OPT_CITY:
     844                 :            :         {
     845 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sl));
     846                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     847                 :          0 :                 break;
     848                 :            :         }
     849                 :            :         case USER_OPT_STATE:
     850                 :            :         {
     851 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sst));
     852                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     853                 :          0 :                 break;
     854                 :            :         }
     855                 :            :         case USER_OPT_ZIP:
     856                 :            :         {
     857 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_spostalcode));
     858                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     859                 :          0 :                 break;
     860                 :            :         }
     861                 :            :         case USER_OPT_COUNTRY:
     862                 :            :         {
     863 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sc));
     864                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     865                 :          0 :                 break;
     866                 :            :         }
     867                 :            :         case USER_OPT_POSITION:
     868                 :            :         {
     869 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sposition));
     870                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     871                 :          0 :                 break;
     872                 :            :         }
     873                 :            :         case USER_OPT_TITLE:
     874                 :            :         {
     875 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_stitle));
     876                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     877                 :          0 :                 break;
     878                 :            :         }
     879                 :            :         case USER_OPT_TELEPHONEHOME:
     880                 :            :         {
     881 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_shomephone));
     882                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     883                 :          0 :                 break;
     884                 :            :         }
     885                 :            :         case USER_OPT_TELEPHONEWORK:
     886                 :            :         {
     887 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_stelephonenumber));
     888                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     889                 :          0 :                 break;
     890                 :            :         }
     891                 :            :         case USER_OPT_FAX:
     892                 :            :         {
     893 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sfacsimiletelephonenumber));
     894                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     895                 :          0 :                 break;
     896                 :            :         }
     897                 :            :         case USER_OPT_EMAIL:
     898                 :            :         {
     899 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_smail));
     900                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     901                 :          0 :                 break;
     902                 :            :         }
     903                 :            :         case USER_OPT_FATHERSNAME:
     904                 :            :             {
     905 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sfathersname));
     906                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     907                 :          0 :                 break;
     908                 :            :             }
     909                 :            :         case USER_OPT_APARTMENT:
     910                 :            :             {
     911 [ #  # ][ #  # ]:          0 :                 aProp = xInfo->getPropertyByName(rtl::OUString(s_sapartment));
     912                 :          0 :                 bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
     913                 :          0 :                 break;
     914                 :            :             }
     915                 :            :         default:
     916                 :            :             SAL_WARN( "unotools.config", "SvtUserOptions_Impl::IsTokenReadonly(): invalid token" );
     917                 :            :     }
     918                 :            : 
     919                 :          0 :     return bRet;
     920                 :            : }
     921                 :            : 
     922                 :            : //------------------------------------------------------------------------
     923                 :        288 : ::rtl::OUString SvtUserOptions_Impl::GetToken(sal_uInt16 nToken) const
     924                 :            : {
     925                 :        288 :     ::rtl::OUString pRet;
     926   [ +  -  -  -  :        288 :     switch(nToken)
          +  +  +  +  +  
          +  +  +  +  +  
             +  -  -  - ]
     927                 :            :     {
     928         [ +  - ]:         24 :         case USER_OPT_COMPANY:        pRet = GetCompany();     break;
     929         [ #  # ]:          0 :         case USER_OPT_FIRSTNAME:      pRet = GetFirstName();   break;
     930         [ #  # ]:          0 :         case USER_OPT_LASTNAME:       pRet = GetLastName();    break;
     931         [ #  # ]:          0 :         case USER_OPT_ID:             pRet = GetID();          break;
     932         [ +  - ]:         24 :         case USER_OPT_STREET:         pRet = GetStreet();      break;
     933         [ +  - ]:         24 :         case USER_OPT_CITY:           pRet = GetCity();        break;
     934         [ +  - ]:         24 :         case USER_OPT_STATE:          pRet = GetState();       break;
     935         [ +  - ]:         24 :         case USER_OPT_ZIP:            pRet = GetZip();         break;
     936         [ +  - ]:         24 :         case USER_OPT_COUNTRY:        pRet = GetCountry();     break;
     937         [ +  - ]:         24 :         case USER_OPT_POSITION:       pRet = GetPosition();    break;
     938         [ +  - ]:         24 :         case USER_OPT_TITLE:          pRet = GetTitle();       break;
     939         [ +  - ]:         24 :         case USER_OPT_TELEPHONEHOME:  pRet = GetTelephoneHome(); break;
     940         [ +  - ]:         24 :         case USER_OPT_TELEPHONEWORK:  pRet = GetTelephoneWork(); break;
     941         [ +  - ]:         24 :         case USER_OPT_FAX:            pRet = GetFax();           break;
     942         [ +  - ]:         24 :         case USER_OPT_EMAIL:          pRet = GetEmail();         break;
     943         [ #  # ]:          0 :         case USER_OPT_FATHERSNAME:    pRet = GetFathersName();   break;
     944         [ #  # ]:          0 :         case USER_OPT_APARTMENT:      pRet = GetApartment();     break;
     945                 :            :         default:
     946                 :            :             SAL_WARN( "unotools.config", "SvtUserOptions_Impl::GetToken(): invalid token" );
     947                 :            :     }
     948                 :        288 :     return pRet;
     949                 :            : }
     950                 :            : 
     951                 :            : // class SvtUserOptions --------------------------------------------------
     952                 :            : 
     953                 :       1559 : SvtUserOptions::SvtUserOptions()
     954                 :            : {
     955                 :            :     // Global access, must be guarded (multithreading)
     956 [ +  - ][ +  - ]:       1559 :     ::osl::MutexGuard aGuard( GetInitMutex() );
     957                 :            : 
     958         [ +  + ]:       1559 :     if ( !pOptions )
     959                 :            :     {
     960                 :            :         RTL_LOGFILE_CONTEXT(aLog, "unotools ( ??? ) ::SvtUserOptions_Impl::ctor()");
     961 [ +  - ][ +  - ]:        105 :         pOptions = new SvtUserOptions_Impl;
     962                 :            : 
     963         [ +  - ]:        105 :         ItemHolder1::holdConfigItem(E_USEROPTIONS);
     964                 :            :     }
     965                 :       1559 :     ++nRefCount;
     966                 :       1559 :     pImp = pOptions;
     967 [ +  - ][ +  - ]:       1559 :     pImp->AddListener(this);
     968                 :       1559 : }
     969                 :            : 
     970                 :            : // -----------------------------------------------------------------------
     971                 :            : 
     972                 :       1532 : SvtUserOptions::~SvtUserOptions()
     973                 :            : {
     974                 :            :     // Global access, must be guarded (multithreading)
     975 [ +  - ][ +  - ]:       1532 :     ::osl::MutexGuard aGuard( GetInitMutex() );
     976         [ +  - ]:       1532 :     pImp->RemoveListener(this);
     977         [ +  + ]:       1532 :     if ( !--nRefCount )
     978                 :            :     {
     979                 :            :         //if ( pOptions->IsModified() )
     980                 :            :         //  pOptions->Commit();
     981 [ +  - ][ +  - ]:         78 :         DELETEZ( pOptions );
     982         [ +  - ]:       1532 :     }
     983         [ -  + ]:       1677 : }
     984                 :            : 
     985                 :            : // -----------------------------------------------------------------------
     986                 :            : 
     987                 :            : namespace
     988                 :            : {
     989                 :            :     class theUserOptionsMutex : public rtl::Static<osl::Mutex, theUserOptionsMutex>{};
     990                 :            : }
     991                 :            : 
     992                 :       6980 : ::osl::Mutex& SvtUserOptions::GetInitMutex()
     993                 :            : {
     994                 :       6980 :     return theUserOptionsMutex::get();
     995                 :            : }
     996                 :            : 
     997                 :            : // -----------------------------------------------------------------------
     998                 :            : 
     999                 :         42 : ::rtl::OUString SvtUserOptions::GetCompany() const
    1000                 :            : {
    1001 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1002 [ +  - ][ +  - ]:         42 :     return pImp->GetCompany();
    1003                 :            : }
    1004                 :            : 
    1005                 :            : // -----------------------------------------------------------------------
    1006                 :            : 
    1007                 :        206 : ::rtl::OUString SvtUserOptions::GetFirstName() const
    1008                 :            : {
    1009 [ +  - ][ +  - ]:        206 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1010 [ +  - ][ +  - ]:        206 :     return pImp->GetFirstName();
    1011                 :            : }
    1012                 :            : 
    1013                 :            : // -----------------------------------------------------------------------
    1014                 :            : 
    1015                 :        261 : ::rtl::OUString SvtUserOptions::GetLastName() const
    1016                 :            : {
    1017 [ +  - ][ +  - ]:        261 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1018 [ +  - ][ +  - ]:        261 :     return pImp->GetLastName();
    1019                 :            : }
    1020                 :            : 
    1021                 :            : // -----------------------------------------------------------------------
    1022                 :            : 
    1023                 :        378 : ::rtl::OUString SvtUserOptions::GetID() const
    1024                 :            : {
    1025 [ +  - ][ +  - ]:        378 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1026 [ +  - ][ +  - ]:        378 :     return pImp->GetID();
    1027                 :            : }
    1028                 :            : 
    1029                 :            : // -----------------------------------------------------------------------
    1030                 :            : 
    1031                 :         42 : ::rtl::OUString SvtUserOptions::GetStreet() const
    1032                 :            : {
    1033 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1034 [ +  - ][ +  - ]:         42 :     return pImp->GetStreet();
    1035                 :            : }
    1036                 :            : 
    1037                 :            : // -----------------------------------------------------------------------
    1038                 :            : 
    1039                 :         42 : ::rtl::OUString SvtUserOptions::GetCity() const
    1040                 :            : {
    1041 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1042 [ +  - ][ +  - ]:         42 :     return pImp->GetCity();
    1043                 :            : }
    1044                 :            : 
    1045                 :            : // -----------------------------------------------------------------------
    1046                 :            : 
    1047                 :          0 : ::rtl::OUString SvtUserOptions::GetState() const
    1048                 :            : {
    1049 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1050 [ #  # ][ #  # ]:          0 :     return pImp->GetState();
    1051                 :            : }
    1052                 :            : 
    1053                 :            : // -----------------------------------------------------------------------
    1054                 :            : 
    1055                 :          0 : ::rtl::OUString SvtUserOptions::GetZip() const
    1056                 :            : {
    1057 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1058 [ #  # ][ #  # ]:          0 :     return pImp->GetZip();
    1059                 :            : }
    1060                 :            : 
    1061                 :            : // -----------------------------------------------------------------------
    1062                 :            : 
    1063                 :          0 : ::rtl::OUString SvtUserOptions::GetCountry() const
    1064                 :            : {
    1065 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1066 [ #  # ][ #  # ]:          0 :     return pImp->GetCountry();
    1067                 :            : }
    1068                 :            : 
    1069                 :            : // -----------------------------------------------------------------------
    1070                 :            : 
    1071                 :         42 : ::rtl::OUString SvtUserOptions::GetPosition() const
    1072                 :            : {
    1073 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1074 [ +  - ][ +  - ]:         42 :     return pImp->GetPosition();
    1075                 :            : }
    1076                 :            : 
    1077                 :            : // -----------------------------------------------------------------------
    1078                 :            : 
    1079                 :         42 : ::rtl::OUString SvtUserOptions::GetTitle() const
    1080                 :            : {
    1081 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1082 [ +  - ][ +  - ]:         42 :     return pImp->GetTitle();
    1083                 :            : }
    1084                 :            : 
    1085                 :            : // -----------------------------------------------------------------------
    1086                 :            : 
    1087                 :          0 : ::rtl::OUString SvtUserOptions::GetTelephoneHome() const
    1088                 :            : {
    1089 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1090 [ #  # ][ #  # ]:          0 :     return pImp->GetTelephoneHome();
    1091                 :            : }
    1092                 :            : 
    1093                 :            : // -----------------------------------------------------------------------
    1094                 :            : 
    1095                 :          0 : ::rtl::OUString SvtUserOptions::GetTelephoneWork() const
    1096                 :            : {
    1097 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1098 [ #  # ][ #  # ]:          0 :     return pImp->GetTelephoneWork();
    1099                 :            : }
    1100                 :            : 
    1101                 :            : // -----------------------------------------------------------------------
    1102                 :            : 
    1103                 :          0 : ::rtl::OUString SvtUserOptions::GetFax() const
    1104                 :            : {
    1105 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1106 [ #  # ][ #  # ]:          0 :     return pImp->GetFax();
    1107                 :            : }
    1108                 :            : 
    1109                 :            : // -----------------------------------------------------------------------
    1110                 :            : 
    1111                 :         42 : ::rtl::OUString SvtUserOptions::GetEmail() const
    1112                 :            : {
    1113 [ +  - ][ +  - ]:         42 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1114 [ +  - ][ +  - ]:         42 :     return pImp->GetEmail();
    1115                 :            : }
    1116                 :            : 
    1117                 :            : // -----------------------------------------------------------------------
    1118                 :            : 
    1119                 :          0 : ::rtl::OUString SvtUserOptions::GetCustomerNumber() const
    1120                 :            : {
    1121 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1122 [ #  # ][ #  # ]:          0 :     return pImp->GetCustomerNumber();
    1123                 :            : }
    1124                 :            : // -----------------------------------------------------------------------
    1125                 :            : 
    1126                 :          0 : ::rtl::OUString SvtUserOptions::GetFathersName() const
    1127                 :            : {
    1128 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1129 [ #  # ][ #  # ]:          0 :     return pImp->GetFathersName() ;
    1130                 :            : }
    1131                 :            : 
    1132                 :            : // -----------------------------------------------------------------------
    1133                 :            : 
    1134                 :          0 : ::rtl::OUString SvtUserOptions::GetApartment() const
    1135                 :            : {
    1136 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1137 [ #  # ][ #  # ]:          0 :     return pImp->GetApartment();
    1138                 :            : }
    1139                 :            : 
    1140                 :            : // -----------------------------------------------------------------------
    1141                 :            : 
    1142                 :       2504 : ::rtl::OUString SvtUserOptions::GetFullName() const
    1143                 :            : {
    1144 [ +  - ][ +  - ]:       2504 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1145 [ +  - ][ +  - ]:       2504 :     return pImp->GetFullName();
    1146                 :            : }
    1147                 :            : 
    1148                 :            : // -----------------------------------------------------------------------
    1149                 :            : 
    1150                 :          0 : void SvtUserOptions::SetCompany( const ::rtl::OUString& rNewToken )
    1151                 :            : {
    1152 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1153 [ #  # ][ #  # ]:          0 :     pImp->SetCompany( rNewToken );
    1154                 :          0 : }
    1155                 :            : 
    1156                 :            : // -----------------------------------------------------------------------
    1157                 :            : 
    1158                 :          0 : void SvtUserOptions::SetFirstName( const ::rtl::OUString& rNewToken )
    1159                 :            : {
    1160 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1161 [ #  # ][ #  # ]:          0 :     pImp->SetFirstName( rNewToken );
    1162                 :          0 : }
    1163                 :            : 
    1164                 :            : // -----------------------------------------------------------------------
    1165                 :            : 
    1166                 :          0 : void SvtUserOptions::SetLastName( const ::rtl::OUString& rNewToken )
    1167                 :            : {
    1168 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1169 [ #  # ][ #  # ]:          0 :     pImp->SetLastName( rNewToken );
    1170                 :          0 : }
    1171                 :            : 
    1172                 :            : // -----------------------------------------------------------------------
    1173                 :            : 
    1174                 :          0 : void SvtUserOptions::SetID( const ::rtl::OUString& rNewToken )
    1175                 :            : {
    1176 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1177 [ #  # ][ #  # ]:          0 :     pImp->SetID( rNewToken );
    1178                 :          0 : }
    1179                 :            : 
    1180                 :            : // -----------------------------------------------------------------------
    1181                 :            : 
    1182                 :          0 : void SvtUserOptions::SetStreet( const ::rtl::OUString& rNewToken )
    1183                 :            : {
    1184 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1185 [ #  # ][ #  # ]:          0 :     pImp->SetStreet( rNewToken );
    1186                 :          0 : }
    1187                 :            : 
    1188                 :            : // -----------------------------------------------------------------------
    1189                 :            : 
    1190                 :          0 : void SvtUserOptions::SetCity( const ::rtl::OUString& rNewToken )
    1191                 :            : {
    1192 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1193 [ #  # ][ #  # ]:          0 :     pImp->SetCity( rNewToken );
    1194                 :          0 : }
    1195                 :            : 
    1196                 :            : // -----------------------------------------------------------------------
    1197                 :            : 
    1198                 :          0 : void SvtUserOptions::SetState( const ::rtl::OUString& rNewToken )
    1199                 :            : {
    1200 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1201 [ #  # ][ #  # ]:          0 :     pImp->SetState( rNewToken );
    1202                 :          0 : }
    1203                 :            : 
    1204                 :            : // -----------------------------------------------------------------------
    1205                 :            : 
    1206                 :          0 : void SvtUserOptions::SetZip( const ::rtl::OUString& rNewToken )
    1207                 :            : {
    1208 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1209 [ #  # ][ #  # ]:          0 :     pImp->SetZip( rNewToken );
    1210                 :          0 : }
    1211                 :            : 
    1212                 :            : // -----------------------------------------------------------------------
    1213                 :            : 
    1214                 :          0 : void SvtUserOptions::SetCountry( const ::rtl::OUString& rNewToken )
    1215                 :            : {
    1216 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1217 [ #  # ][ #  # ]:          0 :     pImp->SetCountry( rNewToken );
    1218                 :          0 : }
    1219                 :            : 
    1220                 :            : // -----------------------------------------------------------------------
    1221                 :            : 
    1222                 :          0 : void SvtUserOptions::SetPosition( const ::rtl::OUString& rNewToken )
    1223                 :            : {
    1224 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1225 [ #  # ][ #  # ]:          0 :     pImp->SetPosition( rNewToken );
    1226                 :          0 : }
    1227                 :            : 
    1228                 :            : // -----------------------------------------------------------------------
    1229                 :            : 
    1230                 :          0 : void SvtUserOptions::SetTitle( const ::rtl::OUString& rNewToken )
    1231                 :            : {
    1232 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1233 [ #  # ][ #  # ]:          0 :     pImp->SetTitle( rNewToken );
    1234                 :          0 : }
    1235                 :            : 
    1236                 :            : // -----------------------------------------------------------------------
    1237                 :            : 
    1238                 :          0 : void SvtUserOptions::SetTelephoneHome( const ::rtl::OUString& rNewToken )
    1239                 :            : {
    1240 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1241 [ #  # ][ #  # ]:          0 :     pImp->SetTelephoneHome( rNewToken );
    1242                 :          0 : }
    1243                 :            : 
    1244                 :            : // -----------------------------------------------------------------------
    1245                 :            : 
    1246                 :          0 : void SvtUserOptions::SetTelephoneWork( const ::rtl::OUString& rNewToken )
    1247                 :            : {
    1248 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1249 [ #  # ][ #  # ]:          0 :     pImp->SetTelephoneWork( rNewToken );
    1250                 :          0 : }
    1251                 :            : 
    1252                 :            : // -----------------------------------------------------------------------
    1253                 :            : 
    1254                 :          0 : void SvtUserOptions::SetFax( const ::rtl::OUString& rNewToken )
    1255                 :            : {
    1256 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1257 [ #  # ][ #  # ]:          0 :     pImp->SetFax( rNewToken );
    1258                 :          0 : }
    1259                 :            : 
    1260                 :            : // -----------------------------------------------------------------------
    1261                 :            : 
    1262                 :          0 : void SvtUserOptions::SetEmail( const ::rtl::OUString& rNewToken )
    1263                 :            : {
    1264 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1265 [ #  # ][ #  # ]:          0 :     pImp->SetEmail( rNewToken );
    1266                 :          0 : }
    1267                 :            : 
    1268                 :            : // -----------------------------------------------------------------------
    1269                 :            : 
    1270                 :          0 : void SvtUserOptions::SetCustomerNumber( const ::rtl::OUString& rNewToken )
    1271                 :            : {
    1272 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1273 [ #  # ][ #  # ]:          0 :     pImp->SetCustomerNumber( rNewToken );
    1274                 :          0 : }
    1275                 :            : // -----------------------------------------------------------------------
    1276                 :            : 
    1277                 :          0 : void SvtUserOptions::SetFathersName( const ::rtl::OUString& rNewToken )
    1278                 :            : {
    1279 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1280 [ #  # ][ #  # ]:          0 :     pImp->SetFathersName( rNewToken );
    1281                 :          0 : }
    1282                 :            : 
    1283                 :            : // -----------------------------------------------------------------------
    1284                 :            : 
    1285                 :          0 : void SvtUserOptions::SetApartment( const ::rtl::OUString& rNewToken )
    1286                 :            : {
    1287 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1288 [ #  # ][ #  # ]:          0 :     pImp->SetApartment( rNewToken );
    1289                 :          0 : }
    1290                 :            : 
    1291                 :            : // -----------------------------------------------------------------------
    1292                 :            : 
    1293                 :          0 : sal_Bool SvtUserOptions::IsTokenReadonly( sal_uInt16 nToken ) const
    1294                 :            : {
    1295 [ #  # ][ #  # ]:          0 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1296 [ #  # ][ #  # ]:          0 :     return pImp->IsTokenReadonly( nToken );
    1297                 :            : }
    1298                 :            : //------------------------------------------------------------------------
    1299                 :        288 : ::rtl::OUString   SvtUserOptions::GetToken(sal_uInt16 nToken) const
    1300                 :            : {
    1301 [ +  - ][ +  - ]:        288 :     ::osl::MutexGuard aGuard( GetInitMutex() );
    1302 [ +  - ][ +  - ]:        288 :     return pImp->GetToken( nToken );
    1303                 :            : }
    1304                 :            : 
    1305                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10