diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-02 22:16:48 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-03 07:44:28 +0000 |
commit | 3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 (patch) | |
tree | 7377a9e1d8cd56279104429abce73aec334569d5 /svx | |
parent | 5c39b6b997ddc85e6848efc230a427a124b97264 (diff) |
xub_StrLen and tools/string.hxx final straw
Thre is still some 0xffff limit left and possibly some
less than gracefully handled overflow/error cases
Change-Id: I00957ee3a30b02f73918ea49d7353056263dc638
Reviewed-on: https://gerrit.libreoffice.org/7787
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleEmptyEditSource.cxx | 30 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 10 | ||||
-rw-r--r-- | svx/source/svdraw/svdoutl.cxx | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 8c8a6894935d..fee79fdf5239 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -96,7 +96,7 @@ namespace accessibility // SvxTextForwarder sal_Int32 GetParagraphCount() const { return 1; } - sal_uInt16 GetTextLen( sal_Int32 /*nParagraph*/ ) const { return 0; } + sal_Int32 GetTextLen( sal_Int32 /*nParagraph*/ ) const { return 0; } OUString GetText( const ESelection& /*rSel*/ ) const { return OUString(); } SfxItemSet GetAttribs( const ESelection& /*rSel*/, sal_Bool /*bOnlyHardAttrib*/ = 0 ) const { @@ -108,7 +108,7 @@ namespace accessibility SfxItemSet GetParaAttribs( sal_Int32 /*nPara*/ ) const { return GetAttribs(ESelection()); } void SetParaAttribs( sal_Int32 /*nPara*/, const SfxItemSet& /*rSet*/ ) {} void RemoveAttribs( const ESelection& /*rSelection*/, sal_Bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ){} - void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_uInt16>& /*rList*/ ) const {} + void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const {} sal_uInt16 GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const { return 0; } sal_uInt16 GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const { return 0; } @@ -123,35 +123,35 @@ namespace accessibility const SfxItemSet * GetEmptyItemSetPtr() { return 0; } void AppendParagraph() {} - sal_uInt16 AppendTextPortion( sal_Int32 /*nPara*/, const OUString & /*rText*/, const SfxItemSet & /*rSet*/ ) { return 0; } + sal_Int32 AppendTextPortion( sal_Int32 /*nPara*/, const OUString & /*rText*/, const SfxItemSet & /*rSet*/ ) { return 0; } //XTextCopy void CopyText(const SvxTextForwarder& ){} - OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_uInt16 /*nPos*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/ ) + OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_Int32 /*nPos*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/ ) { return OUString(); } - void FieldClicked( const SvxFieldItem&, sal_Int32, xub_StrLen ) {;} + void FieldClicked( const SvxFieldItem&, sal_Int32, sal_Int32 ) {;} sal_Bool IsValid() const { return sal_True; } void SetNotifyHdl( const Link& ) {} - LanguageType GetLanguage( sal_Int32, sal_uInt16 ) const { return LANGUAGE_DONTKNOW; } - sal_uInt16 GetFieldCount( sal_Int32 ) const { return 0; } + LanguageType GetLanguage( sal_Int32, sal_Int32 ) const { return LANGUAGE_DONTKNOW; } + sal_Int32 GetFieldCount( sal_Int32 ) const { return 0; } EFieldInfo GetFieldInfo( sal_Int32, sal_uInt16 ) const { return EFieldInfo(); } EBulletInfo GetBulletInfo( sal_Int32 ) const { return EBulletInfo(); } - Rectangle GetCharBounds( sal_Int32, sal_uInt16 ) const { return Rectangle(); } + Rectangle GetCharBounds( sal_Int32, sal_Int32 ) const { return Rectangle(); } Rectangle GetParaBounds( sal_Int32 ) const { return Rectangle(); } MapMode GetMapMode() const { return MapMode(); } OutputDevice* GetRefDevice() const { return NULL; } - sal_Bool GetIndexAtPoint( const Point&, sal_Int32&, sal_uInt16& ) const { return sal_False; } - sal_Bool GetWordIndices( sal_Int32, sal_uInt16, sal_uInt16&, sal_uInt16& ) const { return sal_False; } - sal_Bool GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_Int32, sal_uInt16, sal_Bool ) const { return sal_False; } - sal_uInt16 GetLineCount( sal_Int32 nPara ) const { return nPara == 0 ? 1 : 0; } - sal_uInt16 GetLineLen( sal_Int32, sal_uInt16 ) const { return 0; } - void GetLineBoundaries( /*out*/sal_uInt16 & rStart, /*out*/sal_uInt16 & rEnd, sal_Int32 /*nParagraph*/, sal_uInt16 /*nLine*/ ) const { rStart = rEnd = 0; } - sal_uInt16 GetLineNumberAtIndex( sal_Int32 /*nPara*/, sal_uInt16 /*nIndex*/ ) const { return 0; } + sal_Bool GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const { return sal_False; } + sal_Bool GetWordIndices( sal_Int32, sal_Int32, sal_Int32&, sal_Int32& ) const { return sal_False; } + sal_Bool GetAttributeRun( sal_Int32&, sal_Int32&, sal_Int32, sal_Int32, sal_Bool ) const { return sal_False; } + sal_Int32 GetLineCount( sal_Int32 nPara ) const { return nPara == 0 ? 1 : 0; } + sal_Int32 GetLineLen( sal_Int32, sal_Int32 ) const { return 0; } + void GetLineBoundaries( /*out*/sal_Int32 & rStart, /*out*/sal_Int32 & rEnd, sal_Int32 /*nParagraph*/, sal_Int32 /*nLine*/ ) const { rStart = rEnd = 0; } + sal_Int32 GetLineNumberAtIndex( sal_Int32 /*nPara*/, sal_Int32 /*nIndex*/ ) const { return 0; } // the following two methods would, strictly speaking, require // a switch to a real EditSource, too. Fortunately, the diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 4927d8d45b21..3ca4219f406a 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -386,18 +386,18 @@ namespace // support for WrongSpellVector. Create WrongSpellPrimitives as needed if(rInfo.mpWrongSpellVector && !aDXArray.empty()) { - const sal_uInt32 nSize(rInfo.mpWrongSpellVector->size()); - const sal_uInt32 nDXCount(aDXArray.size()); + const sal_Int32 nSize(rInfo.mpWrongSpellVector->size()); + const sal_Int32 nDXCount(aDXArray.size()); const basegfx::BColor aSpellColor(1.0, 0.0, 0.0); // red, hard coded - for(sal_uInt32 a(0); a < nSize; a++) + for(sal_Int32 a(0); a < nSize; a++) { const EEngineData::WrongSpellClass& rCandidate = (*rInfo.mpWrongSpellVector)[a]; if(rCandidate.nStart >= rInfo.mnTextStart && rCandidate.nEnd >= rInfo.mnTextStart && rCandidate.nEnd > rCandidate.nStart) { - const sal_uInt32 nStart(rCandidate.nStart - rInfo.mnTextStart); - const sal_uInt32 nEnd(rCandidate.nEnd - rInfo.mnTextStart); + const sal_Int32 nStart(rCandidate.nStart - rInfo.mnTextStart); + const sal_Int32 nEnd(rCandidate.nEnd - rInfo.mnTextStart); double fStart(0.0); double fEnd(0.0); diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index 01dfc2b5fe34..e0fa528778f8 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -74,7 +74,7 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj ) mpTextObj.reset( const_cast< SdrTextObj* >(pObj) ); } -OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, +OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor) { bool bOk = false; |