summaryrefslogtreecommitdiffstats
path: root/svx/source/table/tablerow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/table/tablerow.cxx')
-rw-r--r--svx/source/table/tablerow.cxx76
1 files changed, 35 insertions, 41 deletions
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index 87cba24d12cd..d1dd1f371800 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -308,47 +308,41 @@ Any SAL_CALL TableRow::getFastPropertyValue( sal_Int32 nHandle )
rtl::Reference< FastPropertySetInfo > TableRow::getStaticPropertySetInfo()
{
- static rtl::Reference< FastPropertySetInfo > xInfo;
- if( !xInfo.is() )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is() )
- {
- PropertyVector aProperties(6);
-
- aProperties[0].Name = "Height";
- aProperties[0].Handle = Property_Height;
- aProperties[0].Type = ::cppu::UnoType<sal_Int32>::get();
- aProperties[0].Attributes = 0;
-
- aProperties[1].Name = "OptimalHeight";
- aProperties[1].Handle = Property_OptimalHeight;
- aProperties[1].Type = cppu::UnoType<bool>::get();
- aProperties[1].Attributes = 0;
-
- aProperties[2].Name = "IsVisible";
- aProperties[2].Handle = Property_IsVisible;
- aProperties[2].Type = cppu::UnoType<bool>::get();
- aProperties[2].Attributes = 0;
-
- aProperties[3].Name = "IsStartOfNewPage";
- aProperties[3].Handle = Property_IsStartOfNewPage;
- aProperties[3].Type = cppu::UnoType<bool>::get();
- aProperties[3].Attributes = 0;
-
- aProperties[4].Name = "Size";
- aProperties[4].Handle = Property_Height;
- aProperties[4].Type = ::cppu::UnoType<sal_Int32>::get();
- aProperties[4].Attributes = 0;
-
- aProperties[5].Name = "OptimalSize";
- aProperties[5].Handle = Property_OptimalHeight;
- aProperties[5].Type = cppu::UnoType<bool>::get();
- aProperties[5].Attributes = 0;
-
- xInfo.set( new FastPropertySetInfo(aProperties) );
- }
- }
+ static rtl::Reference<FastPropertySetInfo> xInfo = []() {
+ PropertyVector aProperties(6);
+
+ aProperties[0].Name = "Height";
+ aProperties[0].Handle = Property_Height;
+ aProperties[0].Type = ::cppu::UnoType<sal_Int32>::get();
+ aProperties[0].Attributes = 0;
+
+ aProperties[1].Name = "OptimalHeight";
+ aProperties[1].Handle = Property_OptimalHeight;
+ aProperties[1].Type = cppu::UnoType<bool>::get();
+ aProperties[1].Attributes = 0;
+
+ aProperties[2].Name = "IsVisible";
+ aProperties[2].Handle = Property_IsVisible;
+ aProperties[2].Type = cppu::UnoType<bool>::get();
+ aProperties[2].Attributes = 0;
+
+ aProperties[3].Name = "IsStartOfNewPage";
+ aProperties[3].Handle = Property_IsStartOfNewPage;
+ aProperties[3].Type = cppu::UnoType<bool>::get();
+ aProperties[3].Attributes = 0;
+
+ aProperties[4].Name = "Size";
+ aProperties[4].Handle = Property_Height;
+ aProperties[4].Type = ::cppu::UnoType<sal_Int32>::get();
+ aProperties[4].Attributes = 0;
+
+ aProperties[5].Name = "OptimalSize";
+ aProperties[5].Handle = Property_OptimalHeight;
+ aProperties[5].Type = cppu::UnoType<bool>::get();
+ aProperties[5].Attributes = 0;
+
+ return rtl::Reference<FastPropertySetInfo>(new FastPropertySetInfo(aProperties));
+ }();
return xInfo;
}