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

convert includes/svx/srchdlg.hxx from String to OUString

Change-Id: I7e2733f3011b3282873f3c80665f1c7297c2845e
üst ddab2056
...@@ -197,11 +197,11 @@ private: ...@@ -197,11 +197,11 @@ private:
bool bReadOnly; bool bReadOnly;
bool bConstruct; bool bConstruct;
sal_uIntPtr nModifyFlag; sal_uIntPtr nModifyFlag;
String aStylesStr; OUString aStylesStr;
String aLayoutStr; OUString aLayoutStr;
String aLayoutWriterStr; OUString aLayoutWriterStr;
String aLayoutCalcStr; OUString aLayoutCalcStr;
String aCalcStr; OUString aCalcStr;
std::vector<OUString> aSearchStrings; std::vector<OUString> aSearchStrings;
std::vector<OUString> aReplaceStrings; std::vector<OUString> aReplaceStrings;
...@@ -236,9 +236,9 @@ private: ...@@ -236,9 +236,9 @@ private:
void Init_Impl( int bHasItemSet ); void Init_Impl( int bHasItemSet );
void InitAttrList_Impl( const SfxItemSet* pSSet, void InitAttrList_Impl( const SfxItemSet* pSSet,
const SfxItemSet* pRSet ); const SfxItemSet* pRSet );
void Remember_Impl( const String &rStr,sal_Bool bSearch ); void Remember_Impl( const OUString &rStr,sal_Bool bSearch );
void PaintAttrText_Impl(); void PaintAttrText_Impl();
String& BuildAttrText_Impl( String& rStr, sal_Bool bSrchFlag ) const; OUString& BuildAttrText_Impl( OUString& rStr, sal_Bool bSrchFlag ) const;
void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ); void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool );
void EnableControls_Impl( const sal_uInt16 nFlags ); void EnableControls_Impl( const sal_uInt16 nFlags );
......
...@@ -366,7 +366,7 @@ void SvxSearchDialog::Construct_Impl() ...@@ -366,7 +366,7 @@ void SvxSearchDialog::Construct_Impl()
EnableControls_Impl( 0 ); EnableControls_Impl( 0 );
// Store old Text from m_pWordBtn // Store old Text from m_pWordBtn
aCalcStr += sal_Unicode('#'); aCalcStr += "#";
aCalcStr += m_pWordBtn->GetText(); aCalcStr += m_pWordBtn->GetText();
aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES ); aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES );
...@@ -798,7 +798,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) ...@@ -798,7 +798,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
m_pCalcSearchInLB->SelectEntryPos( SVX_SEARCHIN_NOTE ); m_pCalcSearchInLB->SelectEntryPos( SVX_SEARCHIN_NOTE );
break; break;
} }
m_pWordBtn->SetText( aCalcStr.GetToken( 0, '#' ) ); m_pWordBtn->SetText( aCalcStr.getToken( 0, '#' ) );
if ( pSearchItem->GetRowDirection() && if ( pSearchItem->GetRowDirection() &&
( nModifyFlag & MODIFY_ROWS ) == 0 ) ( nModifyFlag & MODIFY_ROWS ) == 0 )
...@@ -817,7 +817,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) ...@@ -817,7 +817,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
} }
else else
{ {
m_pWordBtn->SetText( aCalcStr.GetToken( 1, '#' ) ); m_pWordBtn->SetText( aCalcStr.getToken( 1, '#' ) );
if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_DRAW ) if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_DRAW )
{ {
...@@ -1045,7 +1045,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, ...@@ -1045,7 +1045,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
} }
// See to it that are the texts of the attributes are correct // See to it that are the texts of the attributes are correct
String aDesc; OUString aDesc;
if ( pSSet ) if ( pSSet )
{ {
...@@ -1061,7 +1061,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, ...@@ -1061,7 +1061,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
else else
pImpl->m_pSearchFormats->SetText( BuildAttrText_Impl( aDesc, sal_True ) ); pImpl->m_pSearchFormats->SetText( BuildAttrText_Impl( aDesc, sal_True ) );
if ( aDesc.Len() ) if ( !aDesc.isEmpty() )
bFormat |= sal_True; bFormat |= sal_True;
} }
} }
...@@ -1080,7 +1080,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, ...@@ -1080,7 +1080,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
else else
pImpl->m_pReplaceFormats->SetText( BuildAttrText_Impl( aDesc, sal_False ) ); pImpl->m_pReplaceFormats->SetText( BuildAttrText_Impl( aDesc, sal_False ) );
if ( aDesc.Len() ) if ( !aDesc.isEmpty() )
bFormat |= sal_True; bFormat |= sal_True;
} }
} }
...@@ -1432,7 +1432,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl) ...@@ -1432,7 +1432,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl)
if ( bFormat ) if ( bFormat )
return 0; return 0;
String sDesc; OUString sDesc;
if ( m_pLayoutBtn->IsChecked() ) if ( m_pLayoutBtn->IsChecked() )
{ {
...@@ -1529,9 +1529,9 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl) ...@@ -1529,9 +1529,9 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl)
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void SvxSearchDialog::Remember_Impl( const String &rStr,sal_Bool _bSearch ) void SvxSearchDialog::Remember_Impl( const OUString &rStr, sal_Bool _bSearch )
{ {
if ( !rStr.Len() ) if ( rStr.isEmpty() )
return; return;
std::vector<OUString>* pArr = _bSearch ? &aSearchStrings : &aReplaceStrings; std::vector<OUString>* pArr = _bSearch ? &aSearchStrings : &aReplaceStrings;
...@@ -2074,11 +2074,11 @@ IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer ) ...@@ -2074,11 +2074,11 @@ IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer )
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, OUString& SvxSearchDialog::BuildAttrText_Impl( OUString& rStr,
sal_Bool bSrchFlag ) const sal_Bool bSrchFlag ) const
{ {
if ( rStr.Len() ) if ( !rStr.isEmpty() )
rStr.Erase(); rStr = "";
SfxObjectShell* pSh = SfxObjectShell::Current(); SfxObjectShell* pSh = SfxObjectShell::Current();
DBG_ASSERT( pSh, "no DocShell" ); DBG_ASSERT( pSh, "no DocShell" );
...@@ -2117,8 +2117,8 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, ...@@ -2117,8 +2117,8 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr,
{ {
const SearchAttrItem& rItem = pList->GetObject(i); const SearchAttrItem& rItem = pList->GetObject(i);
if ( rStr.Len() ) if ( !rStr.isEmpty() )
rStr.AppendAscii( ", " ); rStr += ", ";
if ( !IsInvalidItem( rItem.pItem ) ) if ( !IsInvalidItem( rItem.pItem ) )
{ {
...@@ -2147,10 +2147,10 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, ...@@ -2147,10 +2147,10 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr,
void SvxSearchDialog::PaintAttrText_Impl() void SvxSearchDialog::PaintAttrText_Impl()
{ {
String aDesc; OUString aDesc;
BuildAttrText_Impl( aDesc, bSearch ); BuildAttrText_Impl( aDesc, bSearch );
if ( !bFormat && aDesc.Len() ) if ( !bFormat && !aDesc.isEmpty() )
bFormat = sal_True; bFormat = sal_True;
if ( bSearch ) if ( bSearch )
......
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