remove unnecessary use of OUString constructor in FORMS module

Change-Id: Ibbf477e99ba0c07a9138497496442b0f9296f5c3
This commit is contained in:
Noel Grandin
2013-11-04 11:46:53 +02:00
parent 316be1b6f1
commit 373f352ef2
10 changed files with 34 additions and 35 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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(),

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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 );

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;
}