diff options
-rw-r--r-- | sc/inc/table.hxx | 12 | ||||
-rw-r--r-- | sc/inc/tablink.hxx | 16 | ||||
-rw-r--r-- | sc/inc/tabprotection.hxx | 12 | ||||
-rw-r--r-- | sc/inc/targuno.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table4.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table5.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/tabprotection.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 31 | ||||
-rw-r--r-- | sc/source/ui/unoobj/linkuno.cxx | 2 |
11 files changed, 40 insertions, 55 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index fc8ae3a7a9df..7ae03f2ecfe2 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -283,8 +283,8 @@ public: const OUString& GetLinkTab() const { return aLinkTab; } sal_uLong GetLinkRefreshDelay() const { return nLinkRefreshDelay; } - void SetLink( sal_uInt8 nMode, const String& rDoc, const String& rFlt, - const String& rOpt, const String& rTab, sal_uLong nRefreshDelay ); + void SetLink( sal_uInt8 nMode, const OUString& rDoc, const OUString& rFlt, + const OUString& rOpt, const OUString& rTab, sal_uLong nRefreshDelay ); void GetName( OUString& rName ) const; void SetName( const OUString& rNewName ); @@ -299,7 +299,7 @@ public: const OUString& GetPageStyle() const { return aPageStyle; } void SetPageStyle( const OUString& rName ); - void PageStyleModified( const String& rNewName ); + void PageStyleModified( const OUString& rNewName ); bool IsProtected() const; void SetProtection(const ScTableProtection* pProtect); @@ -322,7 +322,7 @@ public: bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const; - bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, + bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString, ScSetStringParam* pParam = NULL ); void SetEditText( SCCOL nCol, SCROW nRow, EditTextObject* pEditText ); @@ -532,7 +532,7 @@ public: void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, double nStepValue, double nMaxValue, ScProgress* pProgress); - String GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ); + OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ); void UpdateSelectionFunction( ScFunctionData& rData, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, @@ -541,7 +541,7 @@ public: void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_uInt16 nFormatNo ); void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData); - void ScReplaceTabsStr( String& rStr, const String& rSrch, const String& rRepl ); // from sw + void ScReplaceTabsStr( OUString& rStr, const OUString& rSrch, const OUString& rRepl ); // from sw bool SearchAndReplace( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark, ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc); diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx index a0e17209af97..aabb2e25dcbe 100644 --- a/sc/inc/tablink.hxx +++ b/sc/inc/tablink.hxx @@ -43,10 +43,10 @@ private: public: TYPEINFO(); - ScTableLink( ScDocShell* pDocSh, const String& rFile, - const String& rFilter, const String& rOpt, sal_uLong nRefresh ); - ScTableLink( SfxObjectShell* pShell, const String& rFile, - const String& rFilter, const String& rOpt, sal_uLong nRefresh ); + ScTableLink( ScDocShell* pDocSh, const OUString& rFile, + const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ); + ScTableLink( SfxObjectShell* pShell, const OUString& rFile, + const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ); virtual ~ScTableLink(); virtual void Closed(); virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( @@ -54,8 +54,8 @@ public: virtual void Edit( Window*, const Link& rEndEditHdl ); - sal_Bool Refresh(const String& rNewFile, const String& rNewFilter, - const String* pNewOptions /* = NULL */, sal_uLong nNewRefresh ); + sal_Bool Refresh(const OUString& rNewFile, const OUString& rNewFilter, + const OUString* pNewOptions /* = NULL */, sal_uLong nNewRefresh ); void SetInCreate(bool bSet) { bInCreate = bSet; } void SetAddUndo(bool bSet) { bAddUndo = bSet; } void SetPaint(bool bSet) { bDoPaint = bSet; } @@ -80,10 +80,6 @@ private: SfxObjectShellRef aRef; SfxMedium* pMedium; - static bool GetFilterName( const String& rFileName, - String& rFilter, String& rOptions, - bool bWithContent, bool bWithInteraction ); - public: ScDocumentLoader( const OUString& rFileName, OUString& rFilterName, OUString& rOptions, diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx index c0b0e3a6e9ff..7703ffb5676e 100644 --- a/sc/inc/tabprotection.hxx +++ b/sc/inc/tabprotection.hxx @@ -65,13 +65,13 @@ public: virtual bool isPasswordEmpty() const = 0; virtual bool hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const = 0; - virtual void setPassword(const String& aPassText) = 0; + virtual void setPassword(const OUString& aPassText) = 0; virtual ::com::sun::star::uno::Sequence<sal_Int8> getPasswordHash( ScPasswordHash eHash, ScPasswordHash eHas2 = PASSHASH_UNSPECIFIED) const = 0; virtual void setPasswordHash( const ::com::sun::star::uno::Sequence<sal_Int8>& aPassword, ScPasswordHash eHash = PASSHASH_SHA1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) = 0; - virtual bool verifyPassword(const String& aPassText) const = 0; + virtual bool verifyPassword(const OUString& aPassText) const = 0; }; class SC_DLLPUBLIC ScDocProtection : public ScPassHashProtectable @@ -95,13 +95,13 @@ public: virtual bool isPasswordEmpty() const; virtual bool hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const; - virtual void setPassword(const String& aPassText); + virtual void setPassword(const OUString& aPassText); virtual ::com::sun::star::uno::Sequence<sal_Int8> getPasswordHash( ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const; virtual void setPasswordHash( const ::com::sun::star::uno::Sequence<sal_Int8>& aPassword, ScPasswordHash eHash = PASSHASH_SHA1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED); - virtual bool verifyPassword(const String& aPassText) const; + virtual bool verifyPassword(const OUString& aPassText) const; bool isOptionEnabled(Option eOption) const; void setOption(Option eOption, bool bEnabled); @@ -152,13 +152,13 @@ public: virtual bool isPasswordEmpty() const; virtual bool hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const; - virtual void setPassword(const String& aPassText); + virtual void setPassword(const OUString& aPassText); virtual ::com::sun::star::uno::Sequence<sal_Int8> getPasswordHash( ScPasswordHash eHash, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED) const; virtual void setPasswordHash( const ::com::sun::star::uno::Sequence<sal_Int8>& aPassword, ScPasswordHash eHash = PASSHASH_SHA1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED); - virtual bool verifyPassword(const String& aPassText) const; + virtual bool verifyPassword(const OUString& aPassText) const; bool isOptionEnabled(Option eOption) const; void setOption(Option eOption, bool bEnabled); diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx index 9ef1c9494a1e..f18ee62e2fec 100644 --- a/sc/inc/targuno.hxx +++ b/sc/inc/targuno.hxx @@ -74,7 +74,7 @@ class ScLinkTargetTypesObj : public ::cppu::WeakImplHelper2< { private: ScDocShell* pDocShell; - String aNames[SC_LINKTARGETTYPE_COUNT]; + OUString aNames[SC_LINKTARGETTYPE_COUNT]; public: ScLinkTargetTypesObj(ScDocShell* pDocSh); @@ -110,7 +110,7 @@ class ScLinkTargetTypeObj : public ::cppu::WeakImplHelper3< private: ScDocShell* pDocShell; sal_uInt16 nType; - String aName; + OUString aName; public: ScLinkTargetTypeObj(ScDocShell* pDocSh, sal_uInt16 nT); diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index f827cc981e0c..0c985fde6abf 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -414,8 +414,8 @@ void ScTable::SetScenario( bool bFlag ) } void ScTable::SetLink( sal_uInt8 nMode, - const String& rDoc, const String& rFlt, const String& rOpt, - const String& rTab, sal_uLong nRefreshDelay ) + const OUString& rDoc, const OUString& rFlt, const OUString& rOpt, + const OUString& rTab, sal_uLong nRefreshDelay ) { nLinkMode = nMode; aLinkDoc = rDoc; // Datei diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 7bd7ac6b035b..24fc92be08a7 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1431,7 +1431,7 @@ bool ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const return bOk; } -bool ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const String& rString, +bool ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const OUString& rString, ScSetStringParam* pParam ) { if (ValidColRow(nCol,nRow)) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 3a84fcb5d1c3..0e5d7cdead9a 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -921,7 +921,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, } } -String ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ) +OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ) { OUString aValue; diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 7c667e05d348..0392b21befc9 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -1153,7 +1153,7 @@ void ScTable::SetPageStyle( const OUString& rName ) } } -void ScTable::PageStyleModified( const String& rNewName ) +void ScTable::PageStyleModified( const OUString& rNewName ) { aPageStyle = rNewName; InvalidateTextWidth(NULL, NULL, false, false); // don't know what was in the style before diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx index 979454027f0c..2f3d4a31cc19 100644 --- a/sc/source/core/data/tabprotection.cxx +++ b/sc/source/core/data/tabprotection.cxx @@ -399,7 +399,7 @@ bool ScDocProtection::hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash return mpImpl->hasPasswordHash(eHash, eHash2); } -void ScDocProtection::setPassword(const String& aPassText) +void ScDocProtection::setPassword(const OUString& aPassText) { mpImpl->setPassword(aPassText); } @@ -415,7 +415,7 @@ void ScDocProtection::setPasswordHash( mpImpl->setPasswordHash(aPassword, eHash, eHash2); } -bool ScDocProtection::verifyPassword(const String& aPassText) const +bool ScDocProtection::verifyPassword(const OUString& aPassText) const { return mpImpl->verifyPassword(aPassText); } @@ -475,7 +475,7 @@ bool ScTableProtection::hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHa return mpImpl->hasPasswordHash(eHash, eHash2); } -void ScTableProtection::setPassword(const String& aPassText) +void ScTableProtection::setPassword(const OUString& aPassText) { mpImpl->setPassword(aPassText); } @@ -491,7 +491,7 @@ void ScTableProtection::setPasswordHash( mpImpl->setPasswordHash(aPassword, eHash, eHash2); } -bool ScTableProtection::verifyPassword(const String& aPassText) const +bool ScTableProtection::verifyPassword(const OUString& aPassText) const { return mpImpl->verifyPassword(aPassText); } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 7dd32ea647e4..92adbfa86bc4 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -58,8 +58,8 @@ TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink); //------------------------------------------------------------------------ -ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile, - const String& rFilter, const String& rOpt, +ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, + const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ): ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), ScRefreshTimer( nRefresh ), @@ -75,8 +75,8 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile, pImpl->m_pDocSh = pDocSh; } -ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile, - const String& rFilter, const String& rOpt, +ScTableLink::ScTableLink(SfxObjectShell* pShell, const OUString& rFile, + const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ): ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), ScRefreshTimer( nRefresh ), @@ -165,12 +165,12 @@ sal_Bool ScTableLink::IsUsed() const return pImpl->m_pDocSh->GetDocument()->HasLink( aFileName, aFilterName, aOptions ); } -sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, - const String* pNewOptions, sal_uLong nNewRefresh ) +sal_Bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, + const OUString* pNewOptions, sal_uLong nNewRefresh ) { // Dokument laden - if (!rNewFile.Len() || !rNewFilter.Len()) + if (rNewFile.isEmpty() || rNewFilter.isEmpty()) return false; OUString aNewUrl = ScGlobal::GetAbsDocName(rNewFile, pImpl->m_pDocSh); @@ -443,8 +443,8 @@ OUString ScDocumentLoader::GetOptions( SfxMedium& rMedium ) return EMPTY_STRING; } -bool ScDocumentLoader::GetFilterName( const String& rFileName, - String& rFilter, String& rOptions, +bool ScDocumentLoader::GetFilterName( const OUString& rFileName, + OUString& rFilter, OUString& rOptions, bool bWithContent, bool bWithInteraction ) { TypeId aScType = TYPE(ScDocShell); @@ -492,24 +492,13 @@ bool ScDocumentLoader::GetFilterName( const String& rFileName, rFilter = pSfxFilter->GetFilterName(); else rFilter = ScDocShell::GetOwnFilterName(); // sonst Calc-Datei - bOK = (rFilter.Len()>0); + bOK = !rFilter.isEmpty(); } delete pMedium; return bOK; } -bool ScDocumentLoader::GetFilterName( - const OUString& rFilterName, OUString& rFilter, OUString& rOptions, - bool bWithContent, bool bWithInteraction) -{ - String aTmp1, aTmp2; - bool bRet = GetFilterName(rFilterName, aTmp1, aTmp2, bWithContent, bWithInteraction); - rFilter = aTmp1; - rOptions = aTmp2; - return bRet; -} - void ScDocumentLoader::RemoveAppPrefix( OUString& rFilterName ) { OUStringBuffer aAppPrefix; diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index f2f16b7e1191..eef68a120e90 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -353,7 +353,7 @@ void ScSheetLinkObj::setFilterOptions(const OUString& FilterOptions) ScTableLink* pLink = GetLink_Impl(); if (pLink) { - String aOptStr(FilterOptions); + OUString aOptStr(FilterOptions); pLink->Refresh( aFileName, pLink->GetFilterName(), &aOptStr, pLink->GetRefreshDelay() ); } } |