diff options
author | David Tardon <dtardon@redhat.com> | 2012-10-06 17:57:07 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-10-06 17:57:31 +0200 |
commit | 0e7e65d0480f63000b46b8009becf749e8a1d765 (patch) | |
tree | a89b118e2eda8d9cd04630409ceb2a4a8601e8f2 /sc/source/filter | |
parent | 5e47d8ca9a4282d2c7b6e1e561d7f2eb46166bd7 (diff) |
get rid of CREATE_OUSTRING
Change-Id: I67cd3213c7c92a4a782906a7250c176efeb01633
Diffstat (limited to 'sc/source/filter')
34 files changed, 348 insertions, 354 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 3ea56ebae788..416b3da01763 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -360,10 +360,10 @@ void ImportExcel8::ReadBasic( void ) SfxMedium& rMedium = GetMedium(); uno::Reference< io::XInputStream > xIn = rMedium.GetInputStream(); oox::ole::OleStorage root( aCtx, xIn, false ); - oox::StorageRef vbaStg = root.openSubStorage( CREATE_OUSTRING( "_VBA_PROJECT_CUR" ), false ); + oox::StorageRef vbaStg = root.openSubStorage( "_VBA_PROJECT_CUR", false ); if ( vbaStg.get() ) { - oox::ole::VbaProject aVbaPrj( aCtx, pShell->GetModel(), CREATE_OUSTRING( "Calc") ); + oox::ole::VbaProject aVbaPrj( aCtx, pShell->GetModel(), "Calc" ); // collect names of embedded form controls, as specified in the VBA project uno::Reference< container::XNameContainer > xOleNameOverrideSink( new OleNameOverrideContainer ); aVbaPrj.setOleOverridesSink( xOleNameOverrideSink ); diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 8c7a48bcbd9b..c79b47489c80 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -1245,7 +1245,7 @@ void ImportExcel::PostDocLoad( void ) // open forms in alive mode (has no effect, if no controls in document) if( ScModelObj* pDocObj = GetDocModelObj() ) - pDocObj->setPropertyValue( CREATE_OUSTRING( SC_UNO_APPLYFMDES ), uno::Any( false ) ); + pDocObj->setPropertyValue( SC_UNO_APPLYFMDES, uno::Any( false ) ); // enables extended options to be set to the view after import GetExtDocOptions().SetChanged( true ); diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 9888f5af4b14..5d0bee7385d1 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -1947,8 +1947,8 @@ bool XclExpChSeries::ConvertDataSeries( Reference< XColorScheme > xColorScheme = xDiagram->getDefaultColorScheme(); if( xColorScheme.is() ) { - const OUString aFillStyleName = CREATE_OUSTRING( "FillStyle" ); - const OUString aColorName = CREATE_OUSTRING( "Color" ); + const OUString aFillStyleName = "FillStyle"; + const OUString aColorName = "Color"; namespace cssd = ::com::sun::star::drawing; for( sal_Int32 nPointIdx = 0; nPointIdx < nMaxPointCount; ++nPointIdx ) { diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 2cac520d7063..c6bffc3b8f42 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1692,7 +1692,7 @@ XclExpWebQueryBuffer::XclExpWebQueryBuffer( const XclExpRoot& rRoot ) if( !aModelProp.Is() ) return; Reference< XAreaLinks > xAreaLinks; - aModelProp.GetProperty( xAreaLinks, CREATE_OUSTRING( SC_UNO_AREALINKS ) ); + aModelProp.GetProperty( xAreaLinks, SC_UNO_AREALINKS ); Reference< XIndexAccess > xLinksIA( xAreaLinks, UNO_QUERY ); if( !xLinksIA.is() ) return; @@ -1706,16 +1706,16 @@ XclExpWebQueryBuffer::XclExpWebQueryBuffer( const XclExpRoot& rRoot ) { ScfPropertySet aLinkProp( xAreaLink ); OUString aFilter; - if( aLinkProp.GetProperty( aFilter, CREATE_OUSTRING( SC_UNONAME_FILTER ) ) && - (aFilter == CREATE_OUSTRING( EXC_WEBQRY_FILTER )) ) + if( aLinkProp.GetProperty( aFilter, SC_UNONAME_FILTER ) && + (aFilter == EXC_WEBQRY_FILTER) ) { // get properties OUString /*aFilterOpt,*/ aUrl; sal_Int32 nRefresh = 0; -// aLinkProp.GetProperty( aFilterOpt, CREATE_OUSTRING( SC_UNONAME_FILTOPT ) ); - aLinkProp.GetProperty( aUrl, CREATE_OUSTRING( SC_UNONAME_LINKURL ) ); - aLinkProp.GetProperty( nRefresh, CREATE_OUSTRING( SC_UNONAME_REFDELAY ) ); +// aLinkProp.GetProperty( aFilterOpt, SC_UNONAME_FILTOPT ); + aLinkProp.GetProperty( aUrl, SC_UNONAME_LINKURL ); + aLinkProp.GetProperty( nRefresh, SC_UNONAME_REFDELAY ); String aAbsDoc( ScGlobal::GetAbsDocName( aUrl, pShell ) ); INetURLObject aUrlObj( aAbsDoc ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index bf71424d9d3c..74bc82d532b9 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -461,11 +461,11 @@ void XclExpControlHelper::ConvertSheetLinks( Reference< XShape > xShape ) if( xBindable.is() ) { Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY ); - if( xServInfo.is() && xServInfo->supportsService( CREATE_OUSTRING( SC_SERVICENAME_VALBIND ) ) ) + if( xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_VALBIND ) ) { ScfPropertySet aBindProp( xServInfo ); CellAddress aApiAddress; - if( aBindProp.GetProperty( aApiAddress, CREATE_OUSTRING( SC_UNONAME_BOUNDCELL ) ) ) + if( aBindProp.GetProperty( aApiAddress, SC_UNONAME_BOUNDCELL ) ) { ScAddress aCellLink; ScUnoConversion::FillScAddress( aCellLink, aApiAddress ); @@ -481,11 +481,11 @@ void XclExpControlHelper::ConvertSheetLinks( Reference< XShape > xShape ) if( xEntrySink.is() ) { Reference< XServiceInfo > xServInfo( xEntrySink->getListEntrySource(), UNO_QUERY ); - if( xServInfo.is() && xServInfo->supportsService( CREATE_OUSTRING( SC_SERVICENAME_LISTSOURCE ) ) ) + if( xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_LISTSOURCE ) ) { ScfPropertySet aSinkProp( xServInfo ); CellRangeAddress aApiRange; - if( aSinkProp.GetProperty( aApiRange, CREATE_OUSTRING( SC_UNONAME_CELLRANGE ) ) ) + if( aSinkProp.GetProperty( aApiRange, SC_UNONAME_CELLRANGE ) ) { ScRange aSrcRange; ScUnoConversion::FillScRange( aSrcRange, aApiRange ); @@ -529,7 +529,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // OBJ record flags SetLocked( sal_True ); - SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); + SetPrintable( aCtrlProp.GetBoolProperty( "Printable" ) ); SetAutoFill( false ); SetAutoLine( false ); @@ -544,7 +544,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // #i51348# name of the control, may overwrite shape name OUString aCtrlName; - if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && !aCtrlName.isEmpty() ) + if( aCtrlProp.GetProperty( aCtrlName, "Name" ) && !aCtrlName.isEmpty() ) aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName ); // meta file @@ -653,7 +653,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< // control type sal_Int16 nClassId = 0; - if( aCtrlProp.GetProperty( nClassId, CREATE_OUSTRING( "ClassId" ) ) ) + if( aCtrlProp.GetProperty( nClassId, "ClassId" ) ) { switch( nClassId ) { @@ -673,7 +673,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< // OBJ record flags SetLocked( sal_True ); - SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); + SetPrintable( aCtrlProp.GetBoolProperty( "Printable" ) ); SetAutoFill( false ); SetAutoLine( false ); @@ -681,7 +681,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT ); EscherPropertyContainer aPropOpt; - bool bVisible = aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "EnableVisible" ) ); + bool bVisible = aCtrlProp.GetBoolProperty( "EnableVisible" ); aPropOpt.AddOpt( ESCHER_Prop_fPrint, bVisible ? 0x00080000 : 0x00080002 ); // visible flag aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x01000100 ); // bool field @@ -693,7 +693,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< // #i51348# name of the control, may overwrite shape name OUString aCtrlName; - if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && !aCtrlName.isEmpty() ) + if( aCtrlProp.GetProperty( aCtrlName, "Name" ) && !aCtrlName.isEmpty() ) aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName ); // write DFF property set to stream @@ -707,7 +707,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< // control label OUString aString; - if( aCtrlProp.GetProperty( aString, CREATE_OUSTRING( "Label" ) ) ) + if( aCtrlProp.GetProperty( aString, "Label" ) ) { /* Be sure to construct the MSODRAWING record containing the ClientTextbox atom after the base OBJ's MSODRAWING record data is @@ -733,7 +733,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< mrEscherEx.CloseContainer(); // ESCHER_SpContainer // other properties - aCtrlProp.GetProperty( mnLineCount, CREATE_OUSTRING( "LineCount" ) ); + aCtrlProp.GetProperty( mnLineCount, "LineCount" ); // border style sal_Int16 nApiButton = AwtVisualEffect::LOOK3D; @@ -742,11 +742,11 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< { case FormCompType::LISTBOX: case FormCompType::COMBOBOX: - aCtrlProp.GetProperty( nApiBorder, CREATE_OUSTRING( "Border" ) ); + aCtrlProp.GetProperty( nApiBorder, "Border" ); break; case FormCompType::CHECKBOX: case FormCompType::RADIOBUTTON: - aCtrlProp.GetProperty( nApiButton, CREATE_OUSTRING( "VisualEffect" ) ); + aCtrlProp.GetProperty( nApiButton, "VisualEffect" ); nApiBorder = AwtVisualEffect::NONE; break; // Push button cannot be set to flat in Excel @@ -774,7 +774,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< // control state sal_Int16 nApiState = 0; - if( aCtrlProp.GetProperty( nApiState, CREATE_OUSTRING( "State" ) ) ) + if( aCtrlProp.GetProperty( nApiState, "State" ) ) { switch( nApiState ) { @@ -789,9 +789,9 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< { case FormCompType::LISTBOX: { - mbMultiSel = aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "MultiSelection" ) ); + mbMultiSel = aCtrlProp.GetBoolProperty( "MultiSelection" ); Sequence< sal_Int16 > aSelection; - if( aCtrlProp.GetProperty( aSelection, CREATE_OUSTRING( "SelectedItems" ) ) ) + if( aCtrlProp.GetProperty( aSelection, "SelectedItems" ) ) { sal_Int32 nLen = aSelection.getLength(); if( nLen > 0 ) @@ -804,7 +804,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< } // convert listbox with dropdown button to Excel dropdown - if( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Dropdown" ) ) ) + if( aCtrlProp.GetBoolProperty( "Dropdown" ) ) mnObjType = EXC_OBJTYPE_DROPDOWN; } break; @@ -813,8 +813,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< { Sequence< OUString > aStringList; OUString aDefText; - if( aCtrlProp.GetProperty( aStringList, CREATE_OUSTRING( "StringItemList" ) ) && - aCtrlProp.GetProperty( aDefText, CREATE_OUSTRING( "Text" ) ) && + if( aCtrlProp.GetProperty( aStringList, "StringItemList" ) && + aCtrlProp.GetProperty( aDefText, "Text" ) && aStringList.getLength() && !aDefText.isEmpty() ) { const OUString* pBegin = aStringList.getConstArray(); @@ -827,7 +827,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< } // convert combobox without dropdown button to Excel listbox - if( !aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Dropdown" ) ) ) + if( !aCtrlProp.GetBoolProperty( "Dropdown" ) ) mnObjType = EXC_OBJTYPE_LISTBOX; } break; @@ -835,17 +835,17 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< case FormCompType::SCROLLBAR: { sal_Int32 nApiValue = 0; - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "ScrollValueMin" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "ScrollValueMin" ) ) mnScrollMin = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "ScrollValueMax" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "ScrollValueMax" ) ) mnScrollMax = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, EXC_OBJ_SCROLLBAR_MIN ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "ScrollValue" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "ScrollValue" ) ) mnScrollValue = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, mnScrollMax ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "LineIncrement" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "LineIncrement" ) ) mnScrollStep = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "BlockIncrement" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "BlockIncrement" ) ) mnScrollPage = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "Orientation" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "Orientation" ) ) mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL; } break; @@ -853,15 +853,15 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< case FormCompType::SPINBUTTON: { sal_Int32 nApiValue = 0; - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "SpinValueMin" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "SpinValueMin" ) ) mnScrollMin = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "SpinValueMax" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "SpinValueMax" ) ) mnScrollMax = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "SpinValue" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "SpinValue" ) ) mnScrollValue = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, mnScrollMax ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "SpinIncrement" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "SpinIncrement" ) ) mnScrollStep = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX ); - if( aCtrlProp.GetProperty( nApiValue, CREATE_OUSTRING( "Orientation" ) ) ) + if( aCtrlProp.GetProperty( nApiValue, "Orientation" ) ) mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL; } break; @@ -1077,10 +1077,10 @@ XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape // create the chart substream object ScfPropertySet aShapeProp( xShape ); Reference< XModel > xModel; - aShapeProp.GetProperty( xModel, CREATE_OUSTRING( "Model" ) ); + aShapeProp.GetProperty( xModel, "Model" ); mxChartDoc.set( xModel,UNO_QUERY ); ::com::sun::star::awt::Rectangle aBoundRect; - aShapeProp.GetProperty( aBoundRect, CREATE_OUSTRING( "BoundRect" ) ); + aShapeProp.GetProperty( aBoundRect, "BoundRect" ); Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); mxChart.reset( new XclExpChart( GetRoot(), xModel, aChartRect ) ); } @@ -1132,7 +1132,7 @@ void XclExpChartObj::WriteChartObj( sax_fastparser::FSHelperPtr pDrawing, XclExp pDrawing->startElement( FSNS( XML_xdr, XML_nvGraphicFramePr ), FSEND ); // TODO: get the correct chart name chart id - OUString sName = CREATE_OUSTRING("Object 1"); + OUString sName = "Object 1"; Reference< XNamed > xNamed( mxShape, UNO_QUERY ); if (xNamed.is()) { diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index a9640408accc..8dea2c4c8266 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -27,13 +27,6 @@ ************************************************************************/ -// XXX xelink.hxx MUST be included before xeformula.hxx because of the -// redifinition of the CREATE_OUSTRING() macro, which is in oox/helper.hxx -// (indirectly included via xelink.hxx) and ../inc/ftools.hxx (indirectly -// included via xeformula.hxx) that does an undef first. Ugly. -#include "xelink.hxx" -#include "xeformula.hxx" - #include <list> #include <map> #include <memory> @@ -44,7 +37,9 @@ #include "rangelst.hxx" #include "token.hxx" #include "tokenarray.hxx" +#include "xeformula.hxx" #include "xehelper.hxx" +#include "xelink.hxx" #include "xename.hxx" #include "xestream.hxx" diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index fe96d7554043..5a9d19a32cce 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -1130,7 +1130,7 @@ bool XclExpXmlStream::exportDocument() throw() if( pShell->GetViewData() ) pShell->GetViewData()->WriteExtOptions( mpRoot->GetExtDocOptions() ); - OUString const workbook = CREATE_OUSTRING( "xl/workbook.xml" ); + OUString const workbook = "xl/workbook.xml"; PushStream( CreateOutputStream( workbook, workbook, Reference <XOutputStream>(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml", @@ -1165,7 +1165,7 @@ OUString XlsxExport_getImplementationName() OUString XclExpXmlStream::implGetImplementationName() const { - return CREATE_OUSTRING( "TODO" ); + return OUString( "TODO" ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 01384ad3e387..6c7ad2ba6287 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -832,7 +832,7 @@ void XclImpChSourceLink::ConvertNumFmt( ScfPropertySet& rPropSet, bool bPercent { bool bLinkToSource = ::get_flag( maData.mnFlags, EXC_CHSRCLINK_NUMFMT ); sal_uInt32 nScNumFmt = bLinkToSource ? GetNumFmtBuffer().GetScFormat( maData.mnNumFmtIdx ) : NUMBERFORMAT_ENTRY_NOT_FOUND; - OUString aPropName = bPercent ? EXC_CHPROP_PERCENTAGENUMFMT : EXC_CHPROP_NUMBERFORMAT; + OUString aPropName = bPercent ? OUString( EXC_CHPROP_PERCENTAGENUMFMT ) : OUString( EXC_CHPROP_NUMBERFORMAT ); if( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND ) rPropSet.SetProperty( aPropName, static_cast< sal_Int32 >( nScNumFmt ) ); else @@ -1551,7 +1551,7 @@ void XclImpChDataFormat::Convert( ScfPropertySet& rPropSet, const XclChExtTypeIn #if EXC_CHART2_3DBAR_HAIRLINES_ONLY // #i83151# only hair lines in 3D charts with filled data points if( rTypeInfo.mb3dChart && rTypeInfo.IsSeriesFrameFormat() && mxLineFmt && mxLineFmt->HasLine() ) - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "BorderWidth" ), 0 ); + rPropSet.SetProperty< sal_Int32 >( "BorderWidth", 0 ); #endif // other formatting @@ -3076,7 +3076,7 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co { // scaling algorithm bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE ); - OUString aScalingService = bLogScale ? SERVICE_CHART2_LOGSCALING : SERVICE_CHART2_LINEARSCALING; + OUString aScalingService = bLogScale ? OUString( SERVICE_CHART2_LOGSCALING ) : OUString( SERVICE_CHART2_LINEARSCALING ); rScaleData.Scaling.set( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY ); // min/max diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 37077e36b5ab..54f033793d8d 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1382,7 +1382,7 @@ SdrObject* XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re { TSdrObjectPtr< SdrObjCustomShape > xSdrObj( new SdrObjCustomShape ); xSdrObj->NbcSetSnapRect( rAnchorRect ); - OUString aRectType = CREATE_OUSTRING( "rectangle" ); + OUString aRectType = "rectangle"; xSdrObj->MergeDefaultAttributes( &aRectType ); ConvertRectStyle( *xSdrObj ); sal_Bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); @@ -1796,7 +1796,7 @@ void XclImpControlHelper::ApplySheetLinkProps() const ScUnoConversion::FillApiAddress( aApiAddress, *mxCellLink ); NamedValue aValue; - aValue.Name = CREATE_OUSTRING( SC_UNONAME_BOUNDCELL ); + aValue.Name = SC_UNONAME_BOUNDCELL; aValue.Value <<= aApiAddress; Sequence< Any > aArgs( 1 ); @@ -1806,8 +1806,8 @@ void XclImpControlHelper::ApplySheetLinkProps() const OUString aServiceName; switch( meBindMode ) { - case EXC_CTRL_BINDCONTENT: aServiceName = CREATE_OUSTRING( SC_SERVICENAME_VALBIND ); break; - case EXC_CTRL_BINDPOSITION: aServiceName = CREATE_OUSTRING( SC_SERVICENAME_LISTCELLBIND ); break; + case EXC_CTRL_BINDCONTENT: aServiceName = SC_SERVICENAME_VALBIND; break; + case EXC_CTRL_BINDPOSITION: aServiceName = SC_SERVICENAME_LISTCELLBIND; break; } Reference< XValueBinding > xBinding( xFactory->createInstanceWithArguments( aServiceName, aArgs ), UNO_QUERY_THROW ); @@ -1827,7 +1827,7 @@ void XclImpControlHelper::ApplySheetLinkProps() const ScUnoConversion::FillApiRange( aApiRange, *mxSrcRange ); NamedValue aValue; - aValue.Name = CREATE_OUSTRING( SC_UNONAME_CELLRANGE ); + aValue.Name = SC_UNONAME_CELLRANGE; aValue.Value <<= aApiRange; Sequence< Any > aArgs( 1 ); @@ -1835,7 +1835,7 @@ void XclImpControlHelper::ApplySheetLinkProps() const // create the EntrySource instance and set at the control model Reference< XListEntrySource > xEntrySource( xFactory->createInstanceWithArguments( - CREATE_OUSTRING( SC_SERVICENAME_LISTSOURCE ), aArgs ), UNO_QUERY_THROW ); + SC_SERVICENAME_LISTSOURCE, aArgs ), UNO_QUERY_THROW ); xEntrySink->setListEntrySource( xEntrySource ); } catch( const Exception& ) @@ -1856,11 +1856,11 @@ void XclImpControlHelper::ProcessControl( const XclImpDrawObjBase& rDrawObj ) co ScfPropertySet aPropSet( xCtrlModel ); // #i51348# set object name at control model - aPropSet.SetStringProperty( CREATE_OUSTRING( "Name" ), rDrawObj.GetObjName() ); + aPropSet.SetStringProperty( "Name", rDrawObj.GetObjName() ); // control visible and printable? - aPropSet.SetBoolProperty( CREATE_OUSTRING( "EnableVisible" ), rDrawObj.IsVisible() ); - aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), rDrawObj.IsPrintable() ); + aPropSet.SetBoolProperty( "EnableVisible", rDrawObj.IsVisible() ); + aPropSet.SetBoolProperty( "Printable", rDrawObj.IsPrintable() ); // virtual call for type specific processing @@ -1988,7 +1988,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const if( nPos != STRING_NOTFOUND ) aLabel.Insert( '~', nPos ); } - rPropSet.SetStringProperty( CREATE_OUSTRING( "Label" ), aLabel ); + rPropSet.SetStringProperty( "Label", aLabel ); } ConvertFont( rPropSet ); } @@ -2027,7 +2027,7 @@ void XclImpButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const case EXC_OBJ_HOR_CENTER: nHorAlign = 1; break; case EXC_OBJ_HOR_RIGHT: nHorAlign = 2; break; } - rPropSet.SetProperty( CREATE_OUSTRING( "Align" ), nHorAlign ); + rPropSet.SetProperty( "Align", nHorAlign ); // vertical text alignment namespace csss = ::com::sun::star::style; @@ -2038,14 +2038,14 @@ void XclImpButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const case EXC_OBJ_VER_CENTER: eVerAlign = csss::VerticalAlignment_MIDDLE; break; case EXC_OBJ_VER_BOTTOM: eVerAlign = csss::VerticalAlignment_BOTTOM; break; } - rPropSet.SetProperty( CREATE_OUSTRING( "VerticalAlign" ), eVerAlign ); + rPropSet.SetProperty( "VerticalAlign", eVerAlign ); // always wrap text automatically - rPropSet.SetBoolProperty( CREATE_OUSTRING( "MultiLine" ), true ); + rPropSet.SetBoolProperty( "MultiLine", true ); // default button bool bDefButton = ::get_flag( maTextData.maData.mnButtonFlags, EXC_OBJ_BUTTON_DEFAULT ); - rPropSet.SetBoolProperty( CREATE_OUSTRING( "DefaultButton" ), bDefButton ); + rPropSet.SetBoolProperty( "DefaultButton", bDefButton ); // button type (flags cannot be combined in OOo) namespace cssa = ::com::sun::star::awt; @@ -2057,12 +2057,12 @@ void XclImpButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const else if( ::get_flag( maTextData.maData.mnButtonFlags, EXC_OBJ_BUTTON_HELP ) ) eButtonType = cssa::PushButtonType_HELP; // property type is short, not enum - rPropSet.SetProperty( CREATE_OUSTRING( "PushButtonType" ), sal_Int16( eButtonType ) ); + rPropSet.SetProperty( "PushButtonType", sal_Int16( eButtonType ) ); } OUString XclImpButtonObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.CommandButton" ); + return OUString( "com.sun.star.form.component.CommandButton" ); } XclTbxEventType XclImpButtonObj::DoGetEventType() const @@ -2126,32 +2126,32 @@ void XclImpCheckBoxObj::DoProcessControl( ScfPropertySet& rPropSet ) const case EXC_OBJ_CHECKBOX_TRISTATE: nApiState = bSupportsTristate ? 2 : 1; break; } if( bSupportsTristate ) - rPropSet.SetBoolProperty( CREATE_OUSTRING( "TriState" ), nApiState == 2 ); - rPropSet.SetProperty( CREATE_OUSTRING( "DefaultState" ), nApiState ); + rPropSet.SetBoolProperty( "TriState", nApiState == 2 ); + rPropSet.SetProperty( "DefaultState", nApiState ); // box style namespace AwtVisualEffect = ::com::sun::star::awt::VisualEffect; sal_Int16 nEffect = ::get_flagvalue( mnCheckBoxFlags, EXC_OBJ_CHECKBOX_FLAT, AwtVisualEffect::FLAT, AwtVisualEffect::LOOK3D ); - rPropSet.SetProperty( CREATE_OUSTRING( "VisualEffect" ), nEffect ); + rPropSet.SetProperty( "VisualEffect", nEffect ); // do not wrap text automatically - rPropSet.SetBoolProperty( CREATE_OUSTRING( "MultiLine" ), false ); + rPropSet.SetBoolProperty( "MultiLine", false ); // #i40279# always centered vertically namespace csss = ::com::sun::star::style; - rPropSet.SetProperty( CREATE_OUSTRING( "VerticalAlign" ), csss::VerticalAlignment_MIDDLE ); + rPropSet.SetProperty( "VerticalAlign", csss::VerticalAlignment_MIDDLE ); // background color if( maFillData.IsFilled() ) { sal_Int32 nColor = static_cast< sal_Int32 >( GetSolidFillColor( maFillData ).GetColor() ); - rPropSet.SetProperty( CREATE_OUSTRING( "BackgroundColor" ), nColor ); + rPropSet.SetProperty( "BackgroundColor", nColor ); } } OUString XclImpCheckBoxObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.CheckBox" ); + return OUString( "com.sun.star.form.component.CheckBox" ); } XclTbxEventType XclImpCheckBoxObj::DoGetEventType() const @@ -2220,8 +2220,8 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const ScfPropertySet aProps( xCtrlModel ); rtl::OUString sGroupName = rtl::OUString::valueOf( static_cast< sal_Int32 >( pLeader->GetDffShapeId() ) ); - aProps.SetStringProperty( CREATE_OUSTRING( "GroupName" ), sGroupName ); - aProps.SetStringProperty( CREATE_OUSTRING( "RefValue" ), rtl::OUString::valueOf( nRefVal++ ) ); + aProps.SetStringProperty( "GroupName", sGroupName ); + aProps.SetStringProperty( "RefValue", rtl::OUString::valueOf( nRefVal++ ) ); if ( pLeader->HasCellLink() && !pTbxObj->HasCellLink() ) { // propagate cell link info @@ -2242,7 +2242,7 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const OUString XclImpOptionButtonObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.RadioButton" ); + return OUString( "com.sun.star.form.component.RadioButton" ); } XclTbxEventType XclImpOptionButtonObj::DoGetEventType() const @@ -2263,17 +2263,17 @@ void XclImpLabelObj::DoProcessControl( ScfPropertySet& rPropSet ) const ConvertLabel( rPropSet ); // text alignment (always top/left aligned) - rPropSet.SetProperty( CREATE_OUSTRING( "Align" ), sal_Int16( 0 ) ); + rPropSet.SetProperty( "Align", sal_Int16( 0 ) ); namespace csss = ::com::sun::star::style; - rPropSet.SetProperty( CREATE_OUSTRING( "VerticalAlign" ), csss::VerticalAlignment_TOP ); + rPropSet.SetProperty( "VerticalAlign", csss::VerticalAlignment_TOP ); // always wrap text automatically - rPropSet.SetBoolProperty( CREATE_OUSTRING( "MultiLine" ), true ); + rPropSet.SetBoolProperty( "MultiLine", true ); } OUString XclImpLabelObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.FixedText" ); + return OUString( "com.sun.star.form.component.FixedText" ); } XclTbxEventType XclImpLabelObj::DoGetEventType() const @@ -2322,7 +2322,7 @@ void XclImpGroupBoxObj::DoProcessControl( ScfPropertySet& rPropSet ) const OUString XclImpGroupBoxObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.GroupBox" ); + return OUString( "com.sun.star.form.component.GroupBox" ); } XclTbxEventType XclImpGroupBoxObj::DoGetEventType() const @@ -2346,7 +2346,7 @@ void XclImpDialogObj::DoProcessControl( ScfPropertySet& rPropSet ) const OUString XclImpDialogObj::DoGetServiceName() const { // dialog frame faked by a groupbox - return CREATE_OUSTRING( "com.sun.star.form.component.GroupBox" ); + return OUString( "com.sun.star.form.component.GroupBox" ); } XclTbxEventType XclImpDialogObj::DoGetEventType() const @@ -2403,14 +2403,14 @@ void XclImpEditObj::DoProcessControl( ScfPropertySet& rPropSet ) const if( IsNumeric() ) { // TODO: OUString::toDouble() does not handle local decimal separator - rPropSet.SetProperty( CREATE_OUSTRING( "DefaultValue" ), aText.toDouble() ); - rPropSet.SetBoolProperty( CREATE_OUSTRING( "Spin" ), mnScrollBar != 0 ); + rPropSet.SetProperty( "DefaultValue", aText.toDouble() ); + rPropSet.SetBoolProperty( "Spin", mnScrollBar != 0 ); } else { - rPropSet.SetProperty( CREATE_OUSTRING( "DefaultText" ), aText ); - rPropSet.SetBoolProperty( CREATE_OUSTRING( "MultiLine" ), mnMultiLine != 0 ); - rPropSet.SetBoolProperty( CREATE_OUSTRING( "VScroll" ), mnScrollBar != 0 ); + rPropSet.SetProperty( "DefaultText", aText ); + rPropSet.SetBoolProperty( "MultiLine", mnMultiLine != 0 ); + rPropSet.SetBoolProperty( "VScroll", mnScrollBar != 0 ); } } ConvertFont( rPropSet ); @@ -2419,8 +2419,8 @@ void XclImpEditObj::DoProcessControl( ScfPropertySet& rPropSet ) const OUString XclImpEditObj::DoGetServiceName() const { return IsNumeric() ? - CREATE_OUSTRING( "com.sun.star.form.component.NumericField" ) : - CREATE_OUSTRING( "com.sun.star.form.component.TextField" ); + OUString( "com.sun.star.form.component.NumericField" ) : + OUString( "com.sun.star.form.component.TextField" ); } XclTbxEventType XclImpEditObj::DoGetEventType() const @@ -2483,19 +2483,19 @@ void XclImpSpinButtonObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, void XclImpSpinButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const { // Calc's "Border" property is not the 3D/flat style effect in Excel (#i34712#) - rPropSet.SetProperty( CREATE_OUSTRING( "Border" ), ::com::sun::star::awt::VisualEffect::NONE ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "DefaultSpinValue" ), mnValue ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "SpinValueMin" ), mnMin ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "SpinValueMax" ), mnMax ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "SpinIncrement" ), mnStep ); + rPropSet.SetProperty( "Border", ::com::sun::star::awt::VisualEffect::NONE ); + rPropSet.SetProperty< sal_Int32 >( "DefaultSpinValue", mnValue ); + rPropSet.SetProperty< sal_Int32 >( "SpinValueMin", mnMin ); + rPropSet.SetProperty< sal_Int32 >( "SpinValueMax", mnMax ); + rPropSet.SetProperty< sal_Int32 >( "SpinIncrement", mnStep ); // Excel spin buttons always vertical - rPropSet.SetProperty( CREATE_OUSTRING( "Orientation" ), ::com::sun::star::awt::ScrollBarOrientation::VERTICAL ); + rPropSet.SetProperty( "Orientation", ::com::sun::star::awt::ScrollBarOrientation::VERTICAL ); } OUString XclImpSpinButtonObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.SpinButton" ); + return OUString( "com.sun.star.form.component.SpinButton" ); } XclTbxEventType XclImpSpinButtonObj::DoGetEventType() const @@ -2522,22 +2522,22 @@ void XclImpScrollBarObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, s void XclImpScrollBarObj::DoProcessControl( ScfPropertySet& rPropSet ) const { // Calc's "Border" property is not the 3D/flat style effect in Excel (#i34712#) - rPropSet.SetProperty( CREATE_OUSTRING( "Border" ), ::com::sun::star::awt::VisualEffect::NONE ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "DefaultScrollValue" ), mnValue ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "ScrollValueMin" ), mnMin ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "ScrollValueMax" ), mnMax ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "LineIncrement" ), mnStep ); - rPropSet.SetProperty< sal_Int32 >( CREATE_OUSTRING( "BlockIncrement" ), mnPageStep ); - rPropSet.SetProperty( CREATE_OUSTRING( "VisibleSize" ), ::std::min< sal_Int32 >( mnPageStep, 1 ) ); + rPropSet.SetProperty( "Border", ::com::sun::star::awt::VisualEffect::NONE ); + rPropSet.SetProperty< sal_Int32 >( "DefaultScrollValue", mnValue ); + rPropSet.SetProperty< sal_Int32 >( "ScrollValueMin", mnMin ); + rPropSet.SetProperty< sal_Int32 >( "ScrollValueMax", mnMax ); + rPropSet.SetProperty< sal_Int32 >( "LineIncrement", mnStep ); + rPropSet.SetProperty< sal_Int32 >( "BlockIncrement", mnPageStep ); + rPropSet.SetProperty( "VisibleSize", ::std::min< sal_Int32 >( mnPageStep, 1 ) ); namespace AwtScrollOrient = ::com::sun::star::awt::ScrollBarOrientation; sal_Int32 nApiOrient = ::get_flagvalue( mnOrient, EXC_OBJ_SCROLLBAR_HOR, AwtScrollOrient::HORIZONTAL, AwtScrollOrient::VERTICAL ); - rPropSet.SetProperty( CREATE_OUSTRING( "Orientation" ), nApiOrient ); + rPropSet.SetProperty( "Orientation", nApiOrient ); } OUString XclImpScrollBarObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.ScrollBar" ); + return OUString( "com.sun.star.form.component.ScrollBar" ); } XclTbxEventType XclImpScrollBarObj::DoGetEventType() const @@ -2568,7 +2568,7 @@ void XclImpTbxObjListBase::SetBoxFormatting( ScfPropertySet& rPropSet ) const // border style namespace AwtVisualEffect = ::com::sun::star::awt::VisualEffect; sal_Int16 nApiBorder = ::get_flagvalue( mnListFlags, EXC_OBJ_LISTBOX_FLAT, AwtVisualEffect::FLAT, AwtVisualEffect::LOOK3D ); - rPropSet.SetProperty( CREATE_OUSTRING( "Border" ), nApiBorder ); + rPropSet.SetProperty( "Border", nApiBorder ); // font formatting if( mbHasDefFontIdx ) @@ -2628,7 +2628,7 @@ void XclImpListBoxObj::DoProcessControl( ScfPropertySet& rPropSet ) const // selection type sal_uInt8 nSelType = ::extract_value< sal_uInt8 >( mnListFlags, 4, 2 ); bool bMultiSel = nSelType != EXC_OBJ_LISTBOX_SINGLE; - rPropSet.SetBoolProperty( CREATE_OUSTRING( "MultiSelection" ), bMultiSel ); + rPropSet.SetBoolProperty( "MultiSelection", bMultiSel ); // selection (do not set, if listbox is linked to a cell) if( !HasCellLink() ) @@ -2649,14 +2649,14 @@ void XclImpListBoxObj::DoProcessControl( ScfPropertySet& rPropSet ) const if( !aSelVec.empty() ) { Sequence< sal_Int16 > aSelSeq( &aSelVec.front(), static_cast< sal_Int32 >( aSelVec.size() ) ); - rPropSet.SetProperty( CREATE_OUSTRING( "DefaultSelection" ), aSelSeq ); + rPropSet.SetProperty( "DefaultSelection", aSelSeq ); } } } OUString XclImpListBoxObj::DoGetServiceName() const { - return CREATE_OUSTRING( "com.sun.star.form.component.ListBox" ); + return OUString( "com.sun.star.form.component.ListBox" ); } XclTbxEventType XclImpListBoxObj::DoGetEventType() const @@ -2726,15 +2726,15 @@ void XclImpDropDownObj::DoProcessControl( ScfPropertySet& rPropSet ) const // dropdown listbox formatting SetBoxFormatting( rPropSet ); // enable dropdown button - rPropSet.SetBoolProperty( CREATE_OUSTRING( "Dropdown" ), true ); + rPropSet.SetBoolProperty( "Dropdown", true ); // dropdown line count - rPropSet.SetProperty( CREATE_OUSTRING( "LineCount" ), mnLineCount ); + rPropSet.SetProperty( "LineCount", mnLineCount ); if( GetDropDownType() == EXC_OBJ_DROPDOWN_COMBOBOX ) { // text of editable combobox if( maTextData.mxString ) - rPropSet.SetStringProperty( CREATE_OUSTRING( "DefaultText" ), maTextData.mxString->GetText() ); + rPropSet.SetStringProperty( "DefaultText", maTextData.mxString->GetText() ); } else { @@ -2743,7 +2743,7 @@ void XclImpDropDownObj::DoProcessControl( ScfPropertySet& rPropSet ) const { Sequence< sal_Int16 > aSelSeq( 1 ); aSelSeq[ 0 ] = mnSelEntry - 1; - rPropSet.SetProperty( CREATE_OUSTRING( "DefaultSelection" ), aSelSeq ); + rPropSet.SetProperty( "DefaultSelection", aSelSeq ); } } } @@ -2751,8 +2751,8 @@ void XclImpDropDownObj::DoProcessControl( ScfPropertySet& rPropSet ) const OUString XclImpDropDownObj::DoGetServiceName() const { return (GetDropDownType() == EXC_OBJ_DROPDOWN_COMBOBOX) ? - CREATE_OUSTRING( "com.sun.star.form.component.ComboBox" ) : - CREATE_OUSTRING( "com.sun.star.form.component.ListBox" ); + OUString( "com.sun.star.form.component.ComboBox" ) : + OUString( "com.sun.star.form.component.ListBox" ); } XclTbxEventType XclImpDropDownObj::DoGetEventType() const @@ -3172,7 +3172,7 @@ XclImpDffConverter::XclImpDffConvData::XclImpDffConvData( XclImpDffConverter::XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) : XclImpSimpleDffConverter( rRoot, rDffStrm ), oox::ole::MSConvertOCXControls( rRoot.GetDocShell()->GetModel() ), - maStdFormName( CREATE_OUSTRING( "Standard" ) ), + maStdFormName( "Standard" ), mnOleImpFlags( 0 ) { const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get(); @@ -3343,7 +3343,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, if ( xFComp.is() ) { ScfPropertySet aPropSet( xFComp ); - aPropSet.SetStringProperty( CREATE_OUSTRING( "Name" ), rPicObj.GetObjName() ); + aPropSet.SetStringProperty( "Name", rPicObj.GetObjName() ); InsertControl( xFComp, aSz,&xShape,true); xSdrObj.reset( rPicObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) ); } @@ -3526,7 +3526,7 @@ sal_Bool XclImpDffConverter::InsertControl( const Reference< XFormComponent >& r Reference< XControlModel > xCtrlModel( rxFormComp, UNO_QUERY_THROW ); // create the control shape - Reference< XShape > xShape( ScfApiHelper::CreateInstance( GetDocShell(), CREATE_OUSTRING( "com.sun.star.drawing.ControlShape" ) ), UNO_QUERY_THROW ); + Reference< XShape > xShape( ScfApiHelper::CreateInstance( GetDocShell(), "com.sun.star.drawing.ControlShape" ), UNO_QUERY_THROW ); Reference< XControlShape > xCtrlShape( xShape, UNO_QUERY_THROW ); // insert the new control into the form @@ -3708,7 +3708,7 @@ void XclImpDffConverter::InitControlForm() } else if( SfxObjectShell* pDocShell = GetDocShell() ) { - rConvData.mxCtrlForm.set( ScfApiHelper::CreateInstance( pDocShell, CREATE_OUSTRING( "com.sun.star.form.component.Form" ) ), UNO_QUERY_THROW ); + rConvData.mxCtrlForm.set( ScfApiHelper::CreateInstance( pDocShell, "com.sun.star.form.component.Form" ), UNO_QUERY_THROW ); xFormsNC->insertByName( maStdFormName, Any( rConvData.mxCtrlForm ) ); } } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index b6ecf6d1e873..760cf4ad878b 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -127,7 +127,7 @@ XclImpPalette::ExportPalette() if ( xProps.is() ) { uno::Reference< container::XIndexAccess > xIndex( new PaletteIndex( aColors ) ); - xProps->setPropertyValue( CREATE_OUSTRING("ColorPalette"), uno::makeAny( xIndex ) ); + xProps->setPropertyValue( "ColorPalette", uno::makeAny( xIndex ) ); } } diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index 53f1136c04bd..c233f51aa169 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -466,10 +466,10 @@ OUString XclChartHelper::GetErrorBarValuesRole( sal_uInt8 nBarType ) { switch( nBarType ) { - case EXC_CHSERERR_XPLUS: return EXC_CHPROP_ROLE_ERRORBARS_POSX; - case EXC_CHSERERR_XMINUS: return EXC_CHPROP_ROLE_ERRORBARS_NEGX; - case EXC_CHSERERR_YPLUS: return EXC_CHPROP_ROLE_ERRORBARS_POSY; - case EXC_CHSERERR_YMINUS: return EXC_CHPROP_ROLE_ERRORBARS_NEGY; + case EXC_CHSERERR_XPLUS: return OUString( EXC_CHPROP_ROLE_ERRORBARS_POSX ); + case EXC_CHSERERR_XMINUS: return OUString( EXC_CHPROP_ROLE_ERRORBARS_NEGX ); + case EXC_CHSERERR_YPLUS: return OUString( EXC_CHPROP_ROLE_ERRORBARS_POSY ); + case EXC_CHSERERR_YMINUS: return OUString( EXC_CHPROP_ROLE_ERRORBARS_NEGY ); default: OSL_FAIL( "XclChartHelper::GetErrorBarValuesRole - unknown bar type" ); } return OUString(); @@ -1253,7 +1253,7 @@ namespace { using the specified interface function. Checks a boolean property first. */ #define EXC_FRAGMENT_GETTITLESHAPE( shape_supplier, supplier_func, property_name ) \ ScfPropertySet aPropSet( shape_supplier ); \ - if( shape_supplier.is() && aPropSet.GetBoolProperty( CREATE_OUSTRING( #property_name ) ) ) \ + if( shape_supplier.is() && aPropSet.GetBoolProperty( #property_name ) ) \ return shape_supplier->supplier_func(); \ return Reference< XShape >(); \ @@ -1322,13 +1322,13 @@ void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChar // create object tables Reference< XMultiServiceFactory > xFactory( mxChartDoc, UNO_QUERY ); mxLineDashTable.reset( new XclChObjectTable( - xFactory, SERVICE_DRAWING_DASHTABLE, CREATE_OUSTRING( "Excel line dash " ) ) ); + xFactory, SERVICE_DRAWING_DASHTABLE, "Excel line dash " ) ); mxGradientTable.reset( new XclChObjectTable( - xFactory, SERVICE_DRAWING_GRADIENTTABLE, CREATE_OUSTRING( "Excel gradient " ) ) ); + xFactory, SERVICE_DRAWING_GRADIENTTABLE, "Excel gradient " ) ); mxHatchTable.reset( new XclChObjectTable( - xFactory, SERVICE_DRAWING_HATCHTABLE, CREATE_OUSTRING( "Excel hatch " ) ) ); + xFactory, SERVICE_DRAWING_HATCHTABLE, "Excel hatch " ) ); mxBitmapTable.reset( new XclChObjectTable( - xFactory, SERVICE_DRAWING_BITMAPTABLE, CREATE_OUSTRING( "Excel bitmap " ) ) ); + xFactory, SERVICE_DRAWING_BITMAPTABLE, "Excel bitmap " ) ); } void XclChRootData::FinishConversion() diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx index ba76e58a61e3..a1e5bc70e832 100644 --- a/sc/source/filter/excel/xlescher.cxx +++ b/sc/source/filter/excel/xlescher.cxx @@ -334,7 +334,7 @@ bool XclControlHelper::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor, { rDescriptor.ListenerType = OUString::createFromAscii( spTbxListenerData[ eEventType ].mpcListenerType ); rDescriptor.EventMethod = OUString::createFromAscii( spTbxListenerData[ eEventType ].mpcEventMethod ); - rDescriptor.ScriptType = CREATE_OUSTRING( "Script" ); + rDescriptor.ScriptType = "Script"; rDescriptor.ScriptCode = XclTools::GetSbMacroUrl( rXclMacroName, pDocShell ); return true; } diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 66b5e33993b2..d5c9d7147aba 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -151,7 +151,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, try { Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_SET_THROW ); - Reference< XFramesSupplier > xFramesSupp( xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY_THROW ); + Reference< XFramesSupplier > xFramesSupp( xFactory->createInstance( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW ); Reference< XFrame > xFrame( xFramesSupp->getActiveFrame(), UNO_SET_THROW ); Reference< XDevice > xDevice( xFrame->getContainerWindow(), UNO_QUERY_THROW ); DeviceInfo aDeviceInfo = xDevice->getInfo(); @@ -182,7 +182,6 @@ XclRoot::XclRoot( XclRootData& rRootData ) : #endif // filter tracer - // do not use CREATE_OUSTRING for conditional expression mrData.mxTracer.reset( new XclTracer( GetDocUrl() ) ); } diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx index a80360314d95..c46a72b49b07 100644 --- a/sc/source/filter/excel/xltracer.cxx +++ b/sc/source/filter/excel/xltracer.cxx @@ -39,7 +39,7 @@ XclTracer::XclTracer( const String& rDocUrl ) , maFirstTimes(eTraceLength,true) { Sequence< PropertyValue > aConfigData( 1 ); - aConfigData[ 0 ].Name = CREATE_OUSTRING( "DocumentURL" ); + aConfigData[ 0 ].Name = "DocumentURL"; aConfigData[ 0 ].Value <<= OUString( rDocUrl ); } diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 14fbb1f98421..0fa1d8bf5784 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -52,116 +52,116 @@ class XclRoot; // Property names ============================================================= // service names -#define SERVICE_DRAWING_BITMAPTABLE CREATE_OUSTRING( "com.sun.star.drawing.BitmapTable" ) -#define SERVICE_DRAWING_DASHTABLE CREATE_OUSTRING( "com.sun.star.drawing.DashTable" ) -#define SERVICE_DRAWING_GRADIENTTABLE CREATE_OUSTRING( "com.sun.star.drawing.GradientTable" ) -#define SERVICE_DRAWING_HATCHTABLE CREATE_OUSTRING( "com.sun.star.drawing.HatchTable" ) - -#define SERVICE_CHART2_AXIS CREATE_OUSTRING( "com.sun.star.chart2.Axis" ) -#define SERVICE_CHART2_CARTESIANCOORDSYS2D CREATE_OUSTRING( "com.sun.star.chart2.CartesianCoordinateSystem2d" ) -#define SERVICE_CHART2_CARTESIANCOORDSYS3D CREATE_OUSTRING( "com.sun.star.chart2.CartesianCoordinateSystem3d" ) -#define SERVICE_CHART2_DATAPROVIDER CREATE_OUSTRING( "com.sun.star.chart2.data.DataProvider" ) -#define SERVICE_CHART2_DATASERIES CREATE_OUSTRING( "com.sun.star.chart2.DataSeries" ) -#define SERVICE_CHART2_DIAGRAM CREATE_OUSTRING( "com.sun.star.chart2.Diagram" ) -#define SERVICE_CHART2_ERRORBAR CREATE_OUSTRING( "com.sun.star.chart2.ErrorBar" ) -#define SERVICE_CHART2_EXPREGCURVE CREATE_OUSTRING( "com.sun.star.chart2.ExponentialRegressionCurve" ) -#define SERVICE_CHART2_FORMATTEDSTRING CREATE_OUSTRING( "com.sun.star.chart2.FormattedString" ) -#define SERVICE_CHART2_LABELEDDATASEQ CREATE_OUSTRING( "com.sun.star.chart2.data.LabeledDataSequence" ) -#define SERVICE_CHART2_LEGEND CREATE_OUSTRING( "com.sun.star.chart2.Legend" ) -#define SERVICE_CHART2_LINEARREGCURVE CREATE_OUSTRING( "com.sun.star.chart2.LinearRegressionCurve" ) -#define SERVICE_CHART2_LINEARSCALING CREATE_OUSTRING( "com.sun.star.chart2.LinearScaling" ) -#define SERVICE_CHART2_LOGREGCURVE CREATE_OUSTRING( "com.sun.star.chart2.LogarithmicRegressionCurve" ) -#define SERVICE_CHART2_LOGSCALING CREATE_OUSTRING( "com.sun.star.chart2.LogarithmicScaling" ) -#define SERVICE_CHART2_POLARCOORDSYS2D CREATE_OUSTRING( "com.sun.star.chart2.PolarCoordinateSystem2d" ) -#define SERVICE_CHART2_POLARCOORDSYS3D CREATE_OUSTRING( "com.sun.star.chart2.PolarCoordinateSystem3d" ) -#define SERVICE_CHART2_POTREGCURVE CREATE_OUSTRING( "com.sun.star.chart2.PotentialRegressionCurve" ) -#define SERVICE_CHART2_TITLE CREATE_OUSTRING( "com.sun.star.chart2.Title" ) +#define SERVICE_DRAWING_BITMAPTABLE "com.sun.star.drawing.BitmapTable" +#define SERVICE_DRAWING_DASHTABLE "com.sun.star.drawing.DashTable" +#define SERVICE_DRAWING_GRADIENTTABLE "com.sun.star.drawing.GradientTable" +#define SERVICE_DRAWING_HATCHTABLE "com.sun.star.drawing.HatchTable" + +#define SERVICE_CHART2_AXIS "com.sun.star.chart2.Axis" +#define SERVICE_CHART2_CARTESIANCOORDSYS2D "com.sun.star.chart2.CartesianCoordinateSystem2d" +#define SERVICE_CHART2_CARTESIANCOORDSYS3D "com.sun.star.chart2.CartesianCoordinateSystem3d" +#define SERVICE_CHART2_DATAPROVIDER "com.sun.star.chart2.data.DataProvider" +#define SERVICE_CHART2_DATASERIES "com.sun.star.chart2.DataSeries" +#define SERVICE_CHART2_DIAGRAM "com.sun.star.chart2.Diagram" +#define SERVICE_CHART2_ERRORBAR "com.sun.star.chart2.ErrorBar" +#define SERVICE_CHART2_EXPREGCURVE "com.sun.star.chart2.ExponentialRegressionCurve" +#define SERVICE_CHART2_FORMATTEDSTRING "com.sun.star.chart2.FormattedString" +#define SERVICE_CHART2_LABELEDDATASEQ "com.sun.star.chart2.data.LabeledDataSequence" +#define SERVICE_CHART2_LEGEND "com.sun.star.chart2.Legend" +#define SERVICE_CHART2_LINEARREGCURVE "com.sun.star.chart2.LinearRegressionCurve" +#define SERVICE_CHART2_LINEARSCALING "com.sun.star.chart2.LinearScaling" +#define SERVICE_CHART2_LOGREGCURVE "com.sun.star.chart2.LogarithmicRegressionCurve" +#define SERVICE_CHART2_LOGSCALING "com.sun.star.chart2.LogarithmicScaling" +#define SERVICE_CHART2_POLARCOORDSYS2D "com.sun.star.chart2.PolarCoordinateSystem2d" +#define SERVICE_CHART2_POLARCOORDSYS3D "com.sun.star.chart2.PolarCoordinateSystem3d" +#define SERVICE_CHART2_POTREGCURVE "com.sun.star.chart2.PotentialRegressionCurve" +#define SERVICE_CHART2_TITLE "com.sun.star.chart2.Title" // property names -#define EXC_CHPROP_ADDITIONALSHAPES CREATE_OUSTRING( "AdditionalShapes" ) -#define EXC_CHPROP_ANCHORPOSITION CREATE_OUSTRING( "AnchorPosition" ) -#define EXC_CHPROP_ARRANGEORDER CREATE_OUSTRING( "ArrangeOrder" ) -#define EXC_CHPROP_ATTAXISINDEX CREATE_OUSTRING( "AttachedAxisIndex" ) -#define EXC_CHPROP_ATTRIBDATAPOINTS CREATE_OUSTRING( "AttributedDataPoints" ) -#define EXC_CHPROP_BLACKDAY CREATE_OUSTRING( "BlackDay" ) -#define EXC_CHPROP_COLOR CREATE_OUSTRING( "Color" ) -#define EXC_CHPROP_CONNECTBARS CREATE_OUSTRING( "ConnectBars" ) -#define EXC_CHPROP_CROSSOVERPOSITION CREATE_OUSTRING( "CrossoverPosition" ) -#define EXC_CHPROP_CROSSOVERVALUE CREATE_OUSTRING( "CrossoverValue" ) -#define EXC_CHPROP_CURVESTYLE CREATE_OUSTRING( "CurveStyle" ) -#define EXC_CHPROP_D3DSCENEAMBIENTCOLOR CREATE_OUSTRING( "D3DSceneAmbientColor" ) -#define EXC_CHPROP_D3DSCENELIGHTON1 CREATE_OUSTRING( "D3DSceneLightOn1" ) -#define EXC_CHPROP_D3DSCENELIGHTCOLOR2 CREATE_OUSTRING( "D3DSceneLightColor2" ) -#define EXC_CHPROP_D3DSCENELIGHTDIR2 CREATE_OUSTRING( "D3DSceneLightDirection2" ) -#define EXC_CHPROP_D3DSCENELIGHTON2 CREATE_OUSTRING( "D3DSceneLightOn2" ) -#define EXC_CHPROP_D3DSCENEPERSPECTIVE CREATE_OUSTRING( "D3DScenePerspective" ) -#define EXC_CHPROP_D3DSCENESHADEMODE CREATE_OUSTRING( "D3DSceneShadeMode" ) -#define EXC_CHPROP_DISPLAYLABELS CREATE_OUSTRING( "DisplayLabels" ) -#define EXC_CHPROP_ERRORBARSTYLE CREATE_OUSTRING( "ErrorBarStyle" ) -#define EXC_CHPROP_ERRORBARX CREATE_OUSTRING( "ErrorBarX" ) -#define EXC_CHPROP_ERRORBARY CREATE_OUSTRING( "ErrorBarY" ) -#define EXC_CHPROP_EXPANSION CREATE_OUSTRING( "Expansion" ) -#define EXC_CHPROP_EXPTIMEINCREMENT CREATE_OUSTRING( "ExplicitTimeIncrement" ) -#define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" ) -#define EXC_CHPROP_GEOMETRY3D CREATE_OUSTRING( "Geometry3D" ) -#define EXC_CHPROP_INCLUDEHIDDENCELLS CREATE_OUSTRING( "IncludeHiddenCells" ) -#define EXC_CHPROP_JAPANESE CREATE_OUSTRING( "Japanese" ) -#define EXC_CHPROP_LABEL CREATE_OUSTRING( "Label" ) -#define EXC_CHPROP_LABELPLACEMENT CREATE_OUSTRING( "LabelPlacement" ) -#define EXC_CHPROP_LABELPOSITION CREATE_OUSTRING( "LabelPosition" ) -#define EXC_CHPROP_LABELSEPARATOR CREATE_OUSTRING( "LabelSeparator" ) -#define EXC_CHPROP_MAJORTICKS CREATE_OUSTRING( "MajorTickmarks" ) -#define EXC_CHPROP_MARKPOSITION CREATE_OUSTRING( "MarkPosition" ) -#define EXC_CHPROP_MINORTICKS CREATE_OUSTRING( "MinorTickmarks" ) -#define EXC_CHPROP_MISSINGVALUETREATMENT CREATE_OUSTRING( "MissingValueTreatment" ) -#define EXC_CHPROP_NEGATIVEERROR CREATE_OUSTRING( "NegativeError" ) -#define EXC_CHPROP_NUMBERFORMAT CREATE_OUSTRING( "NumberFormat" ) -#define EXC_CHPROP_OFFSET CREATE_OUSTRING( "Offset" ) -#define EXC_CHPROP_OVERLAPSEQ CREATE_OUSTRING( "OverlapSequence" ) -#define EXC_CHPROP_PERCENTAGENUMFMT CREATE_OUSTRING( "PercentageNumberFormat" ) -#define EXC_CHPROP_PERCENTDIAGONAL CREATE_OUSTRING( "PercentDiagonal" ) -#define EXC_CHPROP_PERSPECTIVE CREATE_OUSTRING( "Perspective" ) -#define EXC_CHPROP_POSITIVEERROR CREATE_OUSTRING( "PositiveError" ) -#define EXC_CHPROP_RELATIVEPOSITION CREATE_OUSTRING( "RelativePosition" ) -#define EXC_CHPROP_RELATIVESIZE CREATE_OUSTRING( "RelativeSize" ) -#define EXC_CHPROP_RIGHTANGLEDAXES CREATE_OUSTRING( "RightAngledAxes" ) -#define EXC_CHPROP_ROLE CREATE_OUSTRING( "Role" ) -#define EXC_CHPROP_ROTATIONHORIZONTAL CREATE_OUSTRING( "RotationHorizontal" ) -#define EXC_CHPROP_ROTATIONVERTICAL CREATE_OUSTRING( "RotationVertical" ) -#define EXC_CHPROP_SHOW CREATE_OUSTRING( "Show" ) -#define EXC_CHPROP_SHOWCORRELATION CREATE_OUSTRING( "ShowCorrelationCoefficient" ) -#define EXC_CHPROP_SHOWEQUATION CREATE_OUSTRING( "ShowEquation" ) -#define EXC_CHPROP_SHOWFIRST CREATE_OUSTRING( "ShowFirst" ) -#define EXC_CHPROP_SHOWHIGHLOW CREATE_OUSTRING( "ShowHighLow" ) -#define EXC_CHPROP_SHOWNEGATIVEERROR CREATE_OUSTRING( "ShowNegativeError" ) -#define EXC_CHPROP_SHOWPOSITIVEERROR CREATE_OUSTRING( "ShowPositiveError" ) -#define EXC_CHPROP_STACKCHARACTERS CREATE_OUSTRING( "StackCharacters" ) -#define EXC_CHPROP_STACKINGDIR CREATE_OUSTRING( "StackingDirection" ) -#define EXC_CHPROP_STARTINGANGLE CREATE_OUSTRING( "StartingAngle" ) -#define EXC_CHPROP_SWAPXANDYAXIS CREATE_OUSTRING( "SwapXAndYAxis" ) -#define EXC_CHPROP_SYMBOL CREATE_OUSTRING( "Symbol" ) -#define EXC_CHPROP_TEXTBREAK CREATE_OUSTRING( "TextBreak" ) -#define EXC_CHPROP_TEXTOVERLAP CREATE_OUSTRING( "TextOverlap" ) -#define EXC_CHPROP_TEXTROTATION CREATE_OUSTRING( "TextRotation" ) -#define EXC_CHPROP_USERINGS CREATE_OUSTRING( "UseRings" ) -#define EXC_CHPROP_VARYCOLORSBY CREATE_OUSTRING( "VaryColorsByPoint" ) -#define EXC_CHPROP_WEIGHT CREATE_OUSTRING( "Weight" ) -#define EXC_CHPROP_WHITEDAY CREATE_OUSTRING( "WhiteDay" ) +#define EXC_CHPROP_ADDITIONALSHAPES "AdditionalShapes" +#define EXC_CHPROP_ANCHORPOSITION "AnchorPosition" +#define EXC_CHPROP_ARRANGEORDER "ArrangeOrder" +#define EXC_CHPROP_ATTAXISINDEX "AttachedAxisIndex" +#define EXC_CHPROP_ATTRIBDATAPOINTS "AttributedDataPoints" +#define EXC_CHPROP_BLACKDAY "BlackDay" +#define EXC_CHPROP_COLOR "Color" +#define EXC_CHPROP_CONNECTBARS "ConnectBars" +#define EXC_CHPROP_CROSSOVERPOSITION "CrossoverPosition" +#define EXC_CHPROP_CROSSOVERVALUE "CrossoverValue" +#define EXC_CHPROP_CURVESTYLE "CurveStyle" +#define EXC_CHPROP_D3DSCENEAMBIENTCOLOR "D3DSceneAmbientColor" +#define EXC_CHPROP_D3DSCENELIGHTON1 "D3DSceneLightOn1" +#define EXC_CHPROP_D3DSCENELIGHTCOLOR2 "D3DSceneLightColor2" +#define EXC_CHPROP_D3DSCENELIGHTDIR2 "D3DSceneLightDirection2" +#define EXC_CHPROP_D3DSCENELIGHTON2 "D3DSceneLightOn2" +#define EXC_CHPROP_D3DSCENEPERSPECTIVE "D3DScenePerspective" +#define EXC_CHPROP_D3DSCENESHADEMODE "D3DSceneShadeMode" +#define EXC_CHPROP_DISPLAYLABELS "DisplayLabels" +#define EXC_CHPROP_ERRORBARSTYLE "ErrorBarStyle" +#define EXC_CHPROP_ERRORBARX "ErrorBarX" +#define EXC_CHPROP_ERRORBARY "ErrorBarY" +#define EXC_CHPROP_EXPANSION "Expansion" +#define EXC_CHPROP_EXPTIMEINCREMENT "ExplicitTimeIncrement" +#define EXC_CHPROP_GAPWIDTHSEQ "GapwidthSequence" +#define EXC_CHPROP_GEOMETRY3D "Geometry3D" +#define EXC_CHPROP_INCLUDEHIDDENCELLS "IncludeHiddenCells" +#define EXC_CHPROP_JAPANESE "Japanese" +#define EXC_CHPROP_LABEL "Label" +#define EXC_CHPROP_LABELPLACEMENT "LabelPlacement" +#define EXC_CHPROP_LABELPOSITION "LabelPosition" +#define EXC_CHPROP_LABELSEPARATOR "LabelSeparator" +#define EXC_CHPROP_MAJORTICKS "MajorTickmarks" +#define EXC_CHPROP_MARKPOSITION "MarkPosition" +#define EXC_CHPROP_MINORTICKS "MinorTickmarks" +#define EXC_CHPROP_MISSINGVALUETREATMENT "MissingValueTreatment" +#define EXC_CHPROP_NEGATIVEERROR "NegativeError" +#define EXC_CHPROP_NUMBERFORMAT "NumberFormat" +#define EXC_CHPROP_OFFSET "Offset" +#define EXC_CHPROP_OVERLAPSEQ "OverlapSequence" +#define EXC_CHPROP_PERCENTAGENUMFMT "PercentageNumberFormat" +#define EXC_CHPROP_PERCENTDIAGONAL "PercentDiagonal" +#define EXC_CHPROP_PERSPECTIVE "Perspective" +#define EXC_CHPROP_POSITIVEERROR "PositiveError" +#define EXC_CHPROP_RELATIVEPOSITION "RelativePosition" +#define EXC_CHPROP_RELATIVESIZE "RelativeSize" +#define EXC_CHPROP_RIGHTANGLEDAXES "RightAngledAxes" +#define EXC_CHPROP_ROLE "Role" +#define EXC_CHPROP_ROTATIONHORIZONTAL "RotationHorizontal" +#define EXC_CHPROP_ROTATIONVERTICAL "RotationVertical" +#define EXC_CHPROP_SHOW "Show" +#define EXC_CHPROP_SHOWCORRELATION "ShowCorrelationCoefficient" +#define EXC_CHPROP_SHOWEQUATION "ShowEquation" +#define EXC_CHPROP_SHOWFIRST "ShowFirst" +#define EXC_CHPROP_SHOWHIGHLOW "ShowHighLow" +#define EXC_CHPROP_SHOWNEGATIVEERROR "ShowNegativeError" +#define EXC_CHPROP_SHOWPOSITIVEERROR "ShowPositiveError" +#define EXC_CHPROP_STACKCHARACTERS "StackCharacters" +#define EXC_CHPROP_STACKINGDIR "StackingDirection" +#define EXC_CHPROP_STARTINGANGLE "StartingAngle" +#define EXC_CHPROP_SWAPXANDYAXIS "SwapXAndYAxis" +#define EXC_CHPROP_SYMBOL "Symbol" +#define EXC_CHPROP_TEXTBREAK "TextBreak" +#define EXC_CHPROP_TEXTOVERLAP "TextOverlap" +#define EXC_CHPROP_TEXTROTATION "TextRotation" +#define EXC_CHPROP_USERINGS "UseRings" +#define EXC_CHPROP_VARYCOLORSBY "VaryColorsByPoint" +#define EXC_CHPROP_WEIGHT "Weight" +#define EXC_CHPROP_WHITEDAY "WhiteDay" // data series roles -#define EXC_CHPROP_ROLE_CATEG CREATE_OUSTRING( "categories" ) -#define EXC_CHPROP_ROLE_ERRORBARS_NEGX CREATE_OUSTRING( "error-bars-x-negative" ) -#define EXC_CHPROP_ROLE_ERRORBARS_NEGY CREATE_OUSTRING( "error-bars-y-negative" ) -#define EXC_CHPROP_ROLE_ERRORBARS_POSX CREATE_OUSTRING( "error-bars-x-positive" ) -#define EXC_CHPROP_ROLE_ERRORBARS_POSY CREATE_OUSTRING( "error-bars-y-positive" ) -#define EXC_CHPROP_ROLE_LABEL CREATE_OUSTRING( "label" ) -#define EXC_CHPROP_ROLE_XVALUES CREATE_OUSTRING( "values-x" ) -#define EXC_CHPROP_ROLE_YVALUES CREATE_OUSTRING( "values-y" ) -#define EXC_CHPROP_ROLE_OPENVALUES CREATE_OUSTRING( "values-first" ) -#define EXC_CHPROP_ROLE_CLOSEVALUES CREATE_OUSTRING( "values-last" ) -#define EXC_CHPROP_ROLE_LOWVALUES CREATE_OUSTRING( "values-min" ) -#define EXC_CHPROP_ROLE_HIGHVALUES CREATE_OUSTRING( "values-max" ) -#define EXC_CHPROP_ROLE_SIZEVALUES CREATE_OUSTRING( "values-size" ) +#define EXC_CHPROP_ROLE_CATEG "categories" +#define EXC_CHPROP_ROLE_ERRORBARS_NEGX "error-bars-x-negative" +#define EXC_CHPROP_ROLE_ERRORBARS_NEGY "error-bars-y-negative" +#define EXC_CHPROP_ROLE_ERRORBARS_POSX "error-bars-x-positive" +#define EXC_CHPROP_ROLE_ERRORBARS_POSY "error-bars-y-positive" +#define EXC_CHPROP_ROLE_LABEL "label" +#define EXC_CHPROP_ROLE_XVALUES "values-x" +#define EXC_CHPROP_ROLE_YVALUES "values-y" +#define EXC_CHPROP_ROLE_OPENVALUES "values-first" +#define EXC_CHPROP_ROLE_CLOSEVALUES "values-last" +#define EXC_CHPROP_ROLE_LOWVALUES "values-min" +#define EXC_CHPROP_ROLE_HIGHVALUES "values-max" +#define EXC_CHPROP_ROLE_SIZEVALUES "values-size" // Constants and Enumerations ================================================= diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 254b0d6d7beb..75fc18aa62fc 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -643,86 +643,86 @@ void CondFormatRule::finalizeImport() break; case XML_duplicateValues: eOperator = CondFormatBuffer::convertToApiOperator( XML_duplicateValues ); - aReplaceFormula = CREATE_OUSTRING( " " ); + aReplaceFormula = " "; break; case XML_expression: eOperator = ::com::sun::star::sheet::ConditionOperator2::FORMULA; break; case XML_containsText: OSL_ENSURE( maModel.mnOperator == XML_containsText, "CondFormatRule::finalizeImport - unexpected operator" ); - aReplaceFormula = CREATE_OUSTRING( "NOT(ISERROR(SEARCH(#T,#B)))" ); + aReplaceFormula = "NOT(ISERROR(SEARCH(#T,#B)))"; break; case XML_notContainsText: // note: type XML_notContainsText vs. operator XML_notContains OSL_ENSURE( maModel.mnOperator == XML_notContains, "CondFormatRule::finalizeImport - unexpected operator" ); - aReplaceFormula = CREATE_OUSTRING( "ISERROR(SEARCH(#T,#B))" ); + aReplaceFormula = "ISERROR(SEARCH(#T,#B))"; break; case XML_beginsWith: OSL_ENSURE( maModel.mnOperator == XML_beginsWith, "CondFormatRule::finalizeImport - unexpected operator" ); - aReplaceFormula = CREATE_OUSTRING( "LEFT(#B,#L)=#T" ); + aReplaceFormula = "LEFT(#B,#L)=#T"; break; case XML_endsWith: OSL_ENSURE( maModel.mnOperator == XML_endsWith, "CondFormatRule::finalizeImport - unexpected operator" ); - aReplaceFormula = CREATE_OUSTRING( "RIGHT(#B,#L)=#T" ); + aReplaceFormula = "RIGHT(#B,#L)=#T"; break; case XML_timePeriod: switch( maModel.mnTimePeriod ) { case XML_yesterday: - aReplaceFormula = CREATE_OUSTRING( "FLOOR(#B,1)=TODAY()-1" ); + aReplaceFormula = "FLOOR(#B,1)=TODAY()-1"; break; case XML_today: - aReplaceFormula = CREATE_OUSTRING( "FLOOR(#B,1)=TODAY()" ); + aReplaceFormula = "FLOOR(#B,1)=TODAY()"; break; case XML_tomorrow: - aReplaceFormula = CREATE_OUSTRING( "FLOOR(#B,1)=TODAY()+1" ); + aReplaceFormula = "FLOOR(#B,1)=TODAY()+1"; break; case XML_last7Days: - aReplaceFormula = CREATE_OUSTRING( "AND(TODAY()-7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY())" ); + aReplaceFormula = "AND(TODAY()-7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY())"; break; case XML_lastWeek: - aReplaceFormula = CREATE_OUSTRING( "AND(TODAY()-WEEKDAY(TODAY())-7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY()))" ); + aReplaceFormula = "AND(TODAY()-WEEKDAY(TODAY())-7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY()))"; break; case XML_thisWeek: - aReplaceFormula = CREATE_OUSTRING( "AND(TODAY()-WEEKDAY(TODAY())<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY())+7)" ); + aReplaceFormula = "AND(TODAY()-WEEKDAY(TODAY())<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY())+7)"; break; case XML_nextWeek: - aReplaceFormula = CREATE_OUSTRING( "AND(TODAY()-WEEKDAY(TODAY())+7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY())+14)" ); + aReplaceFormula = "AND(TODAY()-WEEKDAY(TODAY())+7<FLOOR(#B,1),FLOOR(#B,1)<=TODAY()-WEEKDAY(TODAY())+14)"; break; case XML_lastMonth: - aReplaceFormula = CREATE_OUSTRING( "OR(AND(MONTH(#B)=MONTH(TODAY())-1,YEAR(#B)=YEAR(TODAY())),AND(MONTH(#B)=12,MONTH(TODAY())=1,YEAR(#B)=YEAR(TODAY())-1))" ); + aReplaceFormula = "OR(AND(MONTH(#B)=MONTH(TODAY())-1,YEAR(#B)=YEAR(TODAY())),AND(MONTH(#B)=12,MONTH(TODAY())=1,YEAR(#B)=YEAR(TODAY())-1))"; break; case XML_thisMonth: - aReplaceFormula = CREATE_OUSTRING( "AND(MONTH(#B)=MONTH(TODAY()),YEAR(#B)=YEAR(TODAY()))" ); + aReplaceFormula = "AND(MONTH(#B)=MONTH(TODAY()),YEAR(#B)=YEAR(TODAY()))"; break; case XML_nextMonth: - aReplaceFormula = CREATE_OUSTRING( "OR(AND(MONTH(#B)=MONTH(TODAY())+1,YEAR(#B)=YEAR(TODAY())),AND(MONTH(#B)=1,MONTH(TODAY())=12,YEAR(#B)=YEAR(TODAY())+1))" ); + aReplaceFormula = "OR(AND(MONTH(#B)=MONTH(TODAY())+1,YEAR(#B)=YEAR(TODAY())),AND(MONTH(#B)=1,MONTH(TODAY())=12,YEAR(#B)=YEAR(TODAY())+1))"; break; default: OSL_FAIL( "CondFormatRule::finalizeImport - unknown time period type" ); } break; case XML_containsBlanks: - aReplaceFormula = CREATE_OUSTRING( "LEN(TRIM(#B))=0" ); + aReplaceFormula = "LEN(TRIM(#B))=0"; break; case XML_notContainsBlanks: - aReplaceFormula = CREATE_OUSTRING( "LEN(TRIM(#B))>0" ); + aReplaceFormula = "LEN(TRIM(#B))>0"; break; case XML_containsErrors: - aReplaceFormula = CREATE_OUSTRING( "ISERROR(#B)" ); + aReplaceFormula = "ISERROR(#B)"; break; case XML_notContainsErrors: - aReplaceFormula = CREATE_OUSTRING( "NOT(ISERROR(#B))" ); + aReplaceFormula = "NOT(ISERROR(#B))"; break; case XML_top10: if( maModel.mbPercent ) - aReplaceFormula = CREATE_OUSTRING( "RANK(#B,#R,#M)/COUNT(#R)<=#K%" ); + aReplaceFormula = "RANK(#B,#R,#M)/COUNT(#R)<=#K%"; else - aReplaceFormula = CREATE_OUSTRING( "RANK(#B,#R,#M)<=#K" ); + aReplaceFormula = "RANK(#B,#R,#M)<=#K"; break; case XML_aboveAverage: if( maModel.mnStdDev == 0 ) - aReplaceFormula = CREATE_OUSTRING( "#B#CAVERAGE(#R)" ); + aReplaceFormula = "#B#CAVERAGE(#R)"; break; case XML_colorScale: break; @@ -767,8 +767,8 @@ void CondFormatRule::finalizeImport() case 'C': // average comparison operator if( aComp.isEmpty() ) aComp = maModel.mbAboveAverage ? - (maModel.mbEqualAverage ? CREATE_OUSTRING( ">=" ) : CREATE_OUSTRING( ">" )) : - (maModel.mbEqualAverage ? CREATE_OUSTRING( "<=" ) : CREATE_OUSTRING( "<" )); + (maModel.mbEqualAverage ? OUString( ">=" ) : OUString( ">" ) ) : + (maModel.mbEqualAverage ? OUString( "<=" ) : OUString( "<" ) ); aReplaceFormula = aReplaceFormula.replaceAt( nStrPos, 2, aComp ); break; default: diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx index 73e6b47eb7c1..afc0ca1ddad4 100644 --- a/sc/source/filter/oox/drawingfragment.cxx +++ b/sc/source/filter/oox/drawingfragment.cxx @@ -86,11 +86,11 @@ void ShapeMacroAttacher::attachMacro( const OUString& rMacroUrl ) Reference< XEventsSupplier > xSupplier( mxShape, UNO_QUERY_THROW ); Reference< XNameReplace > xEvents( xSupplier->getEvents(), UNO_SET_THROW ); Sequence< PropertyValue > aEventProps( 2 ); - aEventProps[ 0 ].Name = CREATE_OUSTRING( "EventType" ); - aEventProps[ 0 ].Value <<= CREATE_OUSTRING( "Script" ); - aEventProps[ 1 ].Name = CREATE_OUSTRING( "Script" ); + aEventProps[ 0 ].Name = "EventType"; + aEventProps[ 0 ].Value <<= OUString( "Script" ); + aEventProps[ 1 ].Name = "Script"; aEventProps[ 1 ].Value <<= rMacroUrl; - xEvents->replaceByName( CREATE_OUSTRING( "OnClick" ), Any( aEventProps ) ); + xEvents->replaceByName( "OnClick", Any( aEventProps ) ); } catch( Exception& ) { @@ -340,7 +340,7 @@ VmlControlMacroAttacher::VmlControlMacroAttacher( const OUString& rMacroName, void VmlControlMacroAttacher::attachMacro( const OUString& rMacroUrl ) { ScriptEventDescriptor aEventDesc; - aEventDesc.ScriptType = CREATE_OUSTRING( "Script" ); + aEventDesc.ScriptType = "Script"; aEventDesc.ScriptCode = rMacroUrl; // editable drop downs are treated like edit boxes @@ -352,28 +352,28 @@ void VmlControlMacroAttacher::attachMacro( const OUString& rMacroUrl ) case XML_Button: case XML_Checkbox: case XML_Radio: - aEventDesc.ListenerType = CREATE_OUSTRING( "XActionListener" ); - aEventDesc.EventMethod = CREATE_OUSTRING( "actionPerformed" ); + aEventDesc.ListenerType = "XActionListener"; + aEventDesc.EventMethod = "actionPerformed"; break; case XML_Label: case XML_GBox: case XML_Dialog: - aEventDesc.ListenerType = CREATE_OUSTRING( "XMouseListener" ); - aEventDesc.EventMethod = CREATE_OUSTRING( "mouseReleased" ); + aEventDesc.ListenerType = "XMouseListener"; + aEventDesc.EventMethod = "mouseReleased"; break; case XML_Edit: - aEventDesc.ListenerType = CREATE_OUSTRING( "XTextListener" ); - aEventDesc.EventMethod = CREATE_OUSTRING( "textChanged" ); + aEventDesc.ListenerType = "XTextListener"; + aEventDesc.EventMethod = "textChanged"; break; case XML_Spin: case XML_Scroll: - aEventDesc.ListenerType = CREATE_OUSTRING( "XAdjustmentListener" ); - aEventDesc.EventMethod = CREATE_OUSTRING( "adjustmentValueChanged" ); + aEventDesc.ListenerType = "XAdjustmentListener"; + aEventDesc.EventMethod = "adjustmentValueChanged"; break; case XML_List: case XML_Drop: - aEventDesc.ListenerType = CREATE_OUSTRING( "XChangeListener" ); - aEventDesc.EventMethod = CREATE_OUSTRING( "changed" ); + aEventDesc.ListenerType = "XChangeListener"; + aEventDesc.EventMethod = "changed"; break; default: OSL_ENSURE( false, "VmlControlMacroAttacher::attachMacro - unexpected object type" ); @@ -398,8 +398,8 @@ VmlDrawing::VmlDrawing( const WorksheetHelper& rHelper ) : maControlConv( rHelper.getBaseFilter().getModel(), rHelper.getBaseFilter().getGraphicHelper() ) { // default font for legacy listboxes and dropdowns: Tahoma, 8pt - maListBoxFont.moName = CREATE_OUSTRING( "Tahoma" ); - maListBoxFont.moColor = CREATE_OUSTRING( "auto" ); + maListBoxFont.moName = "Tahoma"; + maListBoxFont.moColor = "auto"; maListBoxFont.monSize = 160; } @@ -420,19 +420,19 @@ OUString VmlDrawing::getShapeBaseName( const ::oox::vml::ShapeBase& rShape ) con { switch( pClientData->mnObjType ) { - case XML_Button: return CREATE_OUSTRING( "Button" ); - case XML_Checkbox: return CREATE_OUSTRING( "Check Box" ); - case XML_Dialog: return CREATE_OUSTRING( "Dialog Frame" ); - case XML_Drop: return CREATE_OUSTRING( "Drop Down" ); - case XML_Edit: return CREATE_OUSTRING( "Edit Box" ); - case XML_GBox: return CREATE_OUSTRING( "Group Box" ); - case XML_Label: return CREATE_OUSTRING( "Label" ); - case XML_List: return CREATE_OUSTRING( "List Box" ); - case XML_Note: return CREATE_OUSTRING( "Comment" ); - case XML_Pict: return (pClientData->mbDde || getOleObjectInfo( rShape.getShapeId() )) ? CREATE_OUSTRING( "Object" ) : CREATE_OUSTRING( "Picture" ); - case XML_Radio: return CREATE_OUSTRING( "Option Button" ); - case XML_Scroll: return CREATE_OUSTRING( "Scroll Bar" ); - case XML_Spin: return CREATE_OUSTRING( "Spinner" ); + case XML_Button: return OUString( "Button" ); + case XML_Checkbox: return OUString( "Check Box" ); + case XML_Dialog: return OUString( "Dialog Frame" ); + case XML_Drop: return OUString( "Drop Down" ); + case XML_Edit: return OUString( "Edit Box" ); + case XML_GBox: return OUString( "Group Box" ); + case XML_Label: return OUString( "Label" ); + case XML_List: return OUString( "List Box" ); + case XML_Note: return OUString( "Comment" ); + case XML_Pict: return (pClientData->mbDde || getOleObjectInfo( rShape.getShapeId() )) ? OUString( "Object" ) : OUString( "Picture" ); + case XML_Radio: return OUString( "Option Button" ); + case XML_Scroll: return OUString( "Scroll Bar" ); + case XML_Spin: return OUString( "Spinner" ); } } return ::oox::vml::Drawing::getShapeBaseName( rShape ); diff --git a/sc/source/filter/oox/excelchartconverter.cxx b/sc/source/filter/oox/excelchartconverter.cxx index a6303b0362ea..69b317227415 100644 --- a/sc/source/filter/oox/excelchartconverter.cxx +++ b/sc/source/filter/oox/excelchartconverter.cxx @@ -69,7 +69,7 @@ void ExcelChartConverter::createDataProvider( const Reference< XChartDocument >& { Reference< XDataReceiver > xDataRec( rxChartDoc, UNO_QUERY_THROW ); Reference< XDataProvider > xDataProv( getBaseFilter().getModelFactory()->createInstance( - CREATE_OUSTRING( "com.sun.star.chart2.data.DataProvider" ) ), UNO_QUERY_THROW ); + "com.sun.star.chart2.data.DataProvider" ), UNO_QUERY_THROW ); xDataRec->attachDataProvider( xDataProv ); } catch( Exception& ) diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx index 84f933135b99..8320780867ec 100644 --- a/sc/source/filter/oox/excelfilter.cxx +++ b/sc/source/filter/oox/excelfilter.cxx @@ -83,14 +83,14 @@ void ExcelFilterBase::unregisterWorkbookGlobals() OUString SAL_CALL ExcelFilter_getImplementationName() throw() { - return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelFilter" ); + return OUString( "com.sun.star.comp.oox.xls.ExcelFilter" ); } Sequence< OUString > SAL_CALL ExcelFilter_getSupportedServiceNames() throw() { Sequence< OUString > aSeq( 2 ); - aSeq[ 0 ] = CREATE_OUSTRING( "com.sun.star.document.ImportFilter" ); - aSeq[ 1 ] = CREATE_OUSTRING( "com.sun.star.document.ExportFilter" ); + aSeq[ 0 ] = "com.sun.star.document.ImportFilter"; + aSeq[ 1 ] = "com.sun.star.document.ExportFilter"; return aSeq; } @@ -178,7 +178,7 @@ sal_Bool SAL_CALL ExcelFilter::filter( const ::com::sun::star::uno::Sequence< :: if ( isExportFilter() ) { - Reference< XExporter > xExporter( getServiceFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.comp.oox.ExcelFilterExport" ) ), UNO_QUERY ); + Reference< XExporter > xExporter( getServiceFactory()->createInstance( "com.sun.star.comp.oox.ExcelFilterExport" ), UNO_QUERY ); if ( xExporter.is() ) { diff --git a/sc/source/filter/oox/excelvbaproject.cxx b/sc/source/filter/oox/excelvbaproject.cxx index ceb73ecf68f3..f91ae116b781 100644 --- a/sc/source/filter/oox/excelvbaproject.cxx +++ b/sc/source/filter/oox/excelvbaproject.cxx @@ -60,7 +60,7 @@ using ::rtl::OUStringBuffer; // ============================================================================ ExcelVbaProject::ExcelVbaProject( const Reference< XComponentContext >& rxContext, const Reference< XSpreadsheetDocument >& rxDocument ) : - ::oox::ole::VbaProject( rxContext, Reference< XModel >( rxDocument, UNO_QUERY ), CREATE_OUSTRING( "Calc" ) ), + ::oox::ole::VbaProject( rxContext, Reference< XModel >( rxDocument, UNO_QUERY ), "Calc" ), mxDocument( rxDocument ) { } @@ -111,7 +111,7 @@ void ExcelVbaProject::prepareImport() else { // TODO: once we have chart sheets we need a switch/case on sheet type ('SheetNNN' vs. 'ChartNNN') - aCodeNameInfos.push_back( SheetCodeNameInfo( aSheetProp, CREATE_OUSTRING( "Sheet" ) ) ); + aCodeNameInfos.push_back( SheetCodeNameInfo( aSheetProp, "Sheet" ) ); } } catch( Exception& ) diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index b80dbfaaf7b2..db0c40300532 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -894,12 +894,12 @@ void FunctionProviderImpl::initFunc( const FunctionData& rFuncData, sal_uInt8 nM { OSL_ENSURE( !xFuncInfo->maOoxFuncName.isEmpty(), "FunctionProviderImpl::initFunc - missing OOXML function name" ); OSL_ENSURE( !getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCALLODF ), "FunctionProviderImpl::initFunc - unexpected flag FUNCFLAG_MACROCALLODF" ); - xFuncInfo->maBiffMacroName = CREATE_OUSTRING( "_xlfn." ) + xFuncInfo->maOoxFuncName; + xFuncInfo->maBiffMacroName = "_xlfn." + xFuncInfo->maOoxFuncName; } else if( getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCALLODF ) ) { OSL_ENSURE( !xFuncInfo->maOdfFuncName.isEmpty(), "FunctionProviderImpl::initFunc - missing ODF function name" ); - xFuncInfo->maBiffMacroName = CREATE_OUSTRING( "_xlfnodf." ) + xFuncInfo->maOdfFuncName; + xFuncInfo->maBiffMacroName = "_xlfnodf." + xFuncInfo->maOdfFuncName; } xFuncInfo->meFuncLibType = FUNCFLAGS_TO_FUNCLIB( rFuncData.mnFlags ); @@ -1030,7 +1030,7 @@ OpCodeProviderImpl::OpCodeProviderImpl( const FunctionInfoVector& rFuncInfos, if( rxModelFactory.is() ) try { Reference< XFormulaOpCodeMapper > xMapper( rxModelFactory->createInstance( - CREATE_OUSTRING( "com.sun.star.sheet.FormulaOpCodeMapper" ) ), UNO_QUERY_THROW ); + "com.sun.star.sheet.FormulaOpCodeMapper" ), UNO_QUERY_THROW ); // op-codes provided as attributes OPCODE_UNKNOWN = xMapper->getOpCodeUnknown(); @@ -1316,7 +1316,7 @@ ApiParserWrapper::ApiParserWrapper( { if( rxModelFactory.is() ) try { - mxParser.set( rxModelFactory->createInstance( CREATE_OUSTRING( "com.sun.star.sheet.FormulaParser" ) ), UNO_QUERY_THROW ); + mxParser.set( rxModelFactory->createInstance( "com.sun.star.sheet.FormulaParser" ), UNO_QUERY_THROW ); } catch( Exception& ) { @@ -1477,7 +1477,7 @@ OUString FormulaProcessorBase::generateApiString( const OUString& rString ) OUString aRetString = rString; sal_Int32 nQuotePos = aRetString.getLength(); while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 ) - aRetString = aRetString.replaceAt( nQuotePos, 1, CREATE_OUSTRING( "\"\"" ) ); + aRetString = aRetString.replaceAt( nQuotePos, 1, OUString( "\"\"" ) ); return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString ).append( sal_Unicode( '"' ) ).makeStringAndClear(); } diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 72bc935fb223..dc7162f50f41 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -1857,7 +1857,7 @@ sal_Int32 lclCreateFormat( const Reference< XNumberFormats >& rxNumFmts, catch( Exception& ) { // BIFF2-BIFF4 stores standard format explicitly in stream - static const OUString saGeneral = CREATE_OUSTRING( "general" ); + static const OUString saGeneral = "general"; if( rFmtCode.equalsIgnoreAsciiCase( saGeneral ) ) { nIndex = lclCreatePredefinedFormat( rxNumFmts, 0, rToLocale ); @@ -1891,7 +1891,7 @@ private: }; NumberFormatFinalizer::NumberFormatFinalizer( const WorkbookHelper& rHelper ) : - maEnUsLocale( CREATE_OUSTRING( "en" ), CREATE_OUSTRING( "US" ), OUString() ) + maEnUsLocale( "en", "US", OUString() ) { try { @@ -2046,7 +2046,7 @@ void NumberFormatsBuffer::insertBuiltinFormats() append( "' not supported (#i29949#)" ).getStr() ); // start with default table, if no table has been found if( aMIt == aMEnd ) - aMIt = aBuiltinMap.find( CREATE_OUSTRING( "*" ) ); + aMIt = aBuiltinMap.find( "*" ); OSL_ENSURE( aMIt != aMEnd, "NumberFormatsBuffer::insertBuiltinFormats - default map not found" ); // insert all tables into the vector for( ; aMIt != aMEnd; aMIt = aBuiltinMap.find( OUString::createFromAscii( aMIt->second->mpcParent ) ) ) diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx index 122120d4fd83..5a8a09a64266 100644 --- a/sc/source/filter/oox/pagesettings.cxx +++ b/sc/source/filter/oox/pagesettings.cxx @@ -335,7 +335,7 @@ void PageSettings::setFitToPagesMode( bool bFitToPages ) void PageSettings::finalizeImport() { - OUStringBuffer aStyleNameBuffer( CREATE_OUSTRING( "PageStyle_" ) ); + OUStringBuffer aStyleNameBuffer( "PageStyle_" ); Reference< XNamed > xSheetName( getSheet(), UNO_QUERY ); if( xSheetName.is() ) aStyleNameBuffer.append( xSheetName->getName() ); @@ -499,11 +499,11 @@ static const sal_Char* const sppcItalicNames[] = HeaderFooterParser::HeaderFooterParser( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper ), - maPageNumberService( CREATE_OUSTRING( "com.sun.star.text.TextField.PageNumber" ) ), - maPageCountService( CREATE_OUSTRING( "com.sun.star.text.TextField.PageCount" ) ), - maSheetNameService( CREATE_OUSTRING( "com.sun.star.text.TextField.SheetName" ) ), - maFileNameService( CREATE_OUSTRING( "com.sun.star.text.TextField.FileName" ) ), - maDateTimeService( CREATE_OUSTRING( "com.sun.star.text.TextField.DateTime" ) ), + maPageNumberService( "com.sun.star.text.TextField.PageNumber" ), + maPageCountService( "com.sun.star.text.TextField.PageCount" ), + maSheetNameService( "com.sun.star.text.TextField.SheetName" ), + maFileNameService( "com.sun.star.text.TextField.FileName" ), + maDateTimeService( "com.sun.star.text.TextField.DateTime" ), maBoldNames( sppcBoldNames, STATIC_ARRAY_END( sppcBoldNames ) ), maItalicNames( sppcItalicNames, STATIC_ARRAY_END( sppcItalicNames ) ), maPortions( static_cast< size_t >( HF_COUNT ) ), diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 650c2a18c15c..6a79caf1f1c6 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -1182,7 +1182,7 @@ void PivotCache::importPCDSheetSource( SequenceInputStream& rStrm, const Relatio { rStrm >> maSheetSrcModel.maDefName; if( nIsBuiltinName != 0 ) - maSheetSrcModel.maDefName = CREATE_OUSTRING( "_xlnm." ) + maSheetSrcModel.maDefName; + maSheetSrcModel.maDefName = "_xlnm." + maSheetSrcModel.maDefName; } // resolve URL of external document @@ -1397,7 +1397,7 @@ void PivotCache::prepareSourceDataSheet() if( getAddressConverter().checkCellRange( rRange, false, true ) ) { maColSpans.insert( ValueRange( rRange.StartColumn, rRange.EndColumn ) ); - OUString aSheetName = CREATE_OUSTRING( "DPCache_" ) + maSheetSrcModel.maSheet; + OUString aSheetName = "DPCache_" + maSheetSrcModel.maSheet; rRange.Sheet = getWorksheets().insertEmptySheet( aSheetName, false ); mbValidSource = mbDummySheet = rRange.Sheet >= 0; } diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx index 697ccc889cc3..c303dfedc058 100644 --- a/sc/source/filter/oox/querytablebuffer.cxx +++ b/sc/source/filter/oox/querytablebuffer.cxx @@ -123,7 +123,7 @@ void lclAppendWebQueryTableIndex( OUStringBuffer& rTables, sal_Int32 nTableIndex OUString lclBuildWebQueryTables( const WebPrModel::TablesVector& rTables ) { if( rTables.empty() ) - return CREATE_OUSTRING( "HTML_tables" ); + return OUString( "HTML_tables" ); OUStringBuffer aTables; for( WebPrModel::TablesVector::const_iterator aIt = rTables.begin(), aEnd = rTables.end(); aIt != aEnd; ++aIt ) @@ -276,12 +276,12 @@ void QueryTable::finalizeImport() { CellAddress aDestPos( aDestRange.Sheet, aDestRange.StartColumn, aDestRange.StartRow ); // find tables mode: entire document, all tables, or specific tables - OUString aTables = pWebPr->mbHtmlTables ? lclBuildWebQueryTables( pWebPr->maTables ) : CREATE_OUSTRING( "HTML_all" ); + OUString aTables = pWebPr->mbHtmlTables ? lclBuildWebQueryTables( pWebPr->maTables ) : "HTML_all"; if( !aTables.isEmpty() ) try { PropertySet aDocProps( getDocument() ); Reference< XAreaLinks > xAreaLinks( aDocProps.getAnyProperty( PROP_AreaLinks ), UNO_QUERY_THROW ); - OUString aFilterName = CREATE_OUSTRING( "calc_HTML_WebQuery" ); + OUString aFilterName = "calc_HTML_WebQuery"; OUString aFilterOptions; xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, aFilterOptions ); // set refresh interval (convert minutes to seconds) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index f9b9779d32ff..fbb63b076399 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -676,7 +676,7 @@ ApiScriptFontName::ApiScriptFontName() : ApiFontData::ApiFontData() : maDesc( - CREATE_OUSTRING( "Calibri" ), + "Calibri", 220, // height 11 points 0, OUString(), @@ -2849,9 +2849,9 @@ void CellStyleBuffer::finalizeImport() if (mxDefStyle) { Reference<XNameAccess> xNA(getStyleFamily(false), UNO_QUERY_THROW); - if (xNA->hasByName(CREATE_OUSTRING("Default"))) + if (xNA->hasByName("Default")) { - PropertySet aPropSet(xNA->getByName(CREATE_OUSTRING("Default"))); + PropertySet aPropSet(xNA->getByName("Default")); getStyles().writeStyleXfToPropertySet(aPropSet, mxDefStyle->getModel().mnXfId); } } @@ -3172,7 +3172,7 @@ OUString StylesBuffer::createDxfStyle( sal_Int32 nDxfId ) const { if( Dxf* pDxf = maDxfs.get( nDxfId ).get() ) { - rStyleName = OUStringBuffer( CREATE_OUSTRING( "ConditionalStyle_" ) ).append( nDxfId + 1 ).makeStringAndClear(); + rStyleName = OUStringBuffer( "ConditionalStyle_" ).append( nDxfId + 1 ).makeStringAndClear(); // create the style sheet (this may change rStyleName if such a style already exists) Reference< XStyle > xStyle = createStyleObject( rStyleName, false ); // write style formatting properties diff --git a/sc/source/filter/oox/themebuffer.cxx b/sc/source/filter/oox/themebuffer.cxx index 2d3682e4c1a5..d7b7edde6015 100644 --- a/sc/source/filter/oox/themebuffer.cxx +++ b/sc/source/filter/oox/themebuffer.cxx @@ -96,12 +96,12 @@ ThemeBuffer::ThemeBuffer( const WorkbookHelper& rHelper ) : { case FILTER_OOXML: //! TODO: locale dependent font name - mxDefFontModel->maName = CREATE_OUSTRING( "Cambria" ); + mxDefFontModel->maName = "Cambria"; mxDefFontModel->mfHeight = 11.0; break; case FILTER_BIFF: //! TODO: BIFF dependent font name - mxDefFontModel->maName = CREATE_OUSTRING( "Arial" ); + mxDefFontModel->maName = "Arial"; mxDefFontModel->mfHeight = 10.0; break; case FILTER_UNKNOWN: break; diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index 2d0431b21be1..5b0c52829d5f 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -124,13 +124,13 @@ UnitConverter::UnitConverter( const WorkbookHelper& rHelper ) : maCoeffs[ UNIT_SPACE ] = 100.0; // default 1 space = 1 mm // error code maps - addErrorCode( BIFF_ERR_NULL, CREATE_OUSTRING( "#NULL!" ) ); - addErrorCode( BIFF_ERR_DIV0, CREATE_OUSTRING( "#DIV/0!" ) ); - addErrorCode( BIFF_ERR_VALUE, CREATE_OUSTRING( "#VALUE!" ) ); - addErrorCode( BIFF_ERR_REF, CREATE_OUSTRING( "#REF!" ) ); - addErrorCode( BIFF_ERR_NAME, CREATE_OUSTRING( "#NAME?" ) ); - addErrorCode( BIFF_ERR_NUM, CREATE_OUSTRING( "#NUM!" ) ); - addErrorCode( BIFF_ERR_NA, CREATE_OUSTRING( "#NA" ) ); + addErrorCode( BIFF_ERR_NULL, "#NULL!" ); + addErrorCode( BIFF_ERR_DIV0, "#DIV/0!" ); + addErrorCode( BIFF_ERR_VALUE, "#VALUE!" ); + addErrorCode( BIFF_ERR_REF, "#REF!" ); + addErrorCode( BIFF_ERR_NAME, "#NAME?" ); + addErrorCode( BIFF_ERR_NUM, "#NUM!" ); + addErrorCode( BIFF_ERR_NA, "#NA" ); } void UnitConverter::finalizeImport() diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx index 3503011df51c..16353bbefcf4 100644 --- a/sc/source/filter/oox/viewsettings.cxx +++ b/sc/source/filter/oox/viewsettings.cxx @@ -652,7 +652,7 @@ void ViewSettings::finalizeImport() aWinExtent[ 1 ] = aPos.Y; aWinExtent[ 2 ] = aPos.X + aSize.Width; aWinExtent[ 3 ] = aPos.Y + aSize.Height; - getBaseFilter().getMediaDescriptor()[ CREATE_OUSTRING( "WinExtent" ) ] <<= aWinExtent; + getBaseFilter().getMediaDescriptor()[ "WinExtent" ] <<= aWinExtent; } } } diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index d0394987e561..b9dabe67289f 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -511,10 +511,10 @@ Reference< XStyle > WorkbookGlobals::createStyleObject( OUString& orStyleName, b void WorkbookGlobals::initialize( bool bWorkbookFile ) { - maCellStyles = CREATE_OUSTRING( "CellStyles" ); - maPageStyles = CREATE_OUSTRING( "PageStyles" ); - maCellStyleServ = CREATE_OUSTRING( "com.sun.star.style.CellStyle" ); - maPageStyleServ = CREATE_OUSTRING( "com.sun.star.style.PageStyle" ); + maCellStyles = "CellStyles"; + maPageStyles = "PageStyles"; + maCellStyleServ = "com.sun.star.style.CellStyle"; + maPageStyleServ = "com.sun.star.style.PageStyle"; mnCurrSheet = -1; mbWorkbook = bWorkbookFile; meTextEnc = osl_getThreadTextEncoding(); @@ -562,7 +562,7 @@ void WorkbookGlobals::initialize( bool bWorkbookFile ) xLockable->addActionLock(); //! TODO: localize progress bar text - mxProgressBar.reset( new SegmentProgressBar( mrBaseFilter.getStatusIndicator(), CREATE_OUSTRING( "Loading..." ) ) ); + mxProgressBar.reset( new SegmentProgressBar( mrBaseFilter.getStatusIndicator(), "Loading..." ) ); mxFmlaParser.reset( new FormulaParser( *this ) ); //prevent unnecessary broadcasts and "half way listeners" as @@ -572,7 +572,7 @@ void WorkbookGlobals::initialize( bool bWorkbookFile ) else if( mrBaseFilter.isExportFilter() ) { //! TODO: localize progress bar text - mxProgressBar.reset( new SegmentProgressBar( mrBaseFilter.getStatusIndicator(), CREATE_OUSTRING( "Saving..." ) ) ); + mxProgressBar.reset( new SegmentProgressBar( mrBaseFilter.getStatusIndicator(), "Saving..." ) ); } // filter specific switch( getFilterType() ) @@ -692,7 +692,7 @@ void WorkbookHelper::finalizeWorkbookImport() number 1). Otherwise hidden sheets (e.g. for scenarios) which have 'Default' page style will break automatic page numbering for following sheets. Automatic numbering is set by passing the value 0. */ - PropertySet aDefPageStyle( getStyleObject( CREATE_OUSTRING( "Default" ), true ) ); + PropertySet aDefPageStyle( getStyleObject( "Default", true ) ); aDefPageStyle.setProperty< sal_Int16 >( PROP_FirstPageNumber, 0 ); /* Import the VBA project (after finalizing workbook settings which diff --git a/sc/source/filter/oox/workbooksettings.cxx b/sc/source/filter/oox/workbooksettings.cxx index b98cb7d1ff10..e03858d62fe4 100644 --- a/sc/source/filter/oox/workbooksettings.cxx +++ b/sc/source/filter/oox/workbooksettings.cxx @@ -209,10 +209,10 @@ void WorkbookSettings::finalizeImport() // write protection if( maFileSharing.mbRecommendReadOnly || (maFileSharing.mnPasswordHash != 0) ) try { - getBaseFilter().getMediaDescriptor()[ CREATE_OUSTRING( "ReadOnly" ) ] <<= true; + getBaseFilter().getMediaDescriptor()[ "ReadOnly" ] <<= true; Reference< XPropertySet > xDocumentSettings( getBaseFilter().getModelFactory()->createInstance( - CREATE_OUSTRING( "com.sun.star.document.Settings" ) ), UNO_QUERY_THROW ); + "com.sun.star.document.Settings" ), UNO_QUERY_THROW ); PropertySet aSettingsProp( xDocumentSettings ); if( maFileSharing.mbRecommendReadOnly ) aSettingsProp.setProperty( PROP_LoadReadonly, true ); diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx index 8e092ac74e5e..9d49f9c1ee40 100644 --- a/sc/source/filter/oox/worksheetbuffer.cxx +++ b/sc/source/filter/oox/worksheetbuffer.cxx @@ -168,7 +168,7 @@ WorksheetBuffer::IndexNamePair WorksheetBuffer::createSheet( const OUString& rPr Reference< XIndexAccess > xSheetsIA( xSheets, UNO_QUERY_THROW ); Reference< XNameAccess > xSheetsNA( xSheets, UNO_QUERY_THROW ); sal_Int16 nCalcSheet = -1; - OUString aSheetName = rPreferredName.isEmpty() ? CREATE_OUSTRING( "Sheet" ) : rPreferredName; + OUString aSheetName = rPreferredName.isEmpty() ? "Sheet" : rPreferredName; PropertySet aPropSet; if( nSheetPos < xSheetsIA->getCount() ) { diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 8094e0e517bf..32da418570c6 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -426,8 +426,8 @@ private: WorksheetGlobals::WorksheetGlobals( const WorkbookHelper& rHelper, const ISegmentProgressBarRef& rxProgressBar, WorksheetType eSheetType, sal_Int16 nSheet ) : WorkbookHelper( rHelper ), - maSheetCellRanges( CREATE_OUSTRING( "com.sun.star.sheet.SheetCellRanges" ) ), - maUrlTextField( CREATE_OUSTRING( "com.sun.star.text.TextField.URL" ) ), + maSheetCellRanges( "com.sun.star.sheet.SheetCellRanges" ), + maUrlTextField( "com.sun.star.text.TextField.URL" ), mrMaxApiPos( rHelper.getAddressConverter().getMaxApiAddress() ), maUsedArea( nSheet, SAL_MAX_INT32, SAL_MAX_INT32, -1, -1 ), maSheetData( *this ), diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index eea131ac0f15..51ff702d92db 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -183,7 +183,7 @@ bool lcl_IsFontwork( const SdrObject* pObj ) bool bIsFontwork = false; if( pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE ) { - const OUString aTextPath = CREATE_OUSTRING( "TextPath" ); + const OUString aTextPath = "TextPath"; SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&) pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ); if( Any* pAny = rGeometryItem.GetPropertyValueByName( aTextPath, aTextPath ) ) |