diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/inc/fltshell.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww1/fltshell.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww1/w1class.hxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww1/w1filter.cxx | 213 | ||||
-rw-r--r-- | sw/source/ui/dbui/addresslistdialog.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/envelp/label1.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/envelp/labelexp.cxx | 19 |
7 files changed, 157 insertions, 104 deletions
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index dea09cae1458..bf89601a2d08 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -664,7 +664,7 @@ public: bool IsFlagSet(SwFltControlStack::Flags no) const { return aStack.IsFlagSet(no); } - void ConvertUStr( String& rInOut ); + OUString ConvertUStr(const OUString& rInOut); OUString QuoteStr( const OUString& rIn ); // folgende status kann die shell verwalten: diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index eb789ae9a8fe..f8f858c8c3f1 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1127,9 +1127,9 @@ SwFltShell& SwFltShell::operator << ( const String& rStr ) return *this; } -void SwFltShell::ConvertUStr( String& rInOut ) +OUString SwFltShell::ConvertUStr(const OUString& rInOut) { - rInOut = GetAppCharClass().uppercase( rInOut ); + return GetAppCharClass().uppercase(rInOut); } // QuoteString() wandelt CRs abhaengig von nFieldIniFlags in '\n' oder "\0x0d" @@ -1255,7 +1255,7 @@ SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle ) SwFltShell& SwFltShell::operator << (SwFltBookmark& aBook) { - ConvertUStr( aBook.aName ); + aBook.aName = ConvertUStr(aBook.aName); aBook.aVal = QuoteStr(aBook.aVal); aEndStack.NewAttr(*pPaM->GetPoint(), aBook); return *this; diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx index 804220ba7e6d..337929e724ff 100644 --- a/sw/source/filter/ww1/w1class.hxx +++ b/sw/source/filter/ww1/w1class.hxx @@ -164,7 +164,7 @@ public: } sal_Bool GetError() { return !bOK; } sal_Unicode Out( Ww1Shell&, sal_uLong& ); - sal_Unicode Out( String&, sal_uLong=0xffffffff); + sal_Unicode Out( OUString&, sal_uLong=0xffffffff); sal_Unicode Out( sal_Unicode& ); friend std::ostream& operator <<(std::ostream&, Ww1PlainText&); String& Fill( String&, sal_uLong=0, sal_uLong=0xffffffff ); @@ -1209,7 +1209,7 @@ public: class Ww1Fields : public Ww1PlcFields { sal_uInt16 nPlcIndex; - String sErgebnis; // das von word errechnete ergebniss + OUString sErgebnis; // das von word errechnete ergebniss SwField* pField; sal_uLong Where(sal_uInt16 nIndex) // innerhalb des textes { return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); } @@ -1545,7 +1545,7 @@ public: // innerhalb des textes sal_uLong Where() { return pDoc->Where(); } void Fill( sal_Unicode& rChr ) { pDoc->Out( rChr ); } - sal_uInt8 Fill( String& rStr, sal_uLong ulLen) + sal_uInt8 Fill( OUString& rStr, sal_uLong ulLen) { ulLen += pDoc->Where(); return sal::static_int_cast< sal_uInt8 >(pDoc->Out(rStr, ulLen)); diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index 00d32aa3e3a3..3200edc74756 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -426,7 +426,7 @@ void Ww1Fields::Stop( Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode& c) // gelten auch wirklich eingelesen werden und dem feld // zugeordnet werden. } - if (sErgebnis.Len()) + if (!sErgebnis.isEmpty()) rOut << sErgebnis; } } @@ -434,17 +434,17 @@ void Ww1Fields::Stop( Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode& c) enum WWDateTime{ WW_DONTKNOW = 0x0, WW_DATE = 0x1, WW_TIME = 0x2, WW_BOTH = 0x3 }; -static WWDateTime GetTimeDatePara( const String& rForm, +static WWDateTime GetTimeDatePara( const OUString& rForm, SwTimeFormat* pTime = 0, SwDateFormat* pDate = 0 ) { WWDateTime eDT = WW_BOTH; - if( STRING_NOTFOUND == rForm.Search( 'H' )) // H -> 24h + if (rForm.indexOf('H') != -1) // H -> 24h { if( pTime ) *pTime = TF_SSMM_24; } - else if( STRING_NOTFOUND == rForm.Search( 'H' )) // h -> 24h + else if (rForm.indexOf('H') != -1) // h -> 24h { if( pTime ) *pTime = TF_SSMM_12; @@ -454,13 +454,13 @@ static WWDateTime GetTimeDatePara( const String& rForm, eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_TIME ); } - xub_StrLen nDPos = 0; - while( STRING_NOTFOUND != nDPos ) + sal_Int32 nDPos = 0; + while (1) { - nDPos = rForm.Search( 'M', nDPos ); // M -> Datum - if( !nDPos ) + nDPos = rForm.indexOf('M', nDPos); // M -> Datum + if (nDPos == 0 || nDPos == -1) break; - sal_Unicode cPrev = rForm.GetChar( nDPos - 1 ); + sal_Unicode cPrev = rForm[nDPos - 1]; // ignoriere dabei "AM", "aM", "PM", "pM" if( 'a' != cPrev && 'A' != cPrev && 'p' != cPrev && 'P' != cPrev ) break; @@ -468,7 +468,7 @@ static WWDateTime GetTimeDatePara( const String& rForm, ++nDPos; } - if( STRING_NOTFOUND != nDPos ) // Monat -> Datum ? + if (nDPos != -1) // Monat -> Datum ? { static SwDateFormat const aDateA[32] = { @@ -482,32 +482,32 @@ static WWDateTime GetTimeDatePara( const String& rForm, DFF_DDDMMMY, DFF_DDDMMMY, DFF_DDDMMMYY, DFF_DDDMMMYY }; - bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) || - STRING_NOTFOUND != rForm.Search( 'T' ) || - STRING_NOTFOUND != rForm.Search( 'd' ) || - STRING_NOTFOUND != rForm.Search( 'D' ); + bool bHasDay = rForm.indexOf('t') != -1 || + rForm.indexOf('T') != -1 || + rForm.indexOf('d') != -1 || + rForm.indexOf('D') != -1; - sal_Bool bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) || - STRING_NOTFOUND != rForm.SearchAscii( "TTTT" ) || - STRING_NOTFOUND != rForm.SearchAscii( "dddd" ) || - STRING_NOTFOUND != rForm.SearchAscii( "DDDD" ); + sal_Bool bLongDayOfWeek = rForm.indexOf("tttt") != -1 || + rForm.indexOf("TTTT") != -1 || + rForm.indexOf("dddd") != -1 || + rForm.indexOf("DDDD") != -1; - sal_Bool bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) || - STRING_NOTFOUND != rForm.SearchAscii( "TTT" ) || - STRING_NOTFOUND != rForm.SearchAscii( "ddd" ) || - STRING_NOTFOUND != rForm.SearchAscii( "DDD" ); + sal_Bool bDayOfWeek = rForm.indexOf("ttt") != -1 || + rForm.indexOf("TTT") != -1 || + rForm.indexOf("ddd") != -1 || + rForm.indexOf("DDD") != -1; // M, MM -> numeric month // MMM, MMMM -> text. month - sal_Bool bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" ); + sal_Bool bLitMonth = rForm.indexOf("MMM") != -1; // MMMM -> full month - sal_Bool bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" ); + sal_Bool bFullMonth = rForm.indexOf("MMMM") != -1; // jj, JJ -> 2-col-year // jjjj, JJJJ -> 4-col-year - sal_Bool bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) || - STRING_NOTFOUND != rForm.SearchAscii( "JJJ" ) || - STRING_NOTFOUND != rForm.SearchAscii( "yyy" ) || - STRING_NOTFOUND != rForm.SearchAscii( "YYY" ); + sal_Bool bFullYear = rForm.indexOf("jjj") != -1 || + rForm.indexOf("JJJ") != -1 || + rForm.indexOf("yyy") != -1 || + rForm.indexOf("YYY") != -1; sal_uInt16 i = ( bLitMonth & 1 ) | ( ( bFullYear & 1 ) << 1 ) @@ -537,7 +537,7 @@ extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich, void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) { String sType; // der typ als string - String sFormel; // die formel + OUString sFormel; // die formel String sFormat; String sDTFormat; // Datum / Zeit-Format W1_FLD* pData = GetData(); // die an den plc gebunden daten @@ -548,15 +548,21 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) OSL_ENSURE(c==19, "Ww1Fields"); // sollte auch beginn sein if (pData->chGet()==19 && c == 19) { - String aStr; + OUString aStr; c = rMan.Fill( aStr, GetLength() ); OSL_ENSURE(Ww1PlainText::IsChar(c), "Ww1Fields"); - xub_StrLen pos = aStr.Search(' '); + sal_Int32 pos = aStr.indexOf(' '); // get type out of text - sType = aStr.Copy( 0, pos ); - aStr.Erase( 0, pos ); - if ( pos != STRING_NOTFOUND ) - aStr.Erase(0, 1); + if ( pos != -1 ) + { + sType = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + sType = aStr; + aStr = ""; + } sFormel += aStr; sal_uInt8 rbType = pData->fltGet(); do { @@ -571,8 +577,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) Out(rOut, rMan, nDepth+1); rMan.Fill(c); OSL_ENSURE(c==21, "Ww1PlainText"); - sFormel.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "Ww" )); - sFormel += OUString::number( nPlcIndex ); + sFormel += "Ww" + OUString::number(nPlcIndex); c = rMan.Fill(aStr, GetLength()); OSL_ENSURE(Ww1PlainText::IsChar(c), "Ww1PlainText"); sFormel += aStr; @@ -581,13 +586,19 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) while (pData->chGet()==19); // get format out of text - pos = sFormel.SearchAscii( "\\*" ); - sFormat = sFormel.Copy( pos ); - sFormel.Erase( pos ); + pos = sFormel.indexOf("\\*"); + if (pos != -1) + { + sFormat = sFormel.copy(pos); + sFormel = sFormel.copy(0, pos); + } - pos = sFormel.SearchAscii( "\\@" ); - sDTFormat = sFormel.Copy( pos ); - sFormel.Erase( pos ); + pos = sFormel.indexOf( "\\@" ); + if (pos != -1) + { + sDTFormat = sFormel.copy(pos); + sFormel = sFormel.copy(0, pos); + } // der formelteil ist zuende, kommt ein ergebnisteil? if( pData->chGet() == 20 ) @@ -596,7 +607,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) OSL_ENSURE(c==20, "Ww1PlainText"); c = rMan.Fill(sErgebnis, GetLength()); if (!Ww1PlainText::IsChar(c)) - sErgebnis += c; //~ mdt: sonderzeichenbenhandlung + sErgebnis += OUString(c); //~ mdt: sonderzeichenbenhandlung ++(*this); pData = GetData(); } @@ -614,7 +625,7 @@ oncemore: switch (rbType) { case 3: // bookmark reference - rOut.ConvertUStr( sFormel ); + sFormel = rOut.ConvertUStr(sFormel); pField = new SwGetRefField( (SwGetRefFieldType*) rOut.GetSysFldType( RES_GETREFFLD ), sFormel, @@ -625,13 +636,21 @@ oncemore: break; case 6: // set command { - pos = aStr.Search(' '); - String aName( aStr.Copy( 0, pos )); - aStr.Erase(0, pos ); - aStr.Erase(0, 1); - if( !aName.Len() ) + pos = aStr.indexOf(' '); + OUString aName; + if (pos != -1) + { + aName = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + aName = aStr; + aStr = ""; + } + if (aName.isEmpty()) break; - rOut.ConvertUStr( aName ); + aName = rOut.ConvertUStr(aName); SwFieldType* pFT = rOut.GetDoc().InsertFldType( SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) ); pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr); @@ -643,11 +662,20 @@ oncemore: break; case 14: // info var { - pos = aStr.Search(' '); - String aSubType( aStr.Copy( 0, pos )); - aStr.Erase(0, pos ); - aStr.Erase(0, 1); - rOut.ConvertUStr( aSubType ); + OUString aSubType; + pos = aStr.indexOf(' '); + if (pos != -1) + { + aSubType = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + aSubType = aStr; + aStr = ""; + } + + aSubType = rOut.ConvertUStr(aSubType); // ganz grosze schiete: der typ 'info' kann einem der @@ -655,7 +683,7 @@ oncemore: // das eingentliche feld der doc-info. // kein ';' benutzen mit folgendem macro: #define IS(sd, se, t) \ - if (aSubType.EqualsAscii( sd ) || aSubType.EqualsAscii( se)) \ + if (aSubType == sd || aSubType == se) \ rbType = t; \ else @@ -827,13 +855,22 @@ oncemore: break; case 36: // print command, Einfuegendatei { - pos = aStr.Search(' '); - String aFName( aStr.Copy( 0, pos )); - aStr.Erase(0, pos ); - aStr.Erase(0, 1); - if( !aFName.Len() ) + OUString aFName; + pos = aStr.indexOf(' '); + if (pos != -1) + { + aFName = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + aFName = aStr; + aStr = ""; + } + + if(aFName.isEmpty()) break; - aFName.SearchAndReplaceAscii( "\\\\", OUString('\\') ); + aFName = aFName.replaceFirst("\\\\", "\\"); aFName = URIHelper::SmartRel2Abs( INetURLObject(rOut.GetBaseURL()), aFName ); @@ -854,11 +891,20 @@ oncemore: break; case 38: // ask command { - pos = aStr.Search(' '); - String aName( aStr.Copy( 0, pos )); - aStr.Erase(0, pos ); - aStr.Erase(0, 1); - if( !aName.Len() ) + OUString aName; + pos = aStr.indexOf(' '); + if (pos != -1) + { + aName = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + aName = aStr; + aStr = ""; + } + + if (aName.isEmpty()) break; SwFieldType* pFT = rOut.GetDoc().InsertFldType( @@ -875,11 +921,20 @@ oncemore: break; case 51: // macro button { - pos = aStr.Search(' '); - OUString aName( aStr.Copy( 0, pos )); - aStr.Erase(0, pos ); - aStr.Erase(0, 1); - if( aName.isEmpty() || !aStr.Len() ) + OUString aName; + pos = aStr.indexOf(' '); + if (pos != -1) + { + aName = aStr.copy(0, pos); + aStr = aStr.copy(pos+1); + } + else + { + aName = aStr; + aStr = ""; + } + + if (aName.isEmpty() || aStr.isEmpty()) break; pField = new SwMacroField( (SwMacroFieldType*) @@ -889,7 +944,7 @@ oncemore: break; case 55: // read tiff / or better: import anything { - const sal_Unicode* pFormel = sFormel.GetBuffer(); + const sal_Unicode* pFormel = sFormel.getStr(); const sal_Unicode* pDot = 0; String sName; while (*pFormel != '\0' && *pFormel != ' ') @@ -966,8 +1021,8 @@ oncemore: bKnown = false; break; } - if( bKnown || sErgebnis.EqualsAscii( "\270" )) - this->sErgebnis.Erase(); + if( bKnown || sErgebnis == "\270" ) + this->sErgebnis = ""; else this->sErgebnis = sErgebnis; } @@ -1244,10 +1299,10 @@ sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd ) return Ww1PlainText::MinChar; } -sal_Unicode Ww1PlainText::Out( String& rStr, sal_uLong ulEnd ) +sal_Unicode Ww1PlainText::Out(OUString& rStr, sal_uLong ulEnd) { // wie Out(Shell..., jedoch ausgabe auf einen string - rStr.Erase(); + rStr = ""; if (ulEnd > Count()) ulEnd = Count(); while (ulSeek < ulEnd) @@ -1255,7 +1310,7 @@ sal_Unicode Ww1PlainText::Out( String& rStr, sal_uLong ulEnd ) sal_Unicode c = (*this)[ulSeek]; ++(*this); if( Ww1PlainText::IsChar(c) ) - rStr += c; + rStr += OUString(c); else return c; } 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; |