summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-06 19:48:48 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-06 19:49:56 +0200
commit9eb4e4dc51a4448d59ee80f39144387c7b3cffaf (patch)
treeca154ba2b8c61f87e7d772a4ed58134f6d73375b /sw
parent44c133ef996e32ebdfc9560bcf14b0cd77196a9e (diff)
Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/authfld.hxx52
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx4
-rw-r--r--sw/source/core/fields/authfld.cxx32
-rw-r--r--sw/source/core/graphic/ndgrf.cxx2
-rw-r--r--sw/source/core/inc/blink.hxx4
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx6
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/txtnode/ndhints.cxx4
-rw-r--r--sw/source/core/unocore/unomap.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.hxx4
-rw-r--r--sw/source/ui/app/docsh.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx6
-rw-r--r--sw/source/ui/config/optpage.cxx12
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/inc/conttree.hxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx26
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx4
-rw-r--r--sw/source/ui/utlui/glbltree.cxx2
-rw-r--r--sw/source/ui/utlui/uitool.cxx4
24 files changed, 97 insertions, 97 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 44732969b774..7df89db5f97f 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -58,16 +58,16 @@ typedef boost::ptr_vector<SwAuthEntry> SwAuthDataArr;
class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
{
- SwDoc* m_pDoc;
- SwAuthDataArr m_DataArr;
- std::vector<long> m_SequArr;
- SortKeyArr m_SortKeyArr;
- sal_Unicode m_cPrefix;
- sal_Unicode m_cSuffix;
- sal_Bool m_bIsSequence :1;
- sal_Bool m_bSortByDocument :1;
- LanguageType m_eLanguage;
- String m_sSortAlgorithm;
+ SwDoc* m_pDoc;
+ SwAuthDataArr m_DataArr;
+ std::vector<sal_IntPtr> m_SequArr;
+ SortKeyArr m_SortKeyArr;
+ sal_Unicode m_cPrefix;
+ sal_Unicode m_cSuffix;
+ sal_Bool m_bIsSequence :1;
+ sal_Bool m_bSortByDocument :1;
+ LanguageType m_eLanguage;
+ String m_sSortAlgorithm;
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
@@ -81,29 +81,29 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
- inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
- SwDoc* GetDoc(){ return m_pDoc; }
- void RemoveField(long nHandle);
- long AddField(const String& rFieldContents);
- sal_Bool AddField(long nHandle);
+ inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
+ SwDoc* GetDoc(){ return m_pDoc; }
+ void RemoveField(sal_IntPtr nHandle);
+ sal_IntPtr AddField(const String& rFieldContents);
+ sal_Bool AddField(sal_IntPtr nHandle);
void DelSequenceArray()
{
m_SequArr.clear();
}
- const SwAuthEntry* GetEntryByHandle(long nHandle) const;
+ const SwAuthEntry* GetEntryByHandle(sal_IntPtr nHandle) const;
void GetAllEntryIdentifiers( std::vector<String>& rToFill )const;
const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
// import interface
- sal_uInt16 AppendField(const SwAuthEntry& rInsert);
- long GetHandle(sal_uInt16 nPos);
+ sal_uInt16 AppendField(const SwAuthEntry& rInsert);
+ sal_IntPtr GetHandle(sal_uInt16 nPos);
- sal_uInt16 GetSequencePos(long nHandle);
+ sal_uInt16 GetSequencePos(sal_IntPtr nHandle);
- sal_Bool IsSequence() const {return m_bIsSequence;}
+ sal_Bool IsSequence() const {return m_bIsSequence;}
void SetSequence(sal_Bool bSet)
{
DelSequenceArray();
@@ -118,14 +118,14 @@ public:
sal_Unicode GetPrefix() const { return m_cPrefix;}
sal_Unicode GetSuffix() const { return m_cSuffix;}
- sal_Bool IsSortByDocument() const {return m_bSortByDocument;}
+ sal_Bool IsSortByDocument() const {return m_bSortByDocument;}
void SetSortByDocument(sal_Bool bSet)
{
DelSequenceArray();
m_bSortByDocument = bSet;
}
- sal_uInt16 GetSortKeyCount() const ;
+ sal_uInt16 GetSortKeyCount() const ;
const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ;
void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]);
@@ -143,15 +143,15 @@ public:
class SwAuthorityField : public SwField
{
- long m_nHandle;
- mutable long m_nTempSequencePos;
+ sal_IntPtr m_nHandle;
+ mutable sal_IntPtr m_nTempSequencePos;
virtual String Expand() const;
virtual SwField* Copy() const;
public:
SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
- SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
+ SwAuthorityField(SwAuthorityFieldType* pType, sal_IntPtr nHandle);
~SwAuthorityField();
const String& GetFieldText(ToxAuthorityField eField) const;
@@ -162,7 +162,7 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
- long GetHandle() const { return m_nHandle; }
+ sal_IntPtr GetHandle() const { return m_nHandle; }
virtual String GetDescription() const;
};
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index db23e354d5d6..42aa6df15098 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1934,7 +1934,7 @@ void SwDoc::SetModified()
// give the old and new modified state to the link
// Bit 0: -> old state
// Bit 1: -> new state
- long nCall = mbModified ? 3 : 2;
+ sal_IntPtr nCall = mbModified ? 3 : 2;
mbModified = sal_True;
mpDocStat->bModified = sal_True;
if( maOle2Link.IsSet() )
@@ -1953,7 +1953,7 @@ void SwDoc::ResetModified()
// give the old and new modified state to the link
// Bit 0: -> old state
// Bit 1: -> new state
- long nCall = mbModified ? 1 : 0;
+ sal_IntPtr nCall = mbModified ? 1 : 0;
mbModified = sal_False;
GetIDocumentUndoRedo().SetUndoNoModifiedPosition();
if( nCall && maOle2Link.IsSet() )
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 28a7515a5ee0..5da0fb26d644 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -902,7 +902,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
"pOut should not be a virtual device" );
pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(),
- aAlignedGrfArea.SSize(), long(this),
+ aAlignedGrfArea.SSize(), sal_IntPtr(this),
0, GRFMGR_DRAW_STANDARD, pVout );
}
else
@@ -1095,7 +1095,7 @@ void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
if( pGrfNd && pGrfNd->IsAnimated() )
{
- const_cast< SwGrfNode* >(pGrfNd)->StopGraphicAnimation( pOut, long(this) );
+ const_cast< SwGrfNode* >(pGrfNd)->StopGraphicAnimation( pOut, sal_IntPtr(this) );
}
}
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index ab369586a8f7..b262251f26e9 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -82,7 +82,7 @@ SwFieldType* SwAuthorityFieldType::Copy() const
return new SwAuthorityFieldType(m_pDoc);
}
-void SwAuthorityFieldType::RemoveField(long nHandle)
+void SwAuthorityFieldType::RemoveField(sal_IntPtr nHandle)
{
#if OSL_DEBUG_LEVEL > 0
bool bRemoved = false;
@@ -90,7 +90,7 @@ void SwAuthorityFieldType::RemoveField(long nHandle)
for(sal_uInt16 j = 0; j < m_DataArr.size(); j++)
{
SwAuthEntry* pTemp = &m_DataArr[j];
- long nRet = (long)(void*)pTemp;
+ sal_IntPtr nRet = (sal_IntPtr)(void*)pTemp;
if(nRet == nHandle)
{
#if OSL_DEBUG_LEVEL > 0
@@ -111,9 +111,9 @@ void SwAuthorityFieldType::RemoveField(long nHandle)
#endif
}
-long SwAuthorityFieldType::AddField(const String& rFieldContents)
+sal_IntPtr SwAuthorityFieldType::AddField(const String& rFieldContents)
{
- long nRet = 0;
+ sal_IntPtr nRet = 0;
SwAuthEntry* pEntry = new SwAuthEntry;
for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
pEntry->SetAuthorField( (ToxAuthorityField)i,
@@ -125,14 +125,14 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
if(*pTemp == *pEntry)
{
DELETEZ(pEntry);
- nRet = (long)(void*)pTemp;
+ nRet = (sal_IntPtr)(void*)pTemp;
pTemp->AddRef();
}
}
//if it is a new Entry - insert
if(pEntry)
{
- nRet = (long)(void*)pEntry;
+ nRet = (sal_IntPtr)(void*)pEntry;
pEntry->AddRef();
m_DataArr.push_back(pEntry);
//re-generate positions of the fields
@@ -141,13 +141,13 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
return nRet;
}
-sal_Bool SwAuthorityFieldType::AddField(long nHandle)
+sal_Bool SwAuthorityFieldType::AddField(sal_IntPtr nHandle)
{
sal_Bool bRet = sal_False;
for( sal_uInt16 j = 0; j < m_DataArr.size(); j++ )
{
SwAuthEntry* pTemp = &m_DataArr[j];
- long nTmp = (long)(void*)pTemp;
+ sal_IntPtr nTmp = (sal_IntPtr)(void*)pTemp;
if( nTmp == nHandle )
{
bRet = sal_True;
@@ -157,17 +157,17 @@ sal_Bool SwAuthorityFieldType::AddField(long nHandle)
break;
}
}
- OSL_ENSURE(bRet, "::AddField(long) failed");
+ OSL_ENSURE(bRet, "::AddField(sal_IntPtr) failed");
return bRet;
}
-const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
+const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(sal_IntPtr nHandle) const
{
const SwAuthEntry* pRet = 0;
for(sal_uInt16 j = 0; j < m_DataArr.size(); j++)
{
const SwAuthEntry* pTemp = &m_DataArr[j];
- long nTmp = (long)(void*)pTemp;
+ sal_IntPtr nTmp = (sal_IntPtr)(void*)pTemp;
if( nTmp == nHandle )
{
pRet = pTemp;
@@ -246,18 +246,18 @@ sal_uInt16 SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
return nRet;
}
-long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
+sal_IntPtr SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
{
- long nRet = 0;
+ sal_IntPtr nRet = 0;
if( nPos < m_DataArr.size() )
{
SwAuthEntry* pTemp = &m_DataArr[nPos];
- nRet = (long)(void*)pTemp;
+ nRet = (sal_IntPtr)(void*)pTemp;
}
return nRet;
}
-sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
+sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
{
//find the field in a sorted array of handles,
#if OSL_DEBUG_LEVEL > 0
@@ -527,7 +527,7 @@ SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
}
SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
- long nSetHandle )
+ sal_IntPtr nSetHandle )
: SwField( pInitType ),
m_nHandle( nSetHandle ),
m_nTempSequencePos( -1 )
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 5cedf29e600d..e874282930f8 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -1025,7 +1025,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
}
}
- return (long)pRet;
+ return (sal_IntPtr)pRet;
}
/// delete all QuickDraw-Bitmaps in the specified document
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 2532a4b1fe01..9062ea9aaa43 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -47,9 +47,9 @@ public:
const SwLinePortion *GetPortion() const{ return pPor; }
sal_uInt16 GetDirection() const { return nDir; }
sal_Bool operator<( const SwBlinkPortion& rBlinkPortion ) const
- { return (long)pPor < (long)rBlinkPortion.pPor; }
+ { return (sal_IntPtr)pPor < (sal_IntPtr)rBlinkPortion.pPor; }
sal_Bool operator==( const SwBlinkPortion& rBlinkPortion ) const
- { return (long)pPor == (long)rBlinkPortion.pPor; }
+ { return (sal_IntPtr)pPor == (sal_IntPtr)rBlinkPortion.pPor; }
};
class SwBlinkList : public boost::ptr_set<SwBlinkPortion> {};
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index b4fe34b3f292..63ae22ee6d02 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -532,7 +532,7 @@ void SwFmtCntnt::SetNewCntntIdx( const SwNodeIndex *pIdx )
int SwFmtCntnt::operator==( const SfxPoolItem& rAttr ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- if( (long)pStartNode ^ (long)((SwFmtCntnt&)rAttr).pStartNode )
+ if( (sal_IntPtr)pStartNode ^ (sal_IntPtr)((SwFmtCntnt&)rAttr).pStartNode )
return 0;
if( pStartNode )
return ( *pStartNode == *((SwFmtCntnt&)rAttr).GetCntntIdx() );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index cb75b9e46bc1..b19da71db06c 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3794,8 +3794,8 @@ sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
else if ( bTableHack &&
pFly->Frm().Top() >= pFly->GetAnchorFrm()->Frm().Top() &&
pFly->Frm().Top() < pFly->GetAnchorFrm()->Frm().Bottom() &&
- long(pSh->GetOut()) ==
- long(pSh->getIDocumentDeviceAccess()->getPrinter( false ) ) )
+ sal_IntPtr(pSh->GetOut()) ==
+ sal_IntPtr(pSh->getIDocumentDeviceAccess()->getPrinter( false ) ) )
{
pAnch = pFly->AnchorFrm();
}
@@ -3812,7 +3812,7 @@ sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
if ( !pAnch->GetValidPosFlag() )
pAnch = 0;
- else if ( long(pSh->GetOut()) == long(pSh->getIDocumentDeviceAccess()->getPrinter( false )))
+ else if ( sal_IntPtr(pSh->GetOut()) == sal_IntPtr(pSh->getIDocumentDeviceAccess()->getPrinter( false )))
{
//HACK: we have to omit some of the objects for printing,
//otherwise they would be printed twice.
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 37c3ce031da4..ec7a7a4dd6a5 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -968,7 +968,7 @@ void SwGrfNumPortion::Paint( const SwTxtPaintInfo &rInf ) const
bDraw = !rInf.GetOpt().IsGraphic();
if( !nId )
{
- SetId( long( rInf.GetTxtFrm() ) );
+ SetId( sal_IntPtr( rInf.GetTxtFrm() ) );
rInf.GetTxtFrm()->SetAnimation();
}
if( aTmp.IsOver( rInf.GetPaintRect() ) && !bDraw )
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index e5e3901d4b44..d61ca5ce0f19 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -751,7 +751,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
nTmpIdx = 0;
while( nTmpIdx < DROP_CACHE_SIZE &&
- ( aTxt[ nTmpIdx ] != aStr || aMagicNo[ nTmpIdx ] != long(pFntNo) ||
+ ( aTxt[ nTmpIdx ] != aStr || aMagicNo[ nTmpIdx ] != sal_IntPtr(pFntNo) ||
aWishedHeight[ nTmpIdx ] != pDrop->GetDropHeight() ) )
++nTmpIdx;
}
@@ -785,7 +785,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
if ( bUseCache )
{
// save keys for cache
- aMagicNo[ nTmpIdx ] = long(pFntNo);
+ aMagicNo[ nTmpIdx ] = sal_IntPtr(pFntNo);
aTxt[ nTmpIdx ] = aStr;
aWishedHeight[ nTmpIdx ] = KSHORT(nWishedHeight);
// save initial scaling factor
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 2ebdef856c51..02ea3443a884 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -56,7 +56,7 @@ static bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
return nS1 < nS2;
}
- return (long)&rHt1 < (long)&rHt2;
+ return (sal_IntPtr)&rHt1 < (sal_IntPtr)&rHt2;
}
// order is important! for requirements see hintids.hxx
return ( nWhich1 > nWhich2 );
@@ -91,7 +91,7 @@ static bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
return nS1 > nS2;
}
- return (long)&rHt1 > (long)&rHt2;
+ return (sal_IntPtr)&rHt1 > (sal_IntPtr)&rHt2;
}
// order is important! for requirements see hintids.hxx
return ( nWhich1 < nWhich2 );
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index a9bf548d72c2..8a0bc615a9b3 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -2460,13 +2460,13 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
for( ; p->pName; ++p, ++i )
{
// set the name
- const SwPropNameLen& rPropNm = GetPropName( (sal_uInt16)(long)p->pName );
+ const SwPropNameLen& rPropNm = GetPropName( (sal_uInt16)(sal_IntPtr)p->pName );
p->pName = rPropNm.pName;
p->nNameLen = rPropNm.nNameLen;
// get the cppu type from the comphelper
- CppuTypes nTyp = (CppuTypes) (long) p->pType;
+ CppuTypes nTyp = (CppuTypes) (sal_IntPtr) p->pType;
GenerateCppuType( nTyp, p->pType );
- OSL_ENSURE( nTyp != (CppuTypes) (long) p->pType, "unknown type" );
+ OSL_ENSURE( nTyp != (CppuTypes) (sal_IntPtr) p->pType, "unknown type" );
}
}
return aMapEntriesArr[nPropertyId];
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 9d8bbf9a66fd..fa14c746ab2f 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -248,13 +248,13 @@ struct SwHTMLFmtInfo
friend bool operator==( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
- return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
+ return (sal_IntPtr)rInfo1.pFmt == (sal_IntPtr)rInfo2.pFmt;
}
friend bool operator<( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
- return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
+ return (sal_IntPtr)rInfo1.pFmt < (sal_IntPtr)rInfo2.pFmt;
}
};
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 4a1aa27a03bf..d8a5cbfbd654 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1044,7 +1044,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
// the Status is handed over from Doc (see doc.cxx)
// Bit 0: -> old state
// Bit 1: -> new state
- long nStatus = (long)p;
+ sal_IntPtr nStatus = (sal_IntPtr)p;
if( IsEnableSetModified() )
SetModified( (nStatus & 2) ? sal_True : sal_False );
return 0;
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 80aab9802306..942c6b7a1caf 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -110,7 +110,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
{
// use only these metrics
sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
- aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
+ aMetricLB.SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
default:; //prevent warning
}
@@ -184,7 +184,7 @@ sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Double-Cast for VA3.0
- sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)aMetricLB.GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
}
@@ -320,7 +320,7 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl)
if(nMPos != USHRT_MAX)
{
// Double-Cast for VA3.0
- FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos );
+ FieldUnit eFieldUnit = (FieldUnit)(sal_IntPtr)aMetricLB.GetEntryData( nMPos );
sal_Bool bModified = aTabMF.IsModified();
long nVal = bModified ?
sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) :
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 22fae3d34e10..8019213b360e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -138,15 +138,15 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
if ( eFUnit != FUNIT_LINE )
{
sal_uInt16 nPos = m_pMetricLB->InsertEntry( sMetric );
- m_pMetricLB->SetEntryData( nPos, (void*)(long)eFUnit );
+ m_pMetricLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
m_pHMetric->InsertEntry( sMetric );
- m_pHMetric->SetEntryData( nPos, (void*)(long)eFUnit );
+ m_pHMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
// a vertical ruler has not the 'character' unit
if ( eFUnit != FUNIT_CHAR )
{
sal_uInt16 nPos = m_pVMetric->InsertEntry( sMetric );
- m_pVMetric->SetEntryData( nPos, (void*)(long)eFUnit );
+ m_pVMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
}
default:;//prevent warning
@@ -243,7 +243,7 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
if ( nMPos != m_pMetricLB->GetSavedValue() )
{
// Double-Cast for VA3.0
- sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pMetricLB->GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
}
@@ -252,7 +252,7 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
if ( nMPos != m_pHMetric->GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Double-Cast for VA3.0
- sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pHMetric->GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pHMetric->GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
}
@@ -260,7 +260,7 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
if ( nMPos != m_pVMetric->GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Double-Cast for VA3.0
- sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pVMetric->GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pVMetric->GetEntryData( nMPos );
rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True;
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index ed4b42b39002..48bd20fc9826 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -252,7 +252,7 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
{
pTabPage->FillItemSet(*pSet);
}
- nOldSelection = (long)m_pApplyToLB->GetEntryData(m_pApplyToLB->GetSelectEntryPos());
+ nOldSelection = (sal_IntPtr)m_pApplyToLB->GetEntryData(m_pApplyToLB->GetSelectEntryPos());
long nWidth = nSelectionWidth;
switch(nOldSelection)
{
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 8ad29a916404..274998fd05e9 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2969,7 +2969,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
for( nPos = aTextFlowLB.GetEntryCount(); nPos; )
- if( (sal_uInt16)(long)aTextFlowLB.GetEntryData( --nPos ) == nVal )
+ if( (sal_uInt16)(sal_IntPtr)aTextFlowLB.GetEntryData( --nPos ) == nVal )
break;
aTextFlowLB.SelectEntryPos( nPos );
aTextFlowLB.SaveValue();
@@ -3011,7 +3011,7 @@ sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
sal_uInt16 nPos = aTextFlowLB.GetSelectEntryPos();
if( nPos != aTextFlowLB.GetSavedValue() )
{
- nPos = (sal_uInt16)(long)aTextFlowLB.GetEntryData( nPos );
+ nPos = (sal_uInt16)(sal_IntPtr)aTextFlowLB.GetEntryData( nPos );
bRet |= 0 != rSet.Put( SvxFrameDirectionItem(
(SvxFrameDirection)nPos, RES_FRAMEDIR ));
}
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index 6fe6342adfdf..818144a638d0 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -189,7 +189,7 @@ public:
DECL_LINK( ContentDoubleClickHdl, void * );
DECL_LINK( TimerUpdate, void * );
- virtual long GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+ virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
virtual void RequestingChildren( SvTreeListEntry* pParent );
virtual void GetFocus();
virtual void KeyInput(const KeyEvent& rKEvt);
@@ -261,7 +261,7 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual long GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+ virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
virtual sal_Bool NotifyMoving( SvTreeListEntry* pTarget,
SvTreeListEntry* pEntry,
SvTreeListEntry*& rpNewParent,
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index c3fe96774982..783d38d368ab 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -578,16 +578,16 @@ public:
SvTreeListBox(pWin, rResId), pHeaderBar(0){}
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual long GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+ virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
void SetHeaderBar(const HeaderBar* pHB) {pHeaderBar = pHB;}
};
-long SwIndexTreeLB::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
+sal_IntPtr SwIndexTreeLB::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
{
- long nData = (long)pEntry->GetUserData();
+ sal_IntPtr nData = (sal_IntPtr)pEntry->GetUserData();
if(nData != USHRT_MAX)
{
- long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X();
+ sal_IntPtr nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X();
nData = nPos;
}
else
@@ -603,7 +603,7 @@ void SwIndexTreeLB::KeyInput( const KeyEvent& rKEvt )
sal_Bool bChanged = sal_False;
if(pEntry)
{
- long nLevel = (long)pEntry->GetUserData();
+ sal_IntPtr nLevel = (sal_IntPtr)pEntry->GetUserData();
if(aCode.GetCode() == KEY_ADD )
{
if(nLevel < MAXLEVEL - 1)
@@ -786,7 +786,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl)
SvTreeListEntry* pEntry = rTLB.First();
while(pEntry)
{
- long nLevel = (long)pEntry->GetUserData();
+ sal_IntPtr nLevel = (sal_IntPtr)pEntry->GetUserData();
if(nLevel != USHRT_MAX)
{
String sName(rTLB.GetEntryText(pEntry));
@@ -814,7 +814,7 @@ IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn)
SvTreeListEntry* pEntry = aHeaderTree.GetTreeListBox().FirstSelected();
if(pEntry)
{
- long nLevel = (long)pEntry->GetUserData();
+ sal_IntPtr nLevel = (sal_IntPtr)pEntry->GetUserData();
if(bLeft)
{
if(!nLevel)
@@ -1019,7 +1019,7 @@ void SwTOXSelectTabPage::SelectType(TOXTypes eSet)
{
CurTOXType eCurType (eSet, 0);
- long nData = lcl_TOXTypesToUserData(eCurType);
+ sal_IntPtr nData = lcl_TOXTypesToUserData(eCurType);
aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos((void*)nData));
aTypeFT.Enable(sal_False);
aTypeLB.Enable(sal_False);
@@ -1131,7 +1131,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
long nOLEData = rDesc.GetOLEOptions();
for(sal_uInt16 nFromObj = 0; nFromObj < aFromObjCLB.GetEntryCount(); nFromObj++)
{
- long nData = (long)aFromObjCLB.GetEntryData(nFromObj);
+ sal_IntPtr nData = (sal_IntPtr)aFromObjCLB.GetEntryData(nFromObj);
aFromObjCLB.CheckEntryPos(nFromObj, 0 != (nData & nOLEData));
}
}
@@ -1230,7 +1230,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
{
if(aFromObjCLB.IsChecked(i))
{
- long nData = (long)aFromObjCLB.GetEntryData(i);
+ sal_IntPtr nData = (sal_IntPtr)aFromObjCLB.GetEntryData(i);
nOLEData |= nData;
}
}
@@ -1279,7 +1279,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet& )
SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog();
SwWrtShell& rSh = pTOXDlg->GetWrtShell();
const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType();
- long nData = lcl_TOXTypesToUserData(aCurType);
+ sal_IntPtr nData = lcl_TOXTypesToUserData(aCurType);
aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos((void*)nData));
sAutoMarkURL = INetURLObject::decode( rSh.GetTOIAutoMarkURL(),
@@ -1316,7 +1316,7 @@ int SwTOXSelectTabPage::DeactivatePage( SfxItemSet* _pSet )
{
if(_pSet)
_pSet->Put(SfxUInt16Item(FN_PARAM_TOX_TYPE,
- (sal_uInt16)(long)aTypeLB.GetEntryData( aTypeLB.GetSelectEntryPos() )));
+ (sal_uInt16)(sal_IntPtr)aTypeLB.GetEntryData( aTypeLB.GetSelectEntryPos() )));
FillTOXDescription();
return LEAVE_PAGE;
}
@@ -2641,7 +2641,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
{
String sEntry = pBox->GetSelectEntry();
- sal_uInt16 nId = (sal_uInt16)(long)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_uInt16 nId = (sal_uInt16)(sal_IntPtr)pBox->GetEntryData(pBox->GetSelectEntryPos());
aEditStylePB.Enable(sEntry != sNoCharStyle);
if(sEntry == sNoCharStyle)
sEntry.Erase();
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 7b837f5a2fea..c908fb6e3c42 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -96,7 +96,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
ResStringArray& rNames = aNames.GetNames();
for(sal_uInt16 i = 0; i < rNames.Count(); i++)
{
- long nValue = rNames.GetValue(i);
+ sal_IntPtr nValue = rNames.GetValue(i);
bool bInsert = true;
sal_uInt16 nPos = LISTBOX_APPEND;
switch(nValue)
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 8b9a05358330..67a0c090a6f9 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1111,7 +1111,7 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
// Indentation for outlines (and sections)
-long SwContentTree::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
+sal_IntPtr SwContentTree::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
{
sal_uInt16 nLevel = 0;
if(lcl_IsContent(pEntry))
@@ -3030,7 +3030,7 @@ NaviContentBookmark::NaviContentBookmark( const String &rUrl,
const SwDocShell* pDocSh ) :
aUrl( rUrl ),
aDescr(rDesc),
- nDocSh((long)pDocSh),
+ nDocSh((sal_IntPtr)pDocSh),
nDefDrag( nDragType )
{
}
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 5bc1f08cc714..4879f548a40d 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -528,7 +528,7 @@ DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
return SV_DRAGDROP_CTRL_MOVE;
}
-long SwGlobalTree::GetTabPos( SvTreeListEntry*, SvLBoxTab* pTab)
+sal_IntPtr SwGlobalTree::GetTabPos( SvTreeListEntry*, SvLBoxTab* pTab)
{
return pTab->GetPos() - GLBL_TABPOS_SUB;
}
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 530363976d20..70e5e2234b36 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -612,7 +612,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo
nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset );
else
nPos = rToFill.InsertEntry(pBase->GetName());
- long nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
rToFill.SetEntryData( nPos, (void*) (nPoolId));
}
pBase = pPool->Next();
@@ -632,7 +632,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo
nPos = InsertStringSorted(rName, rToFill, bHasOffset );
else
nPos = rToFill.InsertEntry(rName);
- long nPoolId = USHRT_MAX;
+ sal_IntPtr nPoolId = USHRT_MAX;
rToFill.SetEntryData( nPos, (void*) (nPoolId));
}
}