diff options
32 files changed, 149 insertions, 170 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index a683467eef6f..f7ed15fb5470 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -179,7 +179,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, SolarMutexGuard aGuard; mpBrowser->aFoundList.push_back( - new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ) + aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ); mpBrowser->aLbxFound.InsertEntry( GetReducedString( aFoundURL, 50 ), @@ -309,9 +309,9 @@ void TakeThread::execute() for( sal_uInt16 i = 0; i < nEntries && schedule(); i++ ) { if( mpBrowser->bTakeAll ) - aURL = INetURLObject( *mpBrowser->aFoundList[ nPos = i ] ); + aURL = INetURLObject( mpBrowser->aFoundList[ nPos = i ] ); else - aURL = INetURLObject(*mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]); + aURL = INetURLObject( mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]); mrTakenList.push_back( (sal_uLong)nPos ); @@ -390,14 +390,12 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) // refill found list for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i ) if( !aRemoveEntries[ i ] ) - aRemainingVector.push_back( *mpBrowser->aFoundList[ i ] ); + aRemainingVector.push_back( mpBrowser->aFoundList[i] ); - for ( i = 0, nCount = mpBrowser->aFoundList.size(); i < nCount; ++i ) - delete mpBrowser->aFoundList[ i ]; mpBrowser->aFoundList.clear(); for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i ) - mpBrowser->aFoundList.push_back( new String( aRemainingVector[ i ] ) ); + mpBrowser->aFoundList.push_back( aRemainingVector[ i ] ); aRemainingVector.clear(); @@ -812,9 +810,6 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties() xMediaPlayer.clear(); xDialogListener.clear(); - for ( size_t i = 0, n = aFoundList.size(); i < n; ++i ) - delete aFoundList[ i ]; - for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) { delete aFilterEntryList[ i ]; } @@ -1011,10 +1006,7 @@ void TPGalleryThemeProperties::SearchFiles() { SearchProgress* pProgress = new SearchProgress( this, aURL ); - for ( size_t i = 0, n = aFoundList.size(); i < n; ++i ) - delete aFoundList[ i ]; aFoundList.clear(); - aLbxFound.Clear(); pProgress->SetFileType( aCbbFileType.GetText() ); @@ -1110,7 +1102,7 @@ void TPGalleryThemeProperties::DoPreview() if( aString != aPreviewString ) { - INetURLObject _aURL( *aFoundList[ aLbxFound.GetEntryPos( aString ) ] ); + INetURLObject _aURL( aFoundList[ aLbxFound.GetEntryPos( aString ) ] ); bInputAllowed = sal_False; if ( !aWndPreview.SetGraphic( _aURL ) ) diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 6c7e489929fd..537060b30106 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -51,7 +51,7 @@ class SearchProgress; class TakeProgress; class TPGalleryThemeProperties; -typedef ::std::vector< UniString* > StringList; +typedef ::std::vector< OUString > StringList; typedef ::std::vector< sal_uLong > TokenList_impl; // --------------- diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index f07725866594..b28972086335 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -584,7 +584,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() ) { - const String aFollowEntry( aFollowLb.GetSelectEntry() ); + const OUString aFollowEntry( aFollowLb.GetSelectEntry() ); if ( pStyle->GetFollow() != aFollowEntry ) { @@ -601,10 +601,10 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) if ( aBaseLb.IsEnabled() ) { - String aParentEntry( aBaseLb.GetSelectEntry() ); + OUString aParentEntry( aBaseLb.GetSelectEntry() ); if ( SfxResId(STR_NONE).toString().equals(aParentEntry) || aParentEntry == pStyle->GetName() ) - aParentEntry.Erase(); + aParentEntry = OUString(); if ( pStyle->GetParent() != aParentEntry ) { diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 5598b08f65ac..bf60f44eadf2 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -64,9 +64,7 @@ SfxStyleDialog::SfxStyleDialog SetCurPageId( ID_TABPAGE_MANAGESTYLES ); else { - String sTxt( GetText() ); - sTxt += DEFINE_CONST_UNICODE(": ") ; - sTxt += rStyle.GetName(); + OUString sTxt = OUString(GetText()) + ": " + rStyle.GetName(); SetText( sTxt ); } delete pExampleSet; // in SfxTabDialog::Ctor() already created diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 6f816aa814e1..cafd12747a63 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -487,7 +487,7 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource, } // if such a template already exists: delete! - String aOldName(pHisSheet->GetName()); + OUString aOldName(pHisSheet->GetName()); SfxStyleFamily eOldFamily = pHisSheet->GetFamily(); SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily); @@ -600,8 +600,8 @@ sal_Bool SfxObjectShell::Remove SetOrganizerSearchMask(pMyPool); SfxStyleSheetBase* pMySheet = (*pMyPool)[nIdx2]; - String aName(pMySheet->GetName()); - String aEmpty; + OUString aName(pMySheet->GetName()); + OUString aEmpty; SfxStyleFamily eFamily = pMySheet->GetFamily(); pMyPool->Remove(pMySheet); bRet = sal_True; diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index fb698ea5415f..b46f3246e3a0 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -37,7 +37,7 @@ using namespace com::sun::star; using namespace com::sun::star::uno; -typedef ::std::vector< UniString* > UniStringList; +typedef ::std::vector< OUString > OUStringList; #define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \ p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \ @@ -413,27 +413,27 @@ void ImpPathDialog::UpdateEntries( const sal_Bool ) sal_uInt16 nEntries = aDir.Count(); if( nEntries ) { - UniStringList aSortDirList; + OUStringList aSortDirList; const comphelper::string::NaturalStringSorter& rSorter = ::vcl::unohelper::getNaturalStringSorterForAppLocale(); for ( sal_uInt16 n = 0; n < nEntries; n++ ) { DirEntry& rEntry = aDir[n]; - UniString aName( rEntry.GetName() ); - if( aName.Len() && ( aName.GetChar(0) != '.' ) && rEntry.Exists() ) + OUString aName( rEntry.GetName() ); + if( aName.getLength() && ( aName[0] != '.' ) && rEntry.Exists() ) { if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR ) { size_t l = 0; for( l = 0; l < aSortDirList.size(); l++ ) - if( rSorter.compare( *aSortDirList[ l ], aName ) > 0 ) + if( rSorter.compare( aSortDirList[l], aName ) > 0 ) break; if ( l < aSortDirList.size() ) { - UniStringList::iterator it = aSortDirList.begin(); + OUStringList::iterator it = aSortDirList.begin(); ::std::advance( it, l ); - aSortDirList.insert( it, new UniString( aName ) ); + aSortDirList.insert( it, aName ); } else { - aSortDirList.push_back( new UniString( aName ) ); + aSortDirList.push_back( aName ); } } } @@ -441,10 +441,8 @@ void ImpPathDialog::UpdateEntries( const sal_Bool ) for( size_t l = 0; l < aSortDirList.size(); l++ ) { - UniString aEntryStr( aTabString ); - aEntryStr += *aSortDirList[ l ]; + OUString aEntryStr = aTabString + aSortDirList[l]; pDirList->InsertEntry( aEntryStr ); - delete aSortDirList[ l ]; } } @@ -624,7 +622,7 @@ void ImpPathDialog::PostExecute() { } -void ImpPathDialog::SetPath( UniString const & rPath ) +void ImpPathDialog::SetPath( OUString const & rPath ) { aPath = DirEntry( rPath ); @@ -644,7 +642,7 @@ void ImpPathDialog::SetPath( UniString const & rPath ) pSvPathDialog->LeaveWait(); } -UniString ImpPathDialog::GetPath() const +OUString ImpPathDialog::GetPath() const { DirEntry aFile( pEdit->GetText() ); aFile.ToAbs(); diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx index abb5d7940f3f..8f6652d5225c 100644 --- a/svtools/source/dialogs/filedlg2.hxx +++ b/svtools/source/dialogs/filedlg2.hxx @@ -99,8 +99,8 @@ public: ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir ); virtual ~ImpPathDialog(); - virtual void SetPath( const String& rPath ); - virtual String GetPath() const; + virtual void SetPath( const OUString& rPath ); + virtual OUString GetPath() const; virtual void PreExecute(); virtual void PostExecute(); diff --git a/svx/inc/svx/fmview.hxx b/svx/inc/svx/fmview.hxx index c46bbdb5ca19..d31c225df119 100644 --- a/svx/inc/svx/fmview.hxx +++ b/svx/inc/svx/fmview.hxx @@ -72,7 +72,7 @@ public: @deprecated This method is deprecated. Use the version with a ODataAccessDescriptor instead. */ - SdrObject* CreateFieldControl(const UniString& rFieldDesc) const; + SdrObject* CreateFieldControl(const OUString& rFieldDesc) const; /** create a control pair (label/bound control) for the database field description given. */ diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 8fec3cf8e182..11a449c40407 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -877,7 +877,7 @@ void FmFilterModel::Remove( const ::std::vector<FmFilterData*>::iterator& rPos ) } //------------------------------------------------------------------------ -sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const +sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, OUString& rText, OUString& rErrorMsg) const { FmFormItem* pFormItem = PTR_CAST( FmFormItem, pItem->GetParent()->GetParent() ); try @@ -1092,14 +1092,14 @@ void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pE //======================================================================== class FmFilterString : public SvLBoxString { - UniString m_aName; + OUString m_aName; public: - FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName) + FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const OUString& aName) :SvLBoxString(pEntry,nFlags,rStr) ,m_aName(aName) { - m_aName.AppendAscii(": "); + m_aName += ": "; } virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); @@ -1231,8 +1231,8 @@ sal_Bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const rtl::OUS DBG_ASSERT(((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem), "FmFilterNavigator::EditedEntry() wrong entry"); - UniString aText(comphelper::string::strip(rNewText, ' ')); - if (aText.Len() == 0) + OUString aText(comphelper::string::strip(rNewText, ' ')); + if (aText.isEmpty()) { // deleting the entry asynchron sal_uLong nEvent; @@ -1240,7 +1240,7 @@ sal_Bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const rtl::OUS } else { - UniString aErrorMsg; + OUString aErrorMsg; if (m_pModel->ValidateText((FmFilterItem*)pEntry->GetUserData(), aText, aErrorMsg)) { @@ -1732,12 +1732,12 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) case SID_FM_FILTER_IS_NULL: case SID_FM_FILTER_IS_NOT_NULL: { - UniString aErrorMsg; - UniString aText; + OUString aErrorMsg; + OUString aText; if (nSlotId == SID_FM_FILTER_IS_NULL) - aText.AssignAscii("IS NULL"); + aText = "IS NULL"; else - aText.AssignAscii("IS NOT NULL"); + aText = "IS NOT NULL"; m_pModel->ValidateText((FmFilterItem*)pClicked->GetUserData(), aText, aErrorMsg); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 8059fcd364f0..bcf3147b90dd 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -173,16 +173,16 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView, if ( !pFormObject ) return sal_False; - UniString aHelpText; + OUString aHelpText; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet( pFormObject->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY ); if (xSet.is()) { if (::comphelper::hasProperty(FM_PROP_HELPTEXT, xSet)) aHelpText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT)).getStr(); - if (!aHelpText.Len() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet)) + if (!aHelpText.getLength() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet)) { - ::rtl::OUString aText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL)); + OUString aText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL)); INetURLObject aUrl(aText); // testen, ob es ein Protokoll-Typ ist, den ich anzeigen will @@ -200,7 +200,7 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView, } } } - if ( aHelpText.Len() != 0 ) + if ( aHelpText.getLength() != 0 ) { // Hilfe anzeigen Rectangle aItemRect = pObj->GetCurrentBoundRect(); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 31304ac7aa00..b71785a8dc6d 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1565,8 +1565,8 @@ void FmXFormShell::ExecuteSearch() // wenn der Dialog initial den Text des aktiven Controls anbieten soll, muss dieses ein XTextComponent-Interface habe, // ausserdem macht das nur Sinn, wenn das aktuelle Feld auch an ein Tabellen- (oder was-auch-immer-)Feld gebunden ist - UniString strActiveField; - UniString strInitialText; + OUString strActiveField; + OUString strInitialText; // ... das bekomme ich von meinem FormController DBG_ASSERT(m_xActiveController.is(), "FmXFormShell::ExecuteSearch : no active controller !"); Reference< XControl> xActiveControl( m_xActiveController->getCurrentControl()); @@ -2393,7 +2393,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn // -------------------------------------------------------------------------------------------- // assemble the list of fields to involve (that is, the ControlSources of all fields that have such a property) - UniString strFieldList, sFieldDisplayNames; + OUString strFieldList, sFieldDisplayNames; m_arrSearchedControls.clear(); m_arrRelativeGridColumn.clear(); @@ -2497,11 +2497,11 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn // the cursor has a field matching the control source ? if (xValidFormFields->hasByName(aName)) { - strFieldList += aName.getStr(); - strFieldList += ';'; + strFieldList = strFieldList + OUString(aName.getStr()) + ";"; - sFieldDisplayNames += ::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr(); - sFieldDisplayNames += ';'; + sFieldDisplayNames = sFieldDisplayNames + + OUString(::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr()) + + ";"; pfmscContextInfo->arrFields.push_back(xCurrentColumn); @@ -2527,12 +2527,12 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn if (IsSearchableControl(xControl)) { // all tests passed -> take along in the list - strFieldList += sControlSource.getStr(); - strFieldList += ';'; + strFieldList = strFieldList + OUString(sControlSource.getStr()) + ";"; // the label which should appear for the control : - sFieldDisplayNames += getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)).getStr(); - sFieldDisplayNames += ';'; + sFieldDisplayNames = sFieldDisplayNames + + OUString(getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)).getStr()) + + ";"; // mark the SdrObject (accelerates the treatment in OnFoundData) m_arrSearchedControls.push_back(pCurrent); diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index d52ce82af6d3..2e5edd8354dc 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -989,24 +989,23 @@ void FmSearchEngine::SearchNextImpl() if (!m_bWildcard) { // da natuerlich in allen anderen Faellen auch * und ? im Suchstring erlaubt sind, aber nicht als WildCards zaehlen // sollen, muss ich normieren - UniString aTmp(strSearchExpression); - const rtl::OUString s_sStar("\\*"); - const rtl::OUString s_sQuotation("\\?"); - aTmp.SearchAndReplaceAll(rtl::OUString('*'), s_sStar); - aTmp.SearchAndReplaceAll(rtl::OUString('?'), s_sQuotation); + OUString aTmp(strSearchExpression); + const OUString s_sStar("\\*"); + const OUString s_sQuotation("\\?"); + aTmp = aTmp.replaceAll("*", s_sStar); + aTmp = aTmp.replaceAll("?", s_sQuotation); strSearchExpression = aTmp; switch (m_nPosition) { case MATCHING_ANYWHERE : - strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression - + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); + strSearchExpression = "*" + strSearchExpression + "*"; break; case MATCHING_BEGINNING : - strSearchExpression = strSearchExpression + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); + strSearchExpression = strSearchExpression + "*"; break; case MATCHING_END : - strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression; + strSearchExpression = "*" + strSearchExpression; break; case MATCHING_WHOLETEXT : break; diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 047e9ab4c55c..abd632ba6838 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -424,12 +424,12 @@ SdrObject* FmFormView::CreateXFormsControl( const OXFormsDescriptor &_rDesc ) } //------------------------------------------------------------------------ -SdrObject* FmFormView::CreateFieldControl(const UniString& rFieldDesc) const +SdrObject* FmFormView::CreateFieldControl(const OUString& rFieldDesc) const { - ::rtl::OUString sDataSource = rFieldDesc.GetToken(0,sal_Unicode(11)); - ::rtl::OUString sObjectName = rFieldDesc.GetToken(1,sal_Unicode(11)); - sal_uInt16 nObjectType = (sal_uInt16)rFieldDesc.GetToken(2,sal_Unicode(11)).ToInt32(); - ::rtl::OUString sFieldName = rFieldDesc.GetToken(3,sal_Unicode(11)); + OUString sDataSource = rFieldDesc.getToken(0,sal_Unicode(11)); + OUString sObjectName = rFieldDesc.getToken(1,sal_Unicode(11)); + sal_uInt16 nObjectType = (sal_uInt16)rFieldDesc.getToken(2,sal_Unicode(11)).toInt32(); + OUString sFieldName = rFieldDesc.getToken(3,sal_Unicode(11)); if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty()) return NULL; diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 7be58df51c18..a7d96f60ef0f 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -336,7 +336,7 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su { // ListBox loeschen pListBox->Clear(); - UniString aTitle(SVX_RES(RID_STR_FIELDSELECTION)); + OUString aTitle(SVX_RES(RID_STR_FIELDSELECTION)); SetText(aTitle); if (!xForm.is()) @@ -370,7 +370,7 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su } // Prefix setzen - UniString aPrefix; + OUString aPrefix; StringListResource aPrefixes( SVX_RES( RID_RSC_TABWIN_PREFIX ) ); switch (m_nObjectType) @@ -399,10 +399,7 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su m_pChangeListener->addProperty(FM_PROP_COMMANDTYPE); // Titel setzen - aTitle.AppendAscii(" "); - aTitle += aPrefix; - aTitle.AppendAscii(" "); - aTitle += m_aObjectName.getStr(); + aTitle = aTitle + " " + aPrefix + " " + OUString(m_aObjectName.getStr()); SetText( aTitle ); } catch( const Exception& ) diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index c23630afd930..aeaee7408cc1 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -176,7 +176,7 @@ public: void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > & xCurrent); void Clear(); - sal_Bool ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const; + sal_Bool ValidateText(FmFilterItem* pItem, OUString& rText, OUString& rErrorMsg) const; void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem); void SetTextForItem(FmFilterItem* pItem, const ::rtl::OUString& rText); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 6cc3b83e165b..31327d000b14 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -472,7 +472,7 @@ String SwEditShell::GetCurWord() { const SwPaM& rPaM = *GetCrsr(); const SwTxtNode* pNd = rPaM.GetNode()->GetTxtNode(); - String aString = pNd ? + OUString aString = pNd ? pNd->GetCurWord(rPaM.GetPoint()->nContent.GetIndex()) : aEmptyStr; return aString; diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index 8a6e44cf481c..37aac4be9b6a 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -117,10 +117,10 @@ private: // the next two methods are needed to prevent the string hook called // with the res mgr mutex locked // like GetString, but doesn't call the string hook - TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, + TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( OUString& rStr, const sal_uInt8* pStr ); // like ReadString but doesn't call the string hook - TOOLS_DLLPRIVATE UniString ReadStringWithoutHook(); + TOOLS_DLLPRIVATE OUString ReadStringWithoutHook(); static ResMgr* ImplCreateResMgr( InternalResMgr* pImpl ) { return new ResMgr( pImpl ); } @@ -163,7 +163,7 @@ public: { return( pHT->GetGlobOff() ); } /// Return a string and its length out of the resource - static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr ); + static sal_uInt32 GetString( OUString& rStr, const sal_uInt8* pStr ); /// Return a byte string and its length out of the resource static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr ); @@ -190,7 +190,7 @@ public: sal_Int16 ReadShort(); sal_Int32 ReadLong(); - UniString ReadString(); + OUString ReadString(); rtl::OString ReadByteString(); /// Generate auto help ID for current resource stack diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index fb1c462d18e1..3b7d3487e922 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -1188,10 +1188,9 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) if (aContentType.Len()) { // Determine default Content-Type. - UniString aDefaultType = pMsg->GetDefaultContentType(); + OUString aDefaultType = pMsg->GetDefaultContentType(); - if (aDefaultType.CompareIgnoreCaseToAscii ( - aContentType, aContentType.Len()) == 0) + if (aDefaultType.equalsIgnoreAsciiCase(aContentType)) { // No need to specify default. pMsg->SetContentType (String()); diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 4d578f3a39a5..3a2a083f6c16 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -488,7 +488,7 @@ InternalResMgr::~InternalResMgr() const sal_Char* pLogFile = getenv( "STAR_RESOURCE_LOGGING" ); if ( pLogFile ) { - SvFileStream aStm( UniString( pLogFile, RTL_TEXTENCODING_ASCII_US ), STREAM_WRITE ); + SvFileStream aStm( OUString::createFromAscii( pLogFile ), STREAM_WRITE ); aStm.Seek( STREAM_SEEK_TO_END ); rtl::OStringBuffer aLine(RTL_CONSTASCII_STRINGPARAM("FileName: ")); aLine.append(rtl::OUStringToOString(aFileName, @@ -665,7 +665,7 @@ void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource ) #ifdef DBG_UTIL -UniString GetTypeRes_Impl( const ResId& rTypeId ) +OUString GetTypeRes_Impl( const ResId& rTypeId ) { // Return on resource errors static int bInUse = sal_False; @@ -1236,11 +1236,11 @@ sal_uInt64 ResMgr::GetUInt64( void* pDatum ) (sal_uInt64(*((sal_uInt8*)pDatum + 7)) << 0) ); } -sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr ) +sal_uInt32 ResMgr::GetStringWithoutHook( OUString& rStr, const sal_uInt8* pStr ) { sal_uInt32 nLen=0; sal_uInt32 nRet = GetStringSize( pStr, nLen ); - UniString aString( (sal_Char*)pStr, RTL_TEXTENCODING_UTF8, + OUString aString( (sal_Char*)pStr, RTL_TEXTENCODING_UTF8, RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT ); @@ -1248,9 +1248,9 @@ sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr return nRet; } -sal_uInt32 ResMgr::GetString( UniString& rStr, const sal_uInt8* pStr ) +sal_uInt32 ResMgr::GetString( OUString& rStr, const sal_uInt8* pStr ) { - UniString aString; + OUString aString; sal_uInt32 nRet = GetStringWithoutHook( aString, pStr ); if ( pImplResHookProc ) aString = pImplResHookProc( aString ); @@ -1613,20 +1613,20 @@ sal_Int32 ResMgr::ReadLong() return n; } -UniString ResMgr::ReadStringWithoutHook() +OUString ResMgr::ReadStringWithoutHook() { osl::Guard<osl::Mutex> aGuard( getResMgrMutex() ); if( pFallbackResMgr ) return pFallbackResMgr->ReadStringWithoutHook(); - UniString aRet; + OUString aRet; const ImpRCStack& rTop = aStack[nCurStack]; if( (rTop.Flags & RC_NOTFOUND) ) { #if OSL_DEBUG_LEVEL > 0 - aRet = OUString( RTL_CONSTASCII_USTRINGPARAM( "<resource not found>" ) ); + aRet = OUString("<resource not found>"); #endif } else @@ -1635,9 +1635,9 @@ UniString ResMgr::ReadStringWithoutHook() return aRet; } -UniString ResMgr::ReadString() +OUString ResMgr::ReadString() { - UniString aRet = ReadStringWithoutHook(); + OUString aRet = ReadStringWithoutHook(); if ( pImplResHookProc ) aRet = pImplResHookProc( aRet ); return aRet; @@ -1827,7 +1827,7 @@ rtl::OUString SimpleResMgr::ReadString( sal_uInt32 nId ) DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadString : have no impl class !" ); // perhaps constructed with an invalid filename ? - UniString sReturn; + OUString sReturn; if ( !m_pResImpl ) return sReturn; diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index ab0697957deb..72eb0d5fe9b1 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -135,7 +135,7 @@ public: void setOutEdit( MyOutWindow* pOutEdit ) { m_pOutEdit = pOutEdit; } void print( const sal_Char* pText ); - void print( const UniString& rText ); + void print( const OUString& rText ); }; //------------------------------------------------------------------------- @@ -145,7 +145,7 @@ void MessagePrinter::print( const sal_Char* pText ) } //------------------------------------------------------------------------- -void MessagePrinter::print( const UniString& rText ) +void MessagePrinter::print( const OUString& rText ) { SolarMutexGuard aGuard; @@ -733,11 +733,11 @@ protected: public: static UcbContent* create( - Ucb& rUCB, const UniString& rURL, MyOutWindow* pOutEdit ); + Ucb& rUCB, const OUString& rURL, MyOutWindow* pOutEdit ); void dispose(); - const UniString getURL() const; - const UniString getType() const; + const OUString getURL() const; + const OUString getType() const; uno::Sequence< ucb::CommandInfo > getCommands(); uno::Sequence< beans::Property > getProperties(); @@ -752,7 +752,7 @@ public: const rtl::OUString& rValue ); void addStringProperty( const rtl::OUString& rName, const rtl::OUString& rValue ); - void open( const rtl::OUString & rName, const UniString& rInput, + void open( const rtl::OUString & rName, const OUString& rInput, bool bPrint, bool bTiming, bool bSort, OpenStack * pStack = 0, sal_uInt32 nLevel = 0, sal_Int32 nFetchSize = 0 ); @@ -809,7 +809,7 @@ UcbContent::~UcbContent() //------------------------------------------------------------------------- // static UcbContent* UcbContent::create( - Ucb& rUCB, const UniString& rURL, MyOutWindow* pOutEdit ) + Ucb& rUCB, const OUString& rURL, MyOutWindow* pOutEdit ) { if ( !rURL.Len() ) return NULL; @@ -867,20 +867,20 @@ UcbContent* UcbContent::create( } //------------------------------------------------------------------------- -const UniString UcbContent::getURL() const +const OUString UcbContent::getURL() const { uno::Reference< ucb::XContentIdentifier > xId( m_xContent->getIdentifier() ); if ( xId.is() ) - return UniString( xId->getContentIdentifier() ); + return OUString( xId->getContentIdentifier() ); - return UniString(); + return OUString(); } //------------------------------------------------------------------------- -const UniString UcbContent::getType() const +const OUString UcbContent::getType() const { - const UniString aType( m_xContent->getContentType() ); + const OUString aType( m_xContent->getContentType() ); return aType; } @@ -893,7 +893,7 @@ void UcbContent::dispose() } //---------------------------------------------------------------------------- -void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, +void UcbContent::open( const rtl::OUString & rName, const OUString& rInput, bool bPrint, bool bTiming, bool bSort, OpenStack * pStack, sal_uInt32 nLevel, sal_Int32 nFetchSize ) @@ -1704,7 +1704,7 @@ public: void Resize( void ); DECL_LINK ( ToolBarHandler, ToolBox* ); - void print( const UniString& rText ); + void print( const OUString& rText ); void print( const sal_Char* pText ); }; @@ -1922,7 +1922,7 @@ void MyWin::print( const sal_Char* pText ) } //------------------------------------------------------------------------- -void MyWin::print( const UniString& rText ) +void MyWin::print( const OUString& rText ) { SolarMutexGuard aGuard; diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index e9cd489ad041..98651c278374 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -192,7 +192,7 @@ struct SalMouseActivateEvent struct SalExtTextInputEvent { sal_uLong mnTime; // Time in ms, when event is created - UniString maText; // Text + OUString maText; // Text const sal_uInt16* mpTextAttr; // Text-Attribute sal_uLong mnCursorPos; // Cursor-Position sal_uLong mnDeltaStart; // Start-Position of last change @@ -228,7 +228,7 @@ struct SalInputContextChangeEvent // SURROUNDINGTEXTREQUEST struct SalSurroundingTextRequestEvent { - UniString maText; // Text + OUString maText; // Text sal_uLong mnStart; // The beginning index of selected range sal_uLong mnEnd; // The end index of selected range }; diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx index b0b1a2be4e16..4f1facae5395 100644 --- a/vcl/inc/vcl/graph.hxx +++ b/vcl/inc/vcl/graph.hxx @@ -142,7 +142,7 @@ public: void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSize ) const; - static void DrawEx( OutputDevice* pOutDev, const String& rText, + static void DrawEx( OutputDevice* pOutDev, const OUString& rText, Font& rFont, const BitmapEx& rBitmap, const Point& rDestPt, const Size& rDestSize ); diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index f7a3f0075d16..1fef0cdd8396 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -232,7 +232,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ); // \WIN\SOURCE\APP\SALDATA.CXX rtl_TextEncoding ImplSalGetSystemEncoding(); -UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); +OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN ); int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); // ----------- diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 53c59dcec0fc..e6b669d63b0f 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -116,7 +116,7 @@ long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, co struct ImplWinData { - UniString* mpExtOldText; + OUString* mpExtOldText; sal_uInt16* mpExtOldAttrAry; Rectangle* mpCursorRect; long mnCursorExtWidth; diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 0d6276a8f3df..317140c1fa55 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -805,7 +805,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) eCharSet = osl_getThreadTextEncoding(); if ( eCharSet == RTL_TEXTENCODING_SYMBOL ) eCharSet = RTL_TEXTENCODING_MS_1252; - aLogFont.alfFaceName = UniString( lfFaceName, eCharSet ); + aLogFont.alfFaceName = String( lfFaceName, eCharSet ); pOut->CreateObject( GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index ff812a079218..2427d9928e95 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -306,7 +306,7 @@ sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString ) // ------------------------------------------------------------------------ -void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rString ) +void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rString ) { sal_uInt32 nOld = rIStm.Tell(); if ( nStrmPos ) @@ -829,7 +829,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); rIStm.Read( aName, 32 ); - aFont.SetName( UniString( aName, rIStm.GetStreamCharSet() ) ); + aFont.SetName( String( aName, rIStm.GetStreamCharSet() ) ); rIStm >> nWidth >> nHeight; rIStm >> nCharOrient >> nLineOrient; rIStm >> nCharSet >> nFamily >> nPitch >> nAlign >> nWeight >> nUnderline >> nStrikeout; @@ -871,12 +871,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rIStm >> aPt >> nIndex >> nLen >> nTmp; if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) ) { - rtl::OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp); + OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp); sal_uInt8 nTerminator = 0; rIStm >> nTerminator; DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" ); - UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet)); + OUString aStr(OStringToOUString(aByteStr, eActualCharSet)); if ( nUnicodeCommentActionNumber == i ) ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr ); rMtf.AddAction( new MetaTextAction( aPt, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) ); @@ -898,11 +898,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rIStm >> nTerminator; DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" ); - UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet)); + OUString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet)); if( nAryLen > 0L ) { - sal_Int32 nStrLen( aStr.Len() ); + sal_Int32 nStrLen( aStr.getLength() ); pDXAry = new sal_Int32[ Max( nAryLen, nStrLen ) ]; @@ -961,7 +961,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rIStm >> nTerminator; DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" ); - UniString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet)); + OUString aStr(rtl::OStringToOUString(aByteStr, eActualCharSet)); if ( nUnicodeCommentActionNumber == i ) ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr ); rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index b622c22e6619..fcfaf6183aa6 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; // - Default-Drawmethode - // ----------------------- -static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText, +static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx, const Point& rDestPt, const Size& rDestSize ) { @@ -92,7 +92,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText, } } - if ( aSize.Width() > 0 && aSize.Height() > 0 && pFont && pText && pText->Len() + if ( aSize.Width() > 0 && aSize.Height() > 0 && pFont && pText && pText->getLength() && !(!pOutDev->IsOutputEnabled() /*&& pOutDev->GetConnectMetaFile() */) ) { MapMode aMapMode( MAP_POINT ); @@ -122,25 +122,25 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText, sal_uInt16 nStart = 0; sal_uInt16 nLen = 0; - while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' ) + while( nStart < pText->getLength() && (*pText)[nStart] == ' ' ) nStart++; - while( nStart+nLen < pText->Len() && pText->GetChar( nStart+nLen ) != ' ' ) + while( nStart+nLen < pText->getLength() && (*pText)[nStart+nLen] != ' ' ) nLen++; - while( nStart < pText->Len() && nLines-- ) + while( nStart < pText->getLength() && nLines-- ) { sal_uInt16 nNext = nLen; do { - while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) == ' ' ) + while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] == ' ' ) nNext++; - while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) != ' ' ) + while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] != ' ' ) nNext++; nTextWidth = pOutDev->GetTextWidth( *pText, nStart, nNext ); if ( nTextWidth > aSize.Width() ) break; nLen = nNext; } - while ( nStart+nNext < pText->Len() ); + while ( nStart+nNext < pText->getLength() ); sal_uInt16 n = nLen; nTextWidth = pOutDev->GetTextWidth( *pText, nStart, n ); @@ -151,7 +151,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText, aPoint.Y() += nTextHeight; nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen); nLen = nNext-nLen; - while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' ) + while( nStart < pText->getLength() && (*pText)[nStart] == ' ' ) { nStart++; nLen--; @@ -542,7 +542,7 @@ void Graphic::Draw( OutputDevice* pOutDev, // ------------------------------------------------------------------------ -void Graphic::DrawEx( OutputDevice* pOutDev, const String& rText, +void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText, Font& rFont, const BitmapEx& rBitmap, const Point& rDestPt, const Size& rDestSz ) { diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index fc1df45eed1b..fdd4f5a571b1 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -297,8 +297,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup ) rJobSetup.mpData = new ImplJobSetup; ImplJobSetup* pJobData = rJobSetup.mpData; - pJobData->maPrinterName = UniString(pData->cPrinterName, aStreamEncoding); - pJobData->maDriver = UniString(pData->cDriverName, aStreamEncoding); + pJobData->maPrinterName = OStringToOUString(pData->cPrinterName, aStreamEncoding); + pJobData->maDriver = OStringToOUString(pData->cDriverName, aStreamEncoding); // Sind es unsere neuen JobSetup-Daten? if ( nSystem == JOBSET_FILE364_SYSTEM || diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 56fc9b15fdfd..d6d2e1c0eefd 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1262,10 +1262,7 @@ static long ImplHandleExtTextInput( Window* pWindow, if ( !pChild->ImplGetWindowImpl()->mbExtTextInput ) { pChild->ImplGetWindowImpl()->mbExtTextInput = sal_True; - if ( !pWinData->mpExtOldText ) - pWinData->mpExtOldText = new UniString; - else - pWinData->mpExtOldText->Erase(); + pWinData->mpExtOldText = new OUString; if ( pWinData->mpExtOldAttrAry ) { delete [] pWinData->mpExtOldAttrAry; @@ -1281,11 +1278,11 @@ static long ImplHandleExtTextInput( Window* pWindow, // Test for changes sal_Bool bOnlyCursor = sal_False; - xub_StrLen nMinLen = Min( pWinData->mpExtOldText->Len(), rText.Len() ); + xub_StrLen nMinLen = Min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) ); xub_StrLen nDeltaStart = 0; while ( nDeltaStart < nMinLen ) { - if ( pWinData->mpExtOldText->GetChar( nDeltaStart ) != rText.GetChar( nDeltaStart ) ) + if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText.GetChar( nDeltaStart ) ) break; nDeltaStart++; } @@ -1308,13 +1305,13 @@ static long ImplHandleExtTextInput( Window* pWindow, } } if ( (nDeltaStart >= nMinLen) && - (pWinData->mpExtOldText->Len() == rText.Len()) ) + (pWinData->mpExtOldText->getLength() == rText.Len()) ) bOnlyCursor = sal_True; // Call Event and store the information CommandExtTextInputData aData( rText, pTextAttr, (xub_StrLen)nCursorPos, nCursorFlags, - nDeltaStart, pWinData->mpExtOldText->Len(), + nDeltaStart, pWinData->mpExtOldText->getLength(), bOnlyCursor ); *pWinData->mpExtOldText = rText; if ( pWinData->mpExtOldAttrAry ) @@ -2279,20 +2276,19 @@ static long ImplHandleShowDialog( Window* pWindow, int nDialogId ) // ----------------------------------------------------------------------- static void ImplHandleSurroundingTextRequest( Window *pWindow, - XubString& rText, + OUString& rText, Selection &rSelRange ) { Window* pChild = ImplGetKeyInputWindow( pWindow ); if ( !pChild ) { - rText = XubString::EmptyString(); + rText = OUString(); rSelRange.setMin( 0 ); rSelRange.setMax( 0 ); } else { - rText = pChild->GetSurroundingText(); Selection aSel = pChild->GetSurroundingTextSelection(); rSelRange.setMin( aSel.Min() ); @@ -2312,15 +2308,15 @@ static void ImplHandleSalSurroundingTextRequest( Window *pWindow, if( aSelRange.Min() < 0 ) pEvt->mnStart = 0; - else if( aSelRange.Min() > pEvt->maText.Len() ) - pEvt->mnStart = pEvt->maText.Len(); + else if( aSelRange.Min() > pEvt->maText.getLength() ) + pEvt->mnStart = pEvt->maText.getLength(); else pEvt->mnStart = aSelRange.Min(); if( aSelRange.Max() < 0 ) pEvt->mnStart = 0; - else if( aSelRange.Max() > pEvt->maText.Len() ) - pEvt->mnEnd = pEvt->maText.Len(); + else if( aSelRange.Max() > pEvt->maText.getLength() ) + pEvt->mnEnd = pEvt->maText.getLength(); else pEvt->mnEnd = aSelRange.Max(); } diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 6343f5b149f8..f8f4906e56bc 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -3986,7 +3986,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p pThis->m_aInputEvent.mnTime = 0; pThis->m_aInputEvent.mpTextAttr = 0; pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 ); - pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.Len(); + pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.getLength(); pThis->m_aInputEvent.mnCursorFlags = 0; pThis->m_aInputEvent.mnDeltaStart = 0; pThis->m_aInputEvent.mbOnlyCursor = False; @@ -4007,12 +4007,12 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p */ bool bSingleCommit = false; if( ! bWasPreedit - && pThis->m_aInputEvent.maText.Len() == 1 + && pThis->m_aInputEvent.maText.getLength() == 1 && ! pThis->m_aPrevKeyPresses.empty() ) { const PreviousKeyPress& rKP = pThis->m_aPrevKeyPresses.back(); - sal_Unicode aOrigCode = pThis->m_aInputEvent.maText.GetChar(0); + sal_Unicode aOrigCode = pThis->m_aInputEvent.maText[0]; if( checkSingleKeyCommitHack( rKP.keyval, aOrigCode ) ) { @@ -4060,7 +4060,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ // change from nothing to nothing -> do not start preedit // e.g. this will activate input into a calc cell without // user input - if( pThis->m_aInputEvent.maText.Len() == 0 ) + if( pThis->m_aInputEvent.maText.getLength() == 0 ) { g_free( pText ); pango_attr_list_unref( pAttrs ); @@ -4078,7 +4078,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ pThis->m_aInputEvent.mnDeltaStart = 0; pThis->m_aInputEvent.mbOnlyCursor = False; - pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.Len() ), 0 ); + pThis->m_aInputFlags = std::vector<sal_uInt16>( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), 0 ); PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs); do diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index 9d1c0fa33465..ff5a10f406d1 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -44,9 +44,9 @@ rtl_TextEncoding ImplSalGetSystemEncoding() // ----------------------------------------------------------------------- -UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen ) +OUString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen ) { - return UniString( pStr, nLen, ImplSalGetSystemEncoding(), + return OUString( pStr, nLen, ImplSalGetSystemEncoding(), RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT ); diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index a410028ac3d2..406fa3000d68 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1457,7 +1457,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, LOGFONTW& rLogFont, bool /*bTestVerticalAvail*/ ) { - UniString aName; + OUString aName; if ( pFont->mpFontData ) aName = pFont->mpFontData->GetFamilyName(); else |