diff options
Diffstat (limited to 'svx/source/table/tablecolumn.cxx')
-rw-r--r-- | svx/source/table/tablecolumn.cxx | 76 |
1 files changed, 35 insertions, 41 deletions
diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx index 183659670256..2342c6f10c87 100644 --- a/svx/source/table/tablecolumn.cxx +++ b/svx/source/table/tablecolumn.cxx @@ -234,47 +234,41 @@ Any SAL_CALL TableColumn::getFastPropertyValue( sal_Int32 nHandle ) rtl::Reference< FastPropertySetInfo > TableColumn::getStaticPropertySetInfo() { - static rtl::Reference< FastPropertySetInfo > xInfo; - if( !xInfo.is() ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !xInfo.is() ) - { - PropertyVector aProperties(6); - - aProperties[0].Name = "Width"; - aProperties[0].Handle = Property_Width; - aProperties[0].Type = ::cppu::UnoType<sal_Int32>::get(); - aProperties[0].Attributes = 0; - - aProperties[1].Name = "OptimalWidth"; - aProperties[1].Handle = Property_OptimalWidth; - 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_Width; - aProperties[4].Type = ::cppu::UnoType<sal_Int32>::get(); - aProperties[4].Attributes = 0; - - aProperties[5].Name = "OptimalSize"; - aProperties[5].Handle = Property_OptimalWidth; - 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 = "Width"; + aProperties[0].Handle = Property_Width; + aProperties[0].Type = ::cppu::UnoType<sal_Int32>::get(); + aProperties[0].Attributes = 0; + + aProperties[1].Name = "OptimalWidth"; + aProperties[1].Handle = Property_OptimalWidth; + 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_Width; + aProperties[4].Type = ::cppu::UnoType<sal_Int32>::get(); + aProperties[4].Attributes = 0; + + aProperties[5].Name = "OptimalSize"; + aProperties[5].Handle = Property_OptimalWidth; + aProperties[5].Type = cppu::UnoType<bool>::get(); + aProperties[5].Attributes = 0; + + return rtl::Reference<FastPropertySetInfo>(new FastPropertySetInfo(aProperties)); + }(); return xInfo; } |