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

convert sfx2/source/inc/objshimp.hxx from String to OUString

Change-Id: I9f83effda2be8e7edbdd7fbb32245ecaf90cd1d2
üst 89102963
...@@ -814,7 +814,7 @@ OUString SfxObjectShell::GetTitle ...@@ -814,7 +814,7 @@ OUString SfxObjectShell::GetTitle
return String(); return String();
// Create Title? // Create Title?
if ( SFX_TITLE_DETECT == nMaxLength && !pImp->aTitle.Len() ) if ( SFX_TITLE_DETECT == nMaxLength && pImp->aTitle.isEmpty() )
{ {
static sal_Bool bRecur = sal_False; static sal_Bool bRecur = sal_False;
if ( bRecur ) if ( bRecur )
...@@ -843,7 +843,7 @@ OUString SfxObjectShell::GetTitle ...@@ -843,7 +843,7 @@ OUString SfxObjectShell::GetTitle
return X(GetAPIName()); return X(GetAPIName());
// Special case templates: // Special case templates:
if( IsTemplate() && pImp->aTitle.Len() && if( IsTemplate() && !pImp->aTitle.isEmpty() &&
( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) ) ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
return X(pImp->aTitle); return X(pImp->aTitle);
...@@ -863,7 +863,7 @@ OUString SfxObjectShell::GetTitle ...@@ -863,7 +863,7 @@ OUString SfxObjectShell::GetTitle
if ( !HasName() || !pMed ) if ( !HasName() || !pMed )
{ {
// Title already set? // Title already set?
if ( pImp->aTitle.Len() ) if ( !pImp->aTitle.isEmpty() )
return X(pImp->aTitle); return X(pImp->aTitle);
// must it be numbered? // must it be numbered?
...@@ -898,7 +898,7 @@ OUString SfxObjectShell::GetTitle ...@@ -898,7 +898,7 @@ OUString SfxObjectShell::GetTitle
else if ( nMaxLength == SFX_TITLE_FILENAME ) else if ( nMaxLength == SFX_TITLE_FILENAME )
return X( aURL.getName( INetURLObject::LAST_SEGMENT, return X( aURL.getName( INetURLObject::LAST_SEGMENT,
true, INetURLObject::DECODE_WITH_CHARSET ) ); true, INetURLObject::DECODE_WITH_CHARSET ) );
else if ( !pImp->aTitle.Len() ) else if ( pImp->aTitle.isEmpty() )
pImp->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, pImp->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT,
true, INetURLObject::DECODE_WITH_CHARSET ); true, INetURLObject::DECODE_WITH_CHARSET );
} }
...@@ -929,11 +929,11 @@ OUString SfxObjectShell::GetTitle ...@@ -929,11 +929,11 @@ OUString SfxObjectShell::GetTitle
return X(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI )); return X(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ));
// Generate Title from file name if possible // Generate Title from file name if possible
if ( !pImp->aTitle.Len() ) if ( pImp->aTitle.isEmpty() )
pImp->aTitle = aURL.GetBase(); pImp->aTitle = aURL.GetBase();
// workaround for the case when the name can not be retrieved from URL by INetURLObject // workaround for the case when the name can not be retrieved from URL by INetURLObject
if ( !pImp->aTitle.Len() ) if ( pImp->aTitle.isEmpty() )
pImp->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ); pImp->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
} }
...@@ -952,7 +952,7 @@ void SfxObjectShell::InvalidateName() ...@@ -952,7 +952,7 @@ void SfxObjectShell::InvalidateName()
*/ */
{ {
pImp->aTitle.Erase(); pImp->aTitle = "";
SetName( GetTitle( SFX_TITLE_APINAME ) ); SetName( GetTitle( SFX_TITLE_APINAME ) );
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) ); Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
...@@ -965,7 +965,7 @@ void SfxObjectShell::SetNamedVisibility_Impl() ...@@ -965,7 +965,7 @@ void SfxObjectShell::SetNamedVisibility_Impl()
if ( !pImp->bIsNamedVisible ) if ( !pImp->bIsNamedVisible )
{ {
pImp->bIsNamedVisible = sal_True; pImp->bIsNamedVisible = sal_True;
if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && !pImp->aTitle.Len() ) if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && pImp->aTitle.isEmpty() )
{ {
pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex(); pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex();
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) ); Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
...@@ -1398,9 +1398,9 @@ void SfxObjectShell::PositionView_Impl() ...@@ -1398,9 +1398,9 @@ void SfxObjectShell::PositionView_Impl()
if( pMark ) if( pMark )
{ {
SfxViewShell* pSh = pMark->pFrame->GetViewShell(); SfxViewShell* pSh = pMark->pFrame->GetViewShell();
if( pMark->aUserData.Len() ) if( !pMark->aUserData.isEmpty() )
pSh->ReadUserData( pMark->aUserData, sal_True ); pSh->ReadUserData( pMark->aUserData, sal_True );
else if( pMark->aMark.Len() ) else if( !pMark->aMark.isEmpty() )
pSh->JumpToMark( pMark->aMark ); pSh->JumpToMark( pMark->aMark );
DELETEZ( Get_Impl()->pMarkData ); DELETEZ( Get_Impl()->pMarkData );
} }
......
...@@ -402,7 +402,7 @@ SfxObjectShell::~SfxObjectShell() ...@@ -402,7 +402,7 @@ SfxObjectShell::~SfxObjectShell()
} }
// The removing of the temporary file must be done as the latest step in the document destruction // The removing of the temporary file must be done as the latest step in the document destruction
if ( pImp->aTempName.Len() ) if ( !pImp->aTempName.isEmpty() )
{ {
OUString aTmp; OUString aTmp;
::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->aTempName, aTmp ); ::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->aTempName, aTmp );
......
...@@ -40,8 +40,8 @@ DBG_NAMEEX(SfxObjectShell) ...@@ -40,8 +40,8 @@ DBG_NAMEEX(SfxObjectShell)
class SfxViewFrame; class SfxViewFrame;
struct MarkData_Impl struct MarkData_Impl
{ {
String aMark; OUString aMark;
String aUserData; OUString aUserData;
SfxViewFrame* pFrame; SfxViewFrame* pFrame;
}; };
...@@ -61,8 +61,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess ...@@ -61,8 +61,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
::sfx2::DocumentMacroMode ::sfx2::DocumentMacroMode
aMacroMode; aMacroMode;
SfxProgress* pProgress; SfxProgress* pProgress;
String aTitle; OUString aTitle;
String aTempName; OUString aTempName;
DateTime nTime; DateTime nTime;
sal_uInt16 nVisualDocumentNumber; sal_uInt16 nVisualDocumentNumber;
sal_Int16 nDocumentSignatureState; sal_Int16 nDocumentSignatureState;
......
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