[Libreoffice-commits] core.git: 20 commits - cui/source extensions/source filter/source formula/source include/formula include/svx include/vcl linguistic/source reportdesign/source sc/inc sc/source starmath/source svx/source sw/inc sw/source unotools/source vcl/source
Noel Grandin
noel at peralex.com
Tue Dec 3 01:36:58 PST 2013
cui/source/tabpages/numfmt.cxx | 6
extensions/source/propctrlr/standardcontrol.cxx | 2
filter/source/xsltdialog/typedetectionimport.cxx | 6
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2
formula/source/ui/dlg/FormulaHelper.cxx | 40 +++---
formula/source/ui/dlg/formula.cxx | 118 +++++++++----------
include/formula/IFunctionDescription.hxx | 6
include/formula/formdata.hxx | 6
include/formula/formula.hxx | 2
include/formula/formulahelper.hxx | 24 +--
include/svx/numfmtsh.hxx | 2
include/vcl/edit.hxx | 2
linguistic/source/dlistimp.cxx | 10 -
linguistic/source/hyphdsp.cxx | 6
reportdesign/source/ui/dlg/Formula.cxx | 6
reportdesign/source/ui/inc/Formula.hxx | 8 -
reportdesign/source/ui/inc/FunctionHelper.hxx | 2
reportdesign/source/ui/misc/FunctionHelper.cxx | 4
reportdesign/source/ui/misc/UITools.cxx | 6
sc/inc/funcdesc.hxx | 2
sc/inc/scmod.hxx | 4
sc/source/core/data/funcdesc.cxx | 24 +--
sc/source/ui/app/inputhdl.cxx | 14 --
sc/source/ui/app/scmod.cxx | 4
sc/source/ui/formdlg/formula.cxx | 12 -
sc/source/ui/inc/formula.hxx | 4
sc/source/ui/inc/inputhdl.hxx | 22 +--
starmath/source/parse.cxx | 4
svx/source/items/numfmtsh.cxx | 14 --
sw/inc/ndtxt.hxx | 2
sw/source/core/crsr/crsrsh.cxx | 2
sw/source/core/crsr/findattr.cxx | 2
sw/source/core/edit/edlingu.cxx | 2
sw/source/core/frmedt/fecopy.cxx | 6
sw/source/core/txtnode/thints.cxx | 2
sw/source/core/unocore/unochart.cxx | 8 -
sw/source/core/unocore/unorefmk.cxx | 4
sw/source/filter/basflt/fltini.cxx | 2
sw/source/filter/html/htmltab.cxx | 2
sw/source/ui/dbui/mmaddressblockpage.cxx | 2
sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 4
sw/source/ui/docvw/edtwin.cxx | 4
sw/source/ui/docvw/frmsidebarwincontainer.cxx | 4
sw/source/ui/docvw/srcedtw.cxx | 6
sw/source/ui/index/swuiidxmrk.cxx | 2
sw/source/ui/wrtsh/wrtsh1.cxx | 2
unotools/source/i18n/localedatawrapper.cxx | 4
vcl/source/control/edit.cxx | 24 +--
48 files changed, 218 insertions(+), 228 deletions(-)
New commits:
commit 6b6254dfb16febd3e84dde30231f034331d1d2f7
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 3 11:34:12 2013 +0200
convert callers of SwIndex::GetContent from xub_StrLen->sal_Int32
Change-Id: I542399d3ed3a3b42592bcabb70d7034b3a4cc93c
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index b6e0c32..7e0cb2b 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3055,7 +3055,7 @@ bool SwCrsrShell::SelectHiddenRange()
const SwTxtNode* pNode = rPt.nNode.GetNode().GetTxtNode();
if ( pNode )
{
- const xub_StrLen nPos = rPt.nContent.GetIndex();
+ const sal_Int32 nPos = rPt.nContent.GetIndex();
// check if nPos is in hidden range
xub_StrLen nHiddenStart;
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index d183a1a..d39deb0 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -159,7 +159,7 @@ static sal_Bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
const SwTxtAttr *pTxtHt = 0;
sal_Bool bForward = fnMove == fnMoveForward;
sal_uInt16 nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
- xub_StrLen nCntntPos = rPam.GetPoint()->nContent.GetIndex();
+ sal_Int32 nCntntPos = rPam.GetPoint()->nContent.GetIndex();
while( 0 != ( pTxtHt=(*fnMove->fnGetHint)(rTxtNd.GetSwpHints(),nPos,nCntntPos)))
if( pTxtHt->Which() == rCmpItem.Which() &&
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 93d036f..b8c09d6 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1721,7 +1721,7 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition )
SwWrongList *pWrong;
SwNodeIndex aIdx = rErrorPosition.Start()->nNode;
SwNodeIndex aEndIdx = rErrorPosition.Start()->nNode;
- xub_StrLen nStart = rErrorPosition.Start()->nContent.GetIndex();
+ sal_Int32 nStart = rErrorPosition.Start()->nContent.GetIndex();
xub_StrLen nEnd = STRING_LEN;
while( aIdx <= aEndIdx )
{
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index e695fcb..0b93a96 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1051,11 +1051,11 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
// Update the rsid of each pasted text node.
{
- xub_StrLen nNodesCnt = aCpyPam.End()->nNode.GetIndex() - aCpyPam.Start()->nNode.GetIndex();
+ sal_Int32 nNodesCnt = aCpyPam.End()->nNode.GetIndex() - aCpyPam.Start()->nNode.GetIndex();
SwNodes &rDestNodes = GetDoc()->GetNodes();
- xub_StrLen nDestStart = PCURCRSR->GetPoint()->nNode.GetIndex() - nNodesCnt;
+ sal_Int32 nDestStart = PCURCRSR->GetPoint()->nNode.GetIndex() - nNodesCnt;
- for (xub_StrLen nIdx = 0; nIdx <= nNodesCnt; ++nIdx)
+ for (sal_Int32 nIdx = 0; nIdx <= nNodesCnt; ++nIdx)
{
SwTxtNode *pTxtNode = rDestNodes[ nDestStart + nIdx ]->GetTxtNode();
if ( pTxtNode )
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 6906377..5d15fd4 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -839,7 +839,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
0, 0);
}
bool bForceExpandHints(false);
- const xub_StrLen nStartPos(pStartPos->nContent.GetIndex());
+ const sal_Int32 nStartPos(pStartPos->nContent.GetIndex());
// not <= but < because nMetaStart is behind dummy char!
// not >= but > because == means insert at end!
if ((nStartPos < nMetaStart) || (nStartPos > nMetaEnd))
@@ -863,7 +863,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
"of text range not in same paragraph as text content",
0, 0);
}
- const xub_StrLen nEndPos(pEndPos->nContent.GetIndex());
+ const sal_Int32 nEndPos(pEndPos->nContent.GetIndex());
// not <= but < because nMetaStart is behind dummy char!
// not >= but > because == means insert at end!
if ((nEndPos < nMetaStart) || (nEndPos > nMetaEnd))
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index d67816c..fdf628d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3460,7 +3460,7 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
// Attributierungs-Anfang neu setzen
const SwNodeIndex& rSttPara = pPam->GetPoint()->nNode;
- xub_StrLen nSttCnt = pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nSttCnt = pPam->GetPoint()->nContent.GetIndex();
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 21e0cf8..62a7b40 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1334,7 +1334,7 @@ void AddressMultiLineEdit::SetText( const OUString& rStr )
sal_uLong nParaCount = pTextEngine->GetParagraphCount();
for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara)
{
- xub_StrLen nIndex = 0;
+ sal_Int32 nIndex = 0;
OUString sPara = pTextEngine->GetText( nPara );
if(!sPara.isEmpty() && !sPara.endsWith(" "))
{
commit 6d31302d272ac5bc5ad5749cc703c3ddc610957c
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 3 10:37:53 2013 +0200
convert xub_StrLen->sal_Int32 in edtwin.cxx
Change-Id: Idbfeb4180cca90724eb1ce658629d58eed48bb5e
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 00926b1..4b82c16 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -852,7 +852,7 @@ void SwEditWin::FlushInBuffer()
SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
- xub_StrLen nExpandSelection = 0;
+ sal_Int32 nExpandSelection = 0;
if (nOldLen > 0)
{
sal_Int32 nTmpPos = nOldLen;
@@ -885,7 +885,7 @@ void SwEditWin::FlushInBuffer()
if (nChgLen)
{
m_aInBuffer = aNewText.copy( nChgPos, nChgLen );
- nExpandSelection = static_cast< xub_StrLen >(nOldLen - nChgPos);
+ nExpandSelection = nOldLen - nChgPos;
}
else
m_aInBuffer = "";
commit 6207a1c02c42f7f942d6cabc256a945043ca4f30
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 3 09:29:05 2013 +0200
convert SidebarWinKey from xub_StrLen->sal_Int32
Change-Id: Ie0e9176d4f8bbe5bdada5fea848ca9638fc55c91
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
index 0426de9d..cf64e17 100644
--- a/sw/source/ui/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
@@ -28,9 +28,9 @@
namespace {
struct SidebarWinKey
{
- const xub_StrLen mnIndex;
+ const sal_Int32 mnIndex;
- explicit SidebarWinKey( const xub_StrLen nIndex )
+ explicit SidebarWinKey( const sal_Int32 nIndex )
: mnIndex( nIndex )
{}
commit 3abc48701223bdd8c2894d82a7cbfce044f15704
Author: Noel Grandin <noel at peralex.com>
Date: Tue Dec 3 09:26:46 2013 +0200
convert SwTxtNode::GetLang from xub_StrLen->sal_Int32
Change-Id: I2740622a5e30916d050e01350208a0de268e42ac
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index d8e1fbb..545cd8f 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -661,7 +661,7 @@ public:
void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
- sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ sal_uInt16 GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
sal_uInt16 nScript = 0 ) const;
/// in ndcopy.cxx
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 9e56478..64a813d 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -3352,7 +3352,7 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
}
}
-sal_uInt16 SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
+sal_uInt16 SwTxtNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen,
sal_uInt16 nScript ) const
{
sal_uInt16 nRet = LANGUAGE_DONTKNOW;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index d69f6e7..6e4f6d0 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -322,7 +322,7 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading()
OSL_ENSURE(pTxtNode, "need current SwTxtNode");
if(!pTxtNode)
return;
- xub_StrLen nTextIndex = *pTxtTOXMark->GetStart();
+ sal_Int32 nTextIndex = *pTxtTOXMark->GetStart();
nLangForPhoneticReading = pTxtNode->GetLang( nTextIndex );
}
else //if dialog is opened to create a new mark
commit fb45457d67514845faec84411cae023e27ea29dd
Author: Noel Grandin <noel at peralex.com>
Date: Mon Dec 2 15:16:19 2013 +0200
xub_StrLen->salInt32 in lcl_Highlight
Change-Id: I0bcb31a37b642482885379fb2b64ed61c584272e
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index d1b2ee7..46f1a40 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -97,13 +97,13 @@ static void lcl_Highlight(const OUString& rSource, SwTextPortions& aPortionList)
aPortionList.push_back( aText );
nInsert++;
}
- sal_Unicode cFollowFirst = rSource[(xub_StrLen)(nActPos + 1)];
- sal_Unicode cFollowNext = rSource[(xub_StrLen)(nActPos + 2)];
+ sal_Unicode cFollowFirst = rSource[nActPos + 1];
+ sal_Unicode cFollowNext = rSource[nActPos + 2];
if(cExclamation == cFollowFirst)
{
// "<!" SGML or comment
if(cMinus == cFollowNext &&
- nActPos < nStrLen - 3 && cMinus == rSource[(xub_StrLen)(nActPos + 3)])
+ nActPos < nStrLen - 3 && cMinus == rSource[nActPos + 3])
{
eFoundType = svtools::HTMLCOMMENT;
}
commit 0f196eb228e8e5dbc403b9d9a32f3f5f8c056fc7
Author: Noel Grandin <noel at peralex.com>
Date: Mon Dec 2 15:11:35 2013 +0200
convert xub_StrLen->sal_Int32 in SpellState
Change-Id: I78ea405e27050015769bd17fee6c5221c694bae9
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 3a25d88..6fa39cf 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -86,8 +86,8 @@ struct SpellState
ShellModes m_eSelMode;
const SwNode* m_pPointNode;
const SwNode* m_pMarkNode;
- xub_StrLen m_nPointPos;
- xub_StrLen m_nMarkPos;
+ sal_Int32 m_nPointPos;
+ sal_Int32 m_nMarkPos;
const SdrOutliner* m_pOutliner;
ESelection m_aESelection;
commit 3befdd37c610e37d6f1eb33ec2f76ef77a2ba1a0
Author: Noel Grandin <noel at peralex.com>
Date: Mon Dec 2 14:09:17 2013 +0200
convert xub_StrLen -> sal_Int32
Change-Id: If8f3c32f1e7664ceb266341a407aa29effa25ced
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index c19438c..7472a6d 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -172,7 +172,7 @@ void SwWrtShell::InsertByWord( const OUString & rStr)
if( !rStr.isEmpty() )
{
sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
- xub_StrLen nPos = 0, nStt = 0;
+ sal_Int32 nPos = 0, nStt = 0;
for( ; nPos < rStr.getLength(); nPos++ )
{
sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
commit ca015ac13100bb1dc9788990cc7189ce77705480
Author: Noel Grandin <noel at peralex.com>
Date: Mon Dec 2 09:19:24 2013 +0200
convert formula::FormEditData from xub_StrLen->sal_Int32
Change-Id: I0127079ef3ee6bde8e36f2a83ef1f568b9f15568
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 9fa3e8b..f1f0a78 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -371,7 +371,7 @@ void FormulaDlg_Impl::StoreFormEditData(FormEditData* pData)
{
if (pData) // it won't be destroyed via Close
{
- pData->SetFStart((xub_StrLen)pMEdit->GetSelection().Min());
+ pData->SetFStart(pMEdit->GetSelection().Min());
pData->SetSelection(pMEdit->GetSelection());
if(aTabCtrl.GetCurPageId()==TP_FUNCTION)
diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx
index a772823..426cd34 100644
--- a/include/formula/formdata.hxx
+++ b/include/formula/formdata.hxx
@@ -37,7 +37,7 @@ public:
sal_Bool HasParent() const { return pParent != NULL; }
inline sal_uInt16 GetMode() const { return nMode; }
- inline xub_StrLen GetFStart() const { return nFStart; }
+ inline sal_Int32 GetFStart() const { return nFStart; }
inline sal_uInt16 GetCatSel() const { return nCatSel; }
inline sal_uInt16 GetFuncSel() const { return nFuncSel; }
inline sal_uInt16 GetOffset() const { return nOffset; }
@@ -48,7 +48,7 @@ public:
inline const Selection& GetSelection()const { return aSelection;}
inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; }
- inline void SetFStart( xub_StrLen nNew ) { nFStart = nNew; }
+ inline void SetFStart( sal_Int32 nNew ) { nFStart = nNew; }
inline void SetCatSel( sal_uInt16 nNew ) { nCatSel = nNew; }
inline void SetFuncSel( sal_uInt16 nNew ) { nFuncSel = nNew; }
inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; }
@@ -65,7 +65,7 @@ protected:
FormEditData* pParent; // fuer Verschachtelung
private:
sal_uInt16 nMode; // enum ScFormulaDlgMode
- xub_StrLen nFStart;
+ sal_Int32 nFStart;
sal_uInt16 nCatSel;
sal_uInt16 nFuncSel;
sal_uInt16 nOffset;
commit c310019e75520af3773055723538f06a1c332e4a
Author: Noel Grandin <noel at peralex.com>
Date: Mon Dec 2 08:53:54 2013 +0200
convert formula::FormulaDlg_Impl from xub_StrLen->sal_Int32
Change-Id: Id3229083c1e2ad0cfcb01e9dfa6fa66eb5f5604a
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d16e4fe..9fa3e8b 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -95,7 +95,7 @@ namespace formula
sal_Bool CalcStruct( const OUString& rStrExp);
void UpdateValues();
void DeleteArgs();
- xub_StrLen GetFunctionPos(xub_StrLen nPos);
+ sal_Int32 GetFunctionPos(sal_Int32 nPos);
void ClearAllParas();
void MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count);
@@ -103,8 +103,8 @@ namespace formula
void UpdateTokenArray( const OUString& rStrExp);
OUString RepairFormula(const OUString& aFormula);
void FillDialog(sal_Bool nFlag=sal_True);
- void EditNextFunc( sal_Bool bForward, xub_StrLen nFStart=NOT_FOUND );
- void EditThisFunc(xub_StrLen nFStart);
+ void EditNextFunc( sal_Bool bForward, sal_Int32 nFStart=NOT_FOUND );
+ void EditThisFunc(sal_Int32 nFStart);
void StoreFormEditData(FormEditData* pEditData);
@@ -118,7 +118,7 @@ namespace formula
void FillListboxes();
void FillControls(sal_Bool &rbNext, sal_Bool &rbPrev);
- FormulaDlgMode SetMeText(const OUString& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate);
+ FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate);
void SetMeText(const OUString& _sText);
sal_Bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
@@ -127,7 +127,7 @@ namespace formula
sal_Bool UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr);
- void SetData(sal_Int32 nFStart, xub_StrLen nNextFStart, xub_StrLen nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
+ void SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
void PreNotify( NotifyEvent& rNEvt );
RefEdit* GetCurrRefEdit();
@@ -222,7 +222,7 @@ namespace formula
sal_uInt16 nEdFocus;
sal_Bool bEditFlag;
const IFunctionDescription* pFuncDesc;
- xub_StrLen nArgs;
+ sal_Int32 nArgs;
::std::vector< OUString > m_aArguments;
Selection aFuncSel;
@@ -461,13 +461,13 @@ namespace
};
}
// -----------------------------------------------------------------------------
-xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
+sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
{
const sal_Unicode sep = m_pHelper->getFunctionManager()->getSingleToken(IFunctionManager::eSep);
- xub_StrLen nFuncPos=STRING_NOTFOUND;
- sal_Bool bFlag=sal_False;
- OUString aFormString = m_aFormulaHelper.GetCharClass()->uppercase(pMEdit->GetText());
+ sal_Int32 nFuncPos = STRING_NOTFOUND;
+ sal_Bool bFlag = sal_False;
+ OUString aFormString = m_aFormulaHelper.GetCharClass()->uppercase(pMEdit->GetText());
if ( m_aTokenList.getLength() )
{
@@ -478,9 +478,9 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
const sheet::FormulaToken* pEnd = pIter + m_aTokenList.getLength();
try
{
- xub_StrLen nTokPos=1;
- xub_StrLen nOldTokPos=1;
- xub_StrLen nPrevFuncPos = 1;
+ sal_Int32 nTokPos=1;
+ sal_Int32 nOldTokPos=1;
+ sal_Int32 nPrevFuncPos = 1;
short nBracketCount = 0;
while ( pIter != pEnd )
{
@@ -500,7 +500,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
{
const sal_Int32 n1 = aFormString.indexOf(sep, nTokPos);
const sal_Int32 n2 = aFormString.indexOf(')',nTokPos);
- xub_StrLen nXXX = nTokPos;
+ sal_Int32 nXXX = nTokPos;
if(n1<n2)
{
nTokPos=n1;
@@ -520,7 +520,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
}
else
{
- nTokPos = sal::static_int_cast<xub_StrLen>( nTokPos + aString.getLength() );
+ nTokPos = nTokPos + aString.getLength();
}
if ( eOp == m_aSeparatorsOpCodes[TOKEN_OPEN].OpCode )
@@ -821,7 +821,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
// 2. Page or Edit: show selected function
- xub_StrLen nFStart = pData->GetFStart();
+ sal_Int32 nFStart = pData->GetFStart();
OUString aFormula = m_pHelper->getCurrentFormula() + " )";
sal_Int32 nNextFStart = nFStart;
sal_Int32 nNextFEnd = 0;
@@ -873,9 +873,9 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
if(bTestFlag)
pParaWin->SetArgumentOffset(nOffset);
sal_uInt16 nActiv=0;
- xub_StrLen nArgPos= m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
- xub_StrLen nEditPos=(xub_StrLen) pMEdit->GetSelection().Min();
- sal_Bool bFlag=sal_False;
+ sal_Int32 nArgPos = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
+ sal_Int32 nEditPos = pMEdit->GetSelection().Min();
+ sal_Bool bFlag = sal_False;
for(sal_uInt16 i=0;i<nArgs;i++)
{
@@ -886,7 +886,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
nActiv=i;
bFlag=sal_True;
}
- nArgPos = sal::static_int_cast<xub_StrLen>( nArgPos + nLength );
+ nArgPos = nArgPos + nLength;
}
pParaWin->UpdateParas();
@@ -1061,7 +1061,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl)
// --------------------------------------------------------------------------
// Functions for right Page
// --------------------------------------------------------------------------
-void FormulaDlg_Impl::SetData(sal_Int32 nFStart, xub_StrLen nNextFStart, xub_StrLen nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd)
+void FormulaDlg_Impl::SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd)
{
sal_Int32 nFEnd;
@@ -1087,7 +1087,7 @@ void FormulaDlg_Impl::SetData(sal_Int32 nFStart, xub_StrLen nNextFStart, xub_Str
FillDialog();
}
// -----------------------------------------------------------------------------
-void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
+void FormulaDlg_Impl::EditThisFunc(sal_Int32 nFStart)
{
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData) return;
@@ -1121,7 +1121,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
}
}
-void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
+void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, sal_Int32 nFStart )
{
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData)
@@ -1205,10 +1205,10 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
SaveArg(nArgNo);
UpdateSelection();
- xub_StrLen nFormulaStrPos = pData->GetFStart();
+ sal_Int32 nFormulaStrPos = pData->GetFStart();
OUString aFormula = m_pHelper->getCurrentFormula();
- xub_StrLen n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, nEdFocus+pData->GetOffset() );
+ sal_Int32 n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, nEdFocus+pData->GetOffset() );
pData->SetEdFocus( nEdFocus );
pData->SaveValues();
@@ -1246,8 +1246,8 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
OUString aInputFormula=m_pHelper->getCurrentFormula();
OUString aString=pMEdit->GetText();
- Selection aSel =pMEdit->GetSelection();
- xub_StrLen nTest=0;
+ Selection aSel = pMEdit->GetSelection();
+ sal_Int32 nTest = 0;
if(aString.isEmpty()) //in case everything was cleared
{
@@ -1269,9 +1269,9 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
m_pHelper->setSelection(0, aInputFormula.getLength());
m_pHelper->setCurrentFormula(aString);
- m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max());
+ m_pHelper->setSelection(aSel.Min(), aSel.Max());
- xub_StrLen nPos = (xub_StrLen)aSel.Min()-1;
+ sal_Int32 nPos = aSel.Min()-1;
OUString aStrResult;
@@ -1296,7 +1296,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
ClearAllParas();
}
- m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max());
+ m_pHelper->setSelection(aSel.Min(), aSel.Max());
bEditFlag=sal_False;
return 0;
}
@@ -1305,14 +1305,14 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
{
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData) return 0;
- xub_StrLen nFStart = pData->GetFStart();
+ sal_Int32 nFStart = pData->GetFStart();
bEditFlag=sal_True;
OUString aString=pMEdit->GetText();
Selection aSel =pMEdit->GetSelection();
- m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max());
+ m_pHelper->setSelection(aSel.Min(), aSel.Max());
if(aSel.Min()==0)
{
@@ -1322,13 +1322,13 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
if(aSel.Min() != aString.getLength())
{
- xub_StrLen nPos=(xub_StrLen)aSel.Min();
+ sal_Int32 nPos = aSel.Min();
nFStart=GetFunctionPos(nPos - 1);
if(nFStart<nPos)
{
- xub_StrLen nPos1=m_aFormulaHelper.GetFunctionEnd(aString,nFStart);
+ sal_Int32 nPos1 = m_aFormulaHelper.GetFunctionEnd(aString,nFStart);
if(nPos1>nPos || nPos1==STRING_NOTFOUND)
{
@@ -1336,7 +1336,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
}
else
{
- xub_StrLen n=nPos;
+ sal_Int32 n = nPos;
short nCount=1;
while(n>0)
{
@@ -1363,7 +1363,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
ClearAllParas();
}
}
- m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max());
+ m_pHelper->setSelection(aSel.Min(), aSel.Max());
bEditFlag=sal_False;
return 0;
@@ -1371,7 +1371,7 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl)
void FormulaDlg_Impl::UpdateSelection()
{
- m_pHelper->setSelection((xub_StrLen)aFuncSel.Min(),(xub_StrLen)aFuncSel.Max());
+ m_pHelper->setSelection(aFuncSel.Min(), aFuncSel.Max());
m_pHelper->setCurrentFormula( pFuncDesc->getFormula( m_aArguments ) );
pMEdit->SetText(m_pHelper->getCurrentFormula());
sal_Int32 PrivStart, PrivEnd;
@@ -1490,7 +1490,7 @@ void FormulaDlg_Impl::SetMeText(const OUString& _sText)
pMEdit->SetSelection( pData->GetSelection());
aMEFormula.UpdateOldSel();
}
-FormulaDlgMode FormulaDlg_Impl::SetMeText(const OUString& _sText, xub_StrLen PrivStart, xub_StrLen PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate)
+FormulaDlgMode FormulaDlg_Impl::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate)
{
FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA;
if(!bEditFlag)
@@ -1756,7 +1756,7 @@ void FormulaDlg::SetMeText(const OUString& _sText)
}
// -----------------------------------------------------------------------------
-FormulaDlgMode FormulaDlg::SetMeText(const OUString& _sText, xub_StrLen PrivStart, xub_StrLen PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate)
+FormulaDlgMode FormulaDlg::SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate)
{
return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate);
}
diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx
index a7ca1e3..fc0c8b3 100644
--- a/include/formula/formula.hxx
+++ b/include/formula/formula.hxx
@@ -116,7 +116,7 @@ protected:
void HighlightFunctionParas(const OUString& aFormula);
void SetMeText(const OUString& _sText);
- FormulaDlgMode SetMeText(const OUString& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate);
+ FormulaDlgMode SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, sal_Bool bMatrix, sal_Bool _bSelect, sal_Bool _bUpdate);
void Update();
sal_Bool CheckMatrix(OUString& aFormula /*IN/OUT*/);
OUString GetMeText() const;
commit b882c046ee1268438f36f80038c7a8240053e995
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 16:51:31 2013 +0200
convert FormulaHelper from xub_StrLen to sal_Int32
Change-Id: Ib866c39b2bb5a3cf81b899dc38ea548e3762fc9e
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index ff90337..16394f8 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -123,12 +123,12 @@ sal_Bool FormulaHelper::GetNextFunc( const OUString& rFormula,
//------------------------------------------------------------------------
void FormulaHelper::FillArgStrings( const OUString& rFormula,
- xub_StrLen nFuncPos,
- sal_uInt16 nArgs,
+ sal_Int32 nFuncPos,
+ sal_uInt16 nArgs,
::std::vector< OUString >& _rArgs ) const
{
- xub_StrLen nStart = 0;
- xub_StrLen nEnd = 0;
+ sal_Int32 nStart = 0;
+ sal_Int32 nEnd = 0;
sal_uInt16 i;
sal_Bool bLast = sal_False;
@@ -164,7 +164,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula,
void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs,
const OUString& rFormula,
- xub_StrLen nFuncPos,
+ sal_Int32 nFuncPos,
sal_uInt16 nArgs ) const
{
if (nArgs)
@@ -175,7 +175,7 @@ void FormulaHelper::GetArgStrings( ::std::vector< OUString >& _rArgs,
//------------------------------------------------------------------------
-inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, xub_StrLen nPos )
+inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr, sal_Int32 nPos )
{
if( _pCharClass->isLetterNumeric( rStr, nPos ) )
return sal_True;
@@ -188,8 +188,8 @@ inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const OUString& rStr
}
-xub_StrLen FormulaHelper::GetFunctionStart( const OUString& rFormula,
- xub_StrLen nStart,
+sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
+ sal_Int32 nStart,
sal_Bool bBack,
OUString* pFuncName ) const
{
@@ -198,8 +198,8 @@ xub_StrLen FormulaHelper::GetFunctionStart( const OUString& rFormula,
if ( nStrLen < nStart )
return nStart;
- xub_StrLen nFStart = FUNC_NOTFOUND;
- xub_StrLen nParPos = nStart;
+ sal_Int32 nFStart = FUNC_NOTFOUND;
+ sal_Int32 nParPos = nStart;
sal_Bool bRepeat, bFound;
do
@@ -282,7 +282,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const OUString& rFormula,
//------------------------------------------------------------------------
-xub_StrLen FormulaHelper::GetFunctionEnd( const OUString& rStr, xub_StrLen nStart ) const
+sal_Int32 FormulaHelper::GetFunctionEnd( const OUString& rStr, sal_Int32 nStart ) const
{
sal_Int32 nStrLen = rStr.getLength();
@@ -340,7 +340,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const OUString& rStr, xub_StrLen nSta
//------------------------------------------------------------------
-xub_StrLen FormulaHelper::GetArgStart( const OUString& rStr, xub_StrLen nStart, sal_uInt16 nArg ) const
+sal_Int32 FormulaHelper::GetArgStart( const OUString& rStr, sal_Int32 nStart, sal_uInt16 nArg ) const
{
sal_Int32 nStrLen = rStr.getLength();
diff --git a/include/formula/formulahelper.hxx b/include/formula/formulahelper.hxx
index becaa07..84dbcfd 100644
--- a/include/formula/formulahelper.hxx
+++ b/include/formula/formulahelper.hxx
@@ -53,21 +53,21 @@ namespace formula
const IFunctionDescription** ppFDesc = NULL,
::std::vector< OUString>* pArgs = NULL ) const;
- xub_StrLen GetFunctionStart( const OUString& rFormula, xub_StrLen nStart,
+ sal_Int32 GetFunctionStart( const OUString& rFormula, sal_Int32 nStart,
sal_Bool bBack, OUString* pFuncName = NULL ) const;
- xub_StrLen GetFunctionEnd ( const OUString& rFormula, xub_StrLen nStart ) const;
+ sal_Int32 GetFunctionEnd ( const OUString& rFormula, sal_Int32 nStart ) const;
- xub_StrLen GetArgStart ( const OUString& rFormula, xub_StrLen nStart,
+ sal_Int32 GetArgStart ( const OUString& rFormula, sal_Int32 nStart,
sal_uInt16 nArg ) const;
void GetArgStrings ( ::std::vector< OUString >& _rArgs,
- const OUString& rFormula,
- xub_StrLen nFuncPos,
+ const OUString& rFormula,
+ sal_Int32 nFuncPos,
sal_uInt16 nArgs ) const;
void FillArgStrings ( const OUString& rFormula,
- xub_StrLen nFuncPos,
+ sal_Int32 nFuncPos,
sal_uInt16 nArgs,
::std::vector< OUString >& _rArgs ) const;
};
commit d9b4c8ea811da36f8e0f38b481700f5a0406790d
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 16:23:42 2013 +0200
Convert FormulaHelper::GetNextFunc xub_StrLen->salInt32
Change-Id: Ief8c4b4699b3f6ffe1cb02d3dae43ad5a0c4c89e
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 6ca380f..ff90337 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -67,14 +67,14 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager)
}
sal_Bool FormulaHelper::GetNextFunc( const OUString& rFormula,
- sal_Bool bBack,
- xub_StrLen& rFStart, // Input and output
- xub_StrLen* pFEnd, // = NULL
- const IFunctionDescription** ppFDesc, // = NULL
- ::std::vector< OUString>* pArgs ) const // = NULL
+ sal_Bool bBack,
+ sal_Int32& rFStart, // Input and output
+ sal_Int32* pFEnd, // = NULL
+ const IFunctionDescription** ppFDesc, // = NULL
+ ::std::vector< OUString>* pArgs ) const // = NULL
{
- xub_StrLen nOldStart = rFStart;
- OUString aFname;
+ sal_Int32 nOldStart = rFStart;
+ OUString aFname;
rFStart = GetFunctionStart( rFormula, rFStart, bBack, ppFDesc ? &aFname : NULL );
sal_Bool bFound = ( rFStart != FUNC_NOTFOUND );
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 4f1a66b..d16e4fe 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -822,9 +822,9 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
// 2. Page or Edit: show selected function
xub_StrLen nFStart = pData->GetFStart();
- OUString aFormula = m_pHelper->getCurrentFormula() + " )";
- xub_StrLen nNextFStart = nFStart;
- xub_StrLen nNextFEnd = 0;
+ OUString aFormula = m_pHelper->getCurrentFormula() + " )";
+ sal_Int32 nNextFStart = nFStart;
+ sal_Int32 nNextFEnd = 0;
DeleteArgs();
const IFunctionDescription* pOldFuncDesc = pFuncDesc;
@@ -904,9 +904,9 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
}
// Test, ob vorne/hinten noch mehr Funktionen sind
- xub_StrLen nTempStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
+ sal_Int32 nTempStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
rbNext = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nTempStart );
- nTempStart=(xub_StrLen)pMEdit->GetSelection().Min();
+ nTempStart = pMEdit->GetSelection().Min();
pData->SetFStart(nTempStart);
rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, sal_True, nTempStart );
}
@@ -1103,8 +1103,8 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
pData->SetFStart(nFStart);
}
- xub_StrLen nNextFStart = nFStart;
- xub_StrLen nNextFEnd = 0;
+ sal_Int32 nNextFStart = nFStart;
+ sal_Int32 nNextFEnd = 0;
sal_Bool bFound;
@@ -1138,8 +1138,8 @@ void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
pData->SetFStart(nFStart);
}
- xub_StrLen nNextFStart = 0;
- xub_StrLen nNextFEnd = 0;
+ sal_Int32 nNextFStart = 0;
+ sal_Int32 nNextFEnd = 0;
sal_Bool bFound;
if ( bForward )
diff --git a/include/formula/formulahelper.hxx b/include/formula/formulahelper.hxx
index 737550d..becaa07 100644
--- a/include/formula/formulahelper.hxx
+++ b/include/formula/formulahelper.hxx
@@ -46,12 +46,12 @@ namespace formula
inline const CharClass* GetCharClass() const { return m_pCharClass; }
- sal_Bool GetNextFunc( const OUString& rFormula,
- sal_Bool bBack,
- xub_StrLen& rFStart, // Ein- und Ausgabe
- xub_StrLen* pFEnd = NULL,
- const IFunctionDescription** ppFDesc = NULL,
- ::std::vector< OUString>* pArgs = NULL ) const;
+ sal_Bool GetNextFunc( const OUString& rFormula,
+ sal_Bool bBack,
+ sal_Int32& rFStart, // Ein- und Ausgabe
+ sal_Int32* pFEnd = NULL,
+ const IFunctionDescription** ppFDesc = NULL,
+ ::std::vector< OUString>* pArgs = NULL ) const;
xub_StrLen GetFunctionStart( const OUString& rFormula, xub_StrLen nStart,
sal_Bool bBack, OUString* pFuncName = NULL ) const;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 766271f..9e06c6b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -822,8 +822,7 @@ void ScInputHandler::ShowTipCursor()
return;
xub_StrLen nPos = aSel.nEndPos;
OUString aSelText = aFormula.copy( 0, nPos );
- xub_StrLen nNextFStart = 0;
- xub_StrLen nNextFEnd = 0;
+ sal_Int32 nNextFStart = 0;
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< OUString> aArgs;
@@ -841,7 +840,7 @@ void ScInputHandler::ShowTipCursor()
if( !(comphelper::string::isalphaAscii(c)) )
continue;
nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, true);
- if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ if( aHelper.GetNextFunc( aSelText, false, nNextFStart, NULL, &ppFDesc, &aArgs ) )
{
if( !ppFDesc->getFunctionName().isEmpty() )
{
@@ -1059,8 +1058,7 @@ void ScInputHandler::UseFormulaData()
xub_StrLen nPos = aSel.nEndPos;
OUString aFormula = aTotal.copy( 0, nPos );;
sal_Int32 nLeftParentPos = 0;
- xub_StrLen nNextFStart = 0;
- xub_StrLen nNextFEnd = 0;
+ sal_Int32 nNextFStart = 0;
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< OUString> aArgs;
@@ -1093,7 +1091,7 @@ void ScInputHandler::UseFormulaData()
if( !(comphelper::string::isalphaAscii(c)) )
continue;
nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, true);
- if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
+ if( aHelper.GetNextFunc( aFormula, false, nNextFStart, NULL, &ppFDesc, &aArgs ) )
{
if( !ppFDesc->getFunctionName().isEmpty() )
{
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 593b5e0..f3b05d5 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -150,8 +150,8 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
{
bMatrix = CheckMatrix(aFormula);
- xub_StrLen nFStart = 0;
- xub_StrLen nFEnd = 0;
+ sal_Int32 nFStart = 0;
+ sal_Int32 nFEnd = 0;
if ( GetFormulaHelper().GetNextFunc( aFormula, false, nFStart, &nFEnd) )
{
pScMod->InputReplaceSelection( aFormula );
commit 40da065f7e6c96821a4fda2f60ae1a75f174f5a3
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 16:03:31 2013 +0200
fix spelling delimeter -> delimiter
Change-Id: I12a330e922f8f6ffe9c746a26e5b32c0bbae626a
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index e8be7db..824a7ac 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -99,18 +99,18 @@ void TypeDetectionImporter::fillFilterVector( XMLFilterVector& rFilters )
delete (*aIter++);
}
-static OUString getSubdata( int index, sal_Unicode delimeter, const OUString& rData )
+static OUString getSubdata( int index, sal_Unicode delimiter, const OUString& rData )
{
sal_Int32 nLastIndex = 0;
- sal_Int32 nNextIndex = rData.indexOf( delimeter );
+ sal_Int32 nNextIndex = rData.indexOf( delimiter );
OUString aSubdata;
while( index )
{
nLastIndex = nNextIndex + 1;
- nNextIndex = rData.indexOf( delimeter, nLastIndex );
+ nNextIndex = rData.indexOf( delimiter, nLastIndex );
index--;
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index deea834..b7765e2 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -280,7 +280,7 @@ static Sequence< OUString > createExtensionsSequence( const OUString& rExtension
// a non empty string has at least one extension
nExtensions++;
- // now count the delimeters ';'
+ // now count the delimiters ';'
const sal_Unicode * pString = rExtensions.getStr();
int i;
for( i = 0; i < nLength; i++, pString++ )
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 8eb9102..c6a8609 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -802,11 +802,11 @@ static sal_Int32 lcl_GetToken( OUString &rToken,
break;
}
- if (i >= rText.getLength()) // delimeter not found
+ if (i >= rText.getLength()) // delimiter not found
rToken = rText.copy( nPos );
else
rToken = rText.copy( nPos, i - nPos );
- nRes = i + 1; // continue after found delimeter
+ nRes = i + 1; // continue after found delimiter
}
return nRes;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5a79bbb..b5e3765 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -326,7 +326,7 @@ static const sal_Unicode aDelimiterTable[] =
};
bool SmParser::IsDelimiter( const OUString &rTxt, sal_Int32 nPos )
- // returns 'true' iff cChar is '\0' or a delimeter
+ // returns 'true' iff cChar is '\0' or a delimiter
{
OSL_ENSURE( nPos <= rTxt.getLength(), "index out of range" );
@@ -334,7 +334,7 @@ bool SmParser::IsDelimiter( const OUString &rTxt, sal_Int32 nPos )
if(!cChar)
return true;
- // check if 'cChar' is in the delimeter table
+ // check if 'cChar' is in the delimiter table
const sal_Unicode *pDelim = &aDelimiterTable[0];
for ( ; *pDelim != 0; pDelim++)
if (*pDelim == cChar)
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 965c332..f996ad5 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1765,7 +1765,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
OUString aRes;
OUString aRangeRepresentation( rRangeRepresentation );
- // multiple ranges are delimeted by a ';' like in
+ // multiple ranges are delimited by a ';' like in
// "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges!
sal_Int32 nNumRanges = comphelper::string::getTokenCount(aRangeRepresentation, ';');
SwTable* pFirstFoundTable = 0; // to check that only one table will be used
@@ -1815,7 +1815,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
aCellRange.aLowerRight.bIsEmpty = false;
}
OUString aTmp( XMLRangeHelper::getXMLStringFromCellRange( aCellRange ) );
- if (!aRes.isEmpty()) // in case of multiple ranges add delimeter
+ if (!aRes.isEmpty()) // in case of multiple ranges add delimiter
aRes += " ";
aRes += aTmp;
}
@@ -1833,7 +1833,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXML
OUString aRes;
OUString aXMLRange( rXMLRange );
- // multiple ranges are delimeted by a ' ' like in
+ // multiple ranges are delimited by a ' ' like in
// "Table1.$A$1:.$A$4 Table1.$C$2:.$C$5" the same table must be used in all ranges!
sal_Int32 nNumRanges = comphelper::string::getTokenCount(aXMLRange, ' ');
OUString aFirstFoundTable; // to check that only one table will be used
@@ -1862,7 +1862,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXML
aCellRange.aLowerRight.nRow );
}
- if (!aRes.isEmpty()) // in case of multiple ranges add delimeter
+ if (!aRes.isEmpty()) // in case of multiple ranges add delimiter
aRes += ";";
aRes += aTmp;
}
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 9b6cc60..7018fdb 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -600,7 +600,7 @@ OUString NameFromCharSet(rtl_TextEncoding nChrSet)
// 2. LineEnd - as CR/LR/CRLF
// 3. Fontname
// 4. Language
-// the delimetercharacter is ","
+// the delimiter character is ","
//
void SwAsciiOptions::ReadUserData( const OUString& rStr )
commit c5ee41058193d346665bda092b8f692e2ecd43d5
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 15:42:08 2013 +0200
simplify logic in ScFuncDesc::getFormula
Change-Id: I05fd812d1fd76e57d5305d859b2ad64d471adfb1
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index e59249a..f93fe0c 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -242,23 +242,17 @@ OUString ScFuncDesc::getFormula( const ::std::vector< OUString >& _aArguments )
aFormula.append( *pFuncName );
aFormula.appendAscii( "(" );
- ::std::vector< OUString >::const_iterator aIter = _aArguments.begin();
- ::std::vector< OUString >::const_iterator aEnd = _aArguments.end();
-
- if ( nArgCount > 0 && aIter != aEnd )
+ if ( nArgCount > 0 && !_aArguments.empty() && !_aArguments[0].isEmpty())
{
- bool bLastArg = aIter->isEmpty();
+ ::std::vector< OUString >::const_iterator aIter = _aArguments.begin();
+ ::std::vector< OUString >::const_iterator aEnd = _aArguments.end();
- while( aIter != aEnd && !bLastArg )
+ aFormula.append( *aIter );
+ ++aIter;
+ while( aIter != aEnd && !aIter->isEmpty() )
{
- aFormula.append( *(aIter) );
- if ( aIter != (aEnd-1) )
- {
- bLastArg = (aIter+1)->isEmpty();
- if ( !bLastArg )
- aFormula.append( sep );
- }
-
+ aFormula.append( sep );
+ aFormula.append( *aIter );
++aIter;
}
}
commit 418b5df94b5a06ba4c18a82f9ff7a0c215a2060b
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 15:35:12 2013 +0200
convert getSuppressedArgumentCount from xub_StrLen -> sal_Int32
convert IFunctionDescription::getSuppressedArgumentCount from xub_StrLen
-> sal_Int32
Change-Id: Iee7a094a6f067fa57ee828c434417f7583c0f32b
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 29e60f8..6ca380f 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -36,7 +36,7 @@ namespace formula
virtual OUString getFunctionName() const { return OUString(); }
virtual const IFunctionCategory* getCategory() const { return NULL; }
virtual OUString getDescription() const { return OUString(); }
- virtual xub_StrLen getSuppressedArgumentCount() const { return 0; }
+ virtual sal_Int32 getSuppressedArgumentCount() const { return 0; }
virtual OUString getFormula(const ::std::vector< OUString >& ) const { return OUString(); }
virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& ) const {}
virtual void initArgumentInfo() const {}
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index e27d82d..c27a7f5 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -82,7 +82,7 @@ namespace formula
virtual const IFunctionCategory* getCategory() const = 0;
virtual OUString getDescription() const = 0;
// GetSuppressedArgCount
- virtual xub_StrLen getSuppressedArgumentCount() const = 0;
+ virtual sal_Int32 getSuppressedArgumentCount() const = 0;
// GetFormulaString
virtual OUString getFormula(const ::std::vector< OUString >& _aArguments) const = 0;
// GetVisibleArgMapping
diff --git a/reportdesign/source/ui/inc/FunctionHelper.hxx b/reportdesign/source/ui/inc/FunctionHelper.hxx
index 99dbd35..bb9cb85 100644
--- a/reportdesign/source/ui/inc/FunctionHelper.hxx
+++ b/reportdesign/source/ui/inc/FunctionHelper.hxx
@@ -67,7 +67,7 @@ public:
virtual OUString getFunctionName() const ;
virtual const formula::IFunctionCategory* getCategory() const ;
virtual OUString getDescription() const ;
- virtual xub_StrLen getSuppressedArgumentCount() const ;
+ virtual sal_Int32 getSuppressedArgumentCount() const ;
virtual OUString getFormula(const ::std::vector< OUString >& _aArguments) const ;
virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const ;
virtual void initArgumentInfo() const;
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 0b8ed51..59bb0bb 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -168,9 +168,9 @@ OUString FunctionDescription::getDescription() const
return m_xFunctionDescription->getDescription();
}
// -----------------------------------------------------------------------------
-xub_StrLen FunctionDescription::getSuppressedArgumentCount() const
+sal_Int32 FunctionDescription::getSuppressedArgumentCount() const
{
- return static_cast<xub_StrLen>(m_aParameter.getLength());
+ return m_aParameter.getLength();
}
// -----------------------------------------------------------------------------
OUString FunctionDescription::getFormula(const ::std::vector< OUString >& _aArguments) const
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 965f429..479beee 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1032,10 +1032,10 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula
if ( bSuccess )
{
OUString sFormula = aDlg.getCurrentFormula();
- xub_StrLen nIndex = 0;
if ( sFormula[0] == '=' )
- nIndex = 1;
- _in_out_rFormula = "rpt:" + sFormula.copy(nIndex);
+ _in_out_rFormula = "rpt:" + sFormula.copy(1);
+ else
+ _in_out_rFormula = "rpt:" + sFormula;
}
}
}
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index a507962..fb892ec 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -153,7 +153,7 @@ public:
@return number of non-suppressed arguments
*/
sal_uInt16 GetSuppressedArgCount() const;
- virtual xub_StrLen getSuppressedArgumentCount() const ;
+ virtual sal_Int32 getSuppressedArgumentCount() const ;
/**
Requests function data from AddInCollection
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 66c3234..e59249a 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -312,7 +312,7 @@ OUString ScFuncDesc::getDescription() const
return sRet;
}
-xub_StrLen ScFuncDesc::getSuppressedArgumentCount() const
+sal_Int32 ScFuncDesc::getSuppressedArgumentCount() const
{
return GetSuppressedArgCount();
}
commit 8c787dec1ae4e415fdcfdf16b5cd9b749308b2c7
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 15:13:29 2013 +0200
convert ScInputHandler::InputGetSelection from xub_StrLen -> sal_Int32
Change-Id: If01d21824964a0fefecc34bcf8b0b3910d2b4d48
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index a871663..5932904 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -214,8 +214,8 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void ViewShellGone(ScTabViewShell* pViewSh);
void ViewShellChanged();
// communication with function-autopilot
- void InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd );
- void InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd );
+ void InputGetSelection( sal_Int32& rStart, sal_Int32& rEnd );
+ void InputSetSelection( sal_Int32 nStart, sal_Int32 nEnd );
void InputReplaceSelection( const OUString& rStr );
OUString InputGetFormulaStr();
void ActivateInputWindow( const OUString* pStr = NULL,
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 6f901ce..766271f 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3817,7 +3817,7 @@ bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
// InputGetSelection, InputSetSelection, InputReplaceSelection, InputGetFormulaStr
//------------------------------------------------------------------------
-void ScInputHandler::InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd )
+void ScInputHandler::InputGetSelection( sal_Int32& rStart, sal_Int32& rEnd )
{
rStart = nFormSelStart;
rEnd = nFormSelEnd;
@@ -3853,7 +3853,7 @@ EditView* ScInputHandler::GetFuncEditView()
//------------------------------------------------------------------------
-void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd )
+void ScInputHandler::InputSetSelection( sal_Int32 nStart, sal_Int32 nEnd )
{
if ( nStart <= nEnd )
{
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index b4398e5..59e8fcf 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1522,14 +1522,14 @@ ScInputHandler* ScModule::GetRefInputHdl()
//------------------------------------------------------------------------
// Olk's Krempel:
-void ScModule::InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd )
+void ScModule::InputGetSelection( sal_Int32& rStart, sal_Int32& rEnd )
{
ScInputHandler* pHdl = GetInputHdl();
if (pHdl)
pHdl->InputGetSelection( rStart, rEnd );
}
-void ScModule::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd )
+void ScModule::InputSetSelection( sal_Int32 nStart, sal_Int32 nEnd )
{
ScInputHandler* pHdl = GetInputHdl();
if (pHdl)
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index b2a22ee..593b5e0 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -156,7 +156,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
{
pScMod->InputReplaceSelection( aFormula );
pScMod->InputSetSelection( nFStart, nFEnd );
- xub_StrLen PrivStart, PrivEnd;
+ sal_Int32 PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True);
@@ -174,7 +174,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
pScMod->InputReplaceSelection( aNewFormula );
pScMod->InputSetSelection( 1, aNewFormula.getLength()+1 );
- xub_StrLen PrivStart, PrivEnd;
+ sal_Int32 PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,false,false);
@@ -635,10 +635,7 @@ void ScFormulaDlg::setSelection(sal_Int32 _nStart, sal_Int32 _nEnd)
void ScFormulaDlg::getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const
{
ScModule* pScMod = SC_MOD();
- sal_uInt16 nStart1 = _nStart, nEnd1 = _nEnd;
- pScMod->InputGetSelection( nStart1, nEnd1 );
- _nStart = nStart1;
- _nEnd = nEnd1;
+ pScMod->InputGetSelection( _nStart, _nEnd );
}
OUString ScFormulaDlg::getCurrentFormula() const
{
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 73e97c4..03a7da1 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -69,19 +69,19 @@ private:
ScTypedCaseStrSet::const_iterator miAutoPosFormula;
Window* pTipVisibleParent;
- sal_uLong nTipVisible;
+ sal_uLong nTipVisible;
Window* pTipVisibleSecParent;
- sal_uLong nTipVisibleSec;
- OUString aManualTip;
- OUString aAutoSearch;
+ sal_uLong nTipVisibleSec;
+ OUString aManualTip;
+ OUString aAutoSearch;
- OUString aCurrentText;
+ OUString aCurrentText;
- OUString aFormText; // for autopilot function
- xub_StrLen nFormSelStart; // Selection for autopilot function
- xub_StrLen nFormSelEnd;
+ OUString aFormText; // for autopilot function
+ sal_Int32 nFormSelStart; // Selection for autopilot function
+ sal_Int32 nFormSelEnd;
- sal_uInt16 nAutoPar; // autom.parentheses than can be overwritten
+ sal_uInt16 nAutoPar; // autom.parentheses than can be overwritten
ScAddress aCursorPos;
ScInputMode eMode;
@@ -230,8 +230,8 @@ public:
void UpdateRange( sal_uInt16 nIndex, const ScRange& rNew );
// Communication with the autopilot function
- void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
- void InputSetSelection ( xub_StrLen nStart, xub_StrLen nEnd );
+ void InputGetSelection ( sal_Int32& rStart, sal_Int32& rEnd );
+ void InputSetSelection ( sal_Int32 nStart, sal_Int32 nEnd );
void InputReplaceSelection ( const OUString& rStr );
bool IsFormulaMode() const { return bFormulaMode; }
commit 35afee4de18437e4491e04254f21b50372b08ac4
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 13:56:09 2013 +0200
convert IFormulaEditorHelper::*Selection methods from xub_StrLen to sal_Int32
Change-Id: Ia7a6241c651106427e636bdc08085b97a2a41407
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 344ce5e..4f1a66b 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -127,7 +127,7 @@ namespace formula
sal_Bool UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr);
- void SetData(xub_StrLen nFStart,xub_StrLen nNextFStart,xub_StrLen nNextFEnd,xub_StrLen& PrivStart,xub_StrLen& PrivEnd);
+ void SetData(sal_Int32 nFStart, xub_StrLen nNextFStart, xub_StrLen nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
void PreNotify( NotifyEvent& rNEvt );
RefEdit* GetCurrRefEdit();
@@ -848,7 +848,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
pMEdit->SetHelpId(aHelpId);
}
- xub_StrLen nOldStart, nOldEnd;
+ sal_Int32 nOldStart, nOldEnd;
m_pHelper->getSelection( nOldStart, nOldEnd );
if ( nOldStart != nNextFStart || nOldEnd != nNextFEnd )
{
@@ -859,7 +859,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
if(!bEditFlag)
pMEdit->SetText(m_pHelper->getCurrentFormula());
- xub_StrLen PrivStart, PrivEnd;
+ sal_Int32 PrivStart, PrivEnd;
m_pHelper->getSelection( PrivStart, PrivEnd);
if(!bEditFlag)
pMEdit->SetSelection( Selection(PrivStart, PrivEnd));
@@ -1061,9 +1061,9 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl)
// --------------------------------------------------------------------------
// Functions for right Page
// --------------------------------------------------------------------------
-void FormulaDlg_Impl::SetData(xub_StrLen nFStart,xub_StrLen nNextFStart,xub_StrLen nNextFEnd,xub_StrLen& PrivStart,xub_StrLen& PrivEnd)
+void FormulaDlg_Impl::SetData(sal_Int32 nFStart, xub_StrLen nNextFStart, xub_StrLen nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd)
{
- xub_StrLen nFEnd;
+ sal_Int32 nFEnd;
// Notice and set new selection
m_pHelper->getSelection( nFStart, nFEnd );
@@ -1111,8 +1111,8 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart)
bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd);
if ( bFound )
{
- xub_StrLen PrivStart, PrivEnd;
- SetData(nFStart,nNextFStart,nNextFEnd,PrivStart, PrivEnd);
+ sal_Int32 PrivStart, PrivEnd;
+ SetData(nFStart, nNextFStart, nNextFEnd, PrivStart, PrivEnd);
m_pHelper->showReference(aFormula.copy(PrivStart, PrivEnd-PrivStart));
}
else
@@ -1155,8 +1155,8 @@ void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart )
if ( bFound )
{
- xub_StrLen PrivStart, PrivEnd;
- SetData(nFStart,nNextFStart,nNextFEnd,PrivStart, PrivEnd);
+ sal_Int32 PrivStart, PrivEnd;
+ SetData(nFStart, nNextFStart, nNextFEnd, PrivStart, PrivEnd);
}
}
@@ -1374,10 +1374,10 @@ void FormulaDlg_Impl::UpdateSelection()
m_pHelper->setSelection((xub_StrLen)aFuncSel.Min(),(xub_StrLen)aFuncSel.Max());
m_pHelper->setCurrentFormula( pFuncDesc->getFormula( m_aArguments ) );
pMEdit->SetText(m_pHelper->getCurrentFormula());
- xub_StrLen PrivStart, PrivEnd;
+ sal_Int32 PrivStart, PrivEnd;
m_pHelper->getSelection( PrivStart, PrivEnd);
- aFuncSel.Min()=PrivStart;
- aFuncSel.Max()=PrivEnd;
+ aFuncSel.Min() = PrivStart;
+ aFuncSel.Max() = PrivEnd;
nArgs = pFuncDesc->getSuppressedArgumentCount();
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index a22b71a..e27d82d 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -135,8 +135,8 @@ namespace formula
virtual OUString getCurrentFormula() const = 0;
virtual void setCurrentFormula(const OUString& _sReplacement) = 0;
- virtual void getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const = 0;
- virtual void setSelection(xub_StrLen _nStart,xub_StrLen _nEnd) = 0;
+ virtual void getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const = 0;
+ virtual void setSelection(sal_Int32 _nStart, sal_Int32 _nEnd) = 0;
virtual FormEditData* getFormEditData() const = 0;
virtual bool calculateValue(const OUString& _sExpression, OUString& _rResult) = 0;
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 0d37c49..e578436 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -138,7 +138,7 @@ FormEditData* FormulaDialog::getFormEditData() const
}
void FormulaDialog::setCurrentFormula(const OUString& _sReplacement)
{
- const xub_StrLen nOldLen = m_nEnd - m_nStart;
+ const sal_Int32 nOldLen = m_nEnd - m_nStart;
const sal_Int32 nNewLen = _sReplacement.getLength();
if (nOldLen)
m_sFormula = m_sFormula.replaceAt( m_nStart, nOldLen, "" );
@@ -146,7 +146,7 @@ void FormulaDialog::setCurrentFormula(const OUString& _sReplacement)
m_sFormula = m_sFormula.replaceAt( m_nStart, 0, _sReplacement );
m_nEnd = m_nStart + nNewLen;
}
-void FormulaDialog::setSelection(xub_StrLen _nStart,xub_StrLen _nEnd)
+void FormulaDialog::setSelection(sal_Int32 _nStart, sal_Int32 _nEnd)
{
if ( _nStart <= _nEnd )
{
@@ -159,7 +159,7 @@ void FormulaDialog::setSelection(xub_StrLen _nStart,xub_StrLen _nEnd)
m_nStart = _nEnd;
}
}
-void FormulaDialog::getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const
+void FormulaDialog::getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const
{
_nStart = m_nStart;
_nEnd = m_nEnd;
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index a341094..0f11bb4 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -48,8 +48,8 @@ class FormulaDialog : public formula::FormulaModalDialog,
::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
formula::RefEdit* m_pEdit;
OUString m_sFormula;
- xub_StrLen m_nStart;
- xub_StrLen m_nEnd;
+ sal_Int32 m_nStart;
+ sal_Int32 m_nEnd;
DECL_LINK( OnClickHdl, OAddFieldWindow*);
public:
@@ -75,8 +75,8 @@ public:
virtual void switchBack();
virtual formula::FormEditData* getFormEditData() const;
virtual void setCurrentFormula(const OUString& _sReplacement);
- virtual void setSelection(xub_StrLen _nStart,xub_StrLen _nEnd);
- virtual void getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const;
+ virtual void setSelection(sal_Int32 _nStart, sal_Int32 _nEnd);
+ virtual void getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const;
virtual OUString getCurrentFormula() const;
virtual formula::IFunctionManager* getFunctionManager();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 70571d2..b2a22ee 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -627,15 +627,18 @@ void ScFormulaDlg::setCurrentFormula(const OUString& _sReplacement)
}
pScMod->InputReplaceSelection(_sReplacement);
}
-void ScFormulaDlg::setSelection(xub_StrLen _nStart,xub_StrLen _nEnd)
+void ScFormulaDlg::setSelection(sal_Int32 _nStart, sal_Int32 _nEnd)
{
ScModule* pScMod = SC_MOD();
pScMod->InputSetSelection( _nStart, _nEnd );
}
-void ScFormulaDlg::getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const
+void ScFormulaDlg::getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const
{
ScModule* pScMod = SC_MOD();
- pScMod->InputGetSelection( _nStart, _nEnd );
+ sal_uInt16 nStart1 = _nStart, nEnd1 = _nEnd;
+ pScMod->InputGetSelection( nStart1, nEnd1 );
+ _nStart = nStart1;
+ _nEnd = nEnd1;
}
OUString ScFormulaDlg::getCurrentFormula() const
{
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index bedc959..9209224 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -73,8 +73,8 @@ public:
virtual void switchBack();
virtual formula::FormEditData* getFormEditData() const;
virtual void setCurrentFormula(const OUString& _sReplacement);
- virtual void setSelection(xub_StrLen _nStart,xub_StrLen _nEnd);
- virtual void getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const;
+ virtual void setSelection(sal_Int32 _nStart, sal_Int32 _nEnd);
+ virtual void getSelection(sal_Int32& _nStart, sal_Int32& _nEnd) const;
virtual OUString getCurrentFormula() const;
virtual formula::IFunctionManager* getFunctionManager();
commit af63fbbfa59b7f9a22c55aade2c7e3d95952bbe2
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 11:54:27 2013 +0200
convert xub_StrLen->sal_Int32 in unotools
Change-Id: If00ae920eb74dfe67a8654bb092879997f37ccc1
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index c9fcf63..1ff373c 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -1209,7 +1209,7 @@ inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, sal_Unicode c )
}
-inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBuf, xub_StrLen nLen )
+inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBuf, sal_Int32 nLen )
{
memcpy( pBuf, pCopyBuf, nLen * sizeof(sal_Unicode) );
return pBuf + nLen;
@@ -1560,7 +1560,7 @@ OUString LocaleDataWrapper::getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
// convert number
sal_Unicode* pEndNumBuf = ImplAddFormatNum( pNumBuffer, nNumber, nDecimals,
bUseThousandSep, sal_True );
- xub_StrLen nNumLen = (xub_StrLen)(sal_uLong)(pEndNumBuf-pNumBuffer);
+ sal_Int32 nNumLen = (sal_Int32)(sal_uLong)(pEndNumBuf-pNumBuffer);
// replace zeros with zero character
if ( (cZeroChar != '0') && nDecimals /* && IsNumTrailingZeros() */ )
commit 9dae1c5b83878e6ef939bed7cac237f33bc25d64
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 11:49:17 2013 +0200
convert xub_StrLen->sal_Int32 in linguistic
Change-Id: Id2e49e43bc149ee639cdbe5b7a1000049fb87978
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 79e2e86..8eb9102 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -781,7 +781,7 @@ void * SAL_CALL DicList_getFactory( const sal_Char * pImplName,
static sal_Int32 lcl_GetToken( OUString &rToken,
- const OUString &rText, xub_StrLen nPos, const OUString &rDelim )
+ const OUString &rText, sal_Int32 nPos, const OUString &rDelim )
{
sal_Int32 nRes = -1;
@@ -796,7 +796,7 @@ static sal_Int32 lcl_GetToken( OUString &rToken,
else
{
sal_Int32 i;
- for (i = nPos; i < rText.getLength(); ++i)
+ for (i = nPos; i < rText.getLength(); ++i)
{
if (-1 != rDelim.indexOf( rText[i] ))
break;
@@ -805,7 +805,7 @@ static sal_Int32 lcl_GetToken( OUString &rToken,
if (i >= rText.getLength()) // delimeter not found
rToken = rText.copy( nPos );
else
- rToken = rText.copy( nPos, (sal_Int32) i - nPos );
+ rToken = rText.copy( nPos, i - nPos );
nRes = i + 1; // continue after found delimeter
}
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index b7a95e7..0fe658c 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -129,11 +129,11 @@ Reference<XHyphenatedWord> HyphenatorDispatcher::buildHyphWord(
aShorter = rOrigWord;
aLonger = aText;
}
- xub_StrLen nS = sal::static_int_cast< xub_StrLen >( aShorter.getLength() );
- xub_StrLen nL = sal::static_int_cast< xub_StrLen >( aLonger.getLength() );
+ sal_Int32 nS = aShorter.getLength();
+ sal_Int32 nL = aLonger.getLength();
if (nS > 0 && nL > 0)
{
- DBG_ASSERT( (nS + 1 == nL) && aLonger[nL-1] == (sal_Unicode) '.',
+ DBG_ASSERT( (nS + 1 == nL) && aLonger[nL-1] == '.',
"HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" );
}
}
commit 4ded81770296b6eec9291924db53666f1d8e8d7e
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 11:45:09 2013 +0200
convert Edit::GetCharPos from xub_StrLen to sal_Int32
Change-Id: I8fe982d0c0c0a04e2a10cff0f0ae68d51bed590a
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 06bf36d..064271a 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -384,7 +384,7 @@ namespace pcr
//--------------------------------------------------------------------
bool HyperlinkInput::impl_textHitTest( const ::Point& _rWindowPos )
{
- xub_StrLen nPos = GetCharPos( _rWindowPos );
+ sal_Int32 nPos = GetCharPos( _rWindowPos );
return ( ( nPos != STRING_LEN ) && ( nPos < GetText().getLength() ) );
}
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index f02879b..a5f7757 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -236,7 +236,7 @@ public:
virtual Size CalcSize( sal_uInt16 nChars ) const;
virtual xub_StrLen GetMaxVisChars() const;
- xub_StrLen GetCharPos( const Point& rWindowPos ) const;
+ sal_Int32 GetCharPos( const Point& rWindowPos ) const;
// shows a warning box saying "text too long, truncated"
static void ShowTruncationWarning( Window* pParent );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 904a502..d9d17ae 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1430,7 +1430,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
return;
}
- xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() );
+ sal_Int32 nCharPos = ImplGetCharPos( rMEvt.GetPosPixel() );
Selection aSelection( maSelection );
aSelection.Justify();
@@ -1451,10 +1451,10 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
ImplSetSelection( Selection( aBoundary.startPos, aBoundary.endPos ) );
ImplCopyToSelectionClipboard();
}
- else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nChar ) )
+ else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nCharPos ) )
mbClickedInSelection = sal_True;
else if ( rMEvt.IsLeft() )
- ImplSetCursorPos( nChar, rMEvt.IsShift() );
+ ImplSetCursorPos( nCharPos, rMEvt.IsShift() );
if ( !mbClickedInSelection && rMEvt.IsLeft() && ( rMEvt.GetClicks() == 1 ) )
StartTracking( STARTTRACK_SCROLLREPEAT );
@@ -1471,8 +1471,8 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( mbClickedInSelection && rMEvt.IsLeft() )
{
- xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() );
- ImplSetCursorPos( nChar, sal_False );
+ sal_Int32 nCharPos = ImplGetCharPos( rMEvt.GetPosPixel() );
+ ImplSetCursorPos( nCharPos, sal_False );
mbClickedInSelection = sal_False;
}
else if ( rMEvt.IsMiddle() && !mbReadOnly &&
@@ -1492,8 +1492,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
{
if ( mbClickedInSelection )
{
- xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, sal_False );
+ sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
+ ImplSetCursorPos( nCharPos, sal_False );
mbClickedInSelection = sal_False;
}
else if ( rTEvt.GetMouseEvent().IsLeft() )
@@ -1505,8 +1505,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
{
if( !mbClickedInSelection )
{
- xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, sal_True );
+ sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
+ ImplSetCursorPos( nCharPos, sal_True );
}
}
@@ -2967,7 +2967,7 @@ xub_StrLen Edit::GetMaxVisChars() const
// -----------------------------------------------------------------------
-xub_StrLen Edit::GetCharPos( const Point& rWindowPos ) const
+sal_Int32 Edit::GetCharPos( const Point& rWindowPos ) const
{
return ImplGetCharPos( rWindowPos );
}
@@ -3033,8 +3033,8 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
// Nur wenn Maus in der Selektion...
Point aMousePos( rDGE.DragOriginX, rDGE.DragOriginY );
- xub_StrLen nChar = ImplGetCharPos( aMousePos );
- if ( (nChar >= aSel.Min()) && (nChar < aSel.Max()) )
+ sal_Int32 nCharPos = ImplGetCharPos( aMousePos );
+ if ( (nCharPos >= aSel.Min()) && (nCharPos < aSel.Max()) )
{
if ( !mpDDInfo )
mpDDInfo = new DDInfo;
commit 9083e8d1ca0246ba21423726d568846cb89efae9
Author: Noel Grandin <noel at peralex.com>
Date: Fri Nov 29 09:59:28 2013 +0200
convert SvxNumberFormatShell::AddFormat from xub_Strlen to sal_Int32
And make the return code be -1 for error.
Change-Id: I17d066180a604208f0ad689d5dffb77d126c256b
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 5552c3a..3212d48 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1272,7 +1272,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
std::vector<OUString> a2EntryList;
sal_uInt16 nCatLbSelPos = 0;
short nFmtLbSelPos = SELPOS_NONE;
- xub_StrLen nErrPos=0;
+ sal_Int32 nErrPos=0;
pNumFmtShell->SetCurCurrencyEntry(NULL);
bAdded = pNumFmtShell->AddFormat( aFormat, nErrPos,
@@ -1309,7 +1309,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
a2EntryList);
if(bDeleted) a2EntryList.clear();
m_pEdFormat->GrabFocus();
- m_pEdFormat->SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) );
+ m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) );
nReturn |= nReturnOneArea;
}
else
@@ -1345,7 +1345,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
else // syntax error
{
m_pEdFormat->GrabFocus();
- m_pEdFormat->SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) );
+ m_pEdFormat->SetSelection( Selection( nErrPos == -1 ? SELECTION_MAX : nErrPos, SELECTION_MAX ) );
}
EditHdl_Impl(m_pEdFormat);
nReturn = ((nReturn & nReturnOneArea) ? 0 : (nReturn & nReturnChanged));
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index d80a3dd..6755aef 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -104,7 +104,7 @@ public:
Color*& rpFontColor );
bool AddFormat( OUString& rFormat,
- xub_StrLen& rErrPos,
+ sal_Int32& rErrPos,
sal_uInt16& rCatLbSelPos,
short& rFmtSelPos,
std::vector<OUString>& rFmtEntries );
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index a5f7173..118ff9a 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -225,7 +225,7 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
}
// -----------------------------------------------------------------------
-bool SvxNumberFormatShell::AddFormat( OUString& rFormat, xub_StrLen& rErrPos,
+bool SvxNumberFormatShell::AddFormat( OUString& rFormat, sal_Int32& rErrPos,
sal_uInt16& rCatLbSelPos, short& rFmtSelPos,
std::vector<OUString>& rFmtEntries )
{
@@ -247,13 +247,11 @@ bool SvxNumberFormatShell::AddFormat( OUString& rFormat, xub_StrLen& rErrPos,
}
else // neues Format
{
- OUString sTemp(rFormat);
sal_Int32 nPos;
- bInserted = pFormatter->PutEntry( sTemp, nPos,
+ bInserted = pFormatter->PutEntry( rFormat, nPos,
nCurCategory, nAddKey,
eCurLanguage );
- rErrPos = (nPos >= 0) ? (xub_StrLen)nPos : 0xFFFF;
- rFormat = sTemp;
+ rErrPos = (nPos >= 0) ? nPos : -1;
if (bInserted)
{
@@ -342,15 +340,15 @@ void SvxNumberFormatShell::MakeFormat( OUString& rFormat,
{
if( aCurrencyFormatList.size() > static_cast<size_t>(nCurrencyPos) )
{
- xub_StrLen rErrPos=0;
+ sal_Int32 rErrPos=0;
std::vector<OUString> aFmtEList;
sal_uInt32 nFound = pFormatter->TestNewString( aCurrencyFormatList[nCurrencyPos], eCurLanguage );
if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND )
{
- sal_uInt16 rCatLbSelPos=0;
- short rFmtSelPos=0;
+ sal_uInt16 rCatLbSelPos =0;
+ short rFmtSelPos = 0;
AddFormat( aCurrencyFormatList[nCurrencyPos],rErrPos,rCatLbSelPos,
rFmtSelPos,aFmtEList);
}
More information about the Libreoffice-commits
mailing list