Kaydet (Commit) 6b25dd2f authored tarafından Noel Grandin's avatar Noel Grandin

convert sw/source/ui/inc/c*.hxx from String to OUString

Change-Id: I8b8c73a0ba9b1e40549c1832ed6ad5b630d4e620
üst 3acd7ab5
......@@ -662,11 +662,11 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
aCategoryBox.InsertSwEntry(SwBoxEntry(m_sDrawing));
}
if(pOpt->GetCategory().Len())
if(!pOpt->GetCategory().isEmpty())
aCategoryBox.SetText(pOpt->GetCategory());
else
aCategoryBox.SetText(m_sNone);
if (pOpt->GetCategory().Len() &&
if (!pOpt->GetCategory().isEmpty() &&
aCategoryBox.GetEntryPos(OUString(pOpt->GetCategory())) == COMBOBOX_ENTRY_NOTFOUND)
aCategoryBox.InsertEntry(pOpt->GetCategory());
if (aCategoryBox.GetText().isEmpty())
......@@ -716,7 +716,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
aLbLevel.SelectEntryPos( nLevelPos );
aEdDelim.SetText(pOpt->GetSeparator());
aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() );
if(pOpt->GetCharacterStyle().Len())
if(!pOpt->GetCharacterStyle().isEmpty())
aCharStyleLB.SelectEntry( pOpt->GetCharacterStyle() );
else
aCharStyleLB.SelectEntryPos( 0 );
......
......@@ -134,11 +134,11 @@ void SwChangeDBDlg::FillDBPopup()
}
SvTreeListEntry* SwChangeDBDlg::Insert(const String& rDBName)
SvTreeListEntry* SwChangeDBDlg::Insert(const OUString& rDBName)
{
String sDBName(rDBName.GetToken(0, DB_DELIM));
String sTableName(rDBName.GetToken(1, DB_DELIM));
sal_IntPtr nCommandType = rDBName.GetToken(2, DB_DELIM).ToInt32();
String sDBName(rDBName.getToken(0, DB_DELIM));
String sTableName(rDBName.getToken(1, DB_DELIM));
sal_IntPtr nCommandType = rDBName.getToken(2, DB_DELIM).toInt32();
SvTreeListEntry* pParent;
SvTreeListEntry* pChild;
......
......@@ -80,7 +80,7 @@ public:
String GetCharacterStyle() const;
};
String SwCaptionDialog::our_aSepTextSave = OUString(": "); // Caption separator text
OUString SwCaptionDialog::our_aSepTextSave(": "); // Caption separator text
SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
SvxStandardDialog( pParent, "InsertCaptionDialog", "modules/swriter/ui/insertcaption.ui" ),
......
......@@ -30,14 +30,14 @@ private:
sal_Bool bUseCaption;
SwCapObjType eObjType;
SvGlobalName aOleId;
String sCategory;
OUString sCategory;
sal_uInt16 nNumType;
OUString sNumberSeparator;
String sCaption;
OUString sCaption;
sal_uInt16 nPos;
sal_uInt16 nLevel;
String sSeparator;
String sCharacterStyle;
OUString sSeparator;
OUString sCharacterStyle;
bool bIgnoreSeqOpts; // is not being saved
sal_Bool bCopyAttributes; // -""-
......@@ -56,8 +56,8 @@ public:
inline const SvGlobalName& GetOleId() const { return aOleId; }
inline void SetOleId(const SvGlobalName &rId) { aOleId = rId; }
inline const String& GetCategory() const { return sCategory; }
inline void SetCategory(const String& rCat) { sCategory = rCat; }
inline const OUString& GetCategory() const { return sCategory; }
inline void SetCategory(const OUString& rCat) { sCategory = rCat; }
inline sal_uInt16 GetNumType() const { return nNumType; }
inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; }
......@@ -65,8 +65,8 @@ public:
const OUString& GetNumSeparator() const { return sNumberSeparator; }
void SetNumSeparator(const OUString& rSet) {sNumberSeparator = rSet;}
inline const String& GetCaption() const { return sCaption; }
inline void SetCaption(const String& rCap) { sCaption = rCap; }
inline const OUString& GetCaption() const { return sCaption; }
inline void SetCaption(const OUString& rCap) { sCaption = rCap; }
inline sal_uInt16 GetPos() const { return nPos; }
inline void SetPos(const sal_uInt16 nP) { nPos = nP; }
......@@ -74,11 +74,11 @@ public:
inline sal_uInt16 GetLevel() const { return nLevel; }
inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; }
inline const String& GetSeparator() const { return sSeparator; }
inline void SetSeparator(const String& rSep) { sSeparator = rSep; }
inline const OUString& GetSeparator() const { return sSeparator; }
inline void SetSeparator(const OUString& rSep) { sSeparator = rSep; }
const String& GetCharacterStyle() const { return sCharacterStyle; }
void SetCharacterStyle(const String& rStyle)
const OUString& GetCharacterStyle() const { return sCharacterStyle; }
void SetCharacterStyle(const OUString& rStyle)
{ sCharacterStyle = rStyle; }
inline bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
......
......@@ -136,7 +136,7 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
const OUString &GetFax() const { return sFaxName; }
void SetFax( const String& rFax) { sFaxName = rFax; }
void SetFax( const OUString& rFax) { sFaxName = rFax; }
sal_Bool IsPrintProspect() const { return bPrintProspect; }
......
......@@ -56,7 +56,7 @@ class SwChangeDBDlg: public SvxStandardDialog
virtual void Apply();
void UpdateFlds();
void FillDBPopup();
SvTreeListEntry* Insert(const String& rDBName);
SvTreeListEntry* Insert(const OUString& rDBName);
void ShowDBName(const SwDBData& rDBData);
public:
......
......@@ -58,7 +58,7 @@ class SwOutlineContent : public SwContent
bool bIsMoveable;
public:
SwOutlineContent( const SwContentType* pCnt,
const String& rName,
const OUString& rName,
sal_uInt16 nArrPos,
sal_uInt8 nLevel,
bool bMove,
......@@ -79,7 +79,7 @@ class SwRegionContent : public SwContent
public:
SwRegionContent( const SwContentType* pCnt,
const String& rName,
const OUString& rName,
sal_uInt8 nLevel,
long nYPos) :
SwContent(pCnt, rName, nYPos),
......@@ -90,20 +90,20 @@ class SwRegionContent : public SwContent
class SwURLFieldContent : public SwContent
{
String sURL;
OUString sURL;
const SwTxtINetFmt* pINetAttr;
public:
SwURLFieldContent( const SwContentType* pCnt,
const String& rName,
const String& rURL,
const OUString& rName,
const OUString& rURL,
const SwTxtINetFmt* pAttr,
long nYPos )
: SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr )
{}
virtual sal_Bool IsProtect() const;
const String& GetURL() { return sURL; }
const OUString& GetURL() { return sURL; }
const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
};
......@@ -115,13 +115,13 @@ class SwPostItContent : public SwContent
bool mbPostIt;
public:
SwPostItContent( const SwContentType* pCnt,
const String& rName,
const OUString& rName,
const SwFmtFld* pField,
long nYPos )
: SwContent( pCnt, rName, nYPos ), pFld( pField ),mbPostIt(true)
{}
SwPostItContent( const SwContentType* pCnt,
const String& rName,
const OUString& rName,
SwRedline* pRed,
long nYPos )
: SwContent( pCnt, rName, nYPos ), pRedline( pRed ),mbPostIt(false)
......@@ -137,14 +137,14 @@ public:
class SwGraphicContent : public SwContent
{
String sLink;
OUString sLink;
public:
SwGraphicContent(const SwContentType* pCnt, const String& rName, const String& rLink, long nYPos)
SwGraphicContent(const SwContentType* pCnt, const OUString& rName, const OUString& rLink, long nYPos)
: SwContent( pCnt, rName, nYPos ), sLink( rLink )
{}
virtual ~SwGraphicContent();
const String& GetLink() const {return sLink;}
const OUString& GetLink() const {return sLink;}
};
//----------------------------------------------------------------------------
......@@ -152,7 +152,7 @@ class SwTOXBaseContent : public SwContent
{
const SwTOXBase* pBase;
public:
SwTOXBaseContent(const SwContentType* pCnt, const String& rName, long nYPos, const SwTOXBase& rBase)
SwTOXBaseContent(const SwContentType* pCnt, const OUString& rName, long nYPos, const SwTOXBase& rBase)
: SwContent( pCnt, rName, nYPos ), pBase(&rBase)
{}
virtual ~SwTOXBaseContent();
......@@ -171,9 +171,9 @@ class SwContentType : public SwTypeNumber
{
SwWrtShell* pWrtShell;
SwContentArr* pMember; // array for content
String sContentTypeName; // name of content type
String sSingleContentTypeName; // name of content type, singular
String sTypeToken; // attachment for URL
OUString sContentTypeName; // name of content type
OUString sSingleContentTypeName; // name of content type, singular
OUString sTypeToken; // attachment for URL
sal_uInt16 nMemberCount; // content count
sal_uInt16 nContentType; // content type's Id
sal_uInt8 nOutlineLevel;
......@@ -192,9 +192,9 @@ public:
{return nMemberCount;};
sal_uInt16 GetType() const {return nContentType;}
const SwContent* GetMember(sal_uInt16 nIndex);
const String& GetName() {return sContentTypeName;}
const String& GetSingleName() const {return sSingleContentTypeName;}
const String& GetTypeToken() const{return sTypeToken;}
const OUString& GetName() {return sContentTypeName;}
const OUString& GetSingleName() const {return sSingleContentTypeName;}
const OUString& GetTypeToken() const{return sTypeToken;}
void SetOutlineLevel(sal_uInt8 nNew)
{
......
......@@ -49,21 +49,21 @@ class SfxObjectShell;
class SwContentTree : public SvTreeListBox
{
ImageList aEntryImages;
String sSpace;
OUString sSpace;
AutoTimer aUpdTimer;
SwContentType* aActiveContentArr[CONTENT_TYPE_MAX];
SwContentType* aHiddenContentArr[CONTENT_TYPE_MAX];
String aContextStrings[CONTEXT_COUNT + 1];
String sRemoveIdx;
String sUpdateIdx;
String sUnprotTbl;
String sRename;
String sReadonlyIdx;
String sInvisible;
String sPostItShow;
String sPostItHide;
String sPostItDelete;
OUString aContextStrings[CONTEXT_COUNT + 1];
OUString sRemoveIdx;
OUString sUpdateIdx;
OUString sUnprotTbl;
OUString sRename;
OUString sReadonlyIdx;
OUString sInvisible;
OUString sPostItShow;
OUString sPostItHide;
OUString sPostItDelete;
SwWrtShell* pHiddenShell; // dropped Doc
SwWrtShell* pActiveShell; // the active or a const. open view
......@@ -207,7 +207,7 @@ class SwLBoxString : public SvLBoxString
public:
SwLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags,
const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
const OUString& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
{
}
......@@ -223,7 +223,7 @@ class SwGlobalTree : public SvTreeListBox
{
private:
AutoTimer aUpdateTimer;
String aContextStrings[GLOBAL_CONTEXT_COUNT];
OUString aContextStrings[GLOBAL_CONTEXT_COUNT];
ImageList aEntryImages;
......@@ -313,7 +313,7 @@ public:
void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
const String* pFileName = 0 );
const OUString* pFileName = 0 );
void EditContent(const SwGlblDocContent* pCont );
void ShowTree();
......
......@@ -51,7 +51,7 @@ class SwConvertTableDlg: public SfxModalDialog
CheckBox* mpBorderCB;
PushButton* mpAutoFmtBtn;
String sConvertTextTable;
OUString sConvertTextTable;
SwTableAutoFmt* pTAutoFmt;
SwWrtShell* pShell;
......
......@@ -85,8 +85,8 @@ class SwCaptionDialog : public SvxStandardDialog
SwFldMgr *pMgr; // pointer to save the include
SelectionType eType;
String sCharacterStyle;
String sObjectName;
OUString sCharacterStyle;
OUString sObjectName;
bool bCopyAttributes;
bool bOrderNumberingFirst; //#i61007# order of captions
......@@ -104,7 +104,7 @@ class SwCaptionDialog : public SvxStandardDialog
void CheckButtonWidth();
void ApplyCaptionOrder(); //#i61007# order of captions
static String our_aSepTextSave; // Save caption separator text
static OUString our_aSepTextSave; // Save caption separator text
public:
SwCaptionDialog( Window *pParent, SwView &rV );
~SwCaptionDialog();
......
......@@ -167,7 +167,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
GetWrtShell().InsertLabel( eT,
pOpt->GetCaption(),
!pOpt->IgnoreSeqOpts() ? aEmptyStr : pOpt->GetSeparator(),
!pOpt->IgnoreSeqOpts() ? aEmptyOUStr : pOpt->GetSeparator(),
pOpt->GetNumSeparator(),
!pOpt->GetPos(),
nID,
......
......@@ -206,7 +206,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
TransferableDataHelper aData( rEvt.maDropEvent.Transferable );
String sFileName;
OUString sFileName;
const SwGlblDocContent* pCnt = pDropEntry ?
(const SwGlblDocContent*)pDropEntry->GetUserData() :
0;
......@@ -243,8 +243,8 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
delete pTempContents;
}
else if( 0 != (sFileName =
SwNavigationPI::CreateDropFileName( aData )).Len())
else if( !(sFileName =
SwNavigationPI::CreateDropFileName( aData )).isEmpty())
{
INetURLObject aTemp(sFileName);
GraphicDescriptor aDesc(aTemp);
......@@ -704,7 +704,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
}
}
void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pFileName )
void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString* pFileName )
{
Sequence< OUString > aFileNames;
if ( !pFileName )
......@@ -716,7 +716,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
OUString("swriter"), true );
pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) );
}
else if ( pFileName->Len() )
else if ( !pFileName->isEmpty() )
{
aFileNames.realloc(1);
INetURLObject aFileName;
......@@ -929,10 +929,10 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON );
SfxObjectShell& rObj = *pFrame->GetObjectShell();
const SfxMedium* pMedium = rObj.GetMedium();
String sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI));
OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI));
// Insert the area with the Doc-Name
// Bring the own Doc in the foreground
if(aFrmListener.IsValid() && sNewFile.Len())
if(aFrmListener.IsValid() && !sNewFile.isEmpty())
{
pGlobFrm->ToTop();
// Due to the update the entries are invalid
......
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