summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-03 14:03:54 +0200
committerNoel Grandin <noel@peralex.com>2014-11-05 08:44:19 +0200
commit705c48d32eec0aa5180e60ca157daca4b154e4a3 (patch)
tree97f43496f4b429a2b8d03b1e71cb2a1c33142a15 /toolkit
parentb7d8a58ff2698ffc6e22943f64aa97c5ea253bd9 (diff)
fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx10
-rw-r--r--toolkit/source/controls/stdtabcontroller.cxx2
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx8
-rw-r--r--toolkit/source/helper/formpdfexport.cxx38
5 files changed, 27 insertions, 33 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 2f0726e72158..eadba3526384 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -193,17 +193,15 @@ static void lcl_throwElementExistException( )
}
-static const OUString& getTabIndexPropertyName( )
+static OUString getTabIndexPropertyName( )
{
- static const OUString s_sTabIndexProperty( "TabIndex" );
- return s_sTabIndexProperty;
+ return OUString( "TabIndex" );
}
-static const OUString& getStepPropertyName( )
+static OUString getStepPropertyName( )
{
- static const OUString s_sStepProperty( "Step" );
- return s_sStepProperty;
+ return OUString( "Step" );
}
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index b6e28539e77f..145539eb94ad 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -111,7 +111,7 @@ bool StdTabController::ImplCreateComponentSequence(
if ( pTabs )
{
// opt: Constant String for TabStop name
- static const OUString aTabStopName( "Tabstop" );
+ static const char aTabStopName[] = "Tabstop";
Reference< XPropertySet > xPSet( xCtrl->getModel(), UNO_QUERY );
Reference< XPropertySetInfo > xInfo = xPSet->getPropertySetInfo();
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 5a0c4f822498..f6735bfa1bfa 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -151,7 +151,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument
Reference<XPropertySet> xDialogProp(xDialogModel,UNO_QUERY);
if ( xDialogProp.is() )
{
- static const OUString s_sResourceResolver("ResourceResolver");
+ static const char s_sResourceResolver[] = "ResourceResolver";
Reference<XPropertySet> xThis(*this,UNO_QUERY);
xThis->setPropertyValue(s_sResourceResolver,xDialogProp->getPropertyValue(s_sResourceResolver));
xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)));
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index 63b65b034729..ee1468ff22ac 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -248,9 +248,7 @@ void SAL_CALL MutableTreeDataModel::removeEventListener( const Reference< XEvent
OUString SAL_CALL MutableTreeDataModel::getImplementationName( ) throw (RuntimeException, std::exception)
{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aImplName( "toolkit.MutableTreeDataModel" );
- return aImplName;
+ return OUString( "toolkit.MutableTreeDataModel" );
}
sal_Bool SAL_CALL MutableTreeDataModel::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception)
@@ -528,9 +526,7 @@ OUString SAL_CALL MutableTreeNode::getCollapsedGraphicURL( ) throw (RuntimeExce
OUString SAL_CALL MutableTreeNode::getImplementationName( ) throw (RuntimeException, std::exception)
{
- ::osl::Guard< ::osl::Mutex > aGuard( maMutex );
- static const OUString aImplName( "toolkit.MutableTreeNode" );
- return aImplName;
+ return OUString( "toolkit.MutableTreeNode" );
}
sal_Bool SAL_CALL MutableTreeNode::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception)
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index b9da3f67b227..dfb0ae41d039 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -63,7 +63,7 @@ namespace toolkitform
*/
sal_Int16 classifyFormControl( const Reference< XPropertySet >& _rxModel )
{
- static const OUString FM_PROP_CLASSID("ClassId");
+ static const char FM_PROP_CLASSID[] = "ClassId";
sal_Int16 nControlType = FormComponentType::CONTROL;
Reference< XPropertySetInfo > xPSI;
@@ -243,7 +243,7 @@ namespace toolkitform
*/
void getStringItemVector( const Reference< XPropertySet >& _rxModel, ::std::vector< OUString >& _rVector )
{
- static const OUString FM_PROP_STRINGITEMLIST("StringItemList");
+ static const char FM_PROP_STRINGITEMLIST[] = "StringItemList";
Sequence< OUString > aListEntries;
OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) >>= aListEntries );
::std::copy( aListEntries.getConstArray(), aListEntries.getConstArray() + aListEntries.getLength(),
@@ -282,12 +282,12 @@ namespace toolkitform
// Name, Description, Text
- OSL_VERIFY( xModelProps->getPropertyValue( OUString(FM_PROP_NAME) ) >>= Descriptor->Name );
- static const OUString FM_PROP_HELPTEXT("HelpText");
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= Descriptor->Name );
+ static const char FM_PROP_HELPTEXT[] = "HelpText";
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_HELPTEXT ) >>= Descriptor->Description );
Any aText;
- static const OUString FM_PROP_TEXT("Text");
- static const OUString FM_PROP_LABEL("Label");
+ static const char FM_PROP_TEXT[] = "Text";
+ static const char FM_PROP_LABEL[] = "Label";
if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) )
aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
@@ -297,14 +297,14 @@ namespace toolkitform
// readonly
- static const OUString FM_PROP_READONLY("ReadOnly");
+ static const char FM_PROP_READONLY[] = "ReadOnly";
if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) )
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= Descriptor->ReadOnly );
// border
{
- static const OUString FM_PROP_BORDER("Border");
+ static const char FM_PROP_BORDER[] = "Border";
if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) )
{
sal_Int16 nBorderType = 0;
@@ -325,7 +325,7 @@ namespace toolkitform
// background color
- static const OUString FM_PROP_BACKGROUNDCOLOR("BackgroundColor");
+ static const char FM_PROP_BACKGROUNDCOLOR[] = "BackgroundColor";
if ( xPSI->hasPropertyByName( FM_PROP_BACKGROUNDCOLOR ) )
{
sal_Int32 nBackColor = COL_TRANSPARENT;
@@ -336,7 +336,7 @@ namespace toolkitform
// text color
- static const OUString FM_PROP_TEXTCOLOR("TextColor");
+ static const char FM_PROP_TEXTCOLOR[] = "TextColor";
if ( xPSI->hasPropertyByName( FM_PROP_TEXTCOLOR ) )
{
sal_Int32 nTextColor = COL_TRANSPARENT;
@@ -351,7 +351,7 @@ namespace toolkitform
// multi line and word break
// The MultiLine property of the control is mapped to both the "MULTILINE" and
// "WORDBREAK" style flags
- static const OUString FM_PROP_MULTILINE("MultiLine");
+ static const char FM_PROP_MULTILINE[] = "MultiLine";
if ( xPSI->hasPropertyByName( FM_PROP_MULTILINE ) )
{
bool bMultiLine = false;
@@ -361,7 +361,7 @@ namespace toolkitform
}
// horizontal alignment
- static const OUString FM_PROP_ALIGN("Align");
+ static const char FM_PROP_ALIGN[] = "Align";
if ( xPSI->hasPropertyByName( FM_PROP_ALIGN ) )
{
sal_Int16 nAlign = awt::TextAlign::LEFT;
@@ -397,7 +397,7 @@ namespace toolkitform
}
// font
- static const OUString FM_PROP_FONT("FontDescriptor");
+ static const char FM_PROP_FONT[] = "FontDescriptor";
if ( xPSI->hasPropertyByName( FM_PROP_FONT ) )
{
FontDescriptor aUNOFont;
@@ -435,12 +435,12 @@ namespace toolkitform
}
// file select
- static const OUString FM_SUN_COMPONENT_FILECONTROL("com.sun.star.form.component.FileControl");
+ static const char FM_SUN_COMPONENT_FILECONTROL[] = "com.sun.star.form.component.FileControl";
if ( xSI->supportsService( FM_SUN_COMPONENT_FILECONTROL ) )
pEditWidget->FileSelect = true;
// maximum text length
- static const OUString FM_PROP_MAXTEXTLEN("MaxTextLen");
+ static const char FM_PROP_MAXTEXTLEN[] = "MaxTextLen";
if ( xPSI->hasPropertyByName( FM_PROP_MAXTEXTLEN ) )
{
sal_Int16 nMaxTextLength = 0;
@@ -459,7 +459,7 @@ namespace toolkitform
::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( Descriptor.get() );
FormButtonType eButtonType = FormButtonType_PUSH;
OSL_VERIFY( xModelProps->getPropertyValue("ButtonType") >>= eButtonType );
- static const OUString FM_PROP_TARGET_URL("TargetURL");
+ static const char FM_PROP_TARGET_URL[] = "TargetURL";
if ( eButtonType == FormButtonType_SUBMIT )
{
// if a button is a submit button, then it uses the URL at its parent form
@@ -518,7 +518,7 @@ namespace toolkitform
// check boxes
- static const OUString FM_PROP_STATE("State");
+ static const char FM_PROP_STATE[] = "State";
if ( Descriptor->getType() == ::vcl::PDFWriter::CheckBox )
{
::vcl::PDFWriter::CheckBoxWidget* pCheckBoxWidget = static_cast< ::vcl::PDFWriter::CheckBoxWidget* >( Descriptor.get() );
@@ -538,7 +538,7 @@ namespace toolkitform
pRadioWidget->RadioGroup = determineRadioGroupId( xModelProps );
try
{
- static const OUString FM_PROP_REFVALUE("RefValue");
+ static const char FM_PROP_REFVALUE[] = "RefValue";
xModelProps->getPropertyValue( FM_PROP_REFVALUE ) >>= pRadioWidget->OnValue;
}
catch(...)
@@ -554,7 +554,7 @@ namespace toolkitform
::vcl::PDFWriter::ListBoxWidget* pListWidget = static_cast< ::vcl::PDFWriter::ListBoxWidget* >( Descriptor.get() );
// drop down
- static const OUString FM_PROP_DROPDOWN("Dropdown");
+ static const char FM_PROP_DROPDOWN[] = "Dropdown";
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown );
// multi selection