diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index c2d70620764d..9872f01cda62 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -422,19 +422,19 @@ struct ScImportParam SCROW nRow1; SCCOL nCol2; SCROW nRow2; - sal_Bool bImport; - String aDBName; // alias of data base - String aStatement; - sal_Bool bNative; - sal_Bool bSql; // statement or name? - sal_uInt8 nType; // enum DBObject + bool bImport; + ::rtl::OUString aDBName; // alias of data base + ::rtl::OUString aStatement; + bool bNative; + bool bSql; // statement or name? + sal_uInt8 nType; // enum DBObject ScImportParam(); ScImportParam( const ScImportParam& r ); ~ScImportParam(); ScImportParam& operator= ( const ScImportParam& r ); - sal_Bool operator== ( const ScImportParam& r ) const; + bool operator== ( const ScImportParam& r ) const; }; struct ScStringHashCode diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 908cdfc72bcf..0aa7ad69e76f 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -67,7 +67,7 @@ ScImportParam::ScImportParam() : nRow2(0), bImport(false), bNative(false), - bSql(sal_True), + bSql(true), nType(ScDbTable) { } @@ -106,7 +106,7 @@ ScImportParam& ScImportParam::operator=( const ScImportParam& r ) return *this; } -sal_Bool ScImportParam::operator==( const ScImportParam& rOther ) const +bool ScImportParam::operator==( const ScImportParam& rOther ) const { return( nCol1 == rOther.nCol1 && nRow1 == rOther.nRow1 && diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 8fde7e29e57a..653a254e7b89 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1501,7 +1501,7 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName, aImportParam.aStatement = bSql ? rStatement : rTableName; aImportParam.bNative = bNative; aImportParam.nType = nType; - aImportParam.bImport = sal_True; + aImportParam.bImport = true; sal_Bool bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, sal_True ); // DB-Operationen wiederholen diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index fb5951338e37..70e6b1d8e2ca 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -104,8 +104,8 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram sdb::CommandType::TABLE ); ::svx::ODataAccessDescriptor aSelection; - aSelection.setDataSource(rtl::OUString( rParam.aDBName )); - aSelection[svx::daCommand] <<= rtl::OUString( rParam.aStatement ); + aSelection.setDataSource(rParam.aDBName); + aSelection[svx::daCommand] <<= rParam.aStatement; aSelection[svx::daCommandType] <<= nType; xControllerSelection->select(uno::makeAny(aSelection.createPropertyValueSequence())); @@ -127,7 +127,7 @@ sal_Bool ScDBDocFunc::DoImportUno( const ScAddress& rPos, ScImportParam aImParam; aImParam.nCol1 = aImParam.nCol2 = rPos.Col(); aImParam.nRow1 = aImParam.nRow2 = rPos.Row(); - aImParam.bImport = sal_True; + aImParam.bImport = true; uno::Reference xResSet; uno::Sequence aSelection; @@ -303,11 +303,11 @@ sal_Bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, sdb::CommandType::TABLE ); uno::Any aAny; - aAny <<= rtl::OUString( rParam.aDBName ); + aAny <<= rParam.aDBName; xRowProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_DATASOURCENAME)), aAny ); - aAny <<= rtl::OUString( rParam.aStatement ); + aAny <<= rParam.aStatement; xRowProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny ); diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index e85742369e3e..613ef7db2e4f 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -232,19 +232,19 @@ void ScImportDescriptor::FillProperties( uno::Sequence& rS if (aDescriptor.has( svx::daDataSource )) { pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_DBNAME )); - pArray[0].Value <<= rtl::OUString( rParam.aDBName ); + pArray[0].Value <<= rParam.aDBName; } else if (aDescriptor.has( svx::daConnectionResource )) { pArray[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CONRES )); - pArray[0].Value <<= rtl::OUString( rParam.aDBName ); + pArray[0].Value <<= rParam.aDBName; } pArray[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_SRCTYPE )); pArray[1].Value <<= eMode; pArray[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_SRCOBJ )); - pArray[2].Value <<= rtl::OUString( rParam.aStatement ); + pArray[2].Value <<= rParam.aStatement; pArray[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_ISNATIVE )); ScUnoHelpFunctions::SetBoolInAny( pArray[3].Value, rParam.bNative ); @@ -265,17 +265,17 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ else if (aPropName.EqualsAscii( SC_UNONAME_DBNAME )) { if ( rProp.Value >>= aStrVal ) - rParam.aDBName = String( aStrVal ); + rParam.aDBName = aStrVal; } else if (aPropName.EqualsAscii( SC_UNONAME_CONRES )) { if ( rProp.Value >>= aStrVal ) - rParam.aDBName = String( aStrVal ); + rParam.aDBName = aStrVal; } else if (aPropName.EqualsAscii( SC_UNONAME_SRCOBJ )) { if ( rProp.Value >>= aStrVal ) - rParam.aStatement = String( aStrVal ); + rParam.aStatement = aStrVal; } else if (aPropName.EqualsAscii( SC_UNONAME_SRCTYPE )) { @@ -288,16 +288,16 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ rParam.bImport = false; break; case sheet::DataImportMode_SQL: - rParam.bImport = sal_True; - rParam.bSql = sal_True; + rParam.bImport = true; + rParam.bSql = true; break; case sheet::DataImportMode_TABLE: - rParam.bImport = sal_True; + rParam.bImport = true; rParam.bSql = false; rParam.nType = ScDbTable; break; case sheet::DataImportMode_QUERY: - rParam.bImport = sal_True; + rParam.bImport = true; rParam.bSql = false; rParam.nType = ScDbQuery; break; diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index 12699b5f0e08..20a686fe2364 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -276,8 +276,8 @@ void lcl_FillDataSource( frame::FeatureStateEvent& rEvent, const ScImportParam& ( (rParam.nType == ScDbQuery) ? sdb::CommandType::QUERY : sdb::CommandType::TABLE ); - aDescriptor.setDataSource(rtl::OUString( rParam.aDBName )); - aDescriptor[svx::daCommand] <<= rtl::OUString( rParam.aStatement ); + aDescriptor.setDataSource(rParam.aDBName); + aDescriptor[svx::daCommand] <<= rParam.aStatement; aDescriptor[svx::daCommandType] <<= nType; } else