targeted string re-work

Change-Id: I96ce39a3982d7d638283c18a5913c1df13979b1f
This commit is contained in:
Norbert Thiebaud
2012-06-01 09:17:54 -05:00
parent 9601b63509
commit a30795ce51
3 changed files with 87 additions and 87 deletions

View File

@@ -168,7 +168,7 @@ T602ImportFilter::~T602ImportFilter()
/* if ( aFilterName == "T602Document" || aTypeName == "writer_T602_Document" ) /* if ( aFilterName == "T602Document" || aTypeName == "writer_T602_Document" )
// preselection by type (extension) or filter name: no reason to check type // preselection by type (extension) or filter name: no reason to check type
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_T602_Document" ) ); */ return rtl::OUString( "writer_T602_Document" ); */
::com::sun::star::uno::Sequence< sal_Int8 > aData; ::com::sun::star::uno::Sequence< sal_Int8 > aData;
size_t numBytes = 4; size_t numBytes = 4;
@@ -180,7 +180,7 @@ T602ImportFilter::~T602ImportFilter()
(aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' ')) (aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' '))
return ::rtl::OUString(); return ::rtl::OUString();
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_T602_Document" ) ); return rtl::OUString( "writer_T602_Document" );
} }
// XFilter // XFilter
@@ -271,7 +271,7 @@ sal_Bool SAL_CALL T602ImportFilter::importImpl( const Sequence< ::com::sun::star
} }
// An XML import service: what we push sax messages to.. // An XML import service: what we push sax messages to..
OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLImporter" ) ); OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" );
mxHandler = Reference< XDocumentHandler >( mxMSF->createInstance( sXMLImportService ), UNO_QUERY ); mxHandler = Reference< XDocumentHandler >( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
@@ -883,7 +883,7 @@ Sequence< OUString > SAL_CALL T602ImportFilter::getSupportedServiceNames( )
OUString T602ImportFilter_getImplementationName () OUString T602ImportFilter_getImplementationName ()
throw (RuntimeException) throw (RuntimeException)
{ {
return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) ); return OUString ( IMPLEMENTATION_NAME );
} }
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter" #define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
@@ -899,8 +899,8 @@ Sequence< OUString > SAL_CALL T602ImportFilter_getSupportedServiceNames( )
{ {
Sequence < OUString > aRet(2); Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray(); OUString* pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) ); pArray[0] = OUString ( SERVICE_NAME1 );
pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) ); pArray[1] = OUString ( SERVICE_NAME2 );
return aRet; return aRet;
} }
#undef SERVICE_NAME2 #undef SERVICE_NAME2
@@ -1015,12 +1015,12 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895); ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895);
ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2); ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2);
any <<= ous; any <<= ous;
xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "StringItemList" )), any); xPSetCodeLB->setPropertyValue(OUString( "StringItemList" ), any);
Sequence < sal_Int16 > shr(1); Sequence < sal_Int16 > shr(1);
shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0; shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0;
any <<= shr; any <<= shr;
xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" )), any); xPSetCodeLB->setPropertyValue(OUString( "SelectedItems" ), any);
Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel"); Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel");
Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY ); Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY );
@@ -1211,7 +1211,7 @@ Sequence< OUString > SAL_CALL T602ImportFilterDialog::getSupportedServiceNames(
OUString T602ImportFilterDialog_getImplementationName () OUString T602ImportFilterDialog_getImplementationName ()
throw (RuntimeException) throw (RuntimeException)
{ {
return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) ); return OUString ( IMPLEMENTATION_NAME );
} }
#define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog" #define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog"
@@ -1226,7 +1226,7 @@ Sequence< OUString > SAL_CALL T602ImportFilterDialog_getSupportedServiceNames(
{ {
Sequence < OUString > aRet(1); Sequence < OUString > aRet(1);
OUString* pArray = aRet.getArray(); OUString* pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); pArray[0] = OUString ( SERVICE_NAME );
return aRet; return aRet;
} }
#undef SERVICE_NAME #undef SERVICE_NAME

View File

@@ -191,17 +191,17 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
css::uno::Reference<XPropertySet> xProps(m_rServiceFactory, css::uno::Reference<XPropertySet> xProps(m_rServiceFactory,
UNO_QUERY_THROW); UNO_QUERY_THROW);
xContext.set(xProps->getPropertyValue(::rtl::OUString( xContext.set(xProps->getPropertyValue(::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), "DefaultContext" )),
UNO_QUERY_THROW); UNO_QUERY_THROW);
css::uno::Reference<XMacroExpander> css::uno::Reference<XMacroExpander>
xMacroExpander( xMacroExpander(
xContext->getValueByName( xContext->getValueByName(
::rtl::OUString( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" ))), "/singletons/com.sun.star.util.theMacroExpander" )),
UNO_QUERY_THROW); UNO_QUERY_THROW);
sExpandedUrl = xMacroExpander->expandMacros(sUrl); sExpandedUrl = xMacroExpander->expandMacros(sUrl);
sal_Int32 nPos = sExpandedUrl.indexOf(::rtl::OUString( sal_Int32 nPos = sExpandedUrl.indexOf(::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.expand:" ))); "vnd.sun.star.expand:" ));
if (nPos != -1) if (nPos != -1)
sExpandedUrl = sExpandedUrl.copy(nPos + 20); sExpandedUrl = sExpandedUrl.copy(nPos + 20);
} }
@@ -249,10 +249,10 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
subs( subs(
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSubstitution" ))), "com.sun.star.util.PathSubstitution" )),
UNO_QUERY); UNO_QUERY);
OUString aWorkingDir(subs->getSubstituteVariableValue(OUString( OUString aWorkingDir(subs->getSubstituteVariableValue(OUString(
RTL_CONSTASCII_USTRINGPARAM("$(progurl)")))); "$(progurl"))));
INetURLObject aObj(aWorkingDir); INetURLObject aObj(aWorkingDir);
aObj.setFinalSlash(); aObj.setFinalSlash();
bool bWasAbsolute; bool bWasAbsolute;
@@ -303,7 +303,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
xSaxParser( xSaxParser(
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ))), "com.sun.star.xml.sax.Parser" )),
UNO_QUERY); UNO_QUERY);
OSL_ASSERT(xSaxParser.is()); OSL_ASSERT(xSaxParser.is());
if (!xSaxParser.is()) if (!xSaxParser.is())
@@ -313,17 +313,17 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
Sequence<Any> args(3); Sequence<Any> args(3);
NamedValue nv; NamedValue nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" )); nv.Name = OUString( "StylesheetURL" );
nv.Value <<= expandUrl(udStyleSheet); nv.Value <<= expandUrl(udStyleSheet);
args[0] <<= nv; args[0] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "SourceURL" )); nv.Name = OUString( "SourceURL" );
nv.Value <<= aURL; nv.Value <<= aURL;
args[1] <<= nv; args[1] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "SourceBaseURL" )); nv.Name = OUString( "SourceBaseURL" );
nv.Value <<= OUString(INetURLObject(aURL).getBase()); nv.Value <<= OUString(INetURLObject(aURL).getBase());
args[2] <<= nv; args[2] <<= nv;
OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.documentconversion.LibXSLTTransformer")); OUString serviceName("com.sun.star.comp.documentconversion.LibXSLTTransformer");
if (!msUserData[1].isEmpty()) if (!msUserData[1].isEmpty())
serviceName = msUserData[1]; serviceName = msUserData[1];
@@ -349,7 +349,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
pipeout( pipeout(
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))), "com.sun.star.io.Pipe" )),
UNO_QUERY); UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY); css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
@@ -375,7 +375,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
if (xInterActionHandler.is()) { if (xInterActionHandler.is()) {
Sequence<Any> excArgs(0); Sequence<Any> excArgs(0);
::com::sun::star::ucb::InteractiveAugmentedIOException exc( ::com::sun::star::ucb::InteractiveAugmentedIOException exc(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Timeout!")), rtl::OUString("Timeout!"),
static_cast< OWeakObject * >( this ), static_cast< OWeakObject * >( this ),
InteractionClassification_ERROR, InteractionClassification_ERROR,
::com::sun::star::ucb::IOErrorCode_GENERAL, ::com::sun::star::ucb::IOErrorCode_GENERAL,
@@ -461,33 +461,33 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
setDelegate(css::uno::Reference<XExtendedDocumentHandler> ( setDelegate(css::uno::Reference<XExtendedDocumentHandler> (
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ))), "com.sun.star.xml.sax.Writer" )),
UNO_QUERY)); UNO_QUERY));
} }
// create transformer // create transformer
Sequence<Any> args(4); Sequence<Any> args(4);
NamedValue nv; NamedValue nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" )); nv.Name = OUString( "StylesheetURL" );
nv.Value <<= expandUrl(udStyleSheet); nv.Value <<= expandUrl(udStyleSheet);
args[0] <<= nv; args[0] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )); nv.Name = OUString( "TargetURL" );
nv.Value <<= sURL; nv.Value <<= sURL;
args[1] <<= nv; args[1] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "DoctypeSystem" )); nv.Name = OUString( "DoctypeSystem" );
nv.Value <<= aDoctypeSystem; nv.Value <<= aDoctypeSystem;
args[2] <<= nv; args[2] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "DoctypePublic" )); nv.Name = OUString( "DoctypePublic" );
nv.Value <<= aDoctypePublic; nv.Value <<= aDoctypePublic;
args[3] <<= nv; args[3] <<= nv;
nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetBaseURL" )); nv.Name = OUString( "TargetBaseURL" );
INetURLObject ineturl(sURL); INetURLObject ineturl(sURL);
ineturl.removeSegment(); ineturl.removeSegment();
m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE); m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE);
nv.Value <<= m_aExportBaseUrl; nv.Value <<= m_aExportBaseUrl;
args[3] <<= nv; args[3] <<= nv;
OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.documentconversion.LibXSLTTransformer")); OUString serviceName("com.sun.star.comp.documentconversion.LibXSLTTransformer");
if (!msUserData[1].isEmpty()) if (!msUserData[1].isEmpty())
serviceName = msUserData[1]; serviceName = msUserData[1];
@@ -505,7 +505,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
pipeout( pipeout(
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString( OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))), "com.sun.star.io.Pipe" )),
UNO_QUERY); UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY); css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
@@ -600,7 +600,7 @@ extern "C"
Sequence<OUString> serviceNames(1); Sequence<OUString> serviceNames(1);
serviceNames.getArray()[0] serviceNames.getArray()[0]
= OUString( = OUString(
RTL_CONSTASCII_USTRINGPARAM( FILTER_SERVICE_NAME )); FILTER_SERVICE_NAME );
css::uno::Reference<XSingleServiceFactory> css::uno::Reference<XSingleServiceFactory>
xFactory( xFactory(
@@ -622,7 +622,7 @@ extern "C"
Sequence<OUString> serviceNames(1); Sequence<OUString> serviceNames(1);
serviceNames.getArray()[0] serviceNames.getArray()[0]
= OUString( = OUString(
RTL_CONSTASCII_USTRINGPARAM( TRANSFORMER_SERVICE_NAME )); TRANSFORMER_SERVICE_NAME );
css::uno::Reference<XSingleServiceFactory> css::uno::Reference<XSingleServiceFactory>
xFactory( xFactory(
createSingleFactory( createSingleFactory(

View File

@@ -121,10 +121,10 @@ DBG(extern void dump_pset(Reference< XPropertySet > rXPropSet));
namespace oox { namespace drawingml { namespace oox { namespace drawingml {
#define GETA(propName) \ #define GETA(propName) \
GetProperty( rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( #propName ) ) ) GetProperty( rXPropSet, String( #propName ) )
#define GETAD(propName) \ #define GETAD(propName) \
( GetPropertyAndState( rXPropSet, rXPropState, String( RTL_CONSTASCII_USTRINGPARAM( #propName ) ), eState ) && eState == beans::PropertyState_DIRECT_VALUE ) ( GetPropertyAndState( rXPropSet, rXPropState, String( #propName ), eState ) && eState == beans::PropertyState_DIRECT_VALUE )
#define GET(variable, propName) \ #define GET(variable, propName) \
if ( GETA(propName) ) \ if ( GETA(propName) ) \
@@ -137,7 +137,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext()
{ {
Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
if( xFactProp.is()) if( xFactProp.is())
xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))) >>= xContext; xFactProp->getPropertyValue(OUString("DefaultContext")) >>= xContext;
} }
catch( uno::Exception& ) catch( uno::Exception& )
{} {}
@@ -161,7 +161,7 @@ public:
return ( xProp.is() && return ( xProp.is() &&
(xProp->getPropertyValue( (xProp->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Role" )) ) >>= aRole ) && OUString( "Role" ) ) >>= aRole ) &&
m_aRole.equals( aRole )); m_aRole.equals( aRole ));
} }
@@ -214,9 +214,9 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
{ {
(void)ex; // avoid warning for pro build (void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString( OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) + OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
} }
@@ -231,7 +231,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource(
if( xContext.is() ) if( xContext.is() )
xSink.set( xSink.set(
xContext->getServiceManager()->createInstanceWithContext( xContext->getServiceManager()->createInstanceWithContext(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataSource")), OUString("com.sun.star.chart2.data.DataSource"),
xContext ), uno::UNO_QUERY_THROW ); xContext ), uno::UNO_QUERY_THROW );
if( xSink.is()) if( xSink.is())
xSink->setData( aData ); xSink->setData( aData );
@@ -297,12 +297,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
//the first x-values is always the next sequence //todo ... other x-values get lost for old format //the first x-values is always the next sequence //todo ... other x-values get lost for old format
Reference< chart2::data::XLabeledDataSequence > xXValues( Reference< chart2::data::XLabeledDataSequence > xXValues(
lcl_getDataSequenceByRole( aSeriesSeqVector, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) ); lcl_getDataSequenceByRole( aSeriesSeqVector, OUString("values-x") ) );
if( xXValues.is() ) if( xXValues.is() )
aLabeledSeqVector.push_back( xXValues ); aLabeledSeqVector.push_back( xXValues );
//add all other sequences now without x-values //add all other sequences now without x-values
lcl_MatchesRole aHasXValues( OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ); lcl_MatchesRole aHasXValues( OUString("values-x") );
for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ ) for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ )
{ {
if( !aHasXValues( aSeriesSeqVector[nN] ) ) if( !aHasXValues( aSeriesSeqVector[nN] ) )
@@ -325,16 +325,16 @@ bool lcl_isSeriesAttachedToFirstAxis(
sal_Int32 nAxisIndex = 0; sal_Int32 nAxisIndex = 0;
Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW );
if( xProp.is() ) if( xProp.is() )
xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("AttachedAxisIndex") ) ) >>= nAxisIndex; xProp->getPropertyValue( OUString( "AttachedAxisIndex" ) ) >>= nAxisIndex;
bResult = (0==nAxisIndex); bResult = (0==nAxisIndex);
} }
catch( const uno::Exception & ex ) catch( const uno::Exception & ex )
{ {
(void)ex; // avoid warning for pro build (void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString( OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) + OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
} }
@@ -507,7 +507,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
{ {
try try
{ {
xParser.set( xSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FormulaParser")) ), UNO_QUERY ); xParser.set( xSF->createInstance( OUString("com.sun.star.sheet.FormulaParser") ), UNO_QUERY );
} }
catch( Exception& ) catch( Exception& )
{ {
@@ -519,12 +519,12 @@ OUString ChartExport::parseFormula( const OUString& rRange )
Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY ); Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY );
if( xParserProps.is() ) if( xParserProps.is() )
{ {
xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) ); xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
} }
uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) ); uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
if( xParserProps.is() ) if( xParserProps.is() )
{ {
xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) ); xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
} }
aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) ); aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
} }
@@ -698,9 +698,9 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
{ {
(void)ex; // avoid warning for pro build (void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString( OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) + OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) + OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) + OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
} }
} }
@@ -742,7 +742,7 @@ void ChartExport::_ExportContent()
if( xServ.is()) if( xServ.is())
{ {
if( xServ->supportsService( if( xServ->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.ChartTableAddressSupplier")))) OUString("com.sun.star.chart.ChartTableAddressSupplier")))
{ {
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY ); Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is()) if( xProp.is())
@@ -752,13 +752,13 @@ void ChartExport::_ExportContent()
{ {
OUString sChartAddress; OUString sChartAddress;
aAny = xProp->getPropertyValue( aAny = xProp->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("ChartRangeAddress"))); OUString("ChartRangeAddress"));
aAny >>= msChartAddress; aAny >>= msChartAddress;
//maExportHelper.SetChartRangeAddress( sChartAddress ); //maExportHelper.SetChartRangeAddress( sChartAddress );
OUString sTableNumberList; OUString sTableNumberList;
aAny = xProp->getPropertyValue( aAny = xProp->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("TableNumberList"))); OUString("TableNumberList"));
aAny >>= msTableNumberList; aAny >>= msTableNumberList;
//maExportHelper.SetTableNumberList( sTableNumberList ); //maExportHelper.SetTableNumberList( sTableNumberList );
@@ -829,13 +829,13 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen
try try
{ {
Any aAny( xDocPropSet->getPropertyValue( Any aAny( xDocPropSet->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "HasMainTitle" )))); OUString( "HasMainTitle" )));
aAny >>= bHasMainTitle; aAny >>= bHasMainTitle;
aAny = xDocPropSet->getPropertyValue( aAny = xDocPropSet->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSubTitle" ))); OUString( "HasSubTitle" ));
aAny >>= bHasSubTitle; aAny >>= bHasSubTitle;
aAny = xDocPropSet->getPropertyValue( aAny = xDocPropSet->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "HasLegend" ))); OUString( "HasLegend" ));
aAny >>= bHasLegend; aAny >>= bHasLegend;
} }
catch( beans::UnknownPropertyException & ) catch( beans::UnknownPropertyException & )
@@ -912,7 +912,7 @@ void ChartExport::exportLegend( Reference< ::com::sun::star::chart::XChartDocume
try try
{ {
Any aAny( xProp->getPropertyValue( Any aAny( xProp->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" )))); OUString( "Alignment" )));
aAny >>= aLegendPos; aAny >>= aLegendPos;
} }
catch( beans::UnknownPropertyException & ) catch( beans::UnknownPropertyException & )
@@ -963,7 +963,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape )
Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
if( xPropSet.is()) if( xPropSet.is())
{ {
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "String" ))) >>= sText; xPropSet->getPropertyValue( OUString( "String" )) >>= sText;
} }
if( sText.isEmpty() ) if( sText.isEmpty() )
return; return;
@@ -983,7 +983,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape )
// TODO: bodyPr // TODO: bodyPr
const char* sWritingMode = NULL; const char* sWritingMode = NULL;
sal_Bool bVertical = sal_False; sal_Bool bVertical = sal_False;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "StackedText" ))) >>= bVertical; xPropSet->getPropertyValue( OUString( "StackedText" )) >>= bVertical;
if( bVertical ) if( bVertical )
sWritingMode = "wordArtVert"; sWritingMode = "wordArtVert";
@@ -1461,7 +1461,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
sal_Bool bJapaneseCandleSticks = sal_False; sal_Bool bJapaneseCandleSticks = sal_False;
Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY ); Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY );
if( xCTProp.is()) if( xCTProp.is())
xCTProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Japanese"))) >>= bJapaneseCandleSticks; xCTProp->getPropertyValue( OUString("Japanese")) >>= bJapaneseCandleSticks;
exportCandleStickSeries( exportCandleStickSeries(
xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis ); xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis );
return; return;
@@ -1493,7 +1493,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
{ {
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY ); Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
if( xSeqProp.is()) if( xSeqProp.is())
xSeqProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Role"))) >>= aRole; xSeqProp->getPropertyValue(OUString("Role")) >>= aRole;
// "main" sequence // "main" sequence
if( aRole.equals( aLabelRole )) if( aRole.equals( aLabelRole ))
{ {
@@ -1588,7 +1588,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
|| (eChartType == chart::TYPEID_BUBBLE) ) || (eChartType == chart::TYPEID_BUBBLE) )
{ {
// export xVal // export xVal
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) ); Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-x") ) );
if( xSequence.is() ) if( xSequence.is() )
{ {
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1601,7 +1601,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
if( eChartType == chart::TYPEID_BUBBLE ) if( eChartType == chart::TYPEID_BUBBLE )
{ {
// export yVal // export yVal
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")) ) ); Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-y") ) );
if( xSequence.is() ) if( xSequence.is() )
{ {
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1840,39 +1840,39 @@ void ChartExport::InitPlotArea( )
if (xServiceInfo.is()) if (xServiceInfo.is())
{ {
if (xServiceInfo->supportsService( if (xServiceInfo->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisXSupplier")))) OUString("com.sun.star.chart.ChartAxisXSupplier")))
{ {
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis"))) >>= mbHasXAxis; OUString("HasXAxis")) >>= mbHasXAxis;
} }
if (xServiceInfo->supportsService( if (xServiceInfo->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisYSupplier")))) OUString("com.sun.star.chart.ChartAxisYSupplier")))
{ {
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxis"))) >>= mbHasYAxis; OUString("HasYAxis")) >>= mbHasYAxis;
} }
if (xServiceInfo->supportsService( if (xServiceInfo->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisZSupplier")))) OUString("com.sun.star.chart.ChartAxisZSupplier")))
{ {
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxis"))) >>= mbHasZAxis; OUString("HasZAxis")) >>= mbHasZAxis;
} }
if (xServiceInfo->supportsService( if (xServiceInfo->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartTwoAxisXSupplier")))) OUString("com.sun.star.chart.ChartTwoAxisXSupplier")))
{ {
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis"))) >>= mbHasSecondaryXAxis; OUString("HasSecondaryXAxis")) >>= mbHasSecondaryXAxis;
} }
if (xServiceInfo->supportsService( if (xServiceInfo->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartTwoAxisYSupplier")))) OUString("com.sun.star.chart.ChartTwoAxisYSupplier")))
{ {
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryYAxis"))) >>= mbHasSecondaryYAxis; OUString("HasSecondaryYAxis")) >>= mbHasSecondaryYAxis;
} }
} }
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("Dim3D"))) >>= mbIs3DChart; OUString ("Dim3D")) >>= mbIs3DChart;
Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY ); Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY );
if( mbHasCategoryLabels && mxNewDiagram.is()) if( mbHasCategoryLabels && mxNewDiagram.is())
@@ -1912,29 +1912,29 @@ void ChartExport::exportAxis( AxisIdPair aAxisIdPair )
Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY); Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY);
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisTitle"))) >>= bHasXAxisTitle; OUString ("HasXAxisTitle")) >>= bHasXAxisTitle;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisTitle"))) >>= bHasYAxisTitle; OUString ("HasYAxisTitle")) >>= bHasYAxisTitle;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisTitle"))) >>= bHasZAxisTitle; OUString ("HasZAxisTitle")) >>= bHasZAxisTitle;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryXAxisTitle"))) >>= bHasSecondaryXAxisTitle; OUString ("HasSecondaryXAxisTitle")) >>= bHasSecondaryXAxisTitle;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryYAxisTitle"))) >>= bHasSecondaryYAxisTitle; OUString ("HasSecondaryYAxisTitle")) >>= bHasSecondaryYAxisTitle;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisGrid"))) >>= bHasXAxisMajorGrid; OUString ("HasXAxisGrid")) >>= bHasXAxisMajorGrid;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisGrid"))) >>= bHasYAxisMajorGrid; OUString ("HasYAxisGrid")) >>= bHasYAxisMajorGrid;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisGrid"))) >>= bHasZAxisMajorGrid; OUString ("HasZAxisGrid")) >>= bHasZAxisMajorGrid;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisHelpGrid"))) >>= bHasXAxisMinorGrid; OUString ("HasXAxisHelpGrid")) >>= bHasXAxisMinorGrid;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisHelpGrid"))) >>= bHasYAxisMinorGrid; OUString ("HasYAxisHelpGrid")) >>= bHasYAxisMinorGrid;
xDiagramProperties->getPropertyValue( xDiagramProperties->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisHelpGrid"))) >>= bHasZAxisMinorGrid; OUString ("HasZAxisHelpGrid")) >>= bHasZAxisMinorGrid;
Reference< XPropertySet > xAxisProp; Reference< XPropertySet > xAxisProp;
Reference< drawing::XShape > xAxisTitle; Reference< drawing::XShape > xAxisTitle;
@@ -2105,7 +2105,7 @@ void ChartExport::_exportAxis(
if( xAxisProp.is() ) if( xAxisProp.is() )
{ {
xAxisProp->getPropertyValue( xAxisProp->getPropertyValue(
OUString (RTL_CONSTASCII_USTRINGPARAM ("Visible"))) >>= bVisible; OUString ("Visible")) >>= bVisible;
} }
if( !bVisible ) if( !bVisible )
@@ -2322,10 +2322,10 @@ void ChartExport::exportDataPoints(
if( xSeriesProperties.is()) if( xSeriesProperties.is())
{ {
Any aAny = xSeriesProperties->getPropertyValue( Any aAny = xSeriesProperties->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "AttributedDataPoints" ))); OUString( "AttributedDataPoints" ));
aAny >>= aDataPointSeq; aAny >>= aDataPointSeq;
xSeriesProperties->getPropertyValue( xSeriesProperties->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM( "VaryColorsByPoint" ))) >>= bVaryColorsByPoint; OUString( "VaryColorsByPoint" )) >>= bVaryColorsByPoint;
} }
const sal_Int32 * pPoints = aDataPointSeq.getConstArray(); const sal_Int32 * pPoints = aDataPointSeq.getConstArray();