Kaydet (Commit) 32447330 authored tarafından Matteo Casalin's avatar Matteo Casalin

String/XubString to OUString

Change-Id: I0b36d16375ef9ecc751bed1171ea2ecd0c524744
üst a2b4ebdf
...@@ -616,7 +616,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( ...@@ -616,7 +616,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders(); const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders();
for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{ {
const XubString& rHeader = rHeaders.GetString( i ); const OUString rHeader = rHeaders.GetString( i );
SvTreeListEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader); SvTreeListEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
pEntry->SetUserData((void*)(sal_IntPtr)i); pEntry->SetUserData((void*)(sal_IntPtr)i);
} }
...@@ -1026,11 +1026,9 @@ SwAssignFieldsControl::SwAssignFieldsControl( ...@@ -1026,11 +1026,9 @@ SwAssignFieldsControl::SwAssignFieldsControl(
//fill the controls //fill the controls
for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{ {
const XubString& rHeader = rHeaders.GetString( i ); const OUString rHeader = rHeaders.GetString( i );
FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr())); FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr()));
String sLabel(OUString("<>")); pNewText->SetText("<" + rHeader + ">");
sLabel.Insert(rHeader, 1);
pNewText->SetText(sLabel);
ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr()));
pNewLB->SetHelpId( aHIDs[i] ); pNewLB->SetHelpId( aHIDs[i] );
pNewLB->SelectEntryPos(0); pNewLB->SelectEntryPos(0);
...@@ -1179,7 +1177,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) ...@@ -1179,7 +1177,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox) IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox)
{ {
String sColumn = pBox->GetSelectEntry(); const OUString sColumn = pBox->GetSelectEntry();
uno::Reference< XColumnsSupplier > xColsSupp( m_rConfigItem.GetResultSet(), uno::UNO_QUERY); uno::Reference< XColumnsSupplier > xColsSupp( m_rConfigItem.GetResultSet(), uno::UNO_QUERY);
uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0; uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
OUString sPreview; OUString sPreview;
...@@ -1255,14 +1253,14 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( ...@@ -1255,14 +1253,14 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
m_rConfigItem(rConfigItem) m_rConfigItem(rConfigItem)
{ {
//resize the HeaderBar //resize the HeaderBar
String sAddressElement( SW_RES(ST_ADDRESSELEMENT )); OUString sAddressElement( SW_RESSTR(ST_ADDRESSELEMENT) );
String sMatchesTo( SW_RES(ST_MATCHESTO )); const OUString sMatchesTo( SW_RESSTR(ST_MATCHESTO) );
String sPreview( SW_RES(ST_PREVIEW )); const OUString sPreview( SW_RESSTR(ST_PREVIEW) );
if(!bIsAddressBlock) if(!bIsAddressBlock)
{ {
m_aPreviewFI.SetText(String(SW_RES(ST_SALUTATIONPREVIEW))); m_aPreviewFI.SetText(SW_RESSTR(ST_SALUTATIONPREVIEW));
m_aMatchingFI.SetText(String(SW_RES(ST_SALUTATIONMATCHING))); m_aMatchingFI.SetText(SW_RESSTR(ST_SALUTATIONMATCHING));
sAddressElement = String(SW_RES(ST_SALUTATIONELEMENT)); sAddressElement = SW_RESSTR(ST_SALUTATIONELEMENT);
} }
FreeResource(); FreeResource();
Size aOutputSize(m_pFieldsControl->m_aHeaderHB.GetSizePixel()); Size aOutputSize(m_pFieldsControl->m_aHeaderHB.GetSizePixel());
...@@ -1276,9 +1274,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( ...@@ -1276,9 +1274,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
m_pFieldsControl->SetModifyHdl(LINK(this, SwAssignFieldsDialog, AssignmentModifyHdl_Impl )); m_pFieldsControl->SetModifyHdl(LINK(this, SwAssignFieldsDialog, AssignmentModifyHdl_Impl ));
String sMatching = m_aMatchingFI.GetText(); m_aMatchingFI.SetText(m_aMatchingFI.GetText().replaceAll("%1", sMatchesTo));
sMatching.SearchAndReplaceAscii("%1", sMatchesTo);
m_aMatchingFI.SetText(sMatching);
m_aOK.SetClickHdl(LINK(this, SwAssignFieldsDialog, OkHdl_Impl)); m_aOK.SetClickHdl(LINK(this, SwAssignFieldsDialog, OkHdl_Impl));
} }
...@@ -1299,11 +1295,8 @@ uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments() ...@@ -1299,11 +1295,8 @@ uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments()
aLBIter != m_pFieldsControl->m_aMatches.end(); aLBIter != m_pFieldsControl->m_aMatches.end();
++aLBIter, ++nIndex) ++aLBIter, ++nIndex)
{ {
String sSelect = (*aLBIter)->GetSelectEntry(); const OUString sSelect = (*aLBIter)->GetSelectEntry();
if(m_sNone != sSelect) pAssignments[nIndex] = (m_sNone != sSelect) ? sSelect : OUString();
pAssignments[nIndex] = sSelect;
else
pAssignments[nIndex] = OUString();
} }
return aAssignments; return aAssignments;
} }
...@@ -1320,7 +1313,7 @@ IMPL_LINK_NOARG(SwAssignFieldsDialog, OkHdl_Impl) ...@@ -1320,7 +1313,7 @@ IMPL_LINK_NOARG(SwAssignFieldsDialog, OkHdl_Impl)
IMPL_LINK_NOARG(SwAssignFieldsDialog, AssignmentModifyHdl_Impl) IMPL_LINK_NOARG(SwAssignFieldsDialog, AssignmentModifyHdl_Impl)
{ {
uno::Sequence< OUString > aAssignments = CreateAssignments(); uno::Sequence< OUString > aAssignments = CreateAssignments();
String sPreview = SwAddressPreview::FillData( const OUString sPreview = SwAddressPreview::FillData(
m_rPreviewString, m_rConfigItem, &aAssignments); m_rPreviewString, m_rConfigItem, &aAssignments);
m_aPreviewWIN.SetAddress(sPreview); m_aPreviewWIN.SetAddress(sPreview);
return 0; return 0;
......
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