[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - svx/source vcl/workben
Michael Stahl
mstahl at redhat.com
Tue Nov 3 01:58:29 PST 2015
svx/source/form/filtnav.cxx | 30 ++++++------------------------
vcl/workben/vcldemo.cxx | 2 +-
2 files changed, 7 insertions(+), 25 deletions(-)
New commits:
commit a93c08e8eeb8386d02a015c63d161220d059a6bf
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Oct 30 16:05:42 2015 +0100
svx: add result of "badstatics" plugin to fix abuse of VCL Bitmaps
VCL Image/Bitmap/BitmapEx instances must not have static life-time
because then they will be destructed after DeInitVCL() and that
likely segfaults.
(cherry picked from commit bf18f1b3535dd17f9bf584cab15ee6a7fd431257)
Omitting the plugin itself, the fixes should be enough for release
branch.
Change-Id: I3ff8d32de729c971b190028094cb4efe206395e2
Reviewed-on: https://gerrit.libreoffice.org/19742
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index c258692..78a44cd 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -156,14 +156,8 @@ TYPEINIT1(FmFormItem, FmParentData);
Image FmFormItem::GetImage() const
{
- static Image aImage;
-
- if (!aImage)
- {
- ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
- aImage = aNavigatorImages.GetImage( RID_SVXIMG_FORM );
- }
- return aImage;
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ return aNavigatorImages.GetImage( RID_SVXIMG_FORM );
}
@@ -187,14 +181,8 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) co
Image FmFilterItems::GetImage() const
{
- static Image aImage;
-
- if (!aImage)
- {
- ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
- aImage = aNavigatorImages.GetImage( RID_SVXIMG_FILTER );
- }
- return aImage;
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ return aNavigatorImages.GetImage( RID_SVXIMG_FILTER );
}
@@ -213,14 +201,8 @@ FmFilterItem::FmFilterItem( FmFilterItems* pParent,
Image FmFilterItem::GetImage() const
{
- static Image aImage;
-
- if (!aImage)
- {
- ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
- aImage = aNavigatorImages.GetImage( RID_SVXIMG_FIELD );
- }
- return aImage;
+ ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) );
+ return aNavigatorImages.GetImage( RID_SVXIMG_FIELD );
}
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 2db38bd..fd8c01f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -649,7 +649,7 @@ public:
// be done with a shader / gradient
static void SimulateBorderStretch(OutputDevice &rDev, const Rectangle& r)
{
- static BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
+ BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
BitmapEx aRight(aPageShadowMask);
sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4;
More information about the Libreoffice-commits
mailing list