summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-04 11:46:53 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 11:21:22 +0200
commit373f352ef2f39965b4ef830acfc1554f8e2e3abf (patch)
treeeb0b7044d57a2e72a461e2ffd2ae370d4f52760e
parent316be1b6f18963b39aab7729bf93fc9c86519e33 (diff)
remove unnecessary use of OUString constructor in FORMS module
Change-Id: Ibbf477e99ba0c07a9138497496442b0f9296f5c3
-rw-r--r--forms/source/component/DatabaseForm.cxx18
-rw-r--r--forms/source/component/Filter.cxx18
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/FormsCollection.cxx4
-rw-r--r--forms/source/component/Grid.cxx5
-rw-r--r--forms/source/component/clickableimage.cxx8
-rw-r--r--forms/source/misc/services.cxx4
-rw-r--r--forms/source/xforms/submission/replace.cxx2
-rw-r--r--forms/source/xforms/submission/submission_post.cxx4
-rw-r--r--forms/source/xforms/xpathlib/extension.cxx2
10 files changed, 34 insertions, 35 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index e1eb01f90847..dbb9235a2575 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -918,7 +918,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
if (!xContainer.is())
break;
- aName += OUString(static_cast<sal_Unicode>('.'));
+ aName += ".";
Reference<XPropertySet> xSet;
sal_Int32 nCount = xContainer->getCount();
@@ -2162,7 +2162,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor
if (xDisp.is())
{
Sequence<PropertyValue> aArgs(2);
- aArgs.getArray()[0].Name = OUString("Referer");
+ aArgs.getArray()[0].Name = "Referer";
aArgs.getArray()[0].Value <<= aReferer;
// build a sequence from the to-be-submitted string
@@ -2171,7 +2171,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor
Sequence< sal_Int8 > aPostData((const sal_Int8*)a8BitData.getStr(), a8BitData.getLength());
Reference< XInputStream > xPostData = new SequenceInputStream(aPostData);
- aArgs.getArray()[1].Name = OUString("PostData");
+ aArgs.getArray()[1].Name = "PostData";
aArgs.getArray()[1].Value <<= xPostData;
xDisp->dispatch(aURL, aArgs);
@@ -2256,7 +2256,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
if (xDisp.is())
{
Sequence<PropertyValue> aArgs(1);
- aArgs.getArray()->Name = OUString("Referer");
+ aArgs.getArray()->Name = "Referer";
aArgs.getArray()->Value <<= aReferer;
xDisp->dispatch(aURL, aArgs);
}
@@ -2289,15 +2289,15 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
return;
Sequence<PropertyValue> aArgs(3);
- aArgs.getArray()[0].Name = OUString("Referer");
+ aArgs.getArray()[0].Name = "Referer";
aArgs.getArray()[0].Value <<= aReferer;
- aArgs.getArray()[1].Name = OUString("ContentType");
+ aArgs.getArray()[1].Name = "ContentType";
aArgs.getArray()[1].Value <<= aContentType;
// build a sequence from the to-be-submitted string
Reference< XInputStream > xPostData = new SequenceInputStream(aData);
- aArgs.getArray()[2].Name = OUString("PostData");
+ aArgs.getArray()[2].Name = "PostData";
aArgs.getArray()[2].Value <<= xPostData;
xDisp->dispatch(aURL, aArgs);
@@ -2540,7 +2540,7 @@ void SAL_CALL ODatabaseForm::getGroup( sal_Int32 nGroup, Sequence<Reference<XCon
{
::osl::MutexGuard aGuard(m_aMutex);
_rGroup.realloc(0);
- _rName = OUString();
+ _rName = "";
if ((nGroup < 0) || (nGroup >= m_pGroupManager->getGroupCount()))
return;
@@ -3799,7 +3799,7 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getCurrentServiceNames_Static()
OUString* pServices = aServices.getArray();
*pServices++ = FRM_SUN_FORMCOMPONENT;
- *pServices++ = OUString("com.sun.star.form.FormComponents");
+ *pServices++ = "com.sun.star.form.FormComponents";
*pServices++ = FRM_SUN_COMPONENT_FORM;
*pServices++ = FRM_SUN_COMPONENT_HTMLFORM;
*pServices++ = FRM_SUN_COMPONENT_DATAFORM;
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index fa620deafb59..6983e8388b1b 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -159,22 +159,22 @@ namespace frm
switch (m_nControlClass)
{
case FormComponentType::RADIOBUTTON:
- aServiceName = OUString("radiobutton");
+ aServiceName = "radiobutton";
break;
case FormComponentType::CHECKBOX:
- aServiceName = OUString("checkbox");
+ aServiceName = "checkbox";
break;
case FormComponentType::COMBOBOX:
- aServiceName = OUString("combobox");
+ aServiceName = "combobox";
break;
case FormComponentType::LISTBOX:
- aServiceName = OUString("listbox");
+ aServiceName = "listbox";
break;
default:
if (m_bMultiLine)
- aServiceName = OUString("MultiLineEdit");
+ aServiceName = "MultiLineEdit";
else
- aServiceName = OUString("Edit");
+ aServiceName = "Edit";
}
return aServiceName;
}
@@ -635,7 +635,7 @@ namespace frm
OSL_ENSURE( ( itemPos != m_aDisplayItemToValueItem.end() ) || m_aText.isEmpty(),
"OFilterControl::setText: this text is not in my display list!" );
if ( itemPos == m_aDisplayItemToValueItem.end() )
- m_aText = OUString();
+ m_aText = "";
if ( m_aText.isEmpty() )
{
@@ -897,8 +897,8 @@ namespace frm
Sequence< OUString > SAL_CALL OFilterControl::getSupportedServiceNames_Static()
{
Sequence< OUString > aNames( 2 );
- aNames[ 0 ] = OUString( "com.sun.star.form.control.FilterControl" );
- aNames[ 1 ] = OUString( "com.sun.star.awt.UnoControl" );
+ aNames[ 0 ] = "com.sun.star.form.control.FilterControl";
+ aNames[ 1 ] = "com.sun.star.awt.UnoControl";
return aNames;
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 7a23644b173a..627e5535c62d 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -759,7 +759,7 @@ Sequence< OUString > SAL_CALL OControlModel::getSupportedServiceNames_Static() t
{
Sequence< OUString > aServiceNames( 2 );
aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
- aServiceNames[ 1 ] = OUString("com.sun.star.form.FormControlModel");
+ aServiceNames[ 1 ] = "com.sun.star.form.FormControlModel";
return aServiceNames;
}
@@ -1671,7 +1671,7 @@ StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(Run
Sequence< OUString > SAL_CALL OBoundControlModel::getSupportedServiceNames_Static() throw( RuntimeException )
{
Sequence< OUString > aOwnServiceNames( 1 );
- aOwnServiceNames[ 0 ] = OUString("com.sun.star.form.DataAwareControlModel");
+ aOwnServiceNames[ 0 ] = "com.sun.star.form.DataAwareControlModel";
return ::comphelper::concatSequences(
OControlModel::getSupportedServiceNames_Static(),
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index ad941fe790e4..db118d82e77f 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -120,8 +120,8 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti
{
StringSequence aReturn(2);
- aReturn.getArray()[0] = OUString("com.sun.star.form.Forms");
- aReturn.getArray()[1] = OUString("com.sun.star.form.FormComponents");
+ aReturn[0] = "com.sun.star.form.Forms";
+ aReturn[1] = "com.sun.star.form.FormComponents";
return aReturn;
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index e1c8549642cb..c81675f77084 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -202,9 +202,8 @@ StringSequence OGridControlModel::getSupportedServiceNames() throw(RuntimeExcept
StringSequence aSupported = OControlModel::getSupportedServiceNames();
aSupported.realloc(aSupported.getLength() + 2);
- OUString*pArray = aSupported.getArray();
- pArray[aSupported.getLength()-2] = OUString("com.sun.star.awt.UnoControlModel");
- pArray[aSupported.getLength()-1] = FRM_SUN_COMPONENT_GRIDCONTROL;
+ aSupported[aSupported.getLength()-2] = "com.sun.star.awt.UnoControlModel";
+ aSupported[aSupported.getLength()-1] = FRM_SUN_COMPONENT_GRIDCONTROL;
return aSupported;
}
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 63bf2d70ee1b..0a4235481e83 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -306,7 +306,7 @@ namespace frm
Sequence<PropertyValue> aArgs(1);
PropertyValue& rProp = aArgs.getArray()[0];
- rProp.Name = OUString("Referer");
+ rProp.Name = "Referer";
rProp.Value <<= xModel->getURL();
if (xDisp.is())
@@ -321,13 +321,13 @@ namespace frm
if ( xDisp.is() )
{
Sequence<PropertyValue> aProps(3);
- aProps[0].Name = OUString("URL");
+ aProps[0].Name = "URL";
aProps[0].Value <<= aURL.Complete;
- aProps[1].Name = OUString("FrameName");
+ aProps[1].Name = "FrameName";
aProps[1].Value = xSet->getPropertyValue(PROPERTY_TARGET_FRAME);
- aProps[2].Name = OUString("Referer");
+ aProps[2].Name = "Referer";
aProps[2].Value <<= xModel->getURL();
xDisp->dispatch( aHyperLink, aProps );
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index 29e173c0b255..372d0f018850 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -259,7 +259,7 @@ void ensureClassInfos()
// ========================================================================
// = various
aServices.realloc(1);
- aServices.getArray()[0] = OUString("com.sun.star.form.Forms");
+ aServices.getArray()[0] = "com.sun.star.form.Forms";
REGISTER_CLASS_CORE(OFormsCollection);
REGISTER_CLASS1(ImageProducer, SRV_AWT_IMAGEPRODUCER);
@@ -268,7 +268,7 @@ void ensureClassInfos()
// = XForms core
#define REGISTER_XFORMS_CLASS(name) \
aServices.realloc(1); \
- aServices.getArray()[0] = OUString( "com.sun.star.xforms." #name ); \
+ aServices[0] = "com.sun.star.xforms." #name ; \
REGISTER_CLASS_CORE(name)
REGISTER_XFORMS_CLASS(Model);
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index 24391c062cd2..88a7238998e5 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -69,7 +69,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con
-1, makeAny(sal_True), PropertyState_DIRECT_VALUE);
OUString aURL = m_aURLObj.GetMainURL(INetURLObject::NO_DECODE);
- OUString aTarget = OUString("_default");
+ OUString aTarget = "_default";
xLoader->loadComponentFromURL(aURL, aTarget, FrameSearchFlag::ALL, descriptor);
return CSubmission::SUCCESS;
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index 73bdf82c0bf8..eb057f33f755 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -59,8 +59,8 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference<
aPostArgument.Source = apSerialization->getInputStream();
CSS::uno::Reference< XActiveDataSink > aSink(new ucbhelper::ActiveDataSink);
aPostArgument.Sink = aSink;
- aPostArgument.MediaType = OUString("application/xml");
- aPostArgument.Referer = OUString();
+ aPostArgument.MediaType = "application/xml";
+ aPostArgument.Referer = "";
Any aCommandArgument;
aCommandArgument <<= aPostArgument;
aContent.executeCommand( aCommandName, aCommandArgument);
diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx
index 6e93845b61bd..146d94b7e6bd 100644
--- a/forms/source/xforms/xpathlib/extension.cxx
+++ b/forms/source/xforms/xpathlib/extension.cxx
@@ -47,7 +47,7 @@ OUString SAL_CALL CLibxml2XFormsExtension::getImplementationName_Static()
Sequence< OUString > SAL_CALL CLibxml2XFormsExtension::getSupportedServiceNames_Static()
{
Sequence< OUString > aSequence(1);
- aSequence[0] = OUString("com.sun.star.xml.xpath.XPathExtension");
+ aSequence[0] = "com.sun.star.xml.xpath.XPathExtension";
return aSequence;
}