Kaydet (Commit) 9e6f7702 authored tarafından Noel Grandin's avatar Noel Grandin

convert sc/source/ui/undo/*.cxx from String to OUString

Change-Id: I2d2657c5f2ccdf37be0a2376650b66af8f3b1fce
üst 6bd2075b
...@@ -1509,7 +1509,7 @@ void ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget) ...@@ -1509,7 +1509,7 @@ void ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget)
{ {
if (rTarget.ISA(ScTabViewTarget)) if (rTarget.ISA(ScTabViewTarget))
{ {
String aTemp = aName; OUString aTemp = aName;
((ScTabViewTarget&)rTarget).GetViewShell()->UseScenario(aTemp); ((ScTabViewTarget&)rTarget).GetViewShell()->UseScenario(aTemp);
} }
} }
...@@ -1708,7 +1708,7 @@ void ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget) ...@@ -1708,7 +1708,7 @@ void ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget)
{ {
if (rTarget.ISA(ScTabViewTarget)) if (rTarget.ISA(ScTabViewTarget))
{ {
String aTemp = aFormula; OUString aTemp = aFormula;
ScDocument* pDoc = pDocShell->GetDocument(); ScDocument* pDoc = pDocShell->GetDocument();
((ScTabViewTarget&)rTarget).GetViewShell()->EnterMatrix(aTemp, pDoc->GetGrammar()); ((ScTabViewTarget&)rTarget).GetViewShell()->EnterMatrix(aTemp, pDoc->GetGrammar());
} }
......
...@@ -998,7 +998,7 @@ void ScUndoReplace::Undo() ...@@ -998,7 +998,7 @@ void ScUndoReplace::Undo()
else if (pSearchItem->GetPattern() && else if (pSearchItem->GetPattern() &&
pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE) pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE)
{ {
String aTempStr = pSearchItem->GetSearchString(); // toggle OUString aTempStr = pSearchItem->GetSearchString(); // toggle
pSearchItem->SetSearchString(pSearchItem->GetReplaceString()); pSearchItem->SetSearchString(pSearchItem->GetReplaceString());
pSearchItem->SetReplaceString(aTempStr); pSearchItem->SetReplaceString(aTempStr);
pDoc->ReplaceStyle( *pSearchItem, pDoc->ReplaceStyle( *pSearchItem,
...@@ -1470,9 +1470,9 @@ bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const ...@@ -1470,9 +1470,9 @@ bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
return false; return false;
} }
static ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDoc, static ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const OUString& rDoc,
const String& rFlt, const String& rOpt, const OUString& rFlt, const OUString& rOpt,
const String& rSrc, const ScRange& rDest ) const OUString& rSrc, const ScRange& rDest )
{ {
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
sal_uInt16 nCount = pLinkManager->GetLinks().size(); sal_uInt16 nCount = pLinkManager->GetLinks().size();
......
...@@ -514,7 +514,7 @@ ScUndoPageBreak::~ScUndoPageBreak() ...@@ -514,7 +514,7 @@ ScUndoPageBreak::~ScUndoPageBreak()
OUString ScUndoPageBreak::GetComment() const OUString ScUndoPageBreak::GetComment() const
{ {
//"Column break" | "Row break" "insert" | "delete" //"Column break" | "Row break" "insert" | "delete"
return String ( bColumn ? return OUString ( bColumn ?
( bInsert ? ( bInsert ?
ScGlobal::GetRscString( STR_UNDO_INSCOLBREAK ) : ScGlobal::GetRscString( STR_UNDO_INSCOLBREAK ) :
ScGlobal::GetRscString( STR_UNDO_DELCOLBREAK ) ScGlobal::GetRscString( STR_UNDO_DELCOLBREAK )
...@@ -601,7 +601,7 @@ void ScUndoPrintZoom::DoChange( sal_Bool bUndo ) ...@@ -601,7 +601,7 @@ void ScUndoPrintZoom::DoChange( sal_Bool bUndo )
sal_uInt16 nPages = bUndo ? nOldPages : nNewPages; sal_uInt16 nPages = bUndo ? nOldPages : nNewPages;
ScDocument* pDoc = pDocShell->GetDocument(); ScDocument* pDoc = pDocShell->GetDocument();
String aStyleName = pDoc->GetPageStyle( nTab ); OUString aStyleName = pDoc->GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
OSL_ENSURE( pStyleSheet, "PageStyle not found" ); OSL_ENSURE( pStyleSheet, "PageStyle not found" );
......
...@@ -130,8 +130,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName, ...@@ -130,8 +130,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
{ {
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool(); ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
String aNewName = rData.GetName(); OUString aNewName = rData.GetName();
sal_Bool bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style sal_Bool bDelete = aNewName.isEmpty(); // no new name -> delete style
sal_Bool bNew = ( rName.isEmpty() && !bDelete ); // creating new style sal_Bool bNew = ( rName.isEmpty() && !bDelete ); // creating new style
SfxStyleSheetBase* pStyle = NULL; SfxStyleSheetBase* pStyle = NULL;
...@@ -172,7 +172,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName, ...@@ -172,7 +172,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
{ {
// modify style // modify style
String aNewParent = rData.GetParent(); OUString aNewParent = rData.GetParent();
if ( aNewParent != pStyle->GetParent() ) if ( aNewParent != pStyle->GetParent() )
pStyle->SetParent( aNewParent ); pStyle->SetParent( aNewParent );
......
...@@ -1088,7 +1088,7 @@ OUString ScUndoRemoveLink::GetComment() const ...@@ -1088,7 +1088,7 @@ OUString ScUndoRemoveLink::GetComment() const
void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const
{ {
ScDocument* pDoc = pDocShell->GetDocument(); ScDocument* pDoc = pDocShell->GetDocument();
String aEmpty; OUString aEmpty;
for (sal_uInt16 i=0; i<nCount; i++) for (sal_uInt16 i=0; i<nCount; i++)
if (bLink) // establish link if (bLink) // establish link
pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay ); pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay );
...@@ -1475,7 +1475,7 @@ ScUndoRenameObject::~ScUndoRenameObject() ...@@ -1475,7 +1475,7 @@ ScUndoRenameObject::~ScUndoRenameObject()
OUString ScUndoRenameObject::GetComment() const OUString ScUndoRenameObject::GetComment() const
{ {
// string resource shared with title for dialog // string resource shared with title for dialog
return String( ScResId(SCSTR_RENAMEOBJECT) ); return OUString( ScResId(SCSTR_RENAMEOBJECT) );
} }
SdrObject* ScUndoRenameObject::GetObject() SdrObject* ScUndoRenameObject::GetObject()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment