summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/docnode/ndsect.cxx4
-rw-r--r--sw/source/core/edit/edsect.cxx10
-rw-r--r--sw/source/core/unocore/unosect.cxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx34
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/inc/regionsw.hxx2
8 files changed, 31 insertions, 31 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 65a476aeb981..eaf04103ca09 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1378,7 +1378,7 @@ bool SwDoc::RemoveInvisibleContent()
SwSectionData aSectionData( *pSect );
aSectionData.SetCondition( OUString() );
aSectionData.SetHidden( false );
- UpdateSection( static_cast<sal_uInt16>(n), aSectionData );
+ UpdateSection( n, aSectionData );
}
}
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 1504807630ca..9bb5888dad8d 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -606,8 +606,8 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes )
getIDocumentState().SetModified();
}
-void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
- SfxItemSet const*const pAttr, bool const bPreventLinkUpdate)
+void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData,
+ SfxItemSet const*const pAttr, bool const bPreventLinkUpdate )
{
SwSectionFmt* pFmt = (*mpSectionFmtTbl)[ nPos ];
SwSection* pSection = pFmt->GetSection();
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index dc046d3d3b81..028a6f2e4a0f 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -110,7 +110,7 @@ SwSection* SwEditShell::GetAnySection( bool bOutOfTab, const Point* pPt )
return NULL;
}
-sal_uInt16 SwEditShell::GetSectionFmtCount() const
+size_t SwEditShell::GetSectionFmtCount() const
{
return GetDoc()->GetSections().size();
}
@@ -137,18 +137,18 @@ bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly, bool bChkHidden, bool bC
return false;
}
-sal_uInt16 SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
+size_t SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
{
SwSectionFmt* pFmt = const_cast<SwSectionFmt*>(&rFmt);
return GetDoc()->GetSections().GetPos( pFmt );
}
-const SwSectionFmt& SwEditShell::GetSectionFmt( sal_uInt16 nFmt ) const
+const SwSectionFmt& SwEditShell::GetSectionFmt(size_t nFmt) const
{
return *GetDoc()->GetSections()[ nFmt ];
}
-void SwEditShell::DelSectionFmt( sal_uInt16 nFmt )
+void SwEditShell::DelSectionFmt(size_t nFmt)
{
StartAllAction();
GetDoc()->DelSectionFmt( GetDoc()->GetSections()[ nFmt ] );
@@ -157,7 +157,7 @@ void SwEditShell::DelSectionFmt( sal_uInt16 nFmt )
EndAllAction();
}
-void SwEditShell::UpdateSection(sal_uInt16 const nSect,
+void SwEditShell::UpdateSection(size_t const nSect,
SwSectionData & rNewData, SfxItemSet const*const pAttr)
{
StartAllAction();
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index a55cd809fd18..2a4de5c79413 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1682,7 +1682,7 @@ throw (uno::RuntimeException, std::exception)
aSection.SetSectionName(rName);
const SwSectionFmts& rFmts = pFmt->GetDoc()->GetSections();
- sal_uInt16 nApplyPos = USHRT_MAX;
+ size_t nApplyPos = SIZE_MAX;
for( size_t i = 0; i < rFmts.size(); ++i )
{
if(rFmts[i]->GetSection() == pSect)
@@ -1694,7 +1694,7 @@ throw (uno::RuntimeException, std::exception)
throw uno::RuntimeException();
}
}
- if(nApplyPos != USHRT_MAX)
+ if (nApplyPos != SIZE_MAX)
{
{
UnoActionContext aContext(pFmt->GetDoc());
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index d72739d5c533..2281069ce57f 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -73,8 +73,8 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva
{
if( !pNewFmt )
{
- const sal_uInt16 nCount = rSh.GetSectionFmtCount();
- for(sal_uInt16 i=0;i<nCount;i++)
+ const size_t nCount = rSh.GetSectionFmtCount();
+ for (size_t i = 0; i<nCount; i++)
{
SectionType eTmpType;
const SwSectionFmt* pFmt = &rSh.GetSectionFmt(i);
@@ -142,7 +142,7 @@ private:
SwFmtNoBalancedColumns m_Balance;
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
- sal_uInt16 m_nArrPos;
+ size_t m_nArrPos;
// shows, if maybe textcontent is in the region
bool m_bContent : 1;
// for multiselection, mark at first, then work with TreeListBox!
@@ -150,7 +150,7 @@ private:
uno::Sequence<sal_Int8> m_TempPasswd;
public:
- SectRepr(sal_uInt16 nPos, SwSection& rSect);
+ SectRepr(size_t nPos, SwSection& rSect);
bool operator< (const SectRepr& rSectRef) const
{ return m_nArrPos < rSectRef.GetArrPos(); }
@@ -164,7 +164,7 @@ public:
SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; }
SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
- sal_uInt16 GetArrPos() const { return m_nArrPos; }
+ size_t GetArrPos() const { return m_nArrPos; }
OUString GetFile() const;
OUString GetSubRegion() const;
void SetFile(OUString const& rFile);
@@ -182,7 +182,7 @@ public:
{ m_TempPasswd = rPasswd; }
};
-SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
+SectRepr::SectRepr( size_t nPos, SwSection& rSect )
: m_SectionData( rSect )
, m_Brush( RES_BACKGROUND )
, m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
@@ -443,8 +443,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE
SvTreeListEntry* pSelEntry = 0;
if (!pFmt)
{
- const sal_uInt16 nCount=rSh.GetSectionFmtCount();
- for ( sal_uInt16 n=0; n < nCount; n++ )
+ const size_t nCount=rSh.GetSectionFmtCount();
+ for ( size_t n = 0; n < nCount; n++ )
{
SectionType eTmpType;
if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() &&
@@ -503,15 +503,15 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE
}
}
-sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
+size_t SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
{
- const sal_uInt16 nCount=rSh.GetSectionFmtCount();
- for (sal_uInt16 i=0;i<nCount;i++)
- if (pFmt==&rSh.GetSectionFmt(i))
+ const size_t nCount=rSh.GetSectionFmtCount();
+ for ( size_t i = 0; i < nCount; i++ )
+ if ( pFmt == &rSh.GetSectionFmt(i) )
return i;
OSL_FAIL("SectionFormat not on the list" );
- return USHRT_MAX;
+ return SIZE_MAX;
}
SwEditRegionDlg::~SwEditRegionDlg( )
@@ -784,8 +784,8 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl)
{
pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
}
- sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
- if( USHRT_MAX != nNewPos )
+ size_t nNewPos = rDocFmts.GetPos(pFmt);
+ if ( SIZE_MAX != nNewPos )
{
boost::scoped_ptr<SfxItemSet> pSet(pFmt->GetAttrSet().Clone( false ));
if( pFmt->GetCol() != pRepr->GetCol() )
@@ -819,8 +819,8 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl)
for (SectReprArr::reverse_iterator aI = aSectReprArr.rbegin(), aEnd = aSectReprArr.rend(); aI != aEnd; ++aI)
{
SwSectionFmt* pFmt = aOrigArray[ aI->GetArrPos() ];
- const sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
- if( USHRT_MAX != nNewPos )
+ const size_t nNewPos = rDocFmts.GetPos( pFmt );
+ if( SIZE_MAX != nNewPos )
rSh.DelSectionFmt( nNewPos );
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index c4b915af4190..ff77810422ba 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -332,7 +332,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl)
{
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
const SwSectionFmt* pFmt = pCurrSection->GetFmt();
- const sal_uInt16 nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
+ const size_t nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
SwSectionData aData(*pCurrSection);
rWrtShell.UpdateSection( nNewPos, aData, pSectionSet );
}
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index a9b95cf16957..d3154059fced 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -782,8 +782,8 @@ static void lcl_CopyFollowPageDesc(
static void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
{
//reset all links of the sections of synchronized labels
- sal_uInt16 nSections = rWorkShell.GetSectionFmtCount();
- for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection )
+ size_t nSections = rWorkShell.GetSectionFmtCount();
+ for (size_t nSection = 0; nSection < nSections; ++nSection)
{
SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() );
if( aSectionData.GetType() == FILE_LINK_SECTION )
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 633362531f2c..91dcb6fe09f9 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -103,7 +103,7 @@ class SwEditRegionDlg : public SfxModalDialog
Image BuildBitmap(bool bProtect, bool bHidden);
void RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry);
- sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
+ size_t FindArrPos(const SwSectionFmt* pFmt);
DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
DECL_LINK( DeselectHdl, SvTreeListBox * );