summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/tabdlg.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:49:47 +0100
commit091e4aee3386f3bfee081dc8646494e0eb97f88a (patch)
treedd79298b4e8729ca7dc874274d4a33ea88fe107d /sfx2/source/dialog/tabdlg.cxx
parentf0681adbf092e2b455db52535f2df882bc87343a (diff)
parent224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: avmedia/source/framework/mediacontrol.cxx connectivity/source/commontools/DateConversion.cxx desktop/source/deployment/registry/component/dp_component.cxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/txtrange.hxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/misc/txtrange.cxx editeng/source/outliner/outlin2.cxx editeng/source/outliner/outlvw.cxx framework/source/layoutmanager/layoutmanager.cxx linguistic/source/lngsvcmgr.hxx sfx2/source/appl/app.cxx sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appdde.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/workwin.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macro.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/statcach.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styledlg.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplcitem.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/new.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objxtor.cxx sfx2/source/inc/appdata.hxx sfx2/source/inc/helpid.hrc sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/statcach.hxx sfx2/source/inc/templdgi.hxx sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnumgr.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/statbar/stbitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/frame2.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/sfxbasecontroller.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewfrm2.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx svx/inc/svx/svditer.hxx svx/source/dialog/sdstring.src svx/source/form/fmpage.cxx svx/source/form/formcontroller.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svditer.cxx svx/source/svdraw/svdview.cxx xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'sfx2/source/dialog/tabdlg.cxx')
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/tabdlg.cxx273
1 files changed, 139 insertions, 134 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index d61ed24f3929..86362938acab 100644..100755
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -34,7 +34,7 @@
#include <vcl/msgbox.hxx>
#include <unotools/viewoptions.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx>
#include "appdata.hxx"
@@ -43,8 +43,8 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
-#include "sfxresid.hxx"
-#include "sfxhelp.hxx"
+#include "sfx2/sfxresid.hxx"
+#include "sfx2/sfxhelp.hxx"
#include <sfx2/ctrlitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/sfxdlg.hxx>
@@ -69,34 +69,34 @@ TYPEINIT1(LAYOUT_NS_SFX_TABDIALOG SfxTabDialogItem,SfxSetItem);
struct TabPageImpl
{
- BOOL mbStandard;
+ sal_Bool mbStandard;
sfx::ItemConnectionArray maItemConn;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- TabPageImpl() : mbStandard( FALSE ) {}
+ TabPageImpl() : mbStandard( sal_False ) {}
};
NAMESPACE_LAYOUT_SFX_TABDIALOG
struct Data_Impl
{
- USHORT nId; // The ID
+ sal_uInt16 nId; // The ID
CreateTabPage fnCreatePage; // Pointer to Factory
GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
SfxTabPage* pTabPage; // The TabPage itself
- BOOL bOnDemand; // Flag: ItemSet onDemand
- BOOL bRefresh; // Flag: Page must be re-initialized
+ sal_Bool bOnDemand; // Flag: ItemSet onDemand
+ sal_Bool bRefresh; // Flag: Page must be re-initialized
// Constructor
- Data_Impl( USHORT Id, CreateTabPage fnPage,
- GetTabPageRanges fnRanges, BOOL bDemand ) :
+ Data_Impl( sal_uInt16 Id, CreateTabPage fnPage,
+ GetTabPageRanges fnRanges, sal_Bool bDemand ) :
nId ( Id ),
fnCreatePage( fnPage ),
fnGetRanges ( fnRanges ),
pTabPage ( 0 ),
bOnDemand ( bDemand ),
- bRefresh ( FALSE )
+ bRefresh ( sal_False )
{
if ( !fnCreatePage )
{
@@ -115,7 +115,7 @@ SfxTabDialogItem::SfxTabDialogItem( const SfxTabDialogItem& rAttr, SfxItemPool*
{
}
-SfxTabDialogItem::SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet )
+SfxTabDialogItem::SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet )
: SfxSetItem( nId, rItemSet )
{
}
@@ -125,7 +125,7 @@ SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
return new SfxTabDialogItem( *this, pToPool );
}
-SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const
+SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersion*/) const
{
OSL_FAIL( "Use it only in UI!" );
return NULL;
@@ -136,7 +136,7 @@ class SfxTabDialogController : public SfxControllerItem
SfxTabDialog* pDialog;
const SfxItemSet* pSet;
public:
- SfxTabDialogController( USHORT nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
+ SfxTabDialogController( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
: SfxControllerItem( nSlotId, rBindings )
, pDialog( pDlg )
, pSet( NULL )
@@ -145,7 +145,7 @@ public:
~SfxTabDialogController();
DECL_LINK( Execute_Impl, void* );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
};
SfxTabDialogController::~SfxTabDialogController()
@@ -168,21 +168,21 @@ IMPL_LINK( SfxTabDialogController, Execute_Impl, void*, pVoid )
return 0;
}
-void SfxTabDialogController::StateChanged( USHORT /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
+void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxSetItem* pSetItem = PTR_CAST( SfxSetItem, pState );
if ( pSetItem )
{
pSet = pDialog->pSet = pSetItem->GetItemSet().Clone();
- BOOL bDialogStarted = FALSE;
- for ( USHORT n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
+ sal_Bool bDialogStarted = sal_False;
+ for ( sal_uInt16 n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
{
- USHORT nPageId = pDialog->aTabCtrl.GetPageId( n );
+ sal_uInt16 nPageId = pDialog->aTabCtrl.GetPageId( n );
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pDialog->aTabCtrl.GetTabPage( nPageId ));
if ( pTabPage )
{
pTabPage->Reset( pSetItem->GetItemSet() );
- bDialogStarted = TRUE;
+ bDialogStarted = sal_True;
}
}
@@ -197,7 +197,7 @@ DECL_PTRARRAY(SfxTabDlgData_Impl, Data_Impl *, 4,4)
struct TabDlg_Impl
{
- BOOL bModified : 1,
+ sal_Bool bModified : 1,
bModal : 1,
bInOK : 1,
bHideResetBtn : 1;
@@ -206,25 +206,25 @@ struct TabDlg_Impl
PushButton* pApplyButton;
SfxTabDialogController* pController;
- TabDlg_Impl( BYTE nCnt ) :
+ TabDlg_Impl( sal_uInt8 nCnt ) :
- bModified ( FALSE ),
- bModal ( TRUE ),
- bInOK ( FALSE ),
- bHideResetBtn ( FALSE ),
+ bModified ( sal_False ),
+ bModal ( sal_True ),
+ bInOK ( sal_False ),
+ bHideResetBtn ( sal_False ),
pData ( new SfxTabDlgData_Impl( nCnt ) ),
pApplyButton ( NULL ),
pController ( NULL )
{}
};
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos = 0 );
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = 0 );
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos )
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos )
{
- const USHORT nCount = rArr.Count();
+ const sal_uInt16 nCount = rArr.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = rArr[i];
@@ -264,7 +264,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
TabPage( pParent, rResId ),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
@@ -274,7 +274,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ) :
TabPage(pParent, nStyle),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
{
@@ -296,7 +296,7 @@ SfxTabPage::~SfxTabPage()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxTabPage::FillItemSet( SfxItemSet& rSet )
{
return pImpl->maItemConn.DoFillItemSet( rSet, GetItemSet() );
}
@@ -362,14 +362,14 @@ void SfxTabPage::FillUserData()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::IsReadOnly() const
+sal_Bool SfxTabPage::IsReadOnly() const
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep )
+const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep )
/* [Description]
@@ -379,9 +379,9 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
{
const SfxItemPool* pPool = rSet.GetPool();
- USHORT nWh = pPool->GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = pPool->GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
- rSet.GetItemState( nWh, TRUE, &pItem );
+ rSet.GetItemState( nWh, sal_True, &pItem );
if ( !pItem && nWh != nSlot )
pItem = &pPool->GetDefaultItem( nWh );
@@ -391,7 +391,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
- USHORT nSlot, sal_Bool bDeep )
+ sal_uInt16 nSlot, sal_Bool bDeep )
/* [Description]
@@ -400,7 +400,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
{
const SfxItemSet& rOldSet = GetItemSet();
- USHORT nWh = GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
if ( pImpl->mbStandard && rOldSet.GetParent() )
@@ -416,7 +416,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
- USHORT nSlot )
+ sal_uInt16 nSlot )
/* [Description]
@@ -471,11 +471,11 @@ void SfxTabPage::AddItemConnection( sfx::ItemConnectionBase* pConnection )
aBaseFmtBtn ( this ),\
pSet ( ItemSetPtr ),\
pOutSet ( 0 ),\
- pImpl ( new TabDlg_Impl( (BYTE)aTabCtrl.GetPageCount() ) ), \
+ pImpl ( new TabDlg_Impl( (sal_uInt8)aTabCtrl.GetPageCount() ) ), \
pRanges ( 0 ), \
nResId ( rResId.GetId() ), \
nAppPageId ( USHRT_MAX ), \
- bItemsReset ( FALSE ),\
+ bItemsReset ( sal_False ),\
bFmt ( bEditFmt ),\
pExampleSet ( 0 )
@@ -494,7 +494,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset with the data;
// can be NULL, when Pages are onDemand
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -520,7 +520,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset with the data;
// can be NULL, when Pages are onDemand
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -543,9 +543,9 @@ SfxTabDialog::SfxTabDialog
(
Window* pParent, // Parent Window
const ResId& rResId, // ResourceId
- USHORT nSetId,
+ sal_uInt16 nSetId,
SfxBindings& rBindings,
- BOOL bEditFmt, // Flag: templates are processed
+ sal_Bool bEditFmt, // Flag: templates are processed
// when yes -> additional Button for standard
const String* pUserButtonText // Text for UserButton;
// if != 0, the UserButton is created
@@ -558,7 +558,7 @@ SfxTabDialog::SfxTabDialog
pImpl->pController = new SfxTabDialogController( nSetId, rBindings, this );
rBindings.LEAVEREGISTRATIONS();
- EnableApplyButton( TRUE );
+ EnableApplyButton( sal_True );
SetApplyHandler( LINK( pImpl->pController, SfxTabDialogController, Execute_Impl ) );
rBindings.Invalidate( nSetId );
@@ -590,8 +590,8 @@ SfxTabDialog::~SfxTabDialog()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() );
- const USHORT nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pImpl->pData->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
@@ -626,7 +626,7 @@ SfxTabDialog::~SfxTabDialog()
// -----------------------------------------------------------------------
-void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
+void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
/* [Description]
@@ -665,13 +665,13 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
// bFmt = temporary Flag passed on in the Constructor(),
- // if bFmt == 2, then also TRUE,
+ // if bFmt == 2, then also sal_True,
// additional suppression of the standard button,
- // after the Initializing set to TRUE again
+ // after the Initializing set to sal_True again
if ( bFmtFlag != 2 )
aBaseFmtBtn.Show();
else
- bFmtFlag = TRUE;
+ bFmtFlag = sal_True;
}
if ( pSet )
@@ -679,6 +679,11 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
pExampleSet = new SfxItemSet( *pSet );
pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
}
+
+ aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn );
+ aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn );
+ aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn );
+ aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn );
}
// -----------------------------------------------------------------------
@@ -686,7 +691,7 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
void SfxTabDialog::RemoveResetButton()
{
aResetBtn.Hide();
- pImpl->bHideResetBtn = TRUE;
+ pImpl->bHideResetBtn = sal_True;
}
// -----------------------------------------------------------------------
@@ -720,10 +725,10 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl )
// -----------------------------------------------------------------------
-void SfxTabDialog::Start( BOOL bShow )
+void SfxTabDialog::Start( sal_Bool bShow )
{
aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
- pImpl->bModal = FALSE;
+ pImpl->bModal = sal_False;
Start_Impl();
if ( bShow )
@@ -752,7 +757,7 @@ Link SfxTabDialog::GetApplyHandler() const
// -----------------------------------------------------------------------
-void SfxTabDialog::EnableApplyButton(BOOL bEnable)
+void SfxTabDialog::EnableApplyButton(sal_Bool bEnable)
{
if ( IsApplyButtonEnabled() == bEnable )
// nothing to do
@@ -786,7 +791,7 @@ void SfxTabDialog::EnableApplyButton(BOOL bEnable)
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsApplyButtonEnabled() const
+sal_Bool SfxTabDialog::IsApplyButtonEnabled() const
{
return ( NULL != pImpl->pApplyButton );
}
@@ -810,7 +815,7 @@ PushButton* SfxTabDialog::GetApplyButton()
void SfxTabDialog::Start_Impl()
{
DBG_ASSERT( pImpl->pData->Count() == aTabCtrl.GetPageCount(), "not all pages registered" );
- USHORT nActPage = aTabCtrl.GetPageId( 0 );
+ sal_uInt16 nActPage = aTabCtrl.GetPageId( 0 );
// load old settings, when exists
SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
@@ -821,13 +826,13 @@ void SfxTabDialog::Start_Impl()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
// initial TabPage from Program/Help/config
- nActPage = (USHORT)aDlgOpt.GetPageID();
+ nActPage = (sal_uInt16)aDlgOpt.GetPageID();
if ( USHRT_MAX != nAppPageId )
nActPage = nAppPageId;
else
{
- USHORT nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
+ sal_uInt16 nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
if ( nAutoTabPageId )
nActPage = nAutoTabPageId;
}
@@ -842,19 +847,19 @@ void SfxTabDialog::Start_Impl()
ActivatePageHdl( &aTabCtrl );
}
-void SfxTabDialog::AddTabPage( USHORT nId, BOOL bItemsOnDemand )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, sal_Bool bItemsOnDemand )
{
AddTabPage( nId, 0, 0, bItemsOnDemand );
}
-void SfxTabDialog::AddTabPage( USHORT nId, const String &rRiderText, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const String &rRiderText, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos );
}
#ifdef SV_HAS_RIDERBITMAPS
-void SfxTabDialog::AddTabPage( USHORT nId, const Bitmap &rRiderBitmap, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const Bitmap &rRiderBitmap, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderBitmap, 0, 0, bItemsOnDemand, nPos );
}
@@ -872,11 +877,11 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId, // Page ID
+ sal_uInt16 nId, // Page ID
CreateTabPage pCreateFunc, // Pointer to the Factory Method
GetTabPageRanges pRangesFunc, // Pointer to the Method for quering
// Ranges onDemand
- BOOL bItemsOnDemand // indicates whether the set of this page is
+ sal_Bool bItemsOnDemand // indicates whether the set of this page is
// requested when created
)
{
@@ -895,12 +900,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const String& rRiderText,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -922,12 +927,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const Bitmap &rRiderBitmap,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -940,7 +945,7 @@ void SfxTabDialog::AddTabPage
// -----------------------------------------------------------------------
-void SfxTabDialog::RemoveTabPage( USHORT nId )
+void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
/* [Description]
@@ -948,7 +953,7 @@ void SfxTabDialog::RemoveTabPage( USHORT nId )
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aTabCtrl.RemovePage( nId );
Data_Impl* pDataObject = Find( *pImpl->pData, nId, &nPos );
@@ -991,7 +996,7 @@ void SfxTabDialog::PageCreated
*/
(
- USHORT, // Id of the created page
+ sal_uInt16, // Id of the created page
SfxTabPage& // Reference to the created page
)
{
@@ -1013,7 +1018,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
// -----------------------------------------------------------------------
-SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
+SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
/* [Description]
@@ -1021,7 +1026,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
Data_Impl* pDataObject = Find( *pImpl->pData, nPageId, &nPos );
if ( pDataObject )
@@ -1031,7 +1036,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsInOK() const
+sal_Bool SfxTabDialog::IsInOK() const
{
return pImpl->bInOK;
}
@@ -1054,20 +1059,20 @@ short SfxTabDialog::Ok()
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( !pOutSet )
{
if ( !pExampleSet && pSet )
- pOutSet = pSet->Clone( FALSE ); // without Items
+ pOutSet = pSet->Clone( sal_False ); // without Items
else if ( pExampleSet )
pOutSet = new SfxItemSet( *pExampleSet );
}
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
SfxTabPage* pTabPage = pDataObject->pTabPage;
@@ -1086,7 +1091,7 @@ short SfxTabDialog::Ok()
if ( pTabPage->FillItemSet( aTmp ) )
{
- bModified |= TRUE;
+ bModified |= sal_True;
pExampleSet->Put( aTmp );
pOutSet->Put( aTmp );
}
@@ -1095,10 +1100,10 @@ short SfxTabDialog::Ok()
}
if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
- bModified |= TRUE;
+ bModified |= sal_True;
if ( bFmt == 2 )
- bModified |= TRUE;
+ bModified |= sal_True;
return bModified ? RET_OK : RET_CANCEL;
}
@@ -1113,7 +1118,7 @@ IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
// -----------------------------------------------------------------------
-SfxItemSet* SfxTabDialog::CreateInputItemSet( USHORT )
+SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
/* [Description]
@@ -1155,7 +1160,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( OK_Impl() )
{
@@ -1174,7 +1179,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
bool SfxTabDialog::PrepareLeaveCurrentPage()
{
- USHORT const nId = aTabCtrl.GetCurPageId();
+ sal_uInt16 const nId = aTabCtrl.GetCurPageId();
SfxTabPage* pPage = dynamic_cast<SfxTabPage*> (aTabCtrl.GetTabPage( nId ));
bool bEnd = !pPage;
@@ -1244,7 +1249,7 @@ IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id not known" );
@@ -1271,7 +1276,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id not known" );
bFmt = 2;
@@ -1282,17 +1287,17 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
pExampleSet = new SfxItemSet( *pSet );
const SfxItemPool* pPool = pSet->GetPool();
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
SfxItemSet aTmpSet( *pExampleSet );
while ( *pTmpRanges )
{
- const USHORT* pU = pTmpRanges + 1;
+ const sal_uInt16* pU = pTmpRanges + 1;
if ( *pTmpRanges == *pU )
{
// Range which two identical values -> only set one Item
- USHORT nWh = pPool->GetWhich( *pTmpRanges );
+ sal_uInt16 nWh = pPool->GetWhich( *pTmpRanges );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// At the Outset of InvalidateItem,
@@ -1302,13 +1307,13 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
else
{
// Correct Range with multiple values
- USHORT nTmp = *pTmpRanges, nTmpEnd = *pU;
+ sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
DBG_ASSERT( nTmp <= nTmpEnd, "Range is sorted the wrong way" );
if ( nTmp > nTmpEnd )
{
// If really sorted wrongly, then set new
- USHORT nTmp1 = nTmp;
+ sal_uInt16 nTmp1 = nTmp;
nTmp = nTmpEnd;
nTmpEnd = nTmp1;
}
@@ -1316,7 +1321,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
while ( nTmp <= nTmpEnd )
{
// Iterate over the Range and set the Items
- USHORT nWh = pPool->GetWhich( nTmp );
+ sal_uInt16 nWh = pPool->GetWhich( nTmp );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// At the Outset of InvalidateItem,
@@ -1331,7 +1336,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
// Set all Items as new -> the call the current Page Reset()
DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" );
pDataObject->pTabPage->Reset( aTmpSet );
- pDataObject->pTabPage->pImpl->mbStandard = TRUE;
+ pDataObject->pTabPage->pImpl->mbStandard = sal_True;
}
return 1;
}
@@ -1350,13 +1355,13 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
Handler that is called by StarView for switching to a different page.
If the page not exist yet then it is created and the virtual Method
- <SfxTabDialog::PageCreated( USHORT, SfxTabPage &)> is called. If the page
+ <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)> is called. If the page
exist, then the if possible the <SfxTabPage::Reset(const SfxItemSet &)> or
<SfxTabPage::ActivatePage(const SfxItemSet &)> is called.
*/
{
- USHORT const nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 const nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->pData->Count(), "no Pages registered" );
SFX_APP();
@@ -1438,7 +1443,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
}
else if ( pDataObject->bRefresh )
pTabPage->Reset( *pSet );
- pDataObject->bRefresh = FALSE;
+ pDataObject->bRefresh = sal_False;
#if ENABLE_LAYOUT_SFX_TABDIALOG
pTabCtrl->GetPagePos (nId);
@@ -1446,7 +1451,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
if ( pExampleSet )
pTabPage->ActivatePage( *pExampleSet );
- BOOL bReadOnly = pTabPage->IsReadOnly();
+ sal_Bool bReadOnly = pTabPage->IsReadOnly();
( bReadOnly || pImpl->bHideResetBtn ) ? aResetBtn.Hide() : aResetBtn.Show();
return 0;
}
@@ -1465,7 +1470,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
*/
{
- USHORT nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
SFX_APP();
SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
DBG_ASSERT( pPage, "no active Page" );
@@ -1519,22 +1524,22 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
pSet = GetRefreshedSet();
DBG_ASSERT( pSet, "GetRefreshedSet() returns NULL" );
// Flag all Pages as to be initialized as new
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = (*pImpl->pData)[i];
if ( pObj->pTabPage != pPage ) // Do not refresh own Page anymore
- pObj->bRefresh = TRUE;
+ pObj->bRefresh = sal_True;
else
- pObj->bRefresh = FALSE;
+ pObj->bRefresh = sal_False;
}
}
if ( nRet & SfxTabPage::LEAVE_PAGE )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1547,13 +1552,13 @@ const SfxItemSet* SfxTabDialog::GetOutputItemSet
[Cross-reference]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
*/
(
- USHORT nId // the Id, under which the page was added at AddTabPage().
+ sal_uInt16 nId // the Id, under which the page was added at AddTabPage().
// hinzugefügt wurde.
) const
{
@@ -1602,12 +1607,12 @@ extern "C" int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
*/
{
- return *(USHORT*)p1 - *(USHORT*)p2;
+ return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
}
// -----------------------------------------------------------------------
-void SfxTabDialog::ShowPage( USHORT nId )
+void SfxTabDialog::ShowPage( sal_uInt16 nId )
/* [Description]
@@ -1621,7 +1626,7 @@ void SfxTabDialog::ShowPage( USHORT nId )
// -----------------------------------------------------------------------
-const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
+const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
/* [Description]
@@ -1631,14 +1636,14 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
[Return value]
- Pointer to a null-terminated array of USHORT. This array belongs to the
+ Pointer to a null-terminated array of sal_uInt16. This array belongs to the
dialog and is deleted when the dialogue is destroy.
[Cross-reference]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
*/
{
@@ -1651,19 +1656,19 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
if ( pRanges )
return pRanges;
SvUShorts aUS( 16, 16 );
- USHORT nCount = pImpl->pData->Count();
+ sal_uInt16 nCount = pImpl->pData->Count();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
if ( pDataObject->fnGetRanges )
{
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
- const USHORT* pIter = pTmpRanges;
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pIter = pTmpRanges;
- USHORT nLen;
+ sal_uInt16 nLen;
for( nLen = 0; *pIter; ++nLen, ++pIter )
;
aUS.Insert( pTmpRanges, nLen, aUS.Count() );
@@ -1684,10 +1689,10 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
// sort
if ( aUS.Count() > 1 )
qsort( (void*)aUS.GetData(),
- aUS.Count(), sizeof(USHORT), TabDlgCmpUS_Impl );
+ aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl );
- pRanges = new USHORT[aUS.Count() + 1];
- memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count());
+ pRanges = new sal_uInt16[aUS.Count() + 1];
+ memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count());
pRanges[aUS.Count()] = 0;
return pRanges;
}
@@ -1721,15 +1726,15 @@ long SfxTabDialog::Notify( NotifyEvent& rNEvt )
if ( pViewFrame )
{
Window* pWindow = rNEvt.GetWindow();
- ULONG nHelpId = 0;
- while ( !nHelpId && pWindow )
+ rtl::OString sHelpId;
+ while ( !sHelpId.getLength() && pWindow )
{
- nHelpId = pWindow->GetHelpId();
+ sHelpId = pWindow->GetHelpId();
pWindow = pWindow->GetParent();
}
- if ( nHelpId )
- SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), nHelpId );
+ if ( sHelpId.getLength() )
+ SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), sHelpId );
}
}