summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-12-18 09:56:10 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-12-18 09:57:28 +0100
commitbc1387714118773b3ac27903080200fc7c9a50d7 (patch)
treeff176447d6b8a8a4ab06e6a2df9445cd44df5af3 /sw
parentfd17055017b7bb4c02c247ce1136447126cdb5e6 (diff)
sw: kill C2U in filter
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx24
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx44
2 files changed, 33 insertions, 35 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 31c3b4075e0c..216f132babbe 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -163,12 +163,12 @@ bool WW8Export::MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt)
uno::Reference< lang::XServiceInfo > xInfo(xControlModel,
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY);
- if (xInfo->supportsService(C2U("com.sun.star.form.component.ComboBox")))
+ if (xInfo->supportsService("com.sun.star.form.component.ComboBox"))
{
DoComboBox(xPropSet);
bHack = true;
}
- else if (xInfo->supportsService(C2U("com.sun.star.form.component.CheckBox")))
+ else if (xInfo->supportsService("com.sun.star.form.component.CheckBox"))
{
DoCheckBox(xPropSet);
bHack = true;
@@ -183,11 +183,11 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
{
rtl::OUString sSelected;
uno::Sequence<rtl::OUString> aListItems;
- xPropSet->getPropertyValue(C2U("StringItemList")) >>= aListItems;
+ xPropSet->getPropertyValue("StringItemList") >>= aListItems;
sal_Int32 nNoStrings = aListItems.getLength();
if (nNoStrings)
{
- uno::Any aTmp = xPropSet->getPropertyValue(C2U("DefaultText"));
+ uno::Any aTmp = xPropSet->getPropertyValue("DefaultText");
const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
if (pStr)
sSelected = *pStr;
@@ -195,7 +195,7 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
rtl::OUString sName;
{
- uno::Any aTmp = xPropSet->getPropertyValue(C2U("Name"));
+ uno::Any aTmp = xPropSet->getPropertyValue("Name");
const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
if (pStr)
sName = *pStr;
@@ -207,7 +207,7 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
// property "Help" does not exist and due to the no-existence an exception is thrown.
try
{
- uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText"));
+ uno::Any aTmp = xPropSet->getPropertyValue("HelpText");
const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
if (pStr)
sHelp = *pStr;
@@ -218,7 +218,7 @@ void WW8Export::DoComboBox(uno::Reference<beans::XPropertySet> xPropSet)
rtl::OUString sToolTip;
{
- uno::Any aTmp = xPropSet->getPropertyValue(C2U("Name"));
+ uno::Any aTmp = xPropSet->getPropertyValue("Name");
const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
if (pStr)
sToolTip = *pStr;
@@ -309,27 +309,27 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
aFFData.setCheckboxHeight(0x14);
sal_Int16 nTemp = 0;
- xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp;
+ xPropSet->getPropertyValue("DefaultState") >>= nTemp;
aFFData.setDefaultResult(nTemp);
- xPropSet->getPropertyValue(C2U("State")) >>= nTemp;
+ xPropSet->getPropertyValue("State") >>= nTemp;
aFFData.setResult(nTemp);
::rtl::OUString aStr;
- static ::rtl::OUString sName(C2U("Name"));
+ static ::rtl::OUString sName("Name");
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
aFFData.setName(aStr);
}
- static ::rtl::OUString sHelpText(C2U("HelpText"));
+ static ::rtl::OUString sHelpText("HelpText");
if (xPropSetInfo->hasPropertyByName(sHelpText))
{
xPropSet->getPropertyValue(sHelpText) >>= aStr;
aFFData.setHelp(aStr);
}
- static ::rtl::OUString sHelpF1Text(C2U("HelpF1Text"));
+ static ::rtl::OUString sHelpF1Text("HelpF1Text");
if (xPropSetInfo->hasPropertyByName(sHelpF1Text))
{
xPropSet->getPropertyValue(sHelpF1Text) >>= aStr;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 90170614cc1f..ed3c9691ec54 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2262,7 +2262,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
case RES_CHRATR_COLOR:
{
String pNm;
- if (xPropSetInfo->hasPropertyByName(pNm = C2U("TextColor")))
+ if (xPropSetInfo->hasPropertyByName(pNm = "TextColor"))
{
aTmp <<= (sal_Int32)((SvxColorItem*)pItem)->GetValue().GetColor();
rPropSet->setPropertyValue(pNm, aTmp);
@@ -2274,22 +2274,22 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
{
const SvxFontItem *pFontItem = (SvxFontItem *)pItem;
String pNm;
- if (xPropSetInfo->hasPropertyByName(pNm = C2U("FontStyleName")))
+ if (xPropSetInfo->hasPropertyByName(pNm = "FontStyleName"))
{
aTmp <<= rtl::OUString( pFontItem->GetStyleName());
rPropSet->setPropertyValue( pNm, aTmp );
}
- if (xPropSetInfo->hasPropertyByName(pNm = C2U("FontFamily")))
+ if (xPropSetInfo->hasPropertyByName(pNm = "FontFamily"))
{
aTmp <<= (sal_Int16)pFontItem->GetFamily();
rPropSet->setPropertyValue( pNm, aTmp );
}
- if (xPropSetInfo->hasPropertyByName(pNm = C2U("FontCharset")))
+ if (xPropSetInfo->hasPropertyByName(pNm = "FontCharset"))
{
aTmp <<= (sal_Int16)pFontItem->GetCharSet();
rPropSet->setPropertyValue( pNm, aTmp );
}
- if (xPropSetInfo->hasPropertyByName(pNm = C2U("FontPitch")))
+ if (xPropSetInfo->hasPropertyByName(pNm = "FontPitch"))
{
aTmp <<= (sal_Int16)pFontItem->GetPitch();
rPropSet->setPropertyValue( pNm, aTmp );
@@ -2364,8 +2364,7 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference <
lang::XMultiServiceFactory> &rServiceFactory,
uno::Reference <form::XFormComponent> &rFComp,awt::Size &rSz )
{
- uno::Reference<uno::XInterface> xCreate = rServiceFactory->createInstance(
- C2U("com.sun.star.form.component.ComboBox"));
+ uno::Reference<uno::XInterface> xCreate = rServiceFactory->createInstance("com.sun.star.form.component.ComboBox");
if( !xCreate.is() )
return sal_False;
@@ -2380,16 +2379,16 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference <
aTmp <<= sTitle;
else
aTmp <<= sName;
- xPropSet->setPropertyValue(C2U("Name"), aTmp );
+ xPropSet->setPropertyValue("Name", aTmp );
if (!sToolTip.isEmpty())
{
aTmp <<= sToolTip;
- xPropSet->setPropertyValue(C2U("HelpText"), aTmp );
+ xPropSet->setPropertyValue("HelpText", aTmp );
}
sal_Bool bDropDown(sal_True);
- xPropSet->setPropertyValue(C2U("Dropdown"), cppu::bool2any(bDropDown));
+ xPropSet->setPropertyValue("Dropdown", cppu::bool2any(bDropDown));
if (!maListEntries.empty())
{
@@ -2398,7 +2397,7 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference <
for (sal_uInt32 nI = 0; nI < nLen; ++nI)
aListSource[nI] = rtl::OUString(maListEntries[nI]);
aTmp <<= aListSource;
- xPropSet->setPropertyValue(C2U("StringItemList"), aTmp );
+ xPropSet->setPropertyValue("StringItemList", aTmp );
if (fDropdownIndex < nLen)
{
@@ -2409,7 +2408,7 @@ sal_Bool WW8FormulaListBox::Import(const uno::Reference <
aTmp <<= aListSource[0];
}
- xPropSet->setPropertyValue(C2U("DefaultText"), aTmp );
+ xPropSet->setPropertyValue("DefaultText", aTmp );
rSz = rRdr.MiserableDropDownFormHack(maListEntries[0], xPropSet);
}
@@ -2441,7 +2440,7 @@ static void lcl_AddToPropertyContainer
{
uno::Reference<beans::XPropertyContainer>
xPropContainer(xPropSet, uno::UNO_QUERY);
- uno::Any aAny(C2U(""));
+ uno::Any aAny(OUString(""));
xPropContainer->addProperty
(rPropertyName,
static_cast<sal_Int16>(beans::PropertyAttribute::BOUND |
@@ -2457,8 +2456,7 @@ sal_Bool WW8FormulaCheckBox::Import(const uno::Reference <
lang::XMultiServiceFactory> &rServiceFactory,
uno::Reference <form::XFormComponent> &rFComp,awt::Size &rSz )
{
- uno::Reference< uno::XInterface > xCreate = rServiceFactory->createInstance(
- C2U("com.sun.star.form.component.CheckBox"));
+ uno::Reference< uno::XInterface > xCreate = rServiceFactory->createInstance("com.sun.star.form.component.CheckBox");
if( !xCreate.is() )
return sal_False;
@@ -2476,16 +2474,16 @@ sal_Bool WW8FormulaCheckBox::Import(const uno::Reference <
aTmp <<= sTitle;
else
aTmp <<= sName;
- xPropSet->setPropertyValue(C2U("Name"), aTmp );
+ xPropSet->setPropertyValue("Name", aTmp );
aTmp <<= (sal_Int16)nChecked;
- xPropSet->setPropertyValue(C2U("DefaultState"), aTmp);
+ xPropSet->setPropertyValue("DefaultState", aTmp);
if (!sToolTip.isEmpty())
- lcl_AddToPropertyContainer(xPropSet, C2U("HelpText"), sToolTip);
+ lcl_AddToPropertyContainer(xPropSet, "HelpText", sToolTip);
if (!sHelp.isEmpty())
- lcl_AddToPropertyContainer(xPropSet, C2U("HelpF1Text"), sHelp);
+ lcl_AddToPropertyContainer(xPropSet, "HelpF1Text", sHelp);
return sal_True;
@@ -2512,7 +2510,7 @@ sal_Bool SwMSConvertControls::InsertControl(
return sal_False;
uno::Reference< uno::XInterface > xCreate = rServiceFactory->createInstance(
- C2U("com.sun.star.drawing.ControlShape"));
+ "com.sun.star.drawing.ControlShape"));
if( !xCreate.is() )
return sal_False;
@@ -2534,11 +2532,11 @@ sal_Bool SwMSConvertControls::InsertControl(
nTemp= text::TextContentAnchorType_AS_CHARACTER;
aTmp <<= nTemp;
- xShapePropSet->setPropertyValue(C2U("AnchorType"), aTmp );
+ xShapePropSet->setPropertyValue("AnchorType", aTmp );
nTemp= text::VertOrientation::TOP;
aTmp <<= nTemp;
- xShapePropSet->setPropertyValue(C2U("VertOrient"), aTmp );
+ xShapePropSet->setPropertyValue("VertOrient", aTmp );
uno::Reference< text::XText > xDummyTxtRef;
uno::Reference< text::XTextRange > xTxtRg =
@@ -2546,7 +2544,7 @@ sal_Bool SwMSConvertControls::InsertControl(
aTmp.setValue(&xTxtRg,::getCppuType((
uno::Reference< text::XTextRange >*)0));
- xShapePropSet->setPropertyValue(C2U("TextRange"), aTmp );
+ xShapePropSet->setPropertyValue("TextRange", aTmp );
// Das Control-Model am Control-Shape setzen
uno::Reference< drawing::XControlShape > xControlShape( xShape,