summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-09 13:36:44 +0200
committerNoel Grandin <noel@peralex.com>2013-10-10 09:19:06 +0200
commitecdce39037f8ee0fd660b0b1a7ecae3234380f2f (patch)
tree691aaffbbbc14da27baf0d5e9cf0054ee62597c4
parent6d7f80a5ecafd7d7cbb32be968f17b472c7c8101 (diff)
convert sw/source/ui/dbui/*.hxx from String to OUString
Change-Id: I43deb5f70beddec6689a7e1cfb7d76e403b79819
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx24
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx22
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx4
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx40
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx12
6 files changed, 53 insertions, 53 deletions
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index c1411f63fb03..2dcfcd449e0c 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -504,7 +504,7 @@ void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
if(rEvt.GetCharCode())
{
OUString sKey(rEvt.GetCharCode());
- if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
+ if( -1 != sForbiddenChars.indexOf(sKey))
bCallParent = false;
}
if(bCallParent)
@@ -515,9 +515,9 @@ void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
OUString sTemp = GetText();
- for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.getLength(); i++)
{
- sTemp = comphelper::string::remove(sTemp, sForbiddenChars.GetChar(i));
+ sTemp = comphelper::string::remove(sTemp, sForbiddenChars[i]);
}
sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
if(nDiff)
@@ -1398,7 +1398,7 @@ void AddressMultiLineEdit::SetText( const OUString& rStr )
// Insert the new entry in front of the entry at the beginning of the selection
-void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
+void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr )
{
// insert new entry after current selected one.
ExtTextView* pTextView = GetTextView();
@@ -1419,7 +1419,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
Modify();
}
-void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex )
+void AddressMultiLineEdit::InsertNewEntryAtPosition( const OUString& rStr, sal_uLong nPara, sal_uInt16 nIndex )
{
ExtTextEngine* pTextEngine = GetTextEngine();
TextPaM aInsertPos( nPara, nIndex );
@@ -1559,9 +1559,9 @@ bool AddressMultiLineEdit::HasCurrentItem()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()));
}
-String AddressMultiLineEdit::GetCurrentItem()
+OUString AddressMultiLineEdit::GetCurrentItem()
{
- String sRet;
+ OUString sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
@@ -1594,21 +1594,21 @@ void AddressMultiLineEdit::SelectCurrentItem()
}
}
-String AddressMultiLineEdit::GetAddress()
+OUString AddressMultiLineEdit::GetAddress()
{
- String sRet;
+ OUString sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
sal_uLong nParaCount = pTextEngine->GetParagraphCount();
for(sal_uLong nPara = nParaCount; nPara; --nPara)
{
String sPara = comphelper::string::stripEnd(pTextEngine->GetText(nPara - 1), ' ');
//don't add empty trailing paragraphs
- if(sRet.Len() || sPara.Len())
+ if(!sRet.isEmpty() || sPara.Len())
{
- sRet.Insert(sPara, 0);
+ sRet = sPara + sRet;
//insert the para break
if(nPara > 1)
- sRet.Insert( '\n', 0);
+ sRet = "\n" + sRet;
}
}
return sRet;
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 992df365c4dc..929cfe288c81 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -171,23 +171,23 @@ public:
void SetSelectionChangedHdl( const Link& rLink ) {m_aSelectionLink = rLink;}
void SetText( const OUString& rStr );
- String GetAddress();
+ OUString GetAddress();
- void InsertNewEntry( const String& rStr );
- void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex );
+ void InsertNewEntry( const OUString& rStr );
+ void InsertNewEntryAtPosition( const OUString& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(sal_uInt16 nMove);
sal_uInt16 IsCurrentItemMoveable();
bool HasCurrentItem();
- String GetCurrentItem();
+ OUString GetCurrentItem();
void SelectCurrentItem();
};
// Dialog is used to create custom address blocks as well as custom greeting lines
class SwRestrictedComboBox : public ComboBox
{
- String sForbiddenChars;
+ OUString sForbiddenChars;
protected:
virtual void KeyInput( const KeyEvent& );
@@ -198,7 +198,7 @@ public:
{
}
- void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
+ void SetForbiddenChars(const OUString& rSet){sForbiddenChars = rSet;}
};
class SwCustomizeAddressBlockDialog : public SfxModalDialog
@@ -237,9 +237,9 @@ private:
::std::vector<String> m_aSalutations;
::std::vector<String> m_aPunctuations;
- String m_sCurrentSalutation;
- String m_sCurrentPunctuation;
- String m_sCurrentText;
+ OUString m_sCurrentSalutation;
+ OUString m_sCurrentPunctuation;
+ OUString m_sCurrentText;
SwMailMergeConfigItem& m_rConfigItem;
DialogType m_eType;
@@ -278,8 +278,8 @@ class SwAssignFieldsDialog : public SfxModalDialog
CancelButton m_aCancel;
HelpButton m_aHelp;
- String m_sNone;
- OUString m_rPreviewString;
+ OUString m_sNone;
+ OUString m_rPreviewString;
SwMailMergeConfigItem& m_rConfigItem;
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 479b5e413bc2..8a4b6cd395e4 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -153,8 +153,8 @@ public:
SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
~SwMailBodyDialog();
- void SetBody(const String& rBody ) {m_aBodyMLE.SetText(rBody);}
- String GetBody() const {return m_aBodyMLE.GetText();}
+ void SetBody(const OUString& rBody ) {m_aBodyMLE.SetText(rBody);}
+ OUString GetBody() const {return m_aBodyMLE.GetText();}
};
#endif
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 874c5cf2ebc7..ddcdb70eab94 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -84,17 +84,17 @@ class SwMailMergeOutputPage : public svt::OWizardPage
PushButton m_aSendDocumentsPB;
//some FixedLine labels
- String m_sSaveStartST;
- String m_sSaveMergedST;
- String m_sPrintST;
- String m_sSendMailST;
+ OUString m_sSaveStartST;
+ OUString m_sSaveMergedST;
+ OUString m_sPrintST;
+ OUString m_sSendMailST;
//misc strings
- String m_sDefaultAttachmentST;
- String m_sNoSubjectST;
- String m_sConfigureMail;
+ OUString m_sDefaultAttachmentST;
+ OUString m_sNoSubjectST;
+ OUString m_sConfigureMail;
- String m_sBody;
+ OUString m_sBody;
long m_nFromToRBPos;
long m_nFromToFTPos;
@@ -107,8 +107,8 @@ class SwMailMergeOutputPage : public svt::OWizardPage
//some dialog data
Printer* m_pTempPrinter;
- String m_sCC;
- String m_sBCC;
+ OUString m_sCC;
+ OUString m_sBCC;
DECL_LINK(OutputTypeHdl_Impl, RadioButton*);
@@ -168,17 +168,17 @@ class SW_DLLPUBLIC SwSendMailDialog : public ModelessDialog //SfxModalDialog
PushButton m_aStopPB;
PushButton m_aClosePB;
- String m_sMore;
- String m_sLess;
- String m_sContinue;
- String m_sStop;
- String m_sSend;
- String m_sTransferStatus;
+ OUString m_sMore;
+ OUString m_sLess;
+ OUString m_sContinue;
+ OUString m_sStop;
+ OUString m_sSend;
+ OUString m_sTransferStatus;
OUString m_sErrorStatus;
- String m_sSendingTo;
- String m_sCompleted;
- String m_sFailed;
- String m_sTerminateQuery;
+ OUString m_sSendingTo;
+ OUString m_sCompleted;
+ OUString m_sFailed;
+ OUString m_sTerminateQuery;
bool m_bCancel;
bool m_bDesctructionEnabled;
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index defe63f612d9..f8fb54d303f0 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -173,14 +173,14 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
return 0;
}
-String SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
+OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
{
SvTreeListEntry* pEntry = m_aTableLB.FirstSelected();
bIsTable = pEntry->GetUserData() ? false : true;
return pEntry ? m_aTableLB.GetEntryText(pEntry, 0) : OUString();
}
-void SwSelectDBTableDialog::SetSelectedTable(const String& rTable, bool bIsTable)
+void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTable)
{
SvTreeListEntry* pEntry = m_aTableLB.First();
while(pEntry)
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 7793d1145bdf..573697163bee 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -44,10 +44,10 @@ class SwSelectDBTableDialog : public SfxModalDialog
CancelButton m_aCancel;
HelpButton m_aHelp;
- String m_sName;
- String m_sType;
- String m_sTable;
- String m_sQuery;
+ OUString m_sName;
+ OUString m_sType;
+ OUString m_sTable;
+ OUString m_sQuery;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
@@ -59,8 +59,8 @@ public:
);
~SwSelectDBTableDialog();
- String GetSelectedTable(bool& bIsTable);
- void SetSelectedTable(const String& rTable, bool bIsTable);
+ OUString GetSelectedTable(bool& bIsTable);
+ void SetSelectedTable(const OUString& rTable, bool bIsTable);
};
#endif