summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/envelp/label1.cxx11
-rw-r--r--sw/source/ui/envelp/labelexp.cxx19
3 files changed, 16 insertions, 18 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 79e85f950a33..93e7d07a702d 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -100,7 +100,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet>& xSourceProp
{
OUString sDBURL;
xSourceProperties->getPropertyValue("URL") >>= sDBURL;
- if(String(sDBURL).SearchAscii("sdbc:flat:") == 0)
+ if (sDBURL.startsWith("sdbc:flat:"))
{
uno::Sequence<OUString> aFilters;
xSourceProperties->getPropertyValue("TableFilter") >>= aFilters;
@@ -125,7 +125,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet>& xSourceProp
}
if(!sCharSet.compareToAscii( cUTF8 ))
{
- sURL = String(sDBURL).Copy( 10 );
+ sURL = sDBURL.copy(10);
//#i97577# at this point the 'URL' can also be a file name!
sURL = URIHelper::SmartRel2Abs( INetURLObject(), sURL );
sURL += "/";
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 41ec2904cf4e..3187c821636a 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -596,7 +596,7 @@ SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet)
SwVisitingCardPage::~SwVisitingCardPage()
{
for(sal_uInt16 i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); i++)
- delete (String*)m_pAutoTextGroupLB->GetEntryData( i );
+ delete (OUString*)m_pAutoTextGroupLB->GetEntryData( i );
m_xAutoText = 0;
ClearUserData();
@@ -623,11 +623,11 @@ int SwVisitingCardPage::DeactivatePage(SfxItemSet* _pSet)
sal_Bool SwVisitingCardPage::FillItemSet(SfxItemSet& rSet)
{
- String* pGroup = (String*)m_pAutoTextGroupLB->GetEntryData(
+ const OUString* pGroup = (const OUString*)m_pAutoTextGroupLB->GetEntryData(
m_pAutoTextGroupLB->GetSelectEntryPos());
OSL_ENSURE(pGroup, "no group selected?");
- if(pGroup)
+ if (pGroup)
aLabItem.sGlossaryGroup = *pGroup;
SvTreeListEntry* pSelEntry = m_pAutoTextLB->FirstSelected();
@@ -674,8 +674,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
bool bFound = false;
sal_uInt16 i;
for(i = 0; i < m_pAutoTextGroupLB->GetEntryCount() && !bFound; i++)
- if( String(aLabItem.sGlossaryGroup) ==
- *(String*)m_pAutoTextGroupLB->GetEntryData( i ))
+ if( aLabItem.sGlossaryGroup == *(const OUString*)m_pAutoTextGroupLB->GetEntryData( i ))
{
bFound = true;
break;
@@ -686,7 +685,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
// initially search for a group starting with "crd" which is the name of the
// business card AutoTexts
for(i = 0; i < m_pAutoTextGroupLB->GetEntryCount() && !bFound; i++)
- if(0 == (*(String*)m_pAutoTextGroupLB->GetEntryData( i )).SearchAscii( "crd") )
+ if (((const OUString*)m_pAutoTextGroupLB->GetEntryData(i))->startsWith("crd"))
{
bFound = true;
break;
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index b8ae603439a2..716d95055fb6 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -73,9 +73,8 @@ void SwVisitingCardPage::InitFrameControl()
uno::Any aTitle = xPrSet->getPropertyValue( uTitleName );
OUString uTitle;
aTitle >>= uTitle;
- String sGroup(pGroups[i]);
sal_uInt16 nEntry = m_pAutoTextGroupLB->InsertEntry(uTitle);
- m_pAutoTextGroupLB->SetEntryData(nEntry, new String(sGroup));
+ m_pAutoTextGroupLB->SetEntryData(nEntry, new OUString(pGroups[i]));
}
}
catch (const Exception&)
@@ -86,11 +85,11 @@ void SwVisitingCardPage::InitFrameControl()
{
if(LISTBOX_ENTRY_NOTFOUND == m_pAutoTextGroupLB->GetSelectEntryPos())
m_pAutoTextGroupLB->SelectEntryPos(0);
- String sCurGroupName(
- *(String*)m_pAutoTextGroupLB->GetEntryData(m_pAutoTextGroupLB->GetSelectEntryPos()));
- if(m_xAutoText->hasByName(sCurGroupName))
+ const OUString *pCurGroupName(
+ (const OUString*)m_pAutoTextGroupLB->GetEntryData(m_pAutoTextGroupLB->GetSelectEntryPos()));
+ if(m_xAutoText->hasByName(*pCurGroupName))
{
- uno::Any aGroup = m_xAutoText->getByName(sCurGroupName);
+ uno::Any aGroup = m_xAutoText->getByName(*pCurGroupName);
try
{
uno::Reference< text::XAutoTextGroup > xGroup;
@@ -120,9 +119,9 @@ IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl)
if(LISTBOX_ENTRY_NOTFOUND != m_pAutoTextGroupLB->GetSelectEntryPos())
{
- String sGroup( *(String*)m_pAutoTextGroupLB->GetEntryData(
+ const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetEntryData(
m_pAutoTextGroupLB->GetSelectEntryPos() ) );
- uno::Any aGroup = m_xAutoText->getByName(sGroup);
+ uno::Any aGroup = m_xAutoText->getByName(*pGroup);
uno::Reference< text::XAutoTextGroup > xGroup;
aGroup >>= xGroup;
@@ -148,9 +147,9 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
{
if (m_pAutoTextGroupLB == pBox)
{
- String sGroup( *(String*)m_pAutoTextGroupLB->GetEntryData(
+ const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetEntryData(
m_pAutoTextGroupLB->GetSelectEntryPos()));
- uno::Any aGroup = m_xAutoText->getByName(sGroup);
+ uno::Any aGroup = m_xAutoText->getByName(*pGroup);
uno::Reference< text::XAutoTextGroup > xGroup;
aGroup >>= xGroup;