diff options
Diffstat (limited to 'cui/source/tabpages/swpossizetabpage.cxx')
-rw-r--r-- | cui/source/tabpages/swpossizetabpage.cxx | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 7a53da94b26c..2d08dede00ce 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -55,14 +55,14 @@ struct FrmMap SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; short nAlign; - ULONG nLBRelations; + sal_uLong nLBRelations; }; struct RelationMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - ULONG nLBRelation; + sal_uLong nLBRelation; short nRelation; }; struct StringIdPair_Impl @@ -418,7 +418,7 @@ std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) } SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( - SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) + SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL) { //special handling of STR_FROMLEFT if(SwFPos::FROMLEFT == eStringId) @@ -453,7 +453,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; - USHORT nIndex; + sal_uInt16 nIndex; for(nIndex = 0; nIndex < SAL_N_ELEMENTS(aHoriIds); ++nIndex) { if(aHoriIds[nIndex].eHori == eStringId) @@ -476,9 +476,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( } // #i22341# - helper method in order to determine all possible // listbox relations in a relation map for a given relation -ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) +sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < SAL_N_ELEMENTS(aRelationMap); ++nRelMapPos ) { @@ -493,11 +493,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) // #i22341# - helper method on order to determine all possible // listbox relations in a relation map for a given string ID -ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; std::size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -577,10 +577,10 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rIn { FreeResource(); FieldUnit eDlgUnit = GetModuleFieldUnit( rInAttrs ); - SetFieldUnit( m_aHoriByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aVertByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aWidthMF , eDlgUnit, TRUE ); - SetFieldUnit( m_aHeightMF, eDlgUnit, TRUE ); + SetFieldUnit( m_aHoriByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aVertByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aWidthMF , eDlgUnit, sal_True ); + SetFieldUnit( m_aHeightMF, eDlgUnit, sal_True ); SetExchangeSupport(); @@ -623,9 +623,9 @@ SfxTabPage* SvxSwPosSizeTabPage::Create( Window* pParent, const SfxItemSet& rSet return new SvxSwPosSizeTabPage(pParent, rSet); } -USHORT* SvxSwPosSizeTabPage::GetRanges() +sal_uInt16* SvxSwPosSizeTabPage::GetRanges() { - static USHORT pSwPosRanges[] = + static sal_uInt16 pSwPosRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -652,15 +652,15 @@ USHORT* SvxSwPosSizeTabPage::GetRanges() return pSwPosRanges; } -BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) +sal_Bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) { bool bAnchorChanged = false; short nAnchor = GetAnchorType(&bAnchorChanged); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(bAnchorChanged) { rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); - bModified |= TRUE; + bModified |= sal_True; } if ( m_aPositionCB.GetState() != m_aPositionCB.GetSavedValue() ) { @@ -669,8 +669,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_aPositionCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aPositionCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( m_aSizeCB.GetState() != m_aSizeCB.GetSavedValue() ) @@ -680,8 +680,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_aSizeCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aSizeCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } const SfxItemSet& rOldSet = GetItemSet(); @@ -708,7 +708,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_X ), nHoriByPos ) ); rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_Y ), nVertByPos ) ); - bModified |= TRUE; + bModified |= sal_True; } } else @@ -722,7 +722,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rHoriPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_HORI_POSITION)) ; - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); const long nHoriByPos = @@ -737,7 +737,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, nRel)); if(m_aHoriByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_HORI_POSITION, nHoriByPos)); - bModified |= TRUE; + bModified |= sal_True; } } if(m_aHoriMirrorCB.IsEnabled() && m_aHoriMirrorCB.IsChecked() != m_aHoriMirrorCB.GetSavedValue()) @@ -752,7 +752,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rVertPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_VERT_POSITION)); - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); short nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); short nRel = GetRelation(m_pVMap, m_aVertToLB); // #i34055# - convert vertical position for @@ -772,7 +772,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, nRel)); if(m_aVertByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, nVertByPos)); - bModified |= TRUE; + bModified |= sal_True; } } @@ -796,13 +796,13 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) sal_uInt32 nWidth = static_cast<sal_uInt32>(m_aWidthMF.Denormalize(m_aWidthMF.GetValue(FUNIT_TWIP))); sal_uInt32 nHeight = static_cast<sal_uInt32>(m_aHeightMF.Denormalize(m_aHeightMF.GetValue(FUNIT_TWIP))); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) nWidth ) ); + (sal_uInt32) nWidth ) ); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) nHeight ) ); + (sal_uInt32) nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() rSet.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), RP_LT ) ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -833,11 +833,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } if(bInvalidateAnchor) { - m_aToPageRB.Enable( FALSE ); - m_aToParaRB.Enable( FALSE ); - m_aToCharRB.Enable( FALSE ); - m_aAsCharRB.Enable( FALSE ); - m_aToFrameRB.Enable( FALSE ); + m_aToPageRB.Enable( sal_False ); + m_aToParaRB.Enable( sal_False ); + m_aToCharRB.Enable( sal_False ); + m_aAsCharRB.Enable( sal_False ); + m_aToFrameRB.Enable( sal_False ); } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_PROTECT_POS ); @@ -845,7 +845,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_aPositionCB.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_aPositionCB.EnableTriState( FALSE ); + m_aPositionCB.EnableTriState( sal_False ); m_aSizeCB.Enable( !bProtected ); } else @@ -861,7 +861,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aSizeCB.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_aSizeCB.EnableTriState( FALSE ); + m_aSizeCB.EnableTriState( sal_False ); } else m_aSizeCB.SetState( STATE_DONTKNOW ); @@ -897,8 +897,8 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { if( 0 == (m_nHtmlMode & HTMLMODE_FULL_ABS_POS)) { - m_aHeightFT .Enable( FALSE ); - m_aHeightMF .Enable( FALSE ); + m_aHeightFT .Enable( sal_False ); + m_aHeightMF .Enable( sal_False ); } if( 0 == (m_nHtmlMode & HTMLMODE_SOME_ABS_POS)) { @@ -906,12 +906,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aToParaRB.Check(); } - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } - m_aHoriMirrorCB.Show(FALSE); - m_aKeepRatioCB.Enable(FALSE); + m_aHoriMirrorCB.Show(sal_False); + m_aKeepRatioCB.Enable(sal_False); // #i18732# - hide checkbox in HTML mode - m_aFollowCB.Show(FALSE); + m_aFollowCB.Show(sal_False); } else { @@ -924,12 +924,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_WIDTH ); - sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aWidthMF.SetValue(m_aWidthMF.Normalize(nWidth), FUNIT_TWIP); pItem = GetItem( rSet, SID_ATTR_TRANSFORM_HEIGHT ); - sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aHeightMF.SetValue(m_aHeightMF.Normalize(nHeight), FUNIT_TWIP); m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0; @@ -990,12 +990,12 @@ int SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) return( LEAVE_PAGE ); } -void SvxSwPosSizeTabPage::EnableAnchorTypes(USHORT nAnchorEnable) +void SvxSwPosSizeTabPage::EnableAnchorTypes(sal_uInt16 nAnchorEnable) { if((nAnchorEnable & SVX_OBJ_AT_FLY)) m_aToFrameRB.Show(); if(!(nAnchorEnable & SVX_OBJ_PAGE)) - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } short SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged) @@ -1056,9 +1056,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pHMap ) { // Ausrichtung Horizontal - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); - USHORT nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); + sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); aVal.nHoriOrient = (short)nAlign; aVal.nHRelOrient = (short)nRel; @@ -1069,9 +1069,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pVMap ) { // Ausrichtung Vertikal - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); aVal.nVertOrient = (short)nAlign; aVal.nVRelOrient = (short)nRel; @@ -1155,20 +1155,20 @@ IMPL_LINK( SvxSwPosSizeTabPage, MirrorHdl, CheckBox *, EMPTYARG ) IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriToLB; + sal_Bool bHori = pLB == &m_aHoriToLB; UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; if(m_bHtmlMode && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) // wieder Sonderbehandlung { if(bHori) { - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); if(RelOrientation::PRINT_AREA == nRel && 0 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(1); @@ -1188,24 +1188,24 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriLB; + sal_Bool bHori = pLB == &m_aHoriLB; ListBox *pRelLB = bHori ? &m_aHoriToLB : &m_aVertToLB; FixedText *pRelFT = bHori ? &m_aHoriToFT : &m_aVertToFT; FrmMap *pMap = bHori ? m_pHMap : m_pVMap; - USHORT nMapPos = GetMapPos(pMap, *pLB); - USHORT nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); + sal_uInt16 nMapPos = GetMapPos(pMap, *pLB); + sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); if (bHori) { - BOOL bEnable = HoriOrientation::NONE == nAlign; + sal_Bool bEnable = HoriOrientation::NONE == nAlign; m_aHoriByMF.Enable( bEnable ); m_aHoriByFT.Enable( bEnable ); } else { - BOOL bEnable = VertOrientation::NONE == nAlign; + sal_Bool bEnable = VertOrientation::NONE == nAlign; m_aVertByMF.Enable( bEnable ); m_aVertByFT.Enable( bEnable ); } @@ -1228,15 +1228,15 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(m_bHtmlMode && m_nHtmlMode & HTMLMODE_SOME_ABS_POS && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) { - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if(bHori) { // rechts ist nur unterhalb erlaubt - von links nur oben @@ -1248,17 +1248,17 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) m_aVertLB.SelectEntryPos(1); else m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::LEFT == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::NONE == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } if(bSet) PosHdl(&m_aVertLB); @@ -1270,7 +1270,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(1 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(1); } @@ -1279,7 +1279,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(2 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(0) ; } @@ -1322,7 +1322,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, ProtectHdl, TriStateBox *, EMPTYARG) short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) { short nRel = 0; - USHORT nPos = rRelationLB.GetSelectEntryPos(); + sal_uInt16 nPos = rRelationLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1333,7 +1333,7 @@ short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) return nRel; } -short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) +short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { short nAlign = 0; @@ -1344,7 +1344,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1352,7 +1352,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (pMap[i].eStrId == eStrId) { - ULONG nLBRelations = pMap[i].nLBRelations; + sal_uLong nLBRelations = pMap[i].nLBRelations; if (nLBRelations & nRel) { nAlign = pMap[i].nAlign; @@ -1368,10 +1368,10 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ return nAlign; } -USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) +sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) { - USHORT nMapPos = 0; - USHORT nLBSelPos = rAlignLB.GetSelectEntryPos(); + sal_uInt16 nMapPos = 0; + sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos(); if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1388,7 +1388,7 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) if (sEntry == sSelEntry) { - nMapPos = sal::static_int_cast< USHORT >(i); + nMapPos = sal::static_int_cast< sal_uInt16 >(i); break; } } @@ -1401,14 +1401,14 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) } void SvxSwPosSizeTabPage::InitPos(short nAnchor, - USHORT nH, - USHORT nHRel, - USHORT nV, - USHORT nVRel, + sal_uInt16 nH, + sal_uInt16 nHRel, + sal_uInt16 nV, + sal_uInt16 nVRel, long nX, long nY) { - USHORT nPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aVertLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && m_pVMap ) { m_nOldV = m_pVMap[nPos].nAlign; @@ -1427,7 +1427,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, m_nOldHRel = ((RelationMap *)m_aHoriToLB.GetEntryData(nPos))->nRelation; } - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( m_bIsMultiSelection ) { m_pVMap = aVMultiSelectionMap; @@ -1475,7 +1475,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, { m_pVMap = m_bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; m_pHMap = 0; - bEnable = FALSE; + bEnable = sal_False; } m_aHoriLB.Enable( bEnable ); m_aHoriFT.Enable( bEnable ); @@ -1488,7 +1488,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, nHRel = m_nOldHRel; } // #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB> - USHORT nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); + sal_uInt16 nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); FillRelLB(m_pHMap, nMapPos, nH, nHRel, m_aHoriToLB, m_aHoriToFT); // Vertikal @@ -1552,10 +1552,10 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, void SvxSwPosSizeTabPage::UpdateExample() { - USHORT nPos = m_aHoriLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aHoriLB.GetSelectEntryPos(); if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); @@ -1566,9 +1566,9 @@ void SvxSwPosSizeTabPage::UpdateExample() nPos = m_aVertLB.GetSelectEntryPos(); if ( m_pVMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); m_aExampleWN.SetVAlign(nAlign); m_aExampleWN.SetVertRel(nRel); @@ -1583,11 +1583,11 @@ void SvxSwPosSizeTabPage::UpdateExample() m_aExampleWN.Invalidate(); } -ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign, - USHORT nRel, ListBox &rLB, FixedText &rFT) +sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign, + sal_uInt16 nRel, ListBox &rLB, FixedText &rFT) { String sSelEntry; - ULONG nLBRelations = 0; + sal_uLong nLBRelations = 0; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); rLB.Clear(); @@ -1597,7 +1597,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { String sOldEntry(rLB.GetSelectEntry()); - USHORT nRelCount = SAL_N_ELEMENTS(aAsCharRelationMap); + sal_uInt16 nRelCount = SAL_N_ELEMENTS(aAsCharRelationMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++) @@ -1605,7 +1605,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap[_nMapPos].eStrId == eStrId) { nLBRelations = pMap[_nMapPos].nLBRelations; - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation) { @@ -1613,7 +1613,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (pMap[_nMapPos].nAlign == nAlign) sSelEntry = sEntry; @@ -1630,7 +1630,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (!rLB.GetSelectEntryCount()) { - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nLBRelation == LB_REL_CHAR) // Default @@ -1644,7 +1644,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign } else { - USHORT nRelCount = SAL_N_ELEMENTS(aRelationMap); + sal_uInt16 nRelCount = SAL_N_ELEMENTS(aRelationMap); // #i22341# - special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. @@ -1661,18 +1661,18 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign nLBRelations = pMap[nMapPos].nLBRelations; } - for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1) { if (nLBRelations & nBit) { - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (aRelationMap[nRelPos].nLBRelation == nBit) { SvxSwFramePosString::StringId sStrId1 = m_aHoriMirrorCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == nRel) sSelEntry = sEntry; @@ -1705,7 +1705,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign break; } - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nRelation == nRel) @@ -1729,9 +1729,9 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign return nLBRelations; } -USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, - USHORT _nAlign, - const USHORT _nRel, +sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, + sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox &_rLB) { String sSelEntry, sOldEntry; @@ -1741,7 +1741,7 @@ USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, // #i22341# - determine all possible listbox relations for // given relation for map <aVCharMap> - const ULONG nLBRelations = (_pMap != aVCharMap) + const sal_uLong nLBRelations = (_pMap != aVCharMap) ? 0L : ::lcl_GetLBRelationsForRelations( _nRel ); @@ -1807,27 +1807,27 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) if( m_aAnchorPos != Point(0,0) ) // -> Writer { - for( USHORT i = 1; i < rMarkList.GetMarkCount(); i++ ) + for( sal_uInt16 i = 1; i < rMarkList.GetMarkCount(); i++ ) { pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); if( m_aAnchorPos != pObj->GetAnchorPos() ) { // different anchor positions -> disable positioning - m_aPositionFL.Enable(FALSE); - m_aHoriFT.Enable(FALSE); - m_aHoriLB.Enable(FALSE); - m_aHoriByFT.Enable(FALSE); - m_aHoriByMF.Enable(FALSE); - m_aHoriToFT.Enable(FALSE); - m_aHoriToLB.Enable(FALSE); - m_aHoriMirrorCB.Enable(FALSE); - m_aVertFT.Enable(FALSE); - m_aVertLB.Enable(FALSE); - m_aVertByFT.Enable(FALSE); - m_aVertByMF.Enable(FALSE); - m_aVertToFT.Enable(FALSE); - m_aVertToLB.Enable(FALSE); - m_aFollowCB.Enable(FALSE); + m_aPositionFL.Enable(sal_False); + m_aHoriFT.Enable(sal_False); + m_aHoriLB.Enable(sal_False); + m_aHoriByFT.Enable(sal_False); + m_aHoriByMF.Enable(sal_False); + m_aHoriToFT.Enable(sal_False); + m_aHoriToLB.Enable(sal_False); + m_aHoriMirrorCB.Enable(sal_False); + m_aVertFT.Enable(sal_False); + m_aVertLB.Enable(sal_False); + m_aVertByFT.Enable(sal_False); + m_aVertByMF.Enable(sal_False); + m_aVertToFT.Enable(sal_False); + m_aVertToLB.Enable(sal_False); + m_aFollowCB.Enable(sal_False); m_aHoriByMF.SetText(String()); m_aVertByMF.SetText(String()); |