diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-12-22 20:40:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-12-22 20:40:14 +0100 |
commit | 764c3670cf70dbd8a0a0f742576d9c07d51a72a4 (patch) | |
tree | 5e73a2115710a5f1fc46294a2bbf906cc3910163 | |
parent | 71061656d459abecfe55e8725900d699174325df (diff) |
sw: kill C2U in ui
28 files changed, 174 insertions, 179 deletions
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx index b78d3b08c8f1..12c251528cbd 100644 --- a/sw/source/ui/config/barcfg.cxx +++ b/sw/source/ui/config/barcfg.cxx @@ -36,7 +36,7 @@ using namespace com::sun::star::uno; #define SEL_TYPE_GRAPHIC 4 SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) : - ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"), + ConfigItem(bWeb ? OUString("Office.WriterWeb/ObjectBar") : OUString("Office.Writer/ObjectBar"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ ) diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index 258a9463f035..c9cdcf50f36b 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -90,7 +90,7 @@ Sequence<OUString> SwStdFontConfig::GetPropertyNames() } SwStdFontConfig::SwStdFontConfig() : - utl::ConfigItem(C2U("Office.Writer")) + utl::ConfigItem("Office.Writer") { SvtLinguOptions aLinguOpt; diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index 433e03b7deef..f95b87b4ac78 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -248,7 +248,7 @@ const Sequence<OUString>& SwRevisionConfig::GetPropertyNames() } SwRevisionConfig::SwRevisionConfig() : - ConfigItem(C2U("Office.Writer/Revision"), + ConfigItem("Office.Writer/Revision", CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { aInsertAttr.nItemId = SID_ATTR_CHAR_UNDERLINE; @@ -592,7 +592,7 @@ const Sequence<OUString>& SwInsertConfig::GetPropertyNames() } SwInsertConfig::SwInsertConfig(sal_Bool bWeb) : - ConfigItem(bWeb ? C2U("Office.WriterWeb/Insert") : C2U("Office.Writer/Insert"), + ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), pCapOptions(0), pOLEMiscOpt(0), @@ -1138,7 +1138,7 @@ const Sequence<OUString>& SwTableConfig::GetPropertyNames() } SwTableConfig::SwTableConfig(sal_Bool bWeb) : - ConfigItem(bWeb ? C2U("Office.WriterWeb/Table") : C2U("Office.Writer/Table"), + ConfigItem(bWeb ? OUString("Office.WriterWeb/Table") : OUString("Office.Writer/Table"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { Load(); @@ -1204,7 +1204,7 @@ void SwTableConfig::Load() } SwMiscConfig::SwMiscConfig() : - ConfigItem(C2U("Office.Writer"), + ConfigItem("Office.Writer", CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), bDefaultFontsInCurrDocOnly(sal_False), bShowIndexPreview(sal_False), @@ -1341,7 +1341,7 @@ const Sequence<OUString>& SwCompareConfig::GetPropertyNames() } SwCompareConfig::SwCompareConfig() : - ConfigItem(C2U("Office.Writer/Comparison"), + ConfigItem("Office.Writer/Comparison", CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { eCmpMode = SVX_CMP_AUTO; diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index 7614188d2e5f..01bd2dfe7b8d 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -69,7 +69,7 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames() } SwPrintOptions::SwPrintOptions(sal_Bool bWeb) : - ConfigItem(bWeb ? C2U("Office.WriterWeb/Print") : C2U("Office.Writer/Print"), + ConfigItem(bWeb ? OUString("Office.WriterWeb/Print") : OUString("Office.Writer/Print"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), bIsWeb(bWeb) { diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 68acb56a62d9..ee01698dd906 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -112,7 +112,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() } SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")), + ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Content") : OUString("Office.Writer/Content")), rParent(rPar), bWeb(bIsWeb) { @@ -249,7 +249,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() } SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"), + ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Layout") : OUString("Office.Writer/Layout"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), bWeb(bIsWeb) @@ -383,7 +383,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames() } SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : - ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"), + ConfigItem(bIsWeb ? OUString("Office.WriterWeb/Grid") : OUString("Office.Writer/Grid"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar) { @@ -471,7 +471,7 @@ Sequence<OUString> SwCursorConfig::GetPropertyNames() } SwCursorConfig::SwCursorConfig(SwMasterUsrPref& rPar) : - ConfigItem(C2U("Office.Writer/Cursor"), + ConfigItem("Office.Writer/Cursor", CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar) { @@ -537,12 +537,12 @@ void SwCursorConfig::Load() void SwCursorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) : - ConfigItem(C2U("Office.WriterWeb/Background"), + ConfigItem("Office.WriterWeb/Background", CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), aPropNames(1) { - aPropNames.getArray()[0] = C2U("Color"); + aPropNames.getArray()[0] = "Color"; } SwWebColorConfig::~SwWebColorConfig() diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index 951a6b721f21..485fbd0edb69 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -173,7 +173,7 @@ SfxPoolItem* SwEnvItem::Clone(SfxItemPool*) const } SwEnvCfgItem::SwEnvCfgItem() : - ConfigItem(C2U("Office.Writer/Envelope")) + ConfigItem("Office.Writer/Envelope") { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx index 2320dc9b1685..1e39eccccd8a 100644 --- a/sw/source/ui/envelp/labelcfg.cxx +++ b/sw/source/ui/envelp/labelcfg.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::beans; using ::rtl::OUString; SwLabelConfig::SwLabelConfig() : - ConfigItem(C2U("Office.Labels/Manufacturer")) + ConfigItem("Office.Labels/Manufacturer") { aNodeNames = GetNodeNames(OUString()); } @@ -55,8 +55,8 @@ static Sequence<OUString> lcl_CreatePropertyNames(const OUString& rPrefix) for(sal_Int32 nProp = 0; nProp < 2; nProp++) pProperties[nProp] = rPrefix; - pProperties[ 0] += C2U("Name"); - pProperties[ 1] += C2U("Measure"); + pProperties[ 0] += "Name"; + pProperties[ 1] += "Measure"; return aProperties; } @@ -122,7 +122,7 @@ static Sequence<PropertyValue> lcl_CreateProperties( const OUString* pNames = rPropNames.getConstArray(); Sequence<PropertyValue> aRet(rPropNames.getLength()); PropertyValue* pValues = aRet.getArray(); - OUString sColon(C2U(";")); + OUString sColon(";"); for(sal_Int32 nProp = 0; nProp < rPropNames.getLength(); nProp++) { @@ -133,7 +133,7 @@ static Sequence<PropertyValue> lcl_CreateProperties( case 1: { OUString sTmp; - sTmp += C2U( rRec.bCont ? "C" : "S"); sTmp += sColon; + sTmp += OUString( rRec.bCont ? "C" : "S"); sTmp += sColon; sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lHDist) ); sTmp += sColon; sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lVDist)); sTmp += sColon; sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lWidth) ); sTmp += sColon; @@ -160,9 +160,9 @@ void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLab for(sal_Int32 nLabel = 0; nLabel < aLabels.getLength(); nLabel++) { OUString sPrefix(sManufacturer); - sPrefix += C2U("/"); + sPrefix += "/"; sPrefix += pLabels[nLabel]; - sPrefix += C2U("/"); + sPrefix += "/"; Sequence<OUString> aPropNames = lcl_CreatePropertyNames(sPrefix); Sequence<Any> aValues = GetProperties(aPropNames); SwLabRec* pNewRec = lcl_CreateSwLabRec(aValues, rManufacturer); @@ -187,12 +187,12 @@ sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rt for(sal_Int32 nLabel = 0; nLabel < aLabels.getLength(); nLabel++) { OUString sPrefix(sManufacturer); - sPrefix += C2U("/"); + sPrefix += "/"; sPrefix += pLabels[nLabel]; - sPrefix += C2U("/"); + sPrefix += "/"; Sequence<OUString> aProperties(1); aProperties.getArray()[0] = sPrefix; - aProperties.getArray()[0] += C2U("Name"); + aProperties.getArray()[0] += "Name"; Sequence<Any> aValues = GetProperties(aProperties); const Any* pValues = aValues.getConstArray(); if(pValues[0].hasValue()) @@ -246,12 +246,12 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer, for(sal_Int32 nLabel = 0; nLabel < aLabels.getLength(); nLabel++) { OUString sPrefix(sManufacturer); - sPrefix += C2U("/"); + sPrefix += "/"; sPrefix += pLabels[nLabel]; - sPrefix += C2U("/"); + sPrefix += "/"; Sequence<OUString> aProperties(1); aProperties.getArray()[0] = sPrefix; - aProperties.getArray()[0] += C2U("Name"); + aProperties.getArray()[0] += "Name"; Sequence<Any> aValues = GetProperties(aProperties); const Any* pValues = aValues.getConstArray(); if(pValues[0].hasValue()) @@ -269,7 +269,7 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer, if(sFoundNode.isEmpty()) { sal_Int32 nIndex = aLabels.getLength(); - OUString sPrefix(C2U("Label")); + OUString sPrefix("Label"); sFoundNode = sPrefix; sFoundNode += OUString::valueOf(nIndex); while(lcl_Exists(sFoundNode, aLabels)) @@ -279,9 +279,9 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer, } } OUString sPrefix(wrapConfigurationElementName(rManufacturer)); - sPrefix += C2U("/"); + sPrefix += "/"; sPrefix += sFoundNode; - sPrefix += C2U("/"); + sPrefix += "/"; Sequence<OUString> aPropNames = lcl_CreatePropertyNames(sPrefix); Sequence<PropertyValue> aPropValues = lcl_CreateProperties(aPropNames, rRec); SetSetProperties(wrapConfigurationElementName(rManufacturer), aPropValues); diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index 1d83cee481c3..ed30c8d7e430 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -52,8 +52,7 @@ void SwVisitingCardPage::InitFrameControl() getProcessServiceFactory(); //now the AutoText ListBoxes have to be filled - uno::Reference< uno::XInterface > xAText = - xMgr->createInstance( C2U("com.sun.star.text.AutoTextContainer") ); + uno::Reference< uno::XInterface > xAText = xMgr->createInstance( "com.sun.star.text.AutoTextContainer" ); _xAutoText = uno::Reference< container::XNameAccess >(xAText, uno::UNO_QUERY); uno::Sequence<OUString> aNames = _xAutoText->getElementNames(); diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx index 5b06e36bf9e4..38fafdbcb72d 100644 --- a/sw/source/ui/envelp/labimg.cxx +++ b/sw/source/ui/envelp/labimg.cxx @@ -267,7 +267,7 @@ Sequence<rtl::OUString> SwLabCfgItem::GetPropertyNames() } SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) : - ConfigItem(bLabel ? C2U("Office.Writer/Label") : C2U("Office.Writer/BusinessCard")), + ConfigItem(bLabel ? OUString("Office.Writer/Label") : OUString("Office.Writer/BusinessCard")), bIsLabel(bLabel) { Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 4a675dcd2bcd..c778081248b5 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -270,7 +270,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, // create a frame wrapper for myself uno::Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - xFrame = uno::Reference< XFrame >(xMgr->createInstance(C2U("com.sun.star.frame.Frame")), UNO_QUERY); + xFrame = uno::Reference< XFrame >(xMgr->createInstance("com.sun.star.frame.Frame"), UNO_QUERY); if(xFrame.is()) { xFrame->initialize( VCLUnoHelper::GetInterface ( pBeamerWin ) ); @@ -284,19 +284,19 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, { uno::Reference<XDispatchProvider> xDP(xFrame, UNO_QUERY); URL aURL; - aURL.Complete = C2U(".component:DB/DataSourceBrowser"); + aURL.Complete = ".component:DB/DataSourceBrowser"; uno::Reference<XDispatch> xD = xDP->queryDispatch(aURL, - C2U(""), + "", 0x0C); if(xD.is()) { Sequence<PropertyValue> aProperties(3); PropertyValue* pProperties = aProperties.getArray(); - pProperties[0].Name = C2U("DataSourceName"); + pProperties[0].Name = "DataSourceName"; pProperties[0].Value <<= OUString(rSourceName); - pProperties[1].Name = C2U("Command"); + pProperties[1].Name = "Command"; pProperties[1].Value <<= OUString(rTableName); - pProperties[2].Name = C2U("CommandType"); + pProperties[2].Name = "CommandType"; pProperties[2].Value <<= nCommandType; xD->dispatch(aURL, aProperties); pBeamerWin->Show(); @@ -408,13 +408,13 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, try { uno::Reference< container::XNameContainer> xFilterFactory( - xMSF->createInstance(C2U("com.sun.star.document.FilterFactory")), UNO_QUERY_THROW); + xMSF->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY_THROW); uno::Reference< container::XContainerQuery > xQuery(xFilterFactory, UNO_QUERY_THROW); - OUString sCommand(C2U("matchByDocumentService=com.sun.star.text.TextDocument:iflags=")); + OUString sCommand("matchByDocumentService=com.sun.star.text.TextDocument:iflags="); sCommand += String::CreateFromInt32(SFX_FILTER_EXPORT); - sCommand += C2U(":eflags="); + sCommand += ":eflags="; sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG); - sCommand += C2U(":default_first"); + sCommand += ":default_first"; uno::Reference< container::XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand); const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); sal_uInt16 nODT = USHRT_MAX; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 5f9c1990afaa..bc7587fd1d4b 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -376,18 +376,18 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( } beans::PropertyValues aPropVals(nParamCount); beans::PropertyValue* pPropValArr = aPropVals.getArray(); - pPropValArr[0].Name = C2U("TokenType"); + pPropValArr[0].Name = "TokenType"; pPropValArr[0].Value <<= OUString(sTokenType); - pPropValArr[1].Name = C2U("CharacterStyleName"); + pPropValArr[1].Name = "CharacterStyleName"; pPropValArr[1].Value <<= OUString(aToken.sCharStyleName); if(TOKEN_TAB_STOP == aToken.eTokenType) { - pPropValArr[2].Name = C2U("TabStopRightAligned"); + pPropValArr[2].Name = "TabStopRightAligned"; sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign; pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType()); - pPropValArr[3].Name = C2U("TabStopFillCharacter"); + pPropValArr[3].Name = "TabStopFillCharacter"; pPropValArr[3].Value <<= OUString(aToken.cTabFillChar); - pPropValArr[4].Name = C2U("TabStopPosition"); + pPropValArr[4].Name = "TabStopPosition"; SwTwips nTempPos = aToken.nTabStopPosition >= 0 ? aToken.nTabStopPosition : 0; nTempPos = TWIP_TO_MM100(nTempPos); @@ -395,7 +395,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( } else if(TOKEN_TEXT == aToken.eTokenType) { - pPropValArr[2].Name = C2U("Text"); + pPropValArr[2].Name = "Text"; pPropValArr[2].Value <<= OUString(aToken.sText); } beans::PropertyValues* pValues = aSequPropVals.getArray(); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c20fc11dbfe0..9e2e3b0deff3 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -130,7 +130,7 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, sal_Bool bNewDlg, xExtendedIndexEntrySupplier = uno::Reference< i18n::XExtendedIndexEntrySupplier > ( - xMSF->createInstance( C2U("com.sun.star.i18n.IndexEntrySupplier") ), + xMSF->createInstance( "com.sun.star.i18n.IndexEntrySupplier"), uno::UNO_QUERY ); m_pPhoneticFT0->Show(); @@ -1353,11 +1353,9 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) if(!bBibAccessInitialized) { uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); - xBibAccess = uno::Reference< container::XNameAccess > ( - xMSF->createInstance( C2U("com.sun.star.frame.Bibliography") ), - uno::UNO_QUERY ); + xBibAccess = uno::Reference< container::XNameAccess > (xMSF->createInstance( "com.sun.star.frame.Bibliography"), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropSet(xBibAccess, uno::UNO_QUERY); - OUString uPropName(C2U("BibliographyDataFieldNames")); + OUString uPropName("BibliographyDataFieldNames"); if(xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName(uPropName)) { uno::Any aNames = xPropSet->getPropertyValue(uPropName); diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index f939145fcd8a..953fdc762e27 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -391,8 +391,8 @@ void SwHHCWrapper::ReplaceUnit( ReplacementAction eAction, LanguageType *pNewUnitLanguage ) { - static OUString aBracketedStart( C2U( "(" ) ); - static OUString aBracketedEnd( C2U( ")" ) ); + static OUString aBracketedStart( "(" ); + static OUString aBracketedEnd( ")" ); OSL_ENSURE( nUnitStart >= 0 && nUnitEnd >= nUnitStart, "wrong arguments" ); if (!(nUnitStart >= 0 && nUnitEnd >= nUnitStart)) diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx index dac29337ec3d..07ba3d950a98 100644 --- a/sw/source/ui/lingu/hyp.cxx +++ b/sw/source/ui/lingu/hyp.cxx @@ -57,7 +57,7 @@ SwHyphWrapper::SwHyphWrapper( SwView* pVw, { uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() ); bAutomatic = xProp.is() ? - *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_HYPH_AUTO) ).getValue() : sal_False; + *(sal_Bool*)xProp->getPropertyValue(UPN_IS_HYPH_AUTO).getValue() : sal_False; SetHyphen(); } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 3637d22b8eeb..7244ead96b67 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -662,7 +662,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl) Content aTestContent( sPath, uno::Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - Any aAny = aTestContent.getPropertyValue( C2U("IsReadOnly") ); + Any aAny = aTestContent.getPropertyValue( "IsReadOnly" ); if(aAny.hasValue()) { bIsWritable = !*(sal_Bool*)aAny.getValue(); @@ -1179,7 +1179,7 @@ void SwGlossaryDlg::ResumeShowAutoText() xMgr = getProcessServiceFactory(); //now the AutoText ListBoxes have to be filled - uno::Reference< uno::XInterface > xAText = xMgr->createInstance( C2U("com.sun.star.text.AutoTextContainer") ); + uno::Reference< uno::XInterface > xAText = xMgr->createInstance( "com.sun.star.text.AutoTextContainer" ); _xAutoText = uno::Reference< container::XNameAccess >(xAText, uno::UNO_QUERY); } diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 3ce6672b08b5..d9bd8ecce6a4 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1157,9 +1157,9 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) { try { - xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified; - xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants; - xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms; + xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified; + xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants; + xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms; } catch (const Exception&) { diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx index 862e2835b526..4c6d6d572b48 100644 --- a/sw/source/ui/shells/drformsh.cxx +++ b/sw/source/ui/shells/drformsh.cxx @@ -113,7 +113,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY); // Darf man eine URL an dem Objekt setzen? - OUString sTargetURL( C2U( "TargetURL" )); + OUString sTargetURL( "TargetURL" ); uno::Reference< beans::XPropertySetInfo > xPropInfoSet = xPropSet->getPropertySetInfo(); if( xPropInfoSet->hasPropertyByName( sTargetURL )) { @@ -122,7 +122,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) { uno::Any aTmp; // Ja! - ::rtl::OUString sLabel(C2U("Label")); + ::rtl::OUString sLabel("Label"); if( xPropInfoSet->hasPropertyByName(sLabel) ) { aTmp <<= OUString(rHLinkItem.GetName()); @@ -139,13 +139,13 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) if( rHLinkItem.GetTargetFrame().Len() ) { aTmp <<= OUString(rHLinkItem.GetTargetFrame()); - xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp ); + xPropSet->setPropertyValue( "TargetFrame", aTmp ); } form::FormButtonType eButtonType = form::FormButtonType_URL; aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0)); - xPropSet->setPropertyValue( C2U("ButtonType"), aTmp ); + xPropSet->setPropertyValue( "ButtonType", aTmp ); } } } @@ -191,16 +191,16 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet) uno::Any aTmp; uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - if(xInfo->hasPropertyByName(C2U("ButtonType" ))) + if(xInfo->hasPropertyByName( "ButtonType" )) { form::FormButtonType eButtonType = form::FormButtonType_URL; - aTmp = xPropSet->getPropertyValue( C2U("ButtonType") ); + aTmp = xPropSet->getPropertyValue( "ButtonType" ); if( aTmp >>= eButtonType ) { // Label - if(xInfo->hasPropertyByName( C2U("Label") )) + if(xInfo->hasPropertyByName( "Label" )) { - aTmp = xPropSet->getPropertyValue( C2U("Label") ); + aTmp = xPropSet->getPropertyValue( "Label" ); OUString sTmp; if( (aTmp >>= sTmp) && !sTmp.isEmpty()) { @@ -209,9 +209,9 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet) } // URL - if(xInfo->hasPropertyByName( C2U("TargetURL" ))) + if(xInfo->hasPropertyByName( "TargetURL" )) { - aTmp = xPropSet->getPropertyValue( C2U("TargetURL") ); + aTmp = xPropSet->getPropertyValue( "TargetURL" ); OUString sTmp; if( (aTmp >>= sTmp) && !sTmp.isEmpty()) { @@ -220,9 +220,9 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet) } // Target - if(xInfo->hasPropertyByName( C2U("TargetFrame") )) + if(xInfo->hasPropertyByName( "TargetFrame" )) { - aTmp = xPropSet->getPropertyValue( C2U("TargetFrame") ); + aTmp = xPropSet->getPropertyValue( "TargetFrame" ); OUString sTmp; if( (aTmp >>= sTmp) && !sTmp.isEmpty()) { diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 281c5323531e..97d81a5bf31f 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -356,9 +356,9 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) { try { - xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified; - xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants; - xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms; + xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified; + xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants; + xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms; } catch (const Exception&) { diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 08df558f9a75..f2e6fe86c311 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -84,7 +84,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con uno::Any aTmp; aTmp <<= OUString(rTxt); - xPropSet->setPropertyValue( C2U("Label"), aTmp ); + xPropSet->setPropertyValue( "Label", aTmp ); SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium(); INetURLObject aAbs; @@ -92,18 +92,18 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con aAbs = pMedium->GetURLObject(); aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rURL)); - xPropSet->setPropertyValue( C2U("TargetURL"), aTmp ); + xPropSet->setPropertyValue( "TargetURL", aTmp ); if( rTarget.Len() ) { aTmp <<= OUString(rTarget); - xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp ); + xPropSet->setPropertyValue( "TargetFrame", aTmp ); } form::FormButtonType eButtonType = form::FormButtonType_URL; aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0)); - xPropSet->setPropertyValue( C2U("ButtonType"), aTmp ); + xPropSet->setPropertyValue( "ButtonType", aTmp ); if ( ::avmedia::MediaWindow::isMediaURL( rURL ) ) { diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 56ef147872f4..020c7429d233 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1044,9 +1044,9 @@ void SwView::Execute(SfxRequest &rReq) Sequence<PropertyValue> aProperties(3); PropertyValue* pValues = aProperties.getArray(); - pValues[0].Name = C2U("DataSourceName"); - pValues[1].Name = C2U("Command"); - pValues[2].Name = C2U("CommandType"); + pValues[0].Name = "DataSourceName"; + pValues[1].Name = "Command"; + pValues[2].Name = "CommandType"; pValues[0].Value <<= aData.sDataSource; pValues[1].Value <<= aData.sCommand; pValues[2].Value <<= aData.nCommandType; @@ -2350,9 +2350,9 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) Sequence<PropertyValue> aProperties(3); PropertyValue* pValues = aProperties.getArray(); - pValues[0].Name = C2U("DataSourceName"); - pValues[1].Name = C2U("Command"); - pValues[2].Name = C2U("CommandType"); + pValues[0].Name = "DataSourceName"; + pValues[1].Name = "Command"; + pValues[2].Name = "CommandType"; pValues[0].Value <<= aData.sDataSource; pValues[1].Value <<= aData.sCommand; pValues[2].Value <<= aData.nCommandType; diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 5aebf40976e9..e9e89dfba380 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -149,9 +149,9 @@ void SwView::ExecLingu(SfxRequest &rReq) { try { - xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified; - xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants; - xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms; + xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified; + xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants; + xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms; } catch (const Exception&) { @@ -273,7 +273,7 @@ void SwView::SpellStart( SvxSpellArea eWhich, { Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); sal_Bool bIsWrapReverse = (!pConvArgs && xProp.is()) ? - *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_WRAP_REVERSE) ).getValue() : sal_False; + *(sal_Bool*)xProp->getPropertyValue( UPN_IS_WRAP_REVERSE ).getValue() : sal_False; SwDocPositions eStart = DOCPOS_START; SwDocPositions eEnde = DOCPOS_END; @@ -458,7 +458,7 @@ void SwView::HyphenateDocument() pWrtShell->StartUndo(UNDO_INSATTR); // spaeter gueltig sal_Bool bHyphSpecial = xProp.is() ? - *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_HYPH_SPECIAL) ).getValue() : sal_False; + *(sal_Bool*)xProp->getPropertyValue( UPN_IS_HYPH_SPECIAL ).getValue() : sal_False; sal_Bool bSelection = ((SwCrsrShell*)pWrtShell)->HasSelection() || pWrtShell->GetCrsr() != pWrtShell->GetCrsr()->GetNext(); sal_Bool bOther = pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection; @@ -476,7 +476,7 @@ void SwView::HyphenateDocument() { sal_Bool bTrue = sal_True; Any aTmp(&bTrue, ::getBooleanCppuType()); - xProp->setPropertyValue( C2U(UPN_IS_HYPH_SPECIAL), aTmp ); + xProp->setPropertyValue( UPN_IS_HYPH_SPECIAL, aTmp ); } } else diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx index 7195bdb04940..e6ac2a2eea83 100644 --- a/sw/source/ui/uno/unoatxt.cxx +++ b/sw/source/ui/uno/unoatxt.cxx @@ -173,7 +173,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName( if(aGroupName.isEmpty()) { lang::IllegalArgumentException aIllegal; - aIllegal.Message = C2U("group name must not be empty"); + aIllegal.Message = "group name must not be empty"; throw aIllegal; } for(sal_Int32 nPos = 0; nPos < aGroupName.getLength(); nPos++) @@ -187,7 +187,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName( continue; } lang::IllegalArgumentException aIllegal; - aIllegal.Message = C2U("group name must contain a-z, A-z, '_', ' ' only"); + aIllegal.Message = "group name must contain a-z, A-z, '_', ' ' only"; throw aIllegal; } String sGroup(aGroupName); @@ -716,19 +716,19 @@ void SwXAutoTextGroup::Invalidate() OUString SwXAutoTextGroup::getImplementationName(void) throw( uno::RuntimeException ) { - return C2U("SwXAutoTextGroup"); + return OUString("SwXAutoTextGroup"); } sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) { - return C2U("com.sun.star.text.AutoTextGroup") == rServiceName; + return OUString("com.sun.star.text.AutoTextGroup") == rServiceName; } uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames(void) throw( uno::RuntimeException ) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.AutoTextGroup"); + pArray[0] = OUString("com.sun.star.text.AutoTextGroup"); return aRet; } @@ -997,19 +997,19 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR OUString SwXAutoTextEntry::getImplementationName(void) throw( uno::RuntimeException ) { - return C2U("SwXAutoTextEntry"); + return OUString("SwXAutoTextEntry"); } sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) { - return C2U("com.sun.star.text.AutoTextEntry") == rServiceName; + return rServiceName == "com.sun.star.text.AutoTextEntry"; } uno::Sequence< OUString > SwXAutoTextEntry::getSupportedServiceNames(void) throw( uno::RuntimeException ) { uno::Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.AutoTextEntry"); + pArray[0] = "com.sun.star.text.AutoTextEntry"; return aRet; } diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 386afe304d10..91aaa50f58f0 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -149,14 +149,14 @@ static sal_Bool LoadFromURL_impl( // try to open the document readonly and hidden Reference< frame::XModel > xTmpModel; Sequence < PropertyValue > aArgs( 1 ); - aArgs[0].Name = C2U("Hidden"); + aArgs[0].Name = "Hidden"; sal_Bool bVal = sal_True; aArgs[0].Value <<= bVal; try { Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); xTmpModel = Reference < XModel >( xDesktop->loadComponentFromURL( - rURL, C2U("_blank"), 0, aArgs ), UNO_QUERY ); + rURL, "_blank", 0, aArgs ), UNO_QUERY ); } catch (const Exception&) { @@ -633,27 +633,26 @@ uno::Any SAL_CALL SwXMailMerge::execute( Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); if (xMgr.is()) { - Reference< XInterface > xInstance = xMgr->createInstance( - C2U( "com.sun.star.sdb.RowSet" )); + Reference< XInterface > xInstance = xMgr->createInstance( "com.sun.star.sdb.RowSet" ); aRowSetDisposeHelper.reset( xInstance, SharedComponent::TakeOwnership ); Reference< XPropertySet > xRowSetPropSet( xInstance, UNO_QUERY ); OSL_ENSURE( xRowSetPropSet.is(), "failed to get XPropertySet interface from RowSet" ); if (xRowSetPropSet.is()) { if (xCurConnection.is()) - xRowSetPropSet->setPropertyValue( C2U("ActiveConnection"), makeAny( xCurConnection ) ); - xRowSetPropSet->setPropertyValue( C2U("DataSourceName"), makeAny( aCurDataSourceName ) ); - xRowSetPropSet->setPropertyValue( C2U("Command"), makeAny( aCurDataCommand ) ); - xRowSetPropSet->setPropertyValue( C2U("CommandType"), makeAny( nCurDataCommandType ) ); - xRowSetPropSet->setPropertyValue( C2U("EscapeProcessing"), makeAny( bCurEscapeProcessing ) ); - xRowSetPropSet->setPropertyValue( C2U("ApplyFilter"), makeAny( sal_True ) ); - xRowSetPropSet->setPropertyValue( C2U("Filter"), makeAny( aCurFilter ) ); + xRowSetPropSet->setPropertyValue( "ActiveConnection", makeAny( xCurConnection ) ); + xRowSetPropSet->setPropertyValue( "DataSourceName", makeAny( aCurDataSourceName ) ); + xRowSetPropSet->setPropertyValue( "Command", makeAny( aCurDataCommand ) ); + xRowSetPropSet->setPropertyValue( "CommandType", makeAny( nCurDataCommandType ) ); + xRowSetPropSet->setPropertyValue( "EscapeProcessing", makeAny( bCurEscapeProcessing ) ); + xRowSetPropSet->setPropertyValue( "ApplyFilter", makeAny( sal_True ) ); + xRowSetPropSet->setPropertyValue( "Filter", makeAny( aCurFilter ) ); Reference< sdbc::XRowSet > xRowSet( xInstance, UNO_QUERY ); if (xRowSet.is()) xRowSet->execute(); // build ResultSet from properties if( !xCurConnection.is() ) - xCurConnection.set( xRowSetPropSet->getPropertyValue( C2U( "ActiveConnection" )), UNO_QUERY ); + xCurConnection.set( xRowSetPropSet->getPropertyValue( "ActiveConnection" ), UNO_QUERY ); xCurResultSet = Reference< sdbc::XResultSet >( xRowSet, UNO_QUERY ); OSL_ENSURE( xCurResultSet.is(), "failed to build ResultSet" ); } @@ -678,7 +677,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( case MailMergeType::FILE : nMergeType = DBMGR_MERGE_MAILFILES; break; case MailMergeType::MAIL : nMergeType = DBMGR_MERGE_MAILING; break; default: - throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Invalid value of property:" ) ) + C2U("OutputType"), static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Invalid value of property:" ) ) + "OutputType", static_cast < cppu::OWeakObject * > ( this ), 0 ); } SwNewDBMgr* pMgr = rSh.GetNewDBMgr(); @@ -780,7 +779,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); String aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*')); - TempFile aTempFile( C2U("SwMM"), &aExtension ); + TempFile aTempFile( OUString("SwMM"), &aExtension ); aTmpFileName = aTempFile.GetName(); Reference< XStorable > xStorable( xCurModel, UNO_QUERY ); @@ -1188,8 +1187,7 @@ sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName ) throw(RuntimeException) { SolarMutexGuard aGuard; - return C2U( SN_MAIL_MERGE ) == rServiceName || - C2U( SN_DATA_ACCESS_DESCRIPTOR ) == rServiceName; + return rServiceName == SN_MAIL_MERGE || rServiceName == SN_DATA_ACCESS_DESCRIPTOR; } uno::Sequence< OUString > SAL_CALL SwXMailMerge::getSupportedServiceNames() @@ -1206,15 +1204,15 @@ uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() { uno::Sequence< OUString > aNames(2); OUString *pName = aNames.getArray(); - pName[0] = C2U( SN_MAIL_MERGE ); - pName[1] = C2U( SN_DATA_ACCESS_DESCRIPTOR ); + pName[0] = SN_MAIL_MERGE; + pName[1] = SN_DATA_ACCESS_DESCRIPTOR; return aNames; } OUString SAL_CALL SwXMailMerge_getImplementationName() throw() { - return OUString( C2U( "SwXMailMerge" ) ); + return OUString( "SwXMailMerge" ); } uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance( diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 561259a48789..4bdc31fc1b1d 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -546,19 +546,19 @@ void SwXPrintSettings::_postGetValues () OUString SwXPrintSettings::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXPrintSettings"); + return OUString("SwXPrintSettings"); } sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return C2U("com.sun.star.text.PrintSettings") == rServiceName; + return rServiceName == "com.sun.star.text.PrintSettings"; } Sequence< OUString > SwXPrintSettings::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.PrintSettings"); + pArray[0] = "com.sun.star.text.PrintSettings"; return aRet; } @@ -983,19 +983,19 @@ void SwXViewSettings::_postGetValues () OUString SwXViewSettings::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXViewSettings"); + return OUString("SwXViewSettings"); } sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return C2U("com.sun.star.text.ViewSettings") == rServiceName; + return rServiceName == "com.sun.star.text.ViewSettings"; } Sequence< OUString > SwXViewSettings::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence< OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.ViewSettings"); + pArray[0] = "com.sun.star.text.ViewSettings"; return aRet; } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 729145ce88d9..ba146fd8c1f5 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -987,24 +987,24 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void) aData = *pData; Any aVal; aVal <<= (sal_Int16)aData.GetRow(); - pArray[0] = beans::PropertyValue(C2U("PageRows"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[0] = beans::PropertyValue("PageRows", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int16)aData.GetCol(); - pArray[1] = beans::PropertyValue(C2U("PageColumns"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[1] = beans::PropertyValue("PageColumns", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetLeftSpace()); - pArray[2] = beans::PropertyValue(C2U("LeftMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[2] = beans::PropertyValue("LeftMargin", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetRightSpace()); - pArray[3] = beans::PropertyValue(C2U("RightMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[3] = beans::PropertyValue("RightMargin", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetTopSpace()); - pArray[4] = beans::PropertyValue(C2U("TopMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[4] = beans::PropertyValue("TopMargin", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetBottomSpace()); - pArray[5] = beans::PropertyValue(C2U("BottomMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[5] = beans::PropertyValue("BottomMargin", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetHorzSpace()); - pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[6] = beans::PropertyValue("HoriMargin", -1, aVal, PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace()); - pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[7] = beans::PropertyValue("VertMargin", -1, aVal, PropertyState_DIRECT_VALUE); sal_Bool bTemp = aData.GetLandscape(); aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE); + pArray[8] = beans::PropertyValue("IsLandscape", -1, aVal, PropertyState_DIRECT_VALUE); } else throw RuntimeException(); @@ -1640,8 +1640,8 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic { sal_Int32 nIndex = COM_SUN_STAR__DRAWING_LENGTH; OUString sCategory = rServiceName.getToken( 0, '.', nIndex ); - sal_Bool bShape = sCategory == C2U("drawing"); - if( bShape || sCategory == C2U("form")) + sal_Bool bShape = sCategory == "drawing"; + if( bShape || sCategory == "form") { if(bShape) { @@ -1666,7 +1666,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic } } } - else if (sCategory == C2U ("document") ) + else if (sCategory == "document" ) { if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.Settings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); @@ -1675,12 +1675,12 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic xRet = (::cppu::OWeakObject * )new SvXMLEmbeddedObjectHelper( *pDocShell, EMBEDDEDOBJECTHELPER_MODE_READ ); } } - else if (sCategory == C2U ("text") ) + else if (sCategory == "text" ) { if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) ) xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) ); } - else if (sCategory == C2U ("chart2") ) + else if (sCategory == "chart2" ) { if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.data.DataProvider") ) ) xRet = Reference < XInterface > ( dynamic_cast< chart2::data::XDataProvider * >(pDocShell->getIDocumentChartDataProviderAccess()->GetChartDataProvider()) ); @@ -1693,7 +1693,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic //! adding the shapes to the draw page). //! For inserting OLE objects the proper way is to use //! "com.sun.star.text.TextEmbeddedObject"! - if (rServiceName.lastIndexOf( C2U(".OLE2Shape") ) == rServiceName.getLength() - 10) + if (rServiceName.lastIndexOf( ".OLE2Shape" ) == rServiceName.getLength() - 10) throw ServiceNotRegisteredException(); // declare service to be not registered with this factory // @@ -1763,7 +1763,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames(void) OUString SwXTextDocument::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXTextDocument"); + return OUString("SwXTextDocument"); } sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( RuntimeException ) @@ -2305,7 +2305,7 @@ static OutputDevice * lcl_GetOutputDevice( const SwPrintUIOptions &rPrintUIOptio { OutputDevice *pOut = 0; - uno::Any aAny( rPrintUIOptions.getValue( C2U( "RenderDevice" ) )); + uno::Any aAny( rPrintUIOptions.getValue( "RenderDevice" )); uno::Reference< awt::XDevice > xRenderDevice; aAny >>= xRenderDevice; if (xRenderDevice.is()) @@ -3440,13 +3440,13 @@ sal_Bool SwXLinkTargetSupplier::hasElements(void) throw( RuntimeException ) OUString SwXLinkTargetSupplier::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXLinkTargetSupplier"); + return OUString("SwXLinkTargetSupplier"); } sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return (rServiceName == C2U("com.sun.star.document.LinkTargets")); + return (rServiceName == "com.sun.star.document.LinkTargets"); } Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void) @@ -3454,7 +3454,7 @@ Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void) { Sequence< OUString > aRet(1); OUString* pNames = aRet.getArray(); - pNames[0] = C2U("com.sun.star.document.LinkTargets"); + pNames[0] = "com.sun.star.document.LinkTargets"; return aRet; } @@ -3727,13 +3727,13 @@ Reference< XNameAccess > SwXLinkNameAccessWrapper::getLinks(void) OUString SwXLinkNameAccessWrapper::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXLinkNameAccessWrapper"); + return OUString("SwXLinkNameAccessWrapper"); } sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return (rServiceName == C2U("com.sun.star.document.LinkTargets")); + return (rServiceName == "com.sun.star.document.LinkTargets"); } Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void) @@ -3741,7 +3741,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void) { Sequence< OUString > aRet(1); OUString* pNames = aRet.getArray(); - pNames[0] = C2U("com.sun.star.document.LinkTargets"); + pNames[0] = "com.sun.star.document.LinkTargets"; return aRet; } @@ -3806,19 +3806,19 @@ void SwXOutlineTarget::removeVetoableChangeListener( OUString SwXOutlineTarget::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXOutlineTarget"); + return OUString("SwXOutlineTarget"); } sal_Bool SwXOutlineTarget::supportsService(const OUString& ServiceName) throw( RuntimeException ) { - return C2U("com.sun.star.document.LinkTarget") == ServiceName; + return ServiceName == "com.sun.star.document.LinkTarget"; } Sequence< OUString > SwXOutlineTarget::getSupportedServiceNames(void) throw( RuntimeException ) { Sequence < OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.document.LinkTarget"); + pArray[0] = "com.sun.star.document.LinkTarget"; return aRet; } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 76abc3870e28..d875e0abda7c 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1007,7 +1007,7 @@ void SAL_CALL SwXTextView::removeVetoableChangeListener( OUString SwXTextView::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXTextView"); + return OUString("SwXTextView"); } sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException ) @@ -1019,8 +1019,8 @@ Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeE { Sequence< OUString > aRet(2); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.TextDocumentView"); - pArray[1] = C2U("com.sun.star.view.OfficeDocumentView"); + pArray[0] = "com.sun.star.text.TextDocumentView"; + pArray[1] = "com.sun.star.view.OfficeDocumentView"; return aRet; } @@ -1852,7 +1852,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc OUString SwXTextViewCursor::getImplementationName(void) throw( RuntimeException ) { - return C2U("SwXTextViewCursor"); + return OUString("SwXTextViewCursor"); } sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException ) @@ -1870,13 +1870,13 @@ Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames(void) throw( Ru { Sequence< OUString > aRet(7); OUString* pArray = aRet.getArray(); - pArray[0] = C2U("com.sun.star.text.TextViewCursor"); - pArray[1] = C2U("com.sun.star.style.CharacterProperties"); - pArray[2] = C2U("com.sun.star.style.CharacterPropertiesAsian"); - pArray[3] = C2U("com.sun.star.style.CharacterPropertiesComplex"); - pArray[4] = C2U("com.sun.star.style.ParagraphProperties"); - pArray[5] = C2U("com.sun.star.style.ParagraphPropertiesAsian"); - pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex"); + pArray[0] = "com.sun.star.text.TextViewCursor"; + pArray[1] = "com.sun.star.style.CharacterProperties"; + pArray[2] = "com.sun.star.style.CharacterPropertiesAsian"; + pArray[3] = "com.sun.star.style.CharacterPropertiesComplex"; + pArray[4] = "com.sun.star.style.ParagraphProperties"; + pArray[5] = "com.sun.star.style.ParagraphPropertiesAsian"; + pArray[6] = "com.sun.star.style.ParagraphPropertiesComplex"; return aRet; } diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 0418948a9fd0..86c0f3f8af2c 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -116,7 +116,7 @@ void SwOneExampleFrame::CreateControl() uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); - uno::Reference< uno::XInterface > xInst = xMgr->createInstance( C2U("com.sun.star.frame.FrameControl") ); + uno::Reference< uno::XInterface > xInst = xMgr->createInstance( "com.sun.star.frame.FrameControl" ); _xControl = uno::Reference< awt::XControl >(xInst, uno::UNO_QUERY); if(_xControl.is()) { @@ -141,20 +141,20 @@ void SwOneExampleFrame::CreateControl() uno::Sequence<beans::PropertyValue> aSeq(3); beans::PropertyValue* pValues = aSeq.getArray(); - pValues[0].Name = C2U("ReadOnly"); + pValues[0].Name = "ReadOnly"; sal_Bool bTrue = sal_True; pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType()); - pValues[1].Name = C2U("OpenFlags"); - pValues[1].Value <<= C2U("-RB"); - pValues[2].Name = C2U("Referer"); - pValues[2].Value <<= C2U("private:user"); + pValues[1].Name = "OpenFlags"; + pValues[1].Value <<= OUString("-RB"); + pValues[2].Name = "Referer"; + pValues[2].Value <<= OUString("private:user"); uno::Any aArgs; aArgs.setValue(&aSeq, ::getCppuType((uno::Sequence<beans::PropertyValue>*)0)); - xPrSet->setPropertyValue( C2U("LoaderArguments"), aArgs ); + xPrSet->setPropertyValue( "LoaderArguments", aArgs ); //save and set readonly??? - xPrSet->setPropertyValue(C2U("ComponentURL"), aURL); + xPrSet->setPropertyValue("ComponentURL", aURL); aLoadedTimer.Start(); bServiceAvailable = sal_True; @@ -178,7 +178,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) // now get the model uno::Reference< beans::XPropertySet > xPrSet(_xControl, uno::UNO_QUERY); - uno::Any aFrame = xPrSet->getPropertyValue(C2U("Frame")); + uno::Any aFrame = xPrSet->getPropertyValue("Frame"); uno::Reference< frame::XFrame > xFrm; aFrame >>= xFrm; @@ -188,7 +188,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) try { uno::Reference< frame::XLayoutManager > xLayoutManager; - uno::Any aValue = xPropSet->getPropertyValue(C2U("LayoutManager")); + uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if ( xLayoutManager.is() ) xLayoutManager->setVisible( sal_False ); @@ -319,7 +319,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) uno::Reference< style::XStyleFamiliesSupplier > xSSupp( xDoc, uno::UNO_QUERY); uno::Reference< container::XNameAccess > xStyles = xSSupp->getStyleFamilies(); - uno::Any aPFamily = xStyles->getByName( C2U("PageStyles" ) ); + uno::Any aPFamily = xStyles->getByName( "PageStyles" ); uno::Reference< container::XNameContainer > xPFamily; if( 0 == (EX_SHOW_DEFAULT_PAGE == nStyleFlags) diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx index 8a8d2309b043..f0f6e79aa322 100644 --- a/sw/source/ui/wrtsh/wrtsh3.cxx +++ b/sw/source/ui/wrtsh/wrtsh3.cxx @@ -199,15 +199,15 @@ sal_Bool SwWrtShell::GetURLFromButton( String& rURL, String& rDescr ) const form::FormButtonType eButtonType = form::FormButtonType_URL; uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - if(xInfo->hasPropertyByName( C2U("ButtonType") )) + if(xInfo->hasPropertyByName( "ButtonType" )) { - aTmp = xPropSet->getPropertyValue( C2U("ButtonType") ); + aTmp = xPropSet->getPropertyValue( "ButtonType" ); form::FormButtonType eTmpButtonType; aTmp >>= eTmpButtonType; if( eButtonType == eTmpButtonType) { // Label - aTmp = xPropSet->getPropertyValue( C2U("Label") ); + aTmp = xPropSet->getPropertyValue( "Label" ); OUString uTmp; if( (aTmp >>= uTmp) && !uTmp.isEmpty()) { @@ -215,7 +215,7 @@ sal_Bool SwWrtShell::GetURLFromButton( String& rURL, String& rDescr ) const } // util::URL - aTmp = xPropSet->getPropertyValue( C2U("TargetURL") ); + aTmp = xPropSet->getPropertyValue( "TargetURL" ); if( (aTmp >>= uTmp) && !uTmp.isEmpty()) { rURL = String(uTmp); |