summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-09-21 18:01:36 +0200
committerMichael Stahl <mstahl@redhat.com>2013-09-21 18:17:27 +0200
commitca0169340c94adc791061e3fb098fa656f22a8c5 (patch)
tree796351fb0e821f7a78d87c3080d103ececb79675 /include
parentf814795ac9e90414a00bdff754f9dd7810382e63 (diff)
sfx2: fix sfx2::sidebar::Theme lifecycle
It's a horrible idea to have global VCL Images, since that will inevitably crash on shutdown when the static dtor runs after DeInitVCL, which breaks ~every JunitTest now. 0x00002af6750d2d51 in rtl::Reference<sfx2::sidebar::Theme>::~Reference (this=0x2af6756ceb28 <sfx2::sidebar::Theme::mpInstance>, __in_chrg=<optimized out>) Try to fix that by moving the global sidebar::Theme instance to SfxApplication where it can hopefully be deleted before shutdown. Change-Id: Ia78f1e458699335b53a741b6463ce48af69584a7
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/app.hxx6
-rw-r--r--include/sfx2/sidebar/Theme.hxx6
2 files changed, 9 insertions, 3 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index f8361f249e0b..d24b40abf53d 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -94,6 +94,9 @@ typedef ::std::vector< SfxMedium* > SfxMediumList;
namespace sfx2
{
class SvLinkSource;
+ namespace sidebar {
+ class Theme;
+ }
}
//====================================================================
@@ -260,6 +263,9 @@ public:
/** loads the application logo as used in the impress slideshow pause screen */
static BitmapEx GetApplicationLogo(long nWidth);
+
+ /** this Theme contains Images so must be deleted before DeInitVCL */
+ sfx2::sidebar::Theme & GetSidebarTheme();
};
#define SFX_APP() SfxGetpApp()
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index ae1e6a6fdcc4..098b63d7ed0c 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -154,6 +154,8 @@ public:
static void HandleDataChange (void);
+ void InitializeTheme();
+
Theme (void);
virtual ~Theme (void);
@@ -208,8 +210,7 @@ public:
throw(cssu::RuntimeException);
private:
- static ::rtl::Reference<Theme> mpInstance;
- static Theme& GetCurrentTheme (void);
+ static Theme& GetCurrentTheme();
::std::vector<Image> maImages;
::std::vector<Color> maColors;
@@ -246,7 +247,6 @@ private:
};
void SetupPropertyMaps (void);
- void InitializeTheme (void);
void UpdateTheme (void);
static PropertyType GetPropertyType (const ThemeItem eItem);
static cssu::Type GetCppuType (const PropertyType eType);