Anonymous avatar Anonymous committed 886364f

vcl122: #i117746# remove unused NotificationsSettings

Comments (0)

Files changed (2)

vcl/inc/vcl/settings.hxx

                                         { return !(*this == rSet); }
 };
 
-// ------------------------
-// - ImplNotificationData -
-// ------------------------
-
-class ImplNotificationData
-{
-    friend class NotificationSettings;
-
-                                    ImplNotificationData();
-                                    ImplNotificationData( const ImplNotificationData& rData );
-
-private:
-    sal_uLong                           mnRefCount;
-    sal_uLong                           mnOptions;
-};
-
-// ------------------------
-// - NotificationSettings -
-// ------------------------
-
-class VCL_DLLPUBLIC NotificationSettings
-{
-    void                            CopyData();
-
-private:
-    ImplNotificationData*           mpData;
-
-public:
-                                    NotificationSettings();
-                                    NotificationSettings( const NotificationSettings& rSet );
-                                    ~NotificationSettings();
-
-    void                            SetOptions( sal_uLong nOptions )
-                                        { CopyData(); mpData->mnOptions = nOptions; }
-    sal_uLong                           GetOptions() const
-                                        { return mpData->mnOptions; }
-
-    const NotificationSettings&     operator =( const NotificationSettings& rSet );
-
-    sal_Bool                            operator ==( const NotificationSettings& rSet ) const;
-    sal_Bool                            operator !=( const NotificationSettings& rSet ) const
-                                        { return !(*this == rSet); }
-};
-
 // ----------------
 // - ImplHelpData -
 // ----------------
     MouseSettings                           maMouseSettings;
     StyleSettings                           maStyleSettings;
     MiscSettings                            maMiscSettings;
-    NotificationSettings                    maNotificationSettings;
     HelpSettings                            maHelpSettings;
     ::com::sun::star::lang::Locale          maLocale;
     sal_uLong                                   mnSystemUpdate;
 #define SETTINGS_STYLE              ((sal_uLong)0x00000008)
 #define SETTINGS_MISC               ((sal_uLong)0x00000010)
 #define SETTINGS_SOUND              ((sal_uLong)0x00000020)
-#define SETTINGS_NOTIFICATION       ((sal_uLong)0x00000040)
+//#define SETTINGS_NOTIFICATION       ((sal_uLong)0x00000040)
 #define SETTINGS_HELP               ((sal_uLong)0x00000080)
 #define SETTINGS_INTERNATIONAL      ((sal_uLong)0x00000100) /* was for class International, has no effect anymore */
 #define SETTINGS_LOCALE             ((sal_uLong)0x00000200)
 #define SETTINGS_UILOCALE           ((sal_uLong)0x00000400)
 #define SETTINGS_ALLSETTINGS        (SETTINGS_MOUSE |\
                                      SETTINGS_STYLE | SETTINGS_MISC |\
-                                     SETTINGS_SOUND | SETTINGS_NOTIFICATION |\
+                                     SETTINGS_SOUND |\
                                      SETTINGS_HELP |\
                                      SETTINGS_LOCALE | SETTINGS_UILOCALE )
 #define SETTINGS_IN_UPDATE_SETTINGS ((sal_uLong)0x00000800)	  // this flag indicates that the data changed event was created
     const MiscSettings&                     GetMiscSettings() const
                                                 { return mpData->maMiscSettings; }
 
-    void                                    SetNotificationSettings( const NotificationSettings& rSet )
-                                                { CopyData(); mpData->maNotificationSettings = rSet; }
-    const NotificationSettings&             GetNotificationSettings() const
-                                                { return mpData->maNotificationSettings; }
-
     void                                    SetHelpSettings( const HelpSettings& rSet )
                                                 { CopyData(); mpData->maHelpSettings = rSet; }
     const HelpSettings&                     GetHelpSettings() const

vcl/source/app/settings.cxx

 
 // =======================================================================
 
-ImplNotificationData::ImplNotificationData()
-{
-    mnRefCount                  = 1;
-    mnOptions                   = 0;
-}
-
-// -----------------------------------------------------------------------
-
-ImplNotificationData::ImplNotificationData( const ImplNotificationData& rData )
-{
-    mnRefCount                  = 1;
-    mnOptions                   = rData.mnOptions;
-}
-
-// -----------------------------------------------------------------------
-
-NotificationSettings::NotificationSettings()
-{
-    mpData = new ImplNotificationData();
-}
-
-// -----------------------------------------------------------------------
-
-NotificationSettings::NotificationSettings( const NotificationSettings& rSet )
-{
-    DBG_ASSERT( rSet.mpData->mnRefCount < 0xFFFFFFFE, "NotificationSettings: RefCount overflow" );
-
-    // shared Instance Daten uebernehmen und Referenzcounter erhoehen
-    mpData = rSet.mpData;
-    mpData->mnRefCount++;
-}
-
-// -----------------------------------------------------------------------
-
-NotificationSettings::~NotificationSettings()
-{
-    // Daten loeschen, wenn letzte Referenz
-    if ( mpData->mnRefCount == 1 )
-        delete mpData;
-    else
-        mpData->mnRefCount--;
-}
-
-// -----------------------------------------------------------------------
-
-const NotificationSettings& NotificationSettings::operator =( const NotificationSettings& rSet )
-{
-    DBG_ASSERT( rSet.mpData->mnRefCount < 0xFFFFFFFE, "NotificationSettings: RefCount overflow" );
-
-    // Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann
-    rSet.mpData->mnRefCount++;
-
-    // Daten loeschen, wenn letzte Referenz
-    if ( mpData->mnRefCount == 1 )
-        delete mpData;
-    else
-        mpData->mnRefCount--;
-
-    mpData = rSet.mpData;
-
-    return *this;
-}
-
-// -----------------------------------------------------------------------
-
-void NotificationSettings::CopyData()
-{
-    // Falls noch andere Referenzen bestehen, dann kopieren
-    if ( mpData->mnRefCount != 1 )
-    {
-        mpData->mnRefCount--;
-        mpData = new ImplNotificationData( *mpData );
-    }
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool NotificationSettings::operator ==( const NotificationSettings& rSet ) const
-{
-    if ( mpData == rSet.mpData )
-        return sal_True;
-
-    if ( (mpData->mnOptions             == rSet.mpData->mnOptions) )
-        return sal_True;
-    else
-        return sal_False;
-}
-
-// =======================================================================
-
 ImplHelpData::ImplHelpData()
 {
     mnRefCount                  = 1;
     maMouseSettings( rData.maMouseSettings ),
     maStyleSettings( rData.maStyleSettings ),
     maMiscSettings( rData.maMiscSettings ),
-    maNotificationSettings( rData.maNotificationSettings ),
     maHelpSettings( rData.maHelpSettings ),
     maLocale( rData.maLocale )
 {
         }
     }
 
-    if ( nFlags & SETTINGS_NOTIFICATION )
-    {
-        if ( mpData->maNotificationSettings != rSet.mpData->maNotificationSettings )
-        {
-            CopyData();
-            mpData->maNotificationSettings = rSet.mpData->maNotificationSettings;
-            nChangeFlags |= SETTINGS_NOTIFICATION;
-        }
-    }
-
     if ( nFlags & SETTINGS_HELP )
     {
         if ( mpData->maHelpSettings != rSet.mpData->maHelpSettings )
     if ( mpData->maMiscSettings != rSet.mpData->maMiscSettings )
         nChangeFlags |= SETTINGS_MISC;
 
-    if ( mpData->maNotificationSettings != rSet.mpData->maNotificationSettings )
-        nChangeFlags |= SETTINGS_NOTIFICATION;
-
     if ( mpData->maHelpSettings != rSet.mpData->maHelpSettings )
         nChangeFlags |= SETTINGS_HELP;
 
     if ( (mpData->maMouseSettings           == rSet.mpData->maMouseSettings)        &&
          (mpData->maStyleSettings           == rSet.mpData->maStyleSettings)        &&
          (mpData->maMiscSettings            == rSet.mpData->maMiscSettings)         &&
-         (mpData->maNotificationSettings    == rSet.mpData->maNotificationSettings) &&
          (mpData->maHelpSettings            == rSet.mpData->maHelpSettings)         &&
          (mpData->mnSystemUpdate            == rSet.mpData->mnSystemUpdate)         &&
          (mpData->maLocale					== rSet.mpData->maLocale)				&&
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.