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

convert sc/.../tabvwsh.hxx from String to OUString

Change-Id: I5b9cf40acf4f6d2f4daf948e2c85e6cd9580425a
üst 91281ddf
...@@ -104,7 +104,7 @@ private: ...@@ -104,7 +104,7 @@ private:
sal_uInt16 nDrawSfxId; sal_uInt16 nDrawSfxId;
sal_uInt16 nCtrlSfxId; sal_uInt16 nCtrlSfxId;
sal_uInt16 nFormSfxId; sal_uInt16 nFormSfxId;
String sDrawCustom; // current custom shape type OUString sDrawCustom; // current custom shape type
ScDrawShell* pDrawShell; ScDrawShell* pDrawShell;
ScDrawTextObjectBar* pDrawTextShell; ScDrawTextObjectBar* pDrawTextShell;
ScEditShell* pEditShell; ScEditShell* pEditShell;
...@@ -164,7 +164,7 @@ private: ...@@ -164,7 +164,7 @@ private:
SbxObject* pScSbxObject; SbxObject* pScSbxObject;
sal_Bool bChartAreaValid; // if chart is drawn sal_Bool bChartAreaValid; // if chart is drawn
String aEditChartName; OUString aEditChartName;
ScRangeListRef aChartSource; ScRangeListRef aChartSource;
Rectangle aChartPos; Rectangle aChartPos;
SCTAB nChartDestTab; SCTAB nChartDestTab;
...@@ -173,7 +173,7 @@ private: ...@@ -173,7 +173,7 @@ private:
SfxBroadcaster* pAccessibilityBroadcaster; SfxBroadcaster* pAccessibilityBroadcaster;
static const int MASTERENUMCOMMANDS = 6; static const int MASTERENUMCOMMANDS = 6;
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ]; OUString aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
// ugly hack for Add button in ScNameDlg // ugly hack for Add button in ScNameDlg
boost::ptr_map<OUString, ScRangeName> maRangeMap; boost::ptr_map<OUString, ScRangeName> maRangeMap;
...@@ -186,14 +186,14 @@ private: ...@@ -186,14 +186,14 @@ private:
SfxShell* GetMySubShell() const; SfxShell* GetMySubShell() const;
void DoReadUserData( const String& rData ); void DoReadUserData( const OUString& rData );
void DoReadUserDataSequence( const ::com::sun::star::uno::Sequence< void DoReadUserDataSequence( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& rSettings ); ::com::sun::star::beans::PropertyValue >& rSettings );
DECL_LINK( SimpleRefClose, void* ); DECL_LINK( SimpleRefClose, void* );
DECL_LINK( SimpleRefDone, String* ); DECL_LINK( SimpleRefDone, OUString* );
DECL_LINK( SimpleRefAborted, String* ); DECL_LINK( SimpleRefAborted, OUString* );
DECL_LINK( SimpleRefChange, String* ); DECL_LINK( SimpleRefChange, OUString* );
DECL_LINK( FormControlActivated, void* ); DECL_LINK( FormControlActivated, void* );
protected: protected:
...@@ -215,7 +215,7 @@ protected: ...@@ -215,7 +215,7 @@ protected:
virtual OUString GetSelectionText( bool bWholeWord ); virtual OUString GetSelectionText( bool bWholeWord );
virtual sal_Bool HasSelection( sal_Bool bText ) const; virtual sal_Bool HasSelection( sal_Bool bText ) const;
virtual String GetDescription() const; virtual OUString GetDescription() const;
virtual void WriteUserData(OUString &, bool bBrowse = false); virtual void WriteUserData(OUString &, bool bBrowse = false);
virtual void ReadUserData(const OUString &, bool bBrowse = false); virtual void ReadUserData(const OUString &, bool bBrowse = false);
...@@ -340,7 +340,7 @@ public: ...@@ -340,7 +340,7 @@ public:
void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest ); void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest );
sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
void SetEditChartName(const String& aStr){aEditChartName=aStr;} void SetEditChartName(const OUString& aStr){aEditChartName=aStr;}
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
...@@ -372,13 +372,13 @@ public: ...@@ -372,13 +372,13 @@ public:
FmFormShell* GetFormShell() const { return pFormShell; } FmFormShell* GetFormShell() const { return pFormShell; }
void InsertURL( const String& rName, const String& rURL, const OUString& rTarget, void InsertURL( const OUString& rName, const OUString& rURL, const OUString& rTarget,
sal_uInt16 nMode ); sal_uInt16 nMode );
void InsertURLButton( const String& rName, const String& rURL, const String& rTarget, void InsertURLButton( const OUString& rName, const OUString& rURL, const OUString& rTarget,
const Point* pInsPos = NULL ); const Point* pInsPos = NULL );
void InsertURLField( const String& rName, const String& rURL, const String& rTarget ); void InsertURLField( const OUString& rName, const OUString& rURL, const OUString& rTarget );
sal_Bool SelectObject( const String& rName ); sal_Bool SelectObject( const OUString& rName );
void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;} void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;}
sal_Bool IsInFormatDialog() {return bInFormatDialog;} sal_Bool IsInFormatDialog() {return bInFormatDialog;}
...@@ -393,9 +393,9 @@ public: ...@@ -393,9 +393,9 @@ public:
void ExecuteCellFormatDlg ( SfxRequest& rReq, const OString &rTabPage = OString()); void ExecuteCellFormatDlg ( SfxRequest& rReq, const OString &rTabPage = OString());
sal_Bool GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 ); sal_Bool GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode = 0 );
void StartSimpleRefDialog( const String& rTitle, const String& rInitVal, void StartSimpleRefDialog( const OUString& rTitle, const OUString& rInitVal,
sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ); sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection );
void StopSimpleRefDialog(); void StopSimpleRefDialog();
......
...@@ -699,7 +699,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) ...@@ -699,7 +699,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
nErrCode = pCell->GetErrCode(); nErrCode = pCell->GetErrCode();
} }
String aFuncStr; OUString aFuncStr;
if ( pTabViewShell->GetFunction( aFuncStr, nErrCode ) ) if ( pTabViewShell->GetFunction( aFuncStr, nErrCode ) )
rSet.Put( SfxStringItem( nWhich, aFuncStr ) ); rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
} }
...@@ -716,7 +716,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) ...@@ -716,7 +716,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_STATUS_SUM: case SID_STATUS_SUM:
{ {
String aFuncStr; OUString aFuncStr;
if ( pTabViewShell->GetFunction( aFuncStr ) ) if ( pTabViewShell->GetFunction( aFuncStr ) )
rSet.Put( SfxStringItem( nWhich, aFuncStr ) ); rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
} }
......
...@@ -154,7 +154,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) ...@@ -154,7 +154,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) ) if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) )
sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue(); sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue();
} }
bool bSwitchCustom = ( sStringItemValue.Len() && sDrawCustom.Len() && sStringItemValue != sDrawCustom ); bool bSwitchCustom = ( sStringItemValue.Len() && !sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom );
if (nNewId == SID_INSERT_FRAME) // vom Tbx-Button if (nNewId == SID_INSERT_FRAME) // vom Tbx-Button
nNewId = SID_DRAW_TEXT; nNewId = SID_DRAW_TEXT;
...@@ -222,7 +222,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) ...@@ -222,7 +222,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
} }
nDrawSfxId = nNewId; nDrawSfxId = nNewId;
sDrawCustom.Erase(); // value is set below for custom shapes sDrawCustom = ""; // value is set below for custom shapes
if ( nNewId != SID_DRAW_CHART ) // Chart nicht mit DrawShell if ( nNewId != SID_DRAW_CHART ) // Chart nicht mit DrawShell
{ {
...@@ -445,7 +445,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) ...@@ -445,7 +445,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
} }
} }
sal_Bool ScTabViewShell::SelectObject( const String& rName ) sal_Bool ScTabViewShell::SelectObject( const OUString& rName )
{ {
ScDrawView* pView = GetViewData()->GetScDrawView(); ScDrawView* pView = GetViewData()->GetScDrawView();
if (!pView) if (!pView)
......
...@@ -535,7 +535,7 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper ...@@ -535,7 +535,7 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper
// DoReadUserData is also called from ctor when switching from print preview // DoReadUserData is also called from ctor when switching from print preview
void ScTabViewShell::DoReadUserData( const String& rData ) void ScTabViewShell::DoReadUserData( const OUString& rData )
{ {
Window* pOldWin = GetActiveWin(); Window* pOldWin = GetActiveWin();
sal_Bool bFocus = pOldWin && pOldWin->HasFocus(); sal_Bool bFocus = pOldWin && pOldWin->HasFocus();
...@@ -1126,7 +1126,7 @@ static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell ) ...@@ -1126,7 +1126,7 @@ static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
return pRet; return pRet;
} }
IMPL_LINK( ScTabViewShell, SimpleRefDone, String*, pResult ) IMPL_LINK( ScTabViewShell, SimpleRefDone, OUString*, pResult )
{ {
ScTabViewObj* pImpObj = lcl_GetViewObj( *this ); ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult ) if ( pImpObj && pResult )
...@@ -1134,7 +1134,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefDone, String*, pResult ) ...@@ -1134,7 +1134,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefDone, String*, pResult )
return 0; return 0;
} }
IMPL_LINK( ScTabViewShell, SimpleRefAborted, String*, pResult ) IMPL_LINK( ScTabViewShell, SimpleRefAborted, OUString*, pResult )
{ {
ScTabViewObj* pImpObj = lcl_GetViewObj( *this ); ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult ) if ( pImpObj && pResult )
...@@ -1142,7 +1142,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefAborted, String*, pResult ) ...@@ -1142,7 +1142,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefAborted, String*, pResult )
return 0; return 0;
} }
IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult ) IMPL_LINK( ScTabViewShell, SimpleRefChange, OUString*, pResult )
{ {
ScTabViewObj* pImpObj = lcl_GetViewObj( *this ); ScTabViewObj* pImpObj = lcl_GetViewObj( *this );
if ( pImpObj && pResult ) if ( pImpObj && pResult )
...@@ -1151,7 +1151,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult ) ...@@ -1151,7 +1151,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult )
} }
void ScTabViewShell::StartSimpleRefDialog( void ScTabViewShell::StartSimpleRefDialog(
const String& rTitle, const String& rInitVal, const OUString& rTitle, const OUString& rInitVal,
sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ) sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
{ {
SfxViewFrame* pViewFrm = GetViewFrame(); SfxViewFrame* pViewFrm = GetViewFrame();
......
...@@ -115,7 +115,7 @@ ScInputHandler* ScTabViewShell::GetInputHandler() const ...@@ -115,7 +115,7 @@ ScInputHandler* ScTabViewShell::GetInputHandler() const
//------------------------------------------------------------------ //------------------------------------------------------------------
String ScTabViewShell::GetDescription() const OUString ScTabViewShell::GetDescription() const
{ {
return OUString(" ** Test ** "); return OUString(" ** Test ** ");
} }
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#include "cellvalue.hxx" #include "cellvalue.hxx"
#include "tokenarray.hxx" #include "tokenarray.hxx"
sal_Bool ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode ) sal_Bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode )
{ {
String aStr; String aStr;
......
...@@ -119,7 +119,7 @@ OUString ScTabViewShell::GetSelectionText( bool bWholeWord ) ...@@ -119,7 +119,7 @@ OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
//------------------------------------------------------------------------ //------------------------------------------------------------------------
void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const OUString& rTarget, void ScTabViewShell::InsertURL( const OUString& rName, const OUString& rURL, const OUString& rTarget,
sal_uInt16 nMode ) sal_uInt16 nMode )
{ {
SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode; SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode;
...@@ -166,7 +166,7 @@ static void lcl_SelectFieldAfterInsert( EditView& rView ) ...@@ -166,7 +166,7 @@ static void lcl_SelectFieldAfterInsert( EditView& rView )
} }
} }
void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, const String& rTarget ) void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL, const OUString& rTarget )
{ {
SvxURLField aURLField( rURL, rName, SVXURLFORMAT_REPR ); SvxURLField aURLField( rURL, rName, SVXURLFORMAT_REPR );
aURLField.SetTargetFrame( rTarget ); aURLField.SetTargetFrame( rTarget );
......
...@@ -38,8 +38,8 @@ using namespace com::sun::star; ...@@ -38,8 +38,8 @@ using namespace com::sun::star;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL, void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rURL,
const String& rTarget, const OUString& rTarget,
const Point* pInsPos ) const Point* pInsPos )
{ {
// Tabelle geschuetzt ? // Tabelle geschuetzt ?
...@@ -78,9 +78,9 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL, ...@@ -78,9 +78,9 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
aAny <<= aTmp; aAny <<= aTmp;
xPropSet->setPropertyValue("TargetURL", aAny ); xPropSet->setPropertyValue("TargetURL", aAny );
if( rTarget.Len() ) if( !rTarget.isEmpty() )
{ {
aAny <<= OUString(rTarget); aAny <<= rTarget;
xPropSet->setPropertyValue("TargetFrame", aAny ); xPropSet->setPropertyValue("TargetFrame", aAny );
} }
......
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