commit c37e392414d125eef68a9a9dc825442096557168 Author: Julien Nabet Date: Sat Dec 25 13:08:12 2010 +0100 RTL_CONSTASCII_USTRINGPARAM diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h index 6e68bdc..14de6d2 100644 --- a/sw/inc/unomid.h +++ b/sw/inc/unomid.h @@ -29,7 +29,8 @@ #define SW_UNOMID_HXX #define C2S(cChar) String::CreateFromAscii( cChar ) -#define C2U(cChar) rtl::OUString::createFromAscii( cChar ) +//#define C2U(cChar) rtl::OUString::createFromAscii( cChar ) +#define C2U(cChar) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( cChar )) #define MID_MIRROR_VERT 0 #define MID_MIRROR_HORZ_EVEN_PAGES 1 diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index a1344dd..a2e358c 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -72,8 +72,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; -#define C2U(cChar) rtl::OUString::createFromAscii(cChar) - extern void repaintTextFrames( SwModify& rModify ); /************************************************************************* @@ -488,7 +486,7 @@ sal_Bool SwHyphIter::IsAuto() { uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); return xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( - C2U(UPN_IS_HYPH_AUTO) ).getValue() + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_HYPH_AUTO)) ).getValue() : sal_False; } @@ -1043,7 +1041,7 @@ uno::Reference< XSpellAlternatives > // implementation here by providing an additional parameter. Sequence< PropertyValue > aPropVals(1); PropertyValue &rVal = aPropVals.getArray()[0]; - rVal.Name = C2U( UPN_MAX_NUMBER_OF_SUGGESTIONS ); + rVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_MAX_NUMBER_OF_SUGGESTIONS )); rVal.Value <<= (INT16) 7; xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals ); diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index a006b5f..ec5cfcc 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -441,8 +441,8 @@ bool SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const { Sequence aRet(m_pSortKeyArr->Count()); PropertyValues* pValues = aRet.getArray(); - OUString sProp1( C2U(SW_PROP_NAME_STR(UNO_NAME_SORT_KEY)) ), - sProp2( C2U(SW_PROP_NAME_STR(UNO_NAME_IS_SORT_ASCENDING))); + OUString sProp1( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SORT_KEY)) ), + sProp2( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_SORT_ASCENDING))); for(sal_uInt16 i = 0; i < m_pSortKeyArr->Count(); i++) { const SwTOXSortKey* pKey = (*m_pSortKeyArr)[i]; @@ -684,7 +684,7 @@ bool SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const PropertyValue* pValues = aRet.getArray(); for(sal_Int16 i = 0; i < AUTH_FIELD_END; i++) { - pValues[i].Name = C2U(aFieldNames[i]); + pValues[i].Name = rtl::OUString::createFromAscii(aFieldNames[i]); const String& rField = pAuthEntry->GetAuthorField((ToxAuthorityField) i); if(i == AUTH_FIELD_AUTHORITY_TYPE) pValues[i].Value <<= sal_Int16(rField.ToInt32()); diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 0a9ae54..77d9227 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -482,7 +482,7 @@ OUString SwXServiceProvider::GetProviderName(sal_uInt16 nObjectType) OUString sRet; sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId); if(nObjectType < nEntries) - sRet = C2U(aProvNamesId[nObjectType].pName); + sRet = rtl::OUString::createFromAscii(aProvNamesId[nObjectType].pName); return sRet; } @@ -494,7 +494,7 @@ uno::Sequence SwXServiceProvider::GetAllServiceNames() sal_uInt16 n = 0; for(sal_uInt16 i = 0; i < nEntries; i++) { - String sProv(C2U(aProvNamesId[i].pName)); + String sProv(rtl::OUString::createFromAscii(aProvNamesId[i].pName)); if(sProv.Len()) { pArray[n] = sProv; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 011f7c7..1d06097 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2172,22 +2172,19 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan } const ::uno::Any* pSurroundContour; if(pProps->GetProperty(RES_SURROUND, MID_SURROUND_CONTOUR, pSurroundContour)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SURROUND_CONTOUR)), *pSurroundContour); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SURROUND_CONTOUR)), *pSurroundContour); const ::uno::Any* pContourOutside; if(pProps->GetProperty(RES_SURROUND, MID_SURROUND_CONTOUROUTSIDE, pContourOutside)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_OUTSIDE)), *pContourOutside); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_OUTSIDE)), *pContourOutside); const ::uno::Any* pContourPoly; if(pProps->GetProperty(FN_PARAM_COUNTOUR_PP, 0, pContourPoly)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_POLY_POLYGON)), *pContourPoly); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_CONTOUR_POLY_POLYGON)), *pContourPoly); const ::uno::Any* pPixelContour; if(pProps->GetProperty(FN_UNO_IS_PIXEL_CONTOUR, 0, pPixelContour)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_PIXEL_CONTOUR)), *pPixelContour); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_PIXEL_CONTOUR)), *pPixelContour); const ::uno::Any* pAutoContour; if(pProps->GetProperty(FN_UNO_IS_AUTOMATIC_CONTOUR, 0, pAutoContour)) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_AUTOMATIC_CONTOUR)), *pAutoContour); -// const ::uno::Any* pAltText; -// if(pProps->GetProperty(FN_UNO_ALTERNATIVE_TEXT, 0, pAltText)) -// setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ALTERNATIVE_TEXT)), *pAltText); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_AUTOMATIC_CONTOUR)), *pAutoContour); } else { @@ -2292,24 +2289,22 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan GetOrCreateSdrObject( pFmt ); const ::uno::Any* pOrder; if( pProps->GetProperty(FN_UNO_Z_ORDER, 0, pOrder) ) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_Z_ORDER)), *pOrder); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_Z_ORDER)), *pOrder); const ::uno::Any* pReplacement; if( pProps->GetProperty(FN_UNO_REPLACEMENT_GRAPHIC, 0, pReplacement) ) - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_GRAPHIC)), *pReplacement); - // --> OD 2009-07-13 #i73249# + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_GRAPHIC)), *pReplacement); // new attribute Title const ::uno::Any* pTitle; if ( pProps->GetProperty(FN_UNO_TITLE, 0, pTitle) ) { - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_TITLE)), *pTitle); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_TITLE)), *pTitle); } // new attribute Description const ::uno::Any* pDescription; if ( pProps->GetProperty(FN_UNO_DESCRIPTION, 0, pDescription) ) { - setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_DESCRIPTION)), *pDescription); + setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_DESCRIPTION)), *pDescription); } - // <-- } else throw lang::IllegalArgumentException(); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 2278bb5..be19373 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -154,7 +154,7 @@ GetSupportedServiceNamesImpl( uno::Sequence< ::rtl::OUString > ret(nServices); for (size_t i = 0; i < nServices; ++i) { - ret[i] = C2U(pServices[i]); + ret[i] = rtl::OUString::createFromAscii(pServices[i]); } return ret; } diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 4dd5779..e05d452 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -291,7 +291,7 @@ void SwXTextPortion::GetPropertyValue( OUString sRet; if( pRet ) - sRet = C2U( pRet ); + sRet = rtl::OUString::createFromAscii( pRet ); rVal <<= sRet; } break; diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index ffe3050..333f5cc 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -243,15 +243,15 @@ static uno::Sequence lcl_GetSuccessorProperties(const SwRe if(pNext) { beans::PropertyValue* pValues = aValues.getArray(); - pValues[0].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR)); + pValues[0].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR)); // GetAuthorString(n) walks the SwRedlineData* chain; // here we always need element 1 pValues[0].Value <<= OUString(rRedline.GetAuthorString(1)); - pValues[1].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME)); + pValues[1].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME)); pValues[1].Value <<= lcl_DateTimeToUno(pNext->GetTimeStamp()); - pValues[2].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT)); + pValues[2].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT)); pValues[2].Value <<= OUString(pNext->GetComment()); - pValues[3].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE)); + pValues[3].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE)); pValues[3].Value <<= lcl_RedlineTypeToOUString(pNext->GetType()); } return aValues; @@ -368,25 +368,25 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties sRedlineIdBuf.append( sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) ); sal_Int32 nPropIdx = 0; - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_AUTHOR)); pRet[nPropIdx++].Value <<= OUString(rRedline.GetAuthorString()); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_DATE_TIME)); pRet[nPropIdx++].Value <<= lcl_DateTimeToUno(rRedline.GetTimeStamp()); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_COMMENT)); pRet[nPropIdx++].Value <<= OUString(rRedline.GetComment()); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TYPE)); pRet[nPropIdx++].Value <<= lcl_RedlineTypeToOUString(rRedline.GetType()); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_IDENTIFIER)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_IDENTIFIER)); pRet[nPropIdx++].Value <<= sRedlineIdBuf.makeStringAndClear(); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_IS_COLLAPSED)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_COLLAPSED)); sal_Bool bTmp = !rRedline.HasMark(); pRet[nPropIdx++].Value.setValue(&bTmp, ::getBooleanCppuType()) ; - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_IS_START)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_START)); pRet[nPropIdx++].Value.setValue(&bIsStart, ::getBooleanCppuType()) ; bTmp = !rRedline.IsDelLastPara(); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_MERGE_LAST_PARA)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_MERGE_LAST_PARA)); pRet[nPropIdx++].Value.setValue(&bTmp, ::getBooleanCppuType()) ; SwNodeIndex* pNodeIdx = rRedline.GetContentIdx(); @@ -395,7 +395,7 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties if ( 1 < ( pNodeIdx->GetNode().EndOfSectionIndex() - pNodeIdx->GetNode().GetIndex() ) ) { uno::Reference xRet = new SwXRedlineText(rRedline.GetDoc(), *pNodeIdx); - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TEXT)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_TEXT)); pRet[nPropIdx++].Value <<= xRet; } else { @@ -404,7 +404,7 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties } if(pNext) { - pRet[nPropIdx].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_REDLINE_SUCCESSOR_DATA)); + pRet[nPropIdx].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_REDLINE_SUCCESSOR_DATA)); pRet[nPropIdx++].Value <<= lcl_GetSuccessorProperties(rRedline); } aRet.realloc(nPropIdx); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 8286721..9c426e3 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1623,7 +1623,7 @@ uno::Sequence SwXNumberingRules::GetNumberingRuleByIndex( PropValData* lcl_FindProperty(const char* cName, PropValDataArr& rPropertyValues) { - OUString sCmp = C2U(cName); + OUString sCmp = rtl::OUString::createFromAscii(cName); for(sal_uInt16 i = 0; i < rPropertyValues.Count(); i++) { PropValData* pTemp = rPropertyValues.GetObject(i); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 9cf318c..2540a12 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -427,15 +427,15 @@ uno::Sequence< beans::PropertyValue > SwXStyleFamilies::getStyleLoaderOptions(vo uno::Any aVal; sal_Bool bTemp = sal_True; aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[0] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_TEXT_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[0] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_TEXT_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[1] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_FRAME_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[1] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_FRAME_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[2] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_PAGE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[2] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_PAGE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[3] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LOAD_NUMBERING_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[3] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LOAD_NUMBERING_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); aVal.setValue(&bTemp, ::getCppuBooleanType()); - pArray[4] = beans::PropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_OVERWRITE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[4] = beans::PropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_OVERWRITE_STYLES)), -1, aVal, beans::PropertyState_DIRECT_VALUE); return aSeq; } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 4c33dce..57f1eca 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2160,7 +2160,7 @@ lcl_MergeCells(::std::vector & rMergedCells) while (aCellIter != aMergedIter->aCells.end()) { (*aCellIter)->setPropertyValue( - C2U(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)), + rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ROW_SPAN)), uno::makeAny(nCellCount)); if (bFirstCell) { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 3ff45e6..1cd44b2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -172,7 +172,6 @@ void WW8Export::DoComboBox(uno::Reference xPropSet) { // --> OD 2010-05-14 #160026# // property "Help" does not exist and due to the no-existence an exception is thrown. -// uno::Any aTmp = xPropSet->getPropertyValue(C2U("Help")); try { uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText")); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b86545e..fd828f2 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2412,8 +2412,8 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString, break; } - if (bSet && xPropSetInfo->hasPropertyByName(C2U(pMap->pPropNm))) - rPropSet->setPropertyValue(C2U(pMap->pPropNm), aTmp); + if (bSet && xPropSetInfo->hasPropertyByName(rtl::OUString::createFromAscii(pMap->pPropNm))) + rPropSet->setPropertyValue(rtl::OUString::createFromAscii(pMap->pPropNm), aTmp); } // now calculate the size of the control OutputDevice* pOut = Application::GetDefaultDevice(); diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index b725078..7157e7b 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -109,7 +109,7 @@ rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex ) rtl::OUString aRes; if (0 <= nIndex && nIndex < COND_COMMAND_COUNT) { - aRes = C2U( aCommandContext[ nIndex ] ); + aRes = rtl::OUString::createFromAscii( aCommandContext[ nIndex ] ); } return aRes; } diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index bb84277..e06fad6 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -599,9 +599,9 @@ const Sequence& SwInsertConfig::GetPropertyNames() OUString* pWebNames = aWebNames.getArray(); int i; for(i = 0; i < nCount; i++) - pNames[i] = C2U(aPropNames[i]); + pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]); for(i = 0; i < nWebCount; i++) - pWebNames[i] = C2U(aPropNames[i]); + pWebNames[i] = rtl::OUString::createFromAscii(aPropNames[i]); } return bIsWeb ? aWebNames : aNames; } @@ -1261,7 +1261,7 @@ const Sequence& SwMiscConfig::GetPropertyNames() }; OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) - pNames[i] = C2U(aPropNames[i]); + pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]); } return aNames; } diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index c54d9c6..83739bd 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -515,7 +515,7 @@ Sequence SwCursorConfig::GetPropertyNames() Sequence aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) - pNames[i] = C2U(aPropNames[i]); + pNames[i] = rtl::OUString::createFromAscii(aPropNames[i]); return aNames; } diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index fbe08ef..6b3c1a4 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -417,7 +417,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton) pInfo[2].Name = C2U("Extension"); pInfo[2].Value <<= ::rtl::OUString(aURL.getExtension());//C2U("csv"); pInfo[3].Name = C2U("CharSet"); - pInfo[3].Value <<= C2U(cUTF8); + pInfo[3].Value <<= rtl::OUString::createFromAscii(cUTF8); aAny <<= aInfo; xDataProperties->setPropertyValue(C2U("Info"), aAny); diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index 331215e..7deaefb 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -302,7 +302,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : } } //read the list of data base assignments - Sequence aAssignments = GetNodeNames(C2U(cAddressDataAssignments)); + Sequence aAssignments = GetNodeNames(rtl::OUString::createFromAscii(cAddressDataAssignments)); if(aAssignments.getLength()) { //create a list of property names to load the URLs of all data bases @@ -313,18 +313,18 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : OUString sSlash = C2U("/"); for(nAssign = 0; nAssign < aAssignProperties.getLength(); nAssign += 4) { - String sAssignPath = C2U(cAddressDataAssignments); + String sAssignPath = rtl::OUString::createFromAscii(cAddressDataAssignments); sAssignPath += '/'; sAssignPath += String(pAssignments[nAssign / 4]); sAssignPath += '/'; pAssignProperties[nAssign] = sAssignPath; - pAssignProperties[nAssign] += C2U(cDataSourceName); + pAssignProperties[nAssign] += rtl::OUString::createFromAscii(cDataSourceName); pAssignProperties[nAssign + 1] = sAssignPath; - pAssignProperties[nAssign + 1] += C2U(cDataTableName); + pAssignProperties[nAssign + 1] += rtl::OUString::createFromAscii(cDataTableName); pAssignProperties[nAssign + 2] = sAssignPath; - pAssignProperties[nAssign + 2] += C2U(cDataCommandType); + pAssignProperties[nAssign + 2] += rtl::OUString::createFromAscii(cDataCommandType); pAssignProperties[nAssign + 3] = sAssignPath; - pAssignProperties[nAssign + 3] += C2U(cDBColumnAssignments); + pAssignProperties[nAssign + 3] += rtl::OUString::createFromAscii(cDBColumnAssignments); } Sequence aAssignValues = GetProperties(aAssignProperties); const Any* pAssignValues = aAssignValues.getConstArray(); @@ -597,7 +597,7 @@ void SwMailMergeConfigItem_Impl::Commit() //store the changed / new assignments //load the existing node names to find new names - Sequence aAssignments = GetNodeNames(C2U(cAddressDataAssignments)); + Sequence aAssignments = GetNodeNames(rtl::OUString::createFromAscii(cAddressDataAssignments)); ::std::vector::iterator aAssignIter; for(aAssignIter = aAddressDataAssignments.begin(); @@ -610,7 +610,7 @@ void SwMailMergeConfigItem_Impl::Commit() aAssignIter->sConfigNodeName : lcl_CreateNodeName(aAssignments); OUString sSlash = C2U("/"); - OUString sNodePath = C2U(cAddressDataAssignments); + OUString sNodePath = rtl::OUString::createFromAscii(cAddressDataAssignments); sNodePath += sSlash; sNodePath += sNewNode; sNodePath += sSlash; @@ -618,19 +618,19 @@ void SwMailMergeConfigItem_Impl::Commit() Sequence< PropertyValue > aNewValues(4); PropertyValue* pNewValues = aNewValues.getArray(); pNewValues[0].Name = sNodePath; - pNewValues[0].Name += C2U(cDataSourceName); + pNewValues[0].Name += rtl::OUString::createFromAscii(cDataSourceName); pNewValues[0].Value <<= aAssignIter->aDBData.sDataSource; pNewValues[1].Name = sNodePath; - pNewValues[1].Name += C2U(cDataTableName); + pNewValues[1].Name += rtl::OUString::createFromAscii(cDataTableName); pNewValues[1].Value <<= aAssignIter->aDBData.sCommand; pNewValues[2].Name = sNodePath; - pNewValues[2].Name += C2U(cDataCommandType); + pNewValues[2].Name += rtl::OUString::createFromAscii(cDataCommandType); pNewValues[2].Value <<= aAssignIter->aDBData.nCommandType; pNewValues[3].Name = sNodePath; - pNewValues[3].Name += C2U(cDBColumnAssignments); + pNewValues[3].Name += rtl::OUString::createFromAscii(cDBColumnAssignments); pNewValues[3].Value <<= aAssignIter->aDBColumnAssignments; - SetSetProperties(C2U(cAddressDataAssignments), aNewValues); + SetSetProperties(rtl::OUString::createFromAscii(cAddressDataAssignments), aNewValues); } } diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index f14ca1c..eaa6dbe 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -707,7 +707,7 @@ IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG) Any aZoom; aZoom <<= (sal_Int16)DocumentZoomType::ENTIRE_PAGE; - m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); + m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); const SwFmtFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc( m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize(); @@ -731,9 +731,9 @@ IMPL_LINK(SwMailMergeLayoutPage, ZoomHdl_Impl, ListBox*, pBox) } Any aZoom; aZoom <<= eType; - m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); + m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); aZoom <<= nZoom; - m_xViewProperties->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); + m_xViewProperties->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); } return 0; diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index e935cf7..6667c3f 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -73,7 +73,7 @@ void SwVisitingCardPage::InitFrameControl() uno::Sequence aNames = _xAutoText->getElementNames(); const OUString* pGroups = aNames.getConstArray(); - OUString uTitleName( C2U(SW_PROP_NAME_STR(UNO_NAME_TITLE)) ); + OUString uTitleName( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_TITLE)) ); for(sal_uInt16 i = 0; i < aNames.getLength(); i++) { @@ -241,7 +241,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel, { String sFldName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.FieldMaster.User." ))); - OUString uCntName( C2U( SW_PROP_NAME_STR(UNO_NAME_CONTENT ))); + OUString uCntName( rtl::OUString::createFromAscii( SW_PROP_NAME_STR(UNO_NAME_CONTENT ))); for( const _SwLabItemMap* p = aArr; p->pName; ++p ) { String sCurFldName( sFldName ); diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 5861fa8..2b858e3 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -95,7 +95,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, const char* pPropName, const String& rValue) { - OUString uPropName(C2U(pPropName)); + OUString uPropName(rtl::OUString::createFromAscii(pPropName)); if(xInfo->hasPropertyByName(uPropName)) { uno::Any aValue; @@ -115,7 +115,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, USHORT nId, sal_Int16 nValue ) { - OUString uPropName(C2U(SW_PROP_NAME_STR(nId))); + OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) { uno::Any aValue; @@ -129,7 +129,7 @@ void lcl_SetBOOLProp( uno::Reference< beans::XPropertySet > & xProps, USHORT nId, sal_Bool bValue ) { - OUString uPropName(C2U(SW_PROP_NAME_STR(nId))); + OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) { uno::Any aValue; @@ -228,7 +228,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( uno::Reference< text::XTextRange > xRg(xCrsr, uno::UNO_QUERY); xCrsr->getText()->insertTextContent(xRg, xContent, sal_False); } - OUString uIsVisible(C2U(SW_PROP_NAME_STR(UNO_NAME_IS_VISIBLE))); + OUString uIsVisible(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_IS_VISIBLE))); for(sal_uInt16 i = 0 ; i <= TOX_AUTHORITIES; i++) { uno::Reference< beans::XPropertySet > xSectPr(pxIndexSectionsArr[i]->xContainerSection, uno::UNO_QUERY); @@ -254,10 +254,10 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( //stylenames sal_uInt16 nContentOptions = rDesc.GetContentOptions(); - if(xInfo->hasPropertyByName(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES)))) + if(xInfo->hasPropertyByName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES)))) { sal_Bool bOn = 0!=(nContentOptions&nsSwTOXElement::TOX_TEMPLATE ); - uno::Any aStyleNames(xIdxProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES)))); + uno::Any aStyleNames(xIdxProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_PARAGRAPH_STYLES)))); uno::Reference< container::XIndexReplace > xAcc; aStyleNames >>= xAcc; @@ -330,7 +330,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( nEndLevel = pForm->GetFormMax() - 1; } - if(xInfo->hasPropertyByName(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT)))) + if(xInfo->hasPropertyByName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT)))) { for(sal_uInt16 nCurrLevel = nStartLevel; nCurrLevel <= nEndLevel; nCurrLevel++) { @@ -427,7 +427,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( } aSequPropVals.realloc(nTokenIndex); - uno::Any aFormatAccess = xIdxProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT))); + uno::Any aFormatAccess = xIdxProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEVEL_FORMAT))); OSL_ENSURE(aFormatAccess.getValueType() == ::getCppuType((uno::Reference*)0), "wrong property type"); diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 7d628ed..4f00582 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -306,7 +306,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { if (rInfo.mnAttributes & PropertyAttribute::READONLY) - throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + C2U(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); + throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rtl::OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); switch( rInfo.mnHandle ) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 89e41af..2b2d1ef 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1137,11 +1137,11 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption pDocShell->GetDoc()->GetAttrPool()); aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, sal_True)); - OUString sFileName( C2U(SW_PROP_NAME_STR(UNO_NAME_FILE_NAME))); - OUString sCopyCount(C2U(SW_PROP_NAME_STR(UNO_NAME_COPY_COUNT))); - OUString sCollate(C2U(SW_PROP_NAME_STR(UNO_NAME_COLLATE))); - OUString sSort(C2U(SW_PROP_NAME_STR(UNO_NAME_SORT))); - OUString sPages(C2U(SW_PROP_NAME_STR(UNO_NAME_PAGES))); + OUString sFileName( rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_FILE_NAME))); + OUString sCopyCount(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_COPY_COUNT))); + OUString sCollate(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_COLLATE))); + OUString sSort(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SORT))); + OUString sPages(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_PAGES))); for ( int n = 0; n < xOptions.getLength(); ++n ) { @@ -2552,7 +2552,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() ); } - m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) ); + m_pRenderData->SetSwPrtOptions( new SwPrtOptions( rtl::OUString::createFromAscii( bIsPDFExport ? "PDF export" : "Printing" ) ) ); m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell, m_pPrintUIOptions, m_pRenderData, bIsPDFExport ); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index cb76509..ce32180 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -759,16 +759,16 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto pRet[n].realloc(5); PropertyValue* pValues = pRet[n].getArray(); - pValues[0].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_BASE_TEXT)); + pValues[0].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_BASE_TEXT)); pValues[0].Value <<= OUString(rEntryText); - pValues[1].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_TEXT)); + pValues[1].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_TEXT)); pValues[1].Value <<= OUString(rAttr.GetText()); - pValues[2].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME)); + pValues[2].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME)); SwStyleNameMapper::FillProgName(rAttr.GetCharFmtName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True ); pValues[2].Value <<= OUString( aString ); - pValues[3].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST)); + pValues[3].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST)); pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment(); - pValues[4].Name = C2U(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE)); + pValues[4].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE)); sal_Bool bVal = !rAttr.GetPosition(); pValues[4].Value.setValue(&bVal, ::getBooleanCppuType()); } @@ -907,7 +907,7 @@ void SwXTextView::NotifySelChanged() void SwXTextView::NotifyDBChanged() { URL aURL; - aURL.Complete = C2U(SwXDispatch::GetDBChangeURL()); + aURL.Complete = rtl::OUString::createFromAscii(SwXDispatch::GetDBChangeURL()); sal_uInt16 nCount = aSelChangedListeners.Count(); for ( sal_uInt16 i = nCount; i--; ) diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 6bc62d4..7a8bcdb 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -226,32 +226,32 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) if( !bIsInitialized ) { - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_BREAKS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_DRAWINGS )), aTrueSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_FIELD_COMMANDS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_GRAPHICS )), aTrueSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_TEXT )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_RULER )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_PARA_BREAKS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_PROTECTED_SPACES )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_SOFT_HYPHENS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_SPACES )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABLES )), aTrueSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABSTOPS )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_RULER )), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_BREAKS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_DRAWINGS)), aTrueSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_FIELD_COMMANDS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_GRAPHICS)), aTrueSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HIDDEN_TEXT)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_RULER)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_PARA_BREAKS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_PROTECTED_SPACES)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_SOFT_HYPHENS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_SPACES)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABLES)), aTrueSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_TABSTOPS)), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_RULER)), aFalseSet); if(0 ==(nStyleFlags&EX_SHOW_ONLINE_LAYOUT)) { uno::Any aZoom; aZoom <<= (sal_Int16)view::DocumentZoomType::PAGE_WIDTH_EXACT; - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); } else { uno::Any aZoom; aZoom <<= (sal_Int16)view::DocumentZoomType::BY_VALUE; - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); sal_Int16 nZoomValue = 50; if(EX_SHOW_BUSINESS_CARDS == nStyleFlags) @@ -259,10 +259,10 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) nZoomValue = 80; } aZoom <<= nZoomValue; - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); } // set onlinelayout property behind setting the zoom - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_ONLINE_LAYOUT)), + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_ONLINE_LAYOUT)), (nStyleFlags&EX_SHOW_ONLINE_LAYOUT) ? aTrueSet : aFalseSet ); bIsInitialized = sal_True; } @@ -272,7 +272,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) _xCursor = xText->createTextCursor(); uno::Reference< beans::XPropertySet > xCrsrProp(_xCursor, uno::UNO_QUERY); uno::Any aPageStyle = xCrsrProp->getPropertyValue( - C2U(SW_PROP_NAME_STR(UNO_NAME_PAGE_STYLE_NAME))); + rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_PAGE_STYLE_NAME))); OUString sPageStyle; aPageStyle >>= sPageStyle; @@ -288,22 +288,22 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) uno::Reference< style::XStyle > xPStyle; aPStyle >>= xPStyle; uno::Reference< beans::XPropertySet > xPProp(xPStyle, uno::UNO_QUERY); - uno::Any aSize = xPProp->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SIZE))); + uno::Any aSize = xPProp->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SIZE))); awt::Size aPSize; aSize >>= aPSize; //TODO: set page width to card width aPSize.Width = 10000; aSize.setValue(&aPSize, ::getCppuType((awt::Size*)0)); - xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SIZE)), aSize); + xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SIZE)), aSize); uno::Any aZero; aZero <<= (sal_Int32)0; - xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_LEFT_MARGIN)), aZero); - xPProp->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_RIGHT_MARGIN)), aZero); + xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_LEFT_MARGIN)), aZero); + xPProp->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RIGHT_MARGIN)), aZero); } // can only be done here - the SFX changes the ScrollBar values - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_SCROLL_BAR )), aFalseSet); - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_SCROLL_BAR )), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_HORI_SCROLL_BAR )), aFalseSet); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_SHOW_VERT_SCROLL_BAR )), aFalseSet); if( aInitializedLink.IsSet() ) { @@ -406,7 +406,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt) uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings(); - uno::Any aZoom = xViewProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE))); + uno::Any aZoom = xViewProps->getPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE))); sal_Int16 nZoom = 0; aZoom >>= nZoom; @@ -437,9 +437,9 @@ IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu ) uno::Any aZoom; aZoom <<= nZoom; - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom); aZoom <<= (sal_Int16)view::DocumentZoomType::BY_VALUE; - xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); + xViewProps->setPropertyValue(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_ZOOM_TYPE)), aZoom); } else if(ITEM_UP == nId || ITEM_DOWN == nId) {