diff options
Diffstat (limited to 'sfx2/source/dialog')
63 files changed, 1471 insertions, 1903 deletions
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index 83319fc9aa84..83319fc9aa84 100644..100755 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx index 18b915e49c2f..6e2dd844b095 100644..100755 --- a/sfx2/source/dialog/alienwarn.cxx +++ b/sfx2/source/dialog/alienwarn.cxx @@ -31,7 +31,7 @@ #include <sal/macros.h> #include "alienwarn.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "alienwarn.hrc" diff --git a/sfx2/source/dialog/alienwarn.hrc b/sfx2/source/dialog/alienwarn.hrc index e3a23dc57836..e3a23dc57836 100644..100755 --- a/sfx2/source/dialog/alienwarn.hrc +++ b/sfx2/source/dialog/alienwarn.hrc diff --git a/sfx2/source/dialog/alienwarn.src b/sfx2/source/dialog/alienwarn.src index 7aa6f3230778..ae07b28a4f4d 100644..100755 --- a/sfx2/source/dialog/alienwarn.src +++ b/sfx2/source/dialog/alienwarn.src @@ -81,6 +81,7 @@ ModalDialog RID_DLG_ALIEN_WARNING }; CheckBox CB_WARNING_OFF { + HelpID = "sfx2:CheckBox:RID_DLG_ALIEN_WARNING:CB_WARNING_OFF"; Pos = MAP_APPFONT( AW_COL_2, AW_ROW_4 ); Size = MAP_APPFONT( DIALOG_WIDTH-AW_COL_2-RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_CHECKBOX_HEIGHT ); WordBreak = TRUE ; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index f3c7ce0e0b97..f46f9cea85ae 100644..100755 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -48,9 +48,9 @@ #include <sfx2/dispatch.hxx> #include <sfx2/childwin.hxx> #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include "workwin.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" using namespace ::com::sun::star::uno; @@ -63,7 +63,7 @@ class SfxModelessDialog_Impl : public SfxListener public: ByteString aWinState; SfxChildWindow* pMgr; - BOOL bConstructed; + sal_Bool bConstructed; void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); Timer aMoveTimer; @@ -87,7 +87,7 @@ class SfxFloatingWindow_Impl : public SfxListener public: ByteString aWinState; SfxChildWindow* pMgr; - BOOL bConstructed; + sal_Bool bConstructed; Timer aMoveTimer; void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -161,9 +161,6 @@ void SfxModalDialog::GetDialogData_Impl() void SfxModalDialog::init() { GetDialogData_Impl(); - aTimer.SetTimeout( 100 ); - aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) ); - aTimer.Start(); } // ----------------------------------------------------------------------- @@ -216,7 +213,6 @@ SfxModalDialog::~SfxModalDialog() { SetDialogData_Impl(); - aTimer.Stop(); delete pOutputSet; } @@ -229,11 +225,6 @@ void SfxModalDialog::CreateOutputItemSet( SfxItemPool& rPool ) // ----------------------------------------------------------------------- -IMPL_LINK( SfxModalDialog, TimerHdl_Impl, Timer*, EMPTYARG ) -{ - return 0L; -} - void SfxModalDialog::CreateOutputItemSet( const SfxItemSet& rSet ) { DBG_ASSERT( !pOutputSet, "Double creation of OutputSet!" ); @@ -284,7 +275,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange ) } } - pImp->bConstructed = TRUE; + pImp->bConstructed = sal_True; } ModelessDialog::StateChanged( nStateChange ); @@ -344,7 +335,7 @@ IMPL_LINK( SfxModelessDialog, TimerHdl, Timer*, EMPTYARG) { if ( !IsRollUp() ) aSize = GetSizePixel(); - ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE; + sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE; if ( GetStyle() & WB_SIZEABLE ) nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ); pImp->aWinState = GetWindowState( nMask ); @@ -363,10 +354,9 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx, pImp( new SfxModelessDialog_Impl ) { pImp->pMgr = pCW; - pImp->bConstructed = FALSE; - sal_uInt32 nId = GetHelpId(); - SetHelpId(0); - SetUniqueId( nId ); + pImp->bConstructed = sal_False; + SetUniqueId( GetHelpId() ); + SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); pImp->aMoveTimer.SetTimeout(50); @@ -383,10 +373,9 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx, pImp( new SfxModelessDialog_Impl ) { pImp->pMgr = pCW; - pImp->bConstructed = FALSE; - sal_uInt32 nId = GetHelpId(); - SetHelpId(0); - SetUniqueId( nId ); + pImp->bConstructed = sal_False; + SetUniqueId( GetHelpId() ); + SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); pImp->aMoveTimer.SetTimeout(50); @@ -409,15 +398,15 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt ) pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); Window* pWindow = rEvt.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( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId ); + if ( sHelpId.getLength() ) + SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); } else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) { @@ -511,15 +500,15 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt ) pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); Window* pWindow = rEvt.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( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId ); + if ( sHelpId.getLength() ) + SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); } else if ( rEvt.GetType() == EVENT_LOSEFOCUS ) { @@ -551,10 +540,9 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, pImp( new SfxFloatingWindow_Impl ) { pImp->pMgr = pCW; - pImp->bConstructed = FALSE; - sal_uInt32 nId = GetHelpId(); - SetHelpId(0); - SetUniqueId( nId ); + pImp->bConstructed = sal_False; + SetUniqueId( GetHelpId() ); + SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); pImp->aMoveTimer.SetTimeout(50); @@ -572,10 +560,9 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, pImp( new SfxFloatingWindow_Impl ) { pImp->pMgr = pCW; - pImp->bConstructed = FALSE; - sal_uInt32 nId = GetHelpId(); - SetHelpId(0); - SetUniqueId( nId ); + pImp->bConstructed = sal_False; + SetUniqueId( GetHelpId() ); + SetHelpId(""); if ( pBindinx ) pImp->StartListening( *pBindinx ); pImp->aMoveTimer.SetTimeout(50); @@ -663,7 +650,7 @@ IMPL_LINK( SfxFloatingWindow, TimerHdl, Timer*, EMPTYARG) { if ( !IsRollUp() ) aSize = GetSizePixel(); - ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE; + sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE; if ( GetStyle() & WB_SIZEABLE ) nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ); pImp->aWinState = GetWindowState( nMask ); @@ -680,7 +667,7 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange ) // FloatingWindows are not centered by default if ( pImp->aWinState.Len() ) SetWindowState( pImp->aWinState ); - pImp->bConstructed = TRUE; + pImp->bConstructed = sal_True; } FloatingWindow::StateChanged( nStateChange ); diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc index 08940391ac87..08940391ac87 100644..100755 --- a/sfx2/source/dialog/dialog.hrc +++ b/sfx2/source/dialog/dialog.hrc diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src index c39425510ae2..c39425510ae2 100644..100755 --- a/sfx2/source/dialog/dialog.src +++ b/sfx2/source/dialog/dialog.src diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 5ac198849cc2..52fbc865d4f1 100644..100755 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -117,26 +117,26 @@ bool operator==(const util::DateTime &i_rLeft, const util::DateTime &i_rRight) TYPEINIT1_AUTOFACTORY(SfxDocumentInfoItem, SfxStringItem); -const USHORT HI_NAME = 1; -const USHORT HI_TYPE = 2; -const USHORT HI_VALUE = 3; -const USHORT HI_ACTION = 4; +const sal_uInt16 HI_NAME = 1; +const sal_uInt16 HI_TYPE = 2; +const sal_uInt16 HI_VALUE = 3; +const sal_uInt16 HI_ACTION = 4; static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature"; //------------------------------------------------------------------------ -String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE ); -String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes ) +String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes = sal_True, sal_Bool bSmartExtraBytes = sal_False ); +String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartExtraBytes ) { String aUnitStr = ' '; aUnitStr += String( SfxResId(STR_BYTES) ); - ULONG nSize1 = nSize; - ULONG nSize2 = nSize1; - ULONG nMega = 1024 * 1024; - ULONG nGiga = nMega * 1024; + sal_uIntPtr nSize1 = nSize; + sal_uIntPtr nSize2 = nSize1; + sal_uIntPtr nMega = 1024 * 1024; + sal_uIntPtr nGiga = nMega * 1024; double fSize = nSize; int nDec = 0; - BOOL bGB = FALSE; + sal_Bool bGB = sal_False; if ( nSize1 >= 10000 && nSize1 < nMega ) { @@ -159,7 +159,7 @@ String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes ) nSize1 /= nGiga; aUnitStr = ' '; aUnitStr += String( SfxResId(STR_GB) ); - bGB = TRUE; + bGB = sal_True; fSize /= nGiga; nDec = 3; } @@ -199,7 +199,7 @@ String ConvertDateTime_Impl( const String& rName, const String pDelim ( DEFINE_CONST_UNICODE( ", ")); String aStr( rWrapper.getDate( aD ) ); aStr += pDelim; - aStr += rWrapper.getTime( aT, TRUE, FALSE ); + aStr += rWrapper.getTime( aT, sal_True, sal_False ); String aAuthor = rName; aAuthor.EraseLeadingChars(); if ( aAuthor.Len() ) @@ -510,13 +510,13 @@ void SfxDocumentInfoItem::AddCustomProperty( const ::rtl::OUString& sName, const m_aCustomProperties.push_back( pProp ); } -bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const +bool SfxDocumentInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const { String aValue; sal_Int32 nValue = 0; sal_Bool bValue = sal_False; - BOOL bIsInt = FALSE; - BOOL bIsString = FALSE; + sal_Bool bIsInt = sal_False; + sal_Bool bIsString = sal_False; nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) { @@ -530,31 +530,31 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const bValue = isAutoloadEnabled(); break; case MID_DOCINFO_AUTOLOADSECS: - bIsInt = TRUE; + bIsInt = sal_True; nValue = getAutoloadDelay(); break; case MID_DOCINFO_AUTOLOADURL: - bIsString = TRUE; + bIsString = sal_True; aValue = getAutoloadURL(); break; case MID_DOCINFO_DEFAULTTARGET: - bIsString = TRUE; + bIsString = sal_True; aValue = getDefaultTarget(); break; case MID_DOCINFO_DESCRIPTION: - bIsString = TRUE; + bIsString = sal_True; aValue = getDescription(); break; case MID_DOCINFO_KEYWORDS: - bIsString = TRUE; + bIsString = sal_True; aValue = getKeywords(); break; case MID_DOCINFO_SUBJECT: - bIsString = TRUE; + bIsString = sal_True; aValue = getSubject(); break; case MID_DOCINFO_TITLE: - bIsString = TRUE; + bIsString = sal_True; aValue = getTitle(); break; default: @@ -571,7 +571,7 @@ bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const return true; } -bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId ) +bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId ) { ::rtl::OUString aValue; sal_Int32 nValue=0; @@ -669,16 +669,16 @@ SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItem //------------------------------------------------------------------------ -BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) { // Pruefung, ob eine Aenderung vorliegt - const BOOL bTitleMod = aTitleEd.IsModified(); - const BOOL bThemeMod = aThemaEd.IsModified(); - const BOOL bKeywordsMod = aKeywordsEd.IsModified(); - const BOOL bCommentMod = aCommentEd.IsModified(); + const sal_Bool bTitleMod = aTitleEd.IsModified(); + const sal_Bool bThemeMod = aThemaEd.IsModified(); + const sal_Bool bKeywordsMod = aKeywordsEd.IsModified(); + const sal_Bool bCommentMod = aCommentEd.IsModified(); if( !( bTitleMod || bThemeMod || bKeywordsMod || bCommentMod ) ) { - return FALSE; + return sal_False; } // Erzeugung der Ausgabedaten @@ -690,7 +690,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) if ( pDlg ) pExSet = pDlg->GetExampleSet(); - if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) ) + if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) ) pInfo = pInfoItem; else if ( pItem ) pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem *)pItem ); @@ -698,7 +698,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) if ( !pInfo ) { DBG_ERRORFILE( "SfxDocumentDescPage::FillItemSet(): no item found" ); - return FALSE; + return sal_False; } if( bTitleMod ) @@ -723,7 +723,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) delete pInfo; } - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -737,13 +737,13 @@ void SfxDocumentDescPage::Reset(const SfxItemSet &rSet) aKeywordsEd.SetText( pInfoItem->getKeywords() ); aCommentEd.SetText( pInfoItem->getDescription() ); - SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); if ( pROItem && pROItem->GetValue() ) { - aTitleEd.SetReadOnly( TRUE ); - aThemaEd.SetReadOnly( TRUE ); - aKeywordsEd.SetReadOnly( TRUE ); - aCommentEd.SetReadOnly( TRUE ); + aTitleEd.SetReadOnly( sal_True ); + aThemaEd.SetReadOnly( sal_True ); + aKeywordsEd.SetReadOnly( sal_True ); + aCommentEd.SetReadOnly( sal_True ); } } @@ -824,10 +824,11 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet ) aUnknownSize ( SfxResId( STR_UNKNOWNSIZE ) ), aMultiSignedStr ( SfxResId( STR_MULTSIGNED ) ), - bEnableUseUserData ( FALSE ), - bHandleDelete ( FALSE ) + bEnableUseUserData ( sal_False ), + bHandleDelete ( sal_False ) { + aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME))); FreeResource(); ImplUpdateSignatures(); @@ -891,7 +892,7 @@ IMPL_LINK( SfxDocumentPage, DeleteHdl, PushButton*, EMPTYARG ) const Time aTime( 0 ); aTimeLogValFt.SetText( aLocaleWrapper.getDuration( aTime ) ); aDocNoValFt.SetText( '1' ); - bHandleDelete = TRUE; + bHandleDelete = sal_True; return 0; } @@ -954,16 +955,16 @@ SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet void SfxDocumentPage::EnableUseUserData() { - bEnableUseUserData = TRUE; + bEnableUseUserData = sal_True; aUseUserDataCB.Show(); aDeleteBtn.Show(); } //------------------------------------------------------------------------ -BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( !bHandleDelete && bEnableUseUserData && aUseUserDataCB.GetState() != aUseUserDataCB.GetSavedValue() && @@ -972,13 +973,13 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) ) + if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) ) { SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem; - BOOL bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() ); + sal_Bool bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() ); pInfoItem->SetUseUserData( bUseData ); rSet.Put( SfxDocumentInfoItem( *pInfoItem ) ); - bRet = TRUE; + bRet = sal_True; } } @@ -986,10 +987,10 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) { const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) ) + if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) ) { SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem; - BOOL bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked(); + sal_Bool bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked(); SfxDocumentInfoItem newItem( *pInfoItem ); newItem.resetUserData( bUseAuthor ? SvtUserOptions().GetFullName() @@ -997,22 +998,22 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) pInfoItem->SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() ); newItem.SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() ); - newItem.SetDeleteUserData( TRUE ); + newItem.SetDeleteUserData( sal_True ); rSet.Put( newItem ); - bRet = TRUE; + bRet = sal_True; } } if ( aNameED.IsModified() && aNameED.GetText().Len() ) { rSet.Put( SfxStringItem( ID_FILETP_TITLE, aNameED.GetText() ) ); - bRet = TRUE; + bRet = sal_True; } - if ( /* aReadOnlyCB.IsModified() */ TRUE ) + if ( /* aReadOnlyCB.IsModified() */ sal_True ) { rSet.Put( SfxBoolItem( ID_FILETP_READONLY, aReadOnlyCB.IsChecked() ) ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1042,7 +1043,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) String aFactory( aFile ); if ( aFile.Len() > 2 && aFile.GetChar(0) == '[' ) { - USHORT nPos = aFile.Search( ']' ); + sal_uInt16 nPos = aFile.Search( ']' ); aFactory = aFile.Copy( 1, nPos-1 ); aFile = aFile.Copy( nPos+1 ); } @@ -1050,13 +1051,13 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) // determine name String aName; const SfxPoolItem* pItem = 0; - if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, FALSE, &pItem ) ) + if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, sal_False, &pItem ) ) { INetURLObject aURL(aFile); aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET ); if ( !aName.Len() || aURL.GetProtocol() == INET_PROT_PRIVATE ) aName = String( SfxResId( STR_NONAME ) ); - aNameED.SetReadOnly( TRUE ); + aNameED.SetReadOnly( sal_True ); } else { @@ -1067,7 +1068,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) aNameED.ClearModifyFlag(); // determine RO-Flag - if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, FALSE, &pItem ) + if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, sal_False, &pItem ) || !pItem ) aReadOnlyCB.Hide(); else @@ -1078,7 +1079,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) aURL.SetSmartProtocol( INET_PROT_FILE ); aURL.SetSmartURL( aFactory); const String& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE ); - aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, TRUE ) ); + aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, sal_True ) ); // determine size and type String aSizeText( aUnknownSize ); @@ -1131,12 +1132,12 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) TriState eState = (TriState)m_bUseUserData; if ( STATE_DONTKNOW == eState ) - aUseUserDataCB.EnableTriState( TRUE ); + aUseUserDataCB.EnableTriState( sal_True ); aUseUserDataCB.SetState( eState ); aUseUserDataCB.SaveValue(); aUseUserDataCB.Enable( bEnableUseUserData ); - bHandleDelete = FALSE; + bHandleDelete = sal_False; aDeleteBtn.Enable( bEnableUseUserData ); } @@ -1219,30 +1220,30 @@ void SfxInternetPage::ChangeState( STATE eNewState ) switch( eState ) { case S_Init: - EnableNoUpdate( TRUE ); - EnableReload( FALSE ); - EnableForward( FALSE ); + EnableNoUpdate( sal_True ); + EnableReload( sal_False ); + EnableForward( sal_False ); break; case S_NoUpdate: - EnableNoUpdate( FALSE ); + EnableNoUpdate( sal_False ); if( eNewState == S_Reload ) - EnableReload( TRUE ); + EnableReload( sal_True ); else - EnableForward( TRUE ); + EnableForward( sal_True ); break; case S_Reload: - EnableReload( FALSE ); + EnableReload( sal_False ); if( eNewState == S_NoUpdate ) - EnableNoUpdate( TRUE ); + EnableNoUpdate( sal_True ); else - EnableForward( TRUE ); + EnableForward( sal_True ); break; case S_Forward: - EnableForward( FALSE ); + EnableForward( sal_False ); if( eNewState == S_NoUpdate ) - EnableNoUpdate( TRUE ); + EnableNoUpdate( sal_True ); else - EnableReload( TRUE ); + EnableReload( sal_True ); break; default: OSL_FAIL( "*SfxInternetPage::SetState(): unhandled state!" ); @@ -1253,7 +1254,7 @@ void SfxInternetPage::ChangeState( STATE eNewState ) //------------------------------------------------------------------------ -void SfxInternetPage::EnableNoUpdate( BOOL bEnable ) +void SfxInternetPage::EnableNoUpdate( sal_Bool bEnable ) { if( bEnable ) aRBNoAutoUpdate.Check(); @@ -1261,7 +1262,7 @@ void SfxInternetPage::EnableNoUpdate( BOOL bEnable ) //------------------------------------------------------------------------ -void SfxInternetPage::EnableReload( BOOL bEnable ) +void SfxInternetPage::EnableReload( sal_Bool bEnable ) { aFTEvery.Enable( bEnable ); aNFReload.Enable( bEnable ); @@ -1273,7 +1274,7 @@ void SfxInternetPage::EnableReload( BOOL bEnable ) //------------------------------------------------------------------------ -void SfxInternetPage::EnableForward( BOOL bEnable ) +void SfxInternetPage::EnableForward( sal_Bool bEnable ) { aFTAfter.Enable( bEnable ); aNFAfter.Enable( bEnable ); @@ -1341,7 +1342,7 @@ IMPL_LINK( SfxInternetPage, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG ) //------------------------------------------------------------------------ -BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet ) { const SfxPoolItem* pItem = NULL; SfxDocumentInfoItem* pInfo = NULL; @@ -1351,7 +1352,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet ) if( pDlg ) pExSet = pDlg->GetExampleSet(); - if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) ) + if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) ) pInfo = pInfoItem; else if ( pItem ) pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem*)pItem ); @@ -1359,33 +1360,33 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet ) if ( !pInfo ) { DBG_ERRORFILE( "SfxInternetPage::FillItemSet(): no item found" ); - return FALSE; + return sal_False; } DBG_ASSERT( eState != S_Init, "*SfxInternetPage::FillItemSet(): state init is not acceptable at this point!" ); - BOOL bEnableReload = FALSE; + sal_Bool bEnableReload = sal_False; ::std::auto_ptr< String > aURL( NULL ); ::std::auto_ptr< String > aFrame( NULL ); - ULONG nDelay = 0; + sal_uIntPtr nDelay = 0; switch( eState ) { case S_NoUpdate: break; case S_Reload: - bEnableReload = TRUE; + bEnableReload = sal_True; aURL = ::std::auto_ptr< String >( new String() ); aFrame = ::std::auto_ptr< String >( new String() ); - nDelay = static_cast<ULONG>(aNFReload.GetValue()); + nDelay = static_cast<sal_uIntPtr>(aNFReload.GetValue()); break; case S_Forward: DBG_ASSERT( aEDForwardURL.GetText().Len(), "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!" ); - bEnableReload = TRUE; + bEnableReload = sal_True; aURL = ::std::auto_ptr< String >( new String( URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aEDForwardURL.GetText(), URIHelper::GetMaybeFileHdl(), true ) ) ); aFrame = ::std::auto_ptr< String >( new String( aCBFrame.GetText() ) ); - nDelay = static_cast<ULONG>(aNFAfter.GetValue()); + nDelay = static_cast<sal_uIntPtr>(aNFAfter.GetValue()); break; default: break; @@ -1403,7 +1404,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( *pInfo ); if( pInfo != pInfoItem ) delete pInfo; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -1418,7 +1419,7 @@ SfxTabPage *SfxInternetPage::Create( Window* pParent, const SfxItemSet& rItemSet void SfxInternetPage::Reset( const SfxItemSet& rSet ) { pInfoItem = &( SfxDocumentInfoItem& ) rSet.Get( SID_DOCINFO ); - SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE ); + SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False ); DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" ); if ( pURLItem ) aBaseURL = pURLItem->GetValue(); @@ -1445,7 +1446,7 @@ void SfxInternetPage::Reset( const SfxItemSet& rSet ) ChangeState( eNewState ); - SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); if ( pROItem && pROItem->GetValue() ) { aRBNoAutoUpdate.Disable(); @@ -1496,7 +1497,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, &(const SfxDocumentInfoItem &)rItemSet.Get( SID_DOCINFO ); #ifdef DBG_UTIL - SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE ); + SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False ); DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" ); #endif @@ -1504,23 +1505,10 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, const SfxPoolItem* pItem = 0; String aTitle( GetText() ); if ( SFX_ITEM_SET != - rItemSet.GetItemState( SID_EXPLORER_PROPS_START, FALSE, &pItem ) ) + rItemSet.GetItemState( SID_EXPLORER_PROPS_START, sal_False, &pItem ) ) { // Dateiname String aFile( pInfoItem->GetValue() ); -#ifdef WIN - if ( aFile.Len() <= 8 ) - { - String sTmp( SfxResId( STR_NONAME ) ); - USHORT nLen = Min( (USHORT)8, sTmp.Len() ); - - if ( sTmp.Copy( 0, nLen ).Lower() == - aFile.Copy( 0, nLen ).Lower() ) - { - aFile = pInfoItem->GetValue(); - } - } -#endif INetURLObject aURL; aURL.SetSmartProtocol( INET_PROT_FILE ); @@ -1554,7 +1542,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent, // ----------------------------------------------------------------------- -void SfxDocumentInfoDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if ( TP_DOCINFODOC == nId ) ( (SfxDocumentPage&)rPage ).EnableUseUserData(); @@ -1792,6 +1780,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) ); m_aBoxLoseFocusTimer.SetTimeout( 300 ); m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) ); + + ResMgr* pResMgr = rResId.GetResMgr(); + m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) ); + m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) ); + m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) ); } CustomPropertiesWindow::~CustomPropertiesWindow() @@ -1923,7 +1916,7 @@ bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const { sal_uInt32 nTemp = nIndex; bIsValid = const_cast< SvNumberFormatter& >( - m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != FALSE; + m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != sal_False; if ( bIsValid && nTemp != nIndex ) // sValue is a number but the format doesn't match the index bIsValid = false; @@ -1974,7 +1967,7 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, &m_aRemoveButton, NULL }; Window** pCurrent = pWindows; - USHORT nPos = 0; + sal_uInt16 nPos = 0; while ( *pCurrent ) { Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); @@ -2015,9 +2008,9 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa ( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height(); } -USHORT CustomPropertiesWindow::GetVisibleLineCount() const +sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const { - USHORT nCount = 0; + sal_uInt16 nCount = 0; std::vector< CustomPropertyLine* >::const_iterator pIter; for ( pIter = m_aCustomPropertiesLines.begin(); pIter != m_aCustomPropertiesLines.end(); ++pIter ) @@ -2038,6 +2031,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) //add lose focus handlers of date/time fields pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) ); + + pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName()); + pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName()); + pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName()); + long nPos = GetVisibleLineCount() * GetLineHeight(); m_aCustomPropertiesLines.push_back( pNewLine ); Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, @@ -2228,7 +2226,7 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c double nValue = 0; sal_uInt32 nIndex = const_cast< SvNumberFormatter& >( m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM ); - BOOL bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ). + sal_Bool bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ). IsNumberFormat( pLine->m_aValueEdit.GetText(), nIndex, nValue ); if ( bIsNum ) aPropertiesSeq[i].Value <<= makeAny( nValue ); @@ -2357,9 +2355,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny, SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) : SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ), - m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ), m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ), - m_aAddBtn ( this, SfxResId( BTN_ADD ) ) + m_aAddBtn ( this, SfxResId( BTN_ADD ) ), + m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ) { FreeResource(); @@ -2374,9 +2372,9 @@ IMPL_LINK( SfxCustomPropertiesPage, AddHdl, PushButton*, EMPTYARG ) return 0; } -BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SfxPoolItem* pItem = NULL; SfxDocumentInfoItem* pInfo = NULL; bool bMustDelete = false; @@ -2384,7 +2382,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) if ( GetTabDialog() && GetTabDialog()->GetExampleSet() ) { if( SFX_ITEM_SET != - GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, TRUE, &pItem ) ) + GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, sal_True, &pItem ) ) pInfo = &( SfxDocumentInfoItem& )rSet.Get( SID_DOCINFO ); else { @@ -2405,7 +2403,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) } } - bModified = TRUE; //!!! + bModified = sal_True; //!!! if ( bModified ) rSet.Put( *pInfo ); if ( bMustDelete ) diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc index 5453e3606026..43bd848844a0 100644..100755 --- a/sfx2/source/dialog/dinfdlg.hrc +++ b/sfx2/source/dialog/dinfdlg.hrc @@ -153,6 +153,10 @@ #define STR_HEADER_VALUE 92 #define STR_HEADER_ACTION 93 +//IAccessibility2 Implementation 2009----- +#define EDIT_FILE_NAME 94 +//-----IAccessibility2 Implementation 2009 + #define PB_OK 100 #define PB_CANCEL 101 #define PB_HELP 102 diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index ddc76d54ce19..fdaa47543a2a 100755 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -53,6 +53,7 @@ TabPage TP_DOCINFODESC }; Edit ED_TITLE { + HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_TITLE"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 6 ) ; Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -68,6 +69,7 @@ TabPage TP_DOCINFODESC }; Edit ED_THEMA { + HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_THEMA"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 21 ) ; Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -83,6 +85,7 @@ TabPage TP_DOCINFODESC }; Edit ED_KEYWORDS { + HelpID = "sfx2:Edit:TP_DOCINFODESC:ED_KEYWORDS"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 36 ) ; Size = MAP_APPFONT ( 184 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -98,6 +101,7 @@ TabPage TP_DOCINFODESC }; MultiLineEdit ED_COMMENT { + HelpID = "sfx2:MultiLineEdit:TP_DOCINFODESC:ED_COMMENT"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 51 ) ; Size = MAP_APPFONT ( 184 , 128 ) ; @@ -121,6 +125,7 @@ TabPage TP_DOCINFODOC }; Edit ED_FILE_NAME { + HelpID = "sfx2:Edit:TP_DOCINFODOC:ED_FILE_NAME"; Pos = MAP_APPFONT ( 54 , 12 ) ; Size = MAP_APPFONT ( 200 , RSC_CD_TEXTBOX_HEIGHT ) ; Border = TRUE ; @@ -138,11 +143,13 @@ TabPage TP_DOCINFODOC }; Edit FT_FILE_SHOW_TYP { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_TYP"; Pos = MAP_APPFONT ( 78 , 37 ) ; Size = MAP_APPFONT ( 106 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; CheckBox CB_FILE_READONLY { + HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_FILE_READONLY"; Pos = MAP_APPFONT ( 163 , 37 ) ; Size = MAP_APPFONT ( 91 , RSC_CD_CHECKBOX_HEIGHT ) ; Text [ en-US ] = "~Read-only" ; @@ -155,6 +162,7 @@ TabPage TP_DOCINFODOC }; Edit FT_FILE_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_VAL"; Pos = MAP_APPFONT ( 78 , 49 ) ; Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -166,6 +174,7 @@ TabPage TP_DOCINFODOC }; Edit FT_FILE_SHOW_SIZE { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_FILE_SHOW_SIZE"; Pos = MAP_APPFONT ( 78 , 61 ) ; Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -182,6 +191,7 @@ TabPage TP_DOCINFODOC }; Edit FT_CREATE_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CREATE_VAL"; Pos = MAP_APPFONT ( 78 , 80 ) ; Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -193,6 +203,7 @@ TabPage TP_DOCINFODOC }; Edit FT_CHANGE_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_CHANGE_VAL"; Pos = MAP_APPFONT ( 78 , 92 ) ; Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -204,11 +215,13 @@ TabPage TP_DOCINFODOC }; Edit FT_SIGNED_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_SIGNED_VAL"; Pos = MAP_APPFONT ( 78 , 104 ) ; Size = MAP_APPFONT ( 123 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; PushButton BTN_SIGNATURE { + HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_SIGNATURE"; Pos = MAP_APPFONT ( 204 , 101 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; Text [ en-US ] = "Digital Signature..."; @@ -225,6 +238,7 @@ TabPage TP_DOCINFODOC }; Edit FT_PRINT_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_PRINT_VAL"; Pos = MAP_APPFONT ( 78 , 116 ) ; Size = MAP_APPFONT ( 176 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -236,6 +250,7 @@ TabPage TP_DOCINFODOC }; Edit FT_TIMELOG_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TIMELOG_VAL"; Pos = MAP_APPFONT ( 78 , 128 ) ; Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -247,11 +262,13 @@ TabPage TP_DOCINFODOC }; Edit FT_DOCNO_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_DOCNO_VAL"; Pos = MAP_APPFONT ( 78 , 140 ) ; Size = MAP_APPFONT ( 30 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; PushButton BTN_DELETE { + HelpID = "sfx2:PushButton:TP_DOCINFODOC:BTN_DELETE"; Pos = MAP_APPFONT ( 204 , 150 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; Hide = TRUE; @@ -259,6 +276,7 @@ TabPage TP_DOCINFODOC }; CheckBox CB_USE_USERDATA { + HelpID = "sfx2:CheckBox:TP_DOCINFODOC:CB_USE_USERDATA"; Pos = MAP_APPFONT ( 6 , 152 ) ; Size = MAP_APPFONT ( 192 , RSC_CD_CHECKBOX_HEIGHT ) ; Hide = TRUE; @@ -277,6 +295,7 @@ TabPage TP_DOCINFODOC }; Edit FT_TEMPL_VAL { + HelpID = "sfx2:Edit:TP_DOCINFODOC:FT_TEMPL_VAL"; Pos = MAP_APPFONT ( 78 , 172 ) ; Size = MAP_APPFONT ( 180 , RSC_CD_FIXEDTEXT_HEIGHT ) ; }; @@ -284,6 +303,10 @@ TabPage TP_DOCINFODOC { Text [ en-US ] = "unknown" ; }; + String EDIT_FILE_NAME + { + Text [ en-US ] = "File Name" ; + }; }; // TP_DOCINFOUSER -------------------------------------------------------- @@ -301,6 +324,7 @@ TabPage TP_DOCINFOUSER }; Edit ED_INFO1 { + HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO1"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -314,6 +338,7 @@ TabPage TP_DOCINFOUSER }; Edit ED_INFO2 { + HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO2"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 43 ) ; Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -327,6 +352,7 @@ TabPage TP_DOCINFOUSER }; Edit ED_INFO3 { + HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO3"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 69 ) ; Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -340,6 +366,7 @@ TabPage TP_DOCINFOUSER }; Edit ED_INFO4 { + HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO4"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 95 ) ; Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -347,6 +374,7 @@ TabPage TP_DOCINFOUSER }; PushButton BTN_EDITLABEL { + HelpID = "sfx2:PushButton:TP_DOCINFOUSER:BTN_EDITLABEL"; Pos = MAP_APPFONT ( 194 , 165 ) ; Size = MAP_APPFONT ( 60 , RSC_CD_PUSHBUTTON_HEIGHT ) ; Text [ en-US ] = "~Info fields..." ; @@ -362,6 +390,7 @@ TabPage TP_DOCINFORELOAD Size = MAP_APPFONT ( 260 , 185 ) ; RadioButton RB_NOAUTOUPDATE { + HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_NOAUTOUPDATE"; TabStop = TRUE ; Pos = MAP_APPFONT( COL_0 , ROW_0 ) ; Size = MAP_APPFONT( COL_7 - COL_1 , RSC_CD_RADIOBUTTON_HEIGHT ) ; @@ -370,6 +399,7 @@ TabPage TP_DOCINFORELOAD RadioButton RB_RELOADUPDATE { + HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_RELOADUPDATE"; TabStop = TRUE ; Pos = MAP_APPFONT( COL_0, ROW_1 ) ; Size = MAP_APPFONT( COL_7 - COL_1, RSC_CD_RADIOBUTTON_HEIGHT ) ; @@ -383,6 +413,7 @@ TabPage TP_DOCINFORELOAD }; NumericField ED_RELOAD { + HelpID = "sfx2:NumericField:TP_DOCINFORELOAD:ED_RELOAD"; Border = TRUE ; Pos = MAP_APPFONT ( COL_2 , ROW_2 - ROWDIFF_FT_EDTFLD ) ; Size = MAP_APPFONT ( WIDTH_2 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -403,6 +434,7 @@ TabPage TP_DOCINFORELOAD RadioButton RB_FORWARDUPDATE { + HelpID = "sfx2:RadioButton:TP_DOCINFORELOAD:RB_FORWARDUPDATE"; TabStop = TRUE ; Pos = MAP_APPFONT( COL_0, ROW_3 ) ; Size = MAP_APPFONT( COL_7 - COL_1, RSC_CD_RADIOBUTTON_HEIGHT ) ; @@ -416,6 +448,7 @@ TabPage TP_DOCINFORELOAD }; NumericField ED_FORWARD { + HelpID = "sfx2:NumericField:TP_DOCINFORELOAD:ED_FORWARD"; Border = TRUE ; Pos = MAP_APPFONT ( COL_2 , ROW_4 - ROWDIFF_FT_EDTFLD ) ; Size = MAP_APPFONT ( WIDTH_2 , RSC_CD_TEXTBOX_HEIGHT ) ; @@ -441,12 +474,14 @@ TabPage TP_DOCINFORELOAD }; Edit ED_URL { + HelpID = "sfx2:Edit:TP_DOCINFORELOAD:ED_URL"; Border = TRUE ; Pos = MAP_APPFONT ( COL_2 , ROW_5 - ROWDIFF_FT_EDTFLD ) ; Size = MAP_APPFONT ( COL_5 - COL_2 , RSC_CD_TEXTBOX_HEIGHT ) ; }; PushButton PB_BROWSEURL { + HelpID = "sfx2:PushButton:TP_DOCINFORELOAD:PB_BROWSEURL"; Pos = MAP_APPFONT ( COL_6 , ROW_5 - ROWDIFF_FT_EDTFLD ) ; Size = MAP_APPFONT ( COL_7 - COL_6 , RSC_CD_PUSHBUTTON_HEIGHT ) ; Text = "..." ; @@ -459,6 +494,7 @@ TabPage TP_DOCINFORELOAD }; ComboBox CB_FRAME { + HelpID = "sfx2:ComboBox:TP_DOCINFORELOAD:CB_FRAME"; Pos = MAP_APPFONT ( COL_2 , ROW_6 - ROWDIFF_FT_EDTFLD ) ; Size = MAP_APPFONT ( COL_7 - COL_2 , RSC_CD_DROPDOWN_HEIGHT * 10 ) ; DropDown = TRUE ; @@ -524,6 +560,7 @@ TabPage TP_CUSTOMPROPERTIES }; PushButton BTN_ADD { + HelpID = "sfx2:PushButton:TP_CUSTOMPROPERTIES:BTN_ADD"; Pos = MAP_APPFONT( 204 , 165 ); Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); Text [ en-US ] = "~Add"; @@ -751,6 +788,7 @@ ModalDialog RID_EDIT_DURATIONS }; CheckBox CB_NEGATIVE { + HelpID = "sfx2:CheckBox:RID_EDIT_DURATIONS:CB_NEGATIVE"; Pos = MAP_APPFONT ( 6 , 21 ) ; Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "~Negative" ; @@ -764,6 +802,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_YEAR { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_YEAR"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 36 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -784,6 +823,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_MONTH { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MONTH"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 50 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -804,6 +844,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_DAY { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_DAY"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 64 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -824,6 +865,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_HOUR { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_HOUR"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 78 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -844,6 +886,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_MINUTE { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MINUTE"; Border = TRUE ; Pos = MAP_APPFONT ( 70, 92) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -864,6 +907,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_SECOND { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_SECOND"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 106 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; @@ -884,6 +928,7 @@ ModalDialog RID_EDIT_DURATIONS }; NumericField ED_MSECOND { + HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MSECOND"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 120 ) ; Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ; diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx index 7496b7929485..93ee933d48bf 100644..100755 --- a/sfx2/source/dialog/dinfedt.cxx +++ b/sfx2/source/dialog/dinfedt.cxx @@ -29,8 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include "dinfedt.hxx" -#include "sfxresid.hxx" +#include "sfx2/dinfedt.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfx.hrc> #include "dinfedt.hrc" diff --git a/sfx2/source/dialog/dinfedt.hrc b/sfx2/source/dialog/dinfedt.hrc index ef52362af2cb..ef52362af2cb 100644..100755 --- a/sfx2/source/dialog/dinfedt.hrc +++ b/sfx2/source/dialog/dinfedt.hrc diff --git a/sfx2/source/dialog/dinfedt.src b/sfx2/source/dialog/dinfedt.src index 7f4875487536..110dccf11c40 100644..100755 --- a/sfx2/source/dialog/dinfedt.src +++ b/sfx2/source/dialog/dinfedt.src @@ -45,24 +45,28 @@ ModalDialog DLG_DOCINFO_EDT }; Edit ED_INFO1 { + HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO1"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; }; Edit ED_INFO2 { + HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO2"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 29 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; }; Edit ED_INFO3 { + HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO3"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 44 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; }; Edit ED_INFO4 { + HelpID = "sfx2:Edit:DLG_DOCINFO_EDT:ED_INFO4"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 59 ) ; Size = MAP_APPFONT ( 86 , 12 ) ; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 8c60f3376da9..58d09bf48a53 100644..100755 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -45,8 +45,9 @@ #include "workwin.hxx" #include "splitwin.hxx" #include <sfx2/viewsh.hxx> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/objsh.hxx> +#include <sfx2/msgpool.hxx> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -75,7 +76,7 @@ class SfxTitleDockingWindow; class SfxTitleDockingWindow : public SfxDockingWindow { Window* m_pWrappedWindow; - USHORT m_nID; + sal_uInt16 m_nID; public: SfxTitleDockingWindow( @@ -83,7 +84,7 @@ public: SfxChildWindow* pChildWin , Window* pParent , WinBits nBits, - USHORT nID); + sal_uInt16 nID); virtual ~SfxTitleDockingWindow(); Window* GetWrappedWindow() const { return m_pWrappedWindow; } @@ -93,7 +94,7 @@ public: virtual long Notify( NotifyEvent& rNEvt ); virtual void Resize(); virtual void Resizing( Size& rSize ); - virtual BOOL Close(); + virtual sal_Bool Close(); }; namespace @@ -135,7 +136,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >& } SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd , - USHORT nId , + sal_uInt16 nId , SfxBindings* pBindings , SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentWnd , nId ) @@ -243,7 +244,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd , pWindow->SetOutputSizePixel( Size( 270, 240 ) ); ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo ); - SetHideNotDelete( TRUE ); + SetHideNotDelete( sal_True ); } SfxChildWindow* SfxDockingWrapper::CreateImpl( @@ -264,7 +265,7 @@ void SfxDockingWrapper::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal // pre-register a couple of docking windows for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ ) { - USHORT nID = USHORT(SID_DOCKWIN_START+i); + sal_uInt16 nID = sal_uInt16(SID_DOCKWIN_START+i); SfxChildWinFactory *pFact = new SfxChildWinFactory( SfxDockingWrapper::CreateImpl, nID, 0xffff ); pFact->aInfo.nFlags |= nFlags; pFact->aInfo.bVisible = bVis; @@ -283,7 +284,7 @@ SfxTitleDockingWindow::SfxTitleDockingWindow( SfxBindings* pBind , SfxChildWindow* pChildWin , Window* pParent , WinBits nBits, - USHORT nID ) : + sal_uInt16 nID ) : SfxDockingWindow( pBind , pChildWin , pParent , @@ -343,7 +344,7 @@ void SfxTitleDockingWindow::Resizing( Size &rSize ) m_pWrappedWindow->SetSizePixel( GetOutputSizePixel() ); } -BOOL SfxTitleDockingWindow::Close() +sal_Bool SfxTitleDockingWindow::Close() { return SfxDockingWindow::Close(); } @@ -353,9 +354,9 @@ namespace struct ChildrenRegisteredMap : public rtl::Static< bool, ChildrenRegisteredMap > {}; } -static bool lcl_checkDockingWindowID( USHORT nID ) +static bool lcl_checkDockingWindowID( sal_uInt16 nID ) { - if (nID < SID_DOCKWIN_START || nID >= USHORT(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS)) + if (nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS)) return false; else return true; @@ -393,7 +394,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame:: void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName ) { SolarMutexGuard aGuard; - USHORT nID = USHORT(rDockingWindowName.toInt32()); + sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32()); // Check the range of the provided ID otherwise nothing will happen if ( lcl_checkDockingWindowID( nID )) @@ -420,7 +421,7 @@ bool SAL_CALL IsDockingWindowVisible( const uno::Reference< frame::XFrame >& rFr { SolarMutexGuard aGuard; - USHORT nID = USHORT(rDockingWindowName.toInt32()); + sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32()); // Check the range of the provided ID otherwise nothing will happen if ( lcl_checkDockingWindowID( nID )) @@ -443,24 +444,24 @@ friend class SfxDockingWindow; SfxChildAlignment eLastAlignment; SfxChildAlignment eDockAlignment; - BOOL bConstructed; + sal_Bool bConstructed; Size aMinSize; SfxSplitWindow* pSplitWin; - BOOL bSplitable; + sal_Bool bSplitable; Timer aMoveTimer; // Folgende members sind nur in der Zeit von StartDocking bis EndDocking // g"ultig: - BOOL bEndDocked; + sal_Bool bEndDocked; Size aSplitSize; long nHorizontalSize; long nVerticalSize; - USHORT nLine; - USHORT nPos; - USHORT nDockLine; - USHORT nDockPos; - BOOL bNewLine; - BOOL bDockingPrevented; + sal_uInt16 nLine; + sal_uInt16 nPos; + sal_uInt16 nDockLine; + sal_uInt16 nDockPos; + sal_Bool bNewLine; + sal_Bool bDockingPrevented; ByteString aWinState; SfxChildAlignment GetLastAlignment() const @@ -526,7 +527,7 @@ void SfxDockingWindow::Resize() //------------------------------------------------------------------------- -BOOL SfxDockingWindow::PrepareToggleFloatingMode() +sal_Bool SfxDockingWindow::PrepareToggleFloatingMode() /* [Beschreibung] @@ -539,24 +540,24 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode() { if (!pImp->bConstructed) - return TRUE; + return sal_True; if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr ) - return FALSE; + return sal_False; if ( pImp->bDockingPrevented ) - return FALSE; + return sal_False; if (!IsFloatingMode()) { // Testen, ob FloatingMode erlaubt ist if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT ) - return FALSE; + return sal_False; if ( pImp->pSplitWin ) { // Das DockingWindow sitzt in einem SplitWindow und wird abgerissen - pImp->pSplitWin->RemoveWindow(this/*, FALSE*/); + pImp->pSplitWin->RemoveWindow(this/*, sal_False*/); pImp->pSplitWin = 0; } } @@ -566,15 +567,15 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode() // Testen, ob es erlaubt ist, anzudocken if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT) - return FALSE; + return sal_False; // Testen, ob das Workwindow gerade ein Andocken erlaubt SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } //------------------------------------------------------------------------- @@ -692,13 +693,13 @@ void SfxDockingWindow::StartDocking() pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos); pImp->nDockLine = pImp->nLine; pImp->nDockPos = pImp->nPos; - pImp->bNewLine = FALSE; + pImp->bNewLine = sal_False; } } //------------------------------------------------------------------------- -BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) /* [Beschreibung] @@ -709,7 +710,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) */ { if ( Application::IsInModalMode() ) - return TRUE; + return sal_True; if ( !pImp->bConstructed || !pMgr ) { @@ -719,16 +720,16 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); if ( pImp->bDockingPrevented || !pWorkWin->IsInternalDockingAllowed() ) - return FALSE; + return sal_False; - BOOL bFloatMode = FALSE; + sal_Bool bFloatMode = sal_False; if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() ) { // Maus innerhalb OuterRect : Alignment und Rectangle berechnen SfxChildAlignment eAlign = CalcAlignment(rPos, rRect); if (eAlign == SFX_ALIGN_NOALIGNMENT) - bFloatMode = TRUE; + bFloatMode = sal_True; pImp->SetDockAlignment(eAlign); } else @@ -736,8 +737,8 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) // Maus nicht innerhalb OuterRect : muss FloatingWindow sein // Ist das erlaubt ? if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT) - return FALSE; - bFloatMode = TRUE; + return sal_False; + bFloatMode = sal_True; if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() ) { // wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das @@ -801,7 +802,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) //------------------------------------------------------------------------- -void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) /* [Beschreibung] @@ -815,7 +816,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) return; SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); - BOOL bReArrange = FALSE; + sal_Bool bReArrange = sal_False; if ( pImp->bSplitable ) { // Wenn sich das Alignment "andert und das Fenster befindet sich @@ -823,7 +824,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) // Wenn neu angedockt wird, machen PrepareToggleFloatingMode() // und ToggleFloatingMode() das Ummelden. if ( !bFloatMode ) - bReArrange = TRUE; + bReArrange = sal_True; } if ( bReArrange ) @@ -833,7 +834,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) // Vor dem Show() mu\s das Ummelden passiert sein, daher kann nicht // die Basisklasse gerufen werden if ( IsFloatingMode() || !pImp->bSplitable ) - Show( FALSE, SHOW_NOFOCUSCHANGE ); + Show( sal_False, SHOW_NOFOCUSCHANGE ); // Die Gr"o\se f"urs Toggeln setzen pImp->aSplitSize = rRect.GetSize(); @@ -841,11 +842,11 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) { SetFloatingMode( bFloatMode ); if ( IsFloatingMode() || !pImp->bSplitable ) - Show( TRUE, SHOW_NOFOCUSCHANGE ); + Show( sal_True, SHOW_NOFOCUSCHANGE ); } else { - pImp->pSplitWin->RemoveWindow(this,FALSE); + pImp->pSplitWin->RemoveWindow(this,sal_False); pImp->nLine = pImp->nDockLine; pImp->nPos = pImp->nDockPos; pImp->pSplitWin->ReleaseWindow_Impl(this); @@ -865,9 +866,9 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) } else { - pImp->bEndDocked = TRUE; + pImp->bEndDocked = sal_True; DockingWindow::EndDocking(rRect, bFloatMode); - pImp->bEndDocked = FALSE; + pImp->bEndDocked = sal_False; } SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() ); @@ -906,24 +907,36 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, */ { - ULONG nId = GetHelpId(); - if ( !nId && pCW ) - nId = pCW->GetType(); - SetHelpId( 0 ); - SetUniqueId( nId ); + if ( GetHelpId().getLength() ) + { + SetUniqueId( GetHelpId() ); + SetHelpId(""); + } + else + { + SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame(); + SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool(); + const SfxSlot* pSlot = pSlotPool->GetSlot( pCW->GetType() ); + if ( pSlot ) + { + rtl::OString aCmd("SFXDOCKINGWINDOW_"); + aCmd += pSlot->GetUnoName(); + SetUniqueId( aCmd ); + } + } pImp = new SfxDockingWindow_Impl; - pImp->bConstructed = FALSE; + pImp->bConstructed = sal_False; pImp->pSplitWin = 0; - pImp->bEndDocked = FALSE; - pImp->bDockingPrevented = FALSE; + pImp->bEndDocked = sal_False; + pImp->bDockingPrevented = sal_False; - pImp->bSplitable = TRUE; + pImp->bSplitable = sal_True; // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt pImp->nLine = pImp->nDockLine = 0; pImp->nPos = pImp->nDockPos = 0; - pImp->bNewLine = FALSE; + pImp->bNewLine = sal_False; pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT); pImp->aMoveTimer.SetTimeout(50); pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl)); @@ -945,22 +958,36 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, */ { - ULONG nId = GetHelpId(); - SetHelpId(0); - SetUniqueId( nId ); + if ( GetHelpId().getLength() ) + { + SetUniqueId( GetHelpId() ); + SetHelpId(""); + } + else + { + SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame(); + SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool(); + const SfxSlot* pSlot = pSlotPool->GetSlot( pCW->GetType() ); + if ( pSlot ) + { + rtl::OString aCmd("SFXDOCKINGWINDOW_"); + aCmd += pSlot->GetUnoName(); + SetUniqueId( aCmd ); + } + } pImp = new SfxDockingWindow_Impl; - pImp->bConstructed = FALSE; + pImp->bConstructed = sal_False; pImp->pSplitWin = 0; - pImp->bEndDocked = FALSE; - pImp->bDockingPrevented = FALSE; + pImp->bEndDocked = sal_False; + pImp->bDockingPrevented = sal_False; - pImp->bSplitable = TRUE; + pImp->bSplitable = sal_True; // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt pImp->nLine = pImp->nDockLine = 0; pImp->nPos = pImp->nDockPos = 0; - pImp->bNewLine = FALSE; + pImp->bNewLine = sal_False; pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT); pImp->aMoveTimer.SetTimeout(50); pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl)); @@ -980,12 +1007,12 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) if ( !pMgr ) { pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT ); - pImp->bConstructed = TRUE; + pImp->bConstructed = sal_True; return; } if ( pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK ) - pImp->bDockingPrevented = TRUE; + pImp->bDockingPrevented = sal_True; pImp->aSplitSize = GetOutputSizePixel(); if ( !GetFloatingSize().Width() ) @@ -1003,14 +1030,14 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) { // get information about alignment, split size and position in SplitWindow String aStr; - USHORT nPos = pInfo->aExtraString.SearchAscii("AL:"); + sal_uInt16 nPos = pInfo->aExtraString.SearchAscii("AL:"); if ( nPos != STRING_NOTFOUND ) { // alignment information - USHORT n1 = pInfo->aExtraString.Search('(', nPos); + sal_uInt16 n1 = pInfo->aExtraString.Search('(', nPos); if ( n1 != STRING_NOTFOUND ) { - USHORT n2 = pInfo->aExtraString.Search(')', n1); + sal_uInt16 n2 = pInfo->aExtraString.Search(')', n1); if ( n2 != STRING_NOTFOUND ) { // extract alignment information from extrastring @@ -1027,7 +1054,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) pImp->aWinState = pInfo->aWinState; // check for valid alignment - SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (USHORT) aStr.ToInt32(); + SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32(); if ( pImp->bDockingPrevented ) // docking prevented, ignore old configuration and take alignment from default aStr.Erase(); @@ -1047,7 +1074,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) if ( nPos != STRING_NOTFOUND ) { aStr.Erase(0, nPos+1); - pImp->SetLastAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() ); + pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.ToInt32() ); } nPos = aStr.Search(','); @@ -1058,8 +1085,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) aStr.Erase(0, nPos+1); if ( GetPosSizeFromString( aStr, aPos, pImp->aSplitSize ) ) { - pImp->nLine = pImp->nDockLine = (USHORT) aPos.X(); - pImp->nPos = pImp->nDockPos = (USHORT) aPos.Y(); + pImp->nLine = pImp->nDockLine = (sal_uInt16) aPos.X(); + pImp->nPos = pImp->nDockPos = (sal_uInt16) aPos.Y(); pImp->nVerticalSize = pImp->aSplitSize.Height(); pImp->nHorizontalSize = pImp->aSplitSize.Width(); if ( GetSplitSizeFromString( aStr, pImp->aSplitSize )) @@ -1093,7 +1120,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) // detect floating mode // toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet - BOOL bFloatMode = IsFloatingMode(); + sal_Bool bFloatMode = IsFloatingMode(); if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) ) { bFloatMode = !bFloatMode; @@ -1151,12 +1178,12 @@ void SfxDockingWindow::Initialize_Impl() { if ( !pMgr ) { - pImp->bConstructed = TRUE; + pImp->bConstructed = sal_True; return; } FloatingWindow* pFloatWin = GetFloatingWindow(); - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if ( pFloatWin ) { bSet = !pFloatWin->IsDefaultPos(); @@ -1165,7 +1192,7 @@ void SfxDockingWindow::Initialize_Impl() { Point aPos = GetFloatingPos(); if ( aPos != Point() ) - bSet = TRUE; + bSet = sal_True; } if ( !bSet) @@ -1195,7 +1222,7 @@ void SfxDockingWindow::Initialize_Impl() } // allow calling of docking handlers - pImp->bConstructed = TRUE; + pImp->bConstructed = sal_True; } //------------------------------------------------------------------------- @@ -1223,9 +1250,9 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const rInfo.aWinState = pImp->aWinState; rInfo.aExtraString = DEFINE_CONST_UNICODE("AL:("); - rInfo.aExtraString += String::CreateFromInt32((USHORT) GetAlignment()); + rInfo.aExtraString += String::CreateFromInt32((sal_uInt16) GetAlignment()); rInfo.aExtraString += ','; - rInfo.aExtraString += String::CreateFromInt32 ((USHORT) pImp->GetLastAlignment()); + rInfo.aExtraString += String::CreateFromInt32 ((sal_uInt16) pImp->GetLastAlignment()); if ( pImp->bSplitable ) { Point aPos(pImp->nLine, pImp->nPos); @@ -1337,7 +1364,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& aInRect.Bottom() -= nTBBorder/2; // calculate alignment resulting from docking rectangle - BOOL bBecomesFloating = FALSE; + sal_Bool bBecomesFloating = sal_False; SfxChildAlignment eDockAlign = pImp->GetDockAlignment(); Rectangle aDockingRect( rRect ); if ( !IsFloatingMode() ) @@ -1356,7 +1383,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect ); if ( aIntersect.IsEmpty() ) // docking rectangle completely outside docking area -> floating mode - bBecomesFloating = TRUE; + bBecomesFloating = sal_True; else { // create a small test rect around the mouse position and use this one @@ -1370,7 +1397,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect ); if ( aIntersectRect == aSmallDockingRect ) // docking rectangle completely inside (shrinked) inner area -> floating mode - bBecomesFloating = TRUE; + bBecomesFloating = sal_True; } if ( bBecomesFloating ) @@ -1383,7 +1410,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& Point aInPosTL( aPos.X()-aInRect.Left(), aPos.Y()-aInRect.Top() ); Point aInPosBR( aPos.X()-aInRect.Left() + aDockingRect.GetWidth(), aPos.Y()-aInRect.Top() + aDockingRect.GetHeight() ); Size aInSize = aInRect.GetSize(); - BOOL bNoChange = FALSE; + sal_Bool bNoChange = sal_False; // check if alignment is still unchanged switch ( GetAlignment() ) @@ -1394,7 +1421,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& if (aInPosTL.X() <= 0) { eDockAlign = GetAlignment(); - bNoChange = TRUE; + bNoChange = sal_True; } break; case SFX_ALIGN_TOP: @@ -1403,7 +1430,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& if ( aInPosTL.Y() <= 0) { eDockAlign = GetAlignment(); - bNoChange = TRUE; + bNoChange = sal_True; } break; case SFX_ALIGN_RIGHT: @@ -1412,7 +1439,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& if ( aInPosBR.X() >= aInSize.Width()) { eDockAlign = GetAlignment(); - bNoChange = TRUE; + bNoChange = sal_True; } break; case SFX_ALIGN_BOTTOM: @@ -1421,7 +1448,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& if ( aInPosBR.Y() >= aInSize.Height()) { eDockAlign = GetAlignment(); - bNoChange = TRUE; + bNoChange = sal_True; } break; default: @@ -1431,7 +1458,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& if ( !bNoChange ) { // alignment will change, test alignment according to distance of the docking rectangles edges - BOOL bForbidden = TRUE; + sal_Bool bForbidden = sal_True; if ( aInPosTL.X() <= 0) { eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT); @@ -1480,7 +1507,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& } else if ( pImp->bSplitable ) { - USHORT nLine, nPos; + sal_uInt16 nLine, nPos; SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eDockAlign); aPos = pSplitWin->ScreenToOutputPixel( aPos ); if ( pSplitWin->GetWindowPos( aPos, nLine, nPos ) ) @@ -1488,7 +1515,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& // mouse over splitwindow, get line and position pImp->nDockLine = nLine; pImp->nDockPos = nPos; - pImp->bNewLine = FALSE; + pImp->bNewLine = sal_False; } else { @@ -1508,18 +1535,18 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& // if this window is the only one in the last line, it can't be docked as new line in the same splitwindow pImp->nDockLine = pImp->nLine; pImp->nDockPos = pImp->nPos; - pImp->bNewLine = FALSE; + pImp->bNewLine = sal_False; } else { // create new line pImp->nDockLine = pSplitWin->GetLineCount(); pImp->nDockPos = 0; - pImp->bNewLine = TRUE; + pImp->bNewLine = sal_True; } } - BOOL bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment(); + sal_Bool bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment(); if ( !bChanged && !IsFloatingMode() ) { // window only sightly moved, no change of any property @@ -1705,7 +1732,7 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment, //------------------------------------------------------------------------- -BOOL SfxDockingWindow::Close() +sal_Bool SfxDockingWindow::Close() /* [Beschreibung] @@ -1720,12 +1747,12 @@ BOOL SfxDockingWindow::Close() // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert // werden kann if ( !pMgr ) - return TRUE; + return sal_True; - SfxBoolItem aValue( pMgr->GetType(), FALSE); + SfxBoolItem aValue( pMgr->GetType(), sal_False); pBindings->GetDispatcher_Impl()->Execute( pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------- @@ -1823,21 +1850,21 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) pMgr->Activate_Impl(); Window* pWindow = rEvt.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( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), nHelpId ); + if ( sHelpId.getLength() ) + SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); // In VCL geht Notify zun"achst an das Fenster selbst, // also base class rufen, sonst erf"ahrt der parent nichts // if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer DockingWindow::Notify( rEvt ); - return TRUE; + return sal_True; } else if( rEvt.GetType() == EVENT_KEYINPUT ) { @@ -1845,7 +1872,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() ) // dann auch global g"ultige Acceleratoren verwenden return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() ); - return TRUE; + return sal_True; } else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) { @@ -1857,9 +1884,9 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) } -USHORT SfxDockingWindow::GetWinBits_Impl() const +sal_uInt16 SfxDockingWindow::GetWinBits_Impl() const { - USHORT nBits = 0; + sal_uInt16 nBits = 0; return nBits; } @@ -1890,27 +1917,27 @@ void SfxDockingWindow::Reappear_Impl() } } -BOOL SfxDockingWindow::IsAutoHide_Impl() const +sal_Bool SfxDockingWindow::IsAutoHide_Impl() const { if ( pImp->pSplitWin ) return !pImp->pSplitWin->IsFadeIn(); else - return FALSE; + return sal_False; } -BOOL SfxDockingWindow::IsPinned_Impl() const +sal_Bool SfxDockingWindow::IsPinned_Impl() const { if ( pImp->pSplitWin ) return pImp->pSplitWin->IsPinned(); else - return TRUE; + return sal_True; } -void SfxDockingWindow::AutoShow( BOOL bShow ) +void SfxDockingWindow::AutoShow( sal_Bool bShow ) { AutoShow_Impl(bShow); } -void SfxDockingWindow::AutoShow_Impl( BOOL bShow ) +void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow ) { if ( pImp->pSplitWin ) { @@ -1926,7 +1953,7 @@ SfxSplitWindow* SfxDockingWindow::GetSplitWindow_Impl() const return pImp->pSplitWin; } -void SfxDockingWindow::FadeIn( BOOL /*bFadeIn*/ ) +void SfxDockingWindow::FadeIn( sal_Bool /*bFadeIn*/ ) { } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 2abe18442b8c..f90cb9116fe6 100644..100755 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -80,7 +80,6 @@ #include <unotools/viewoptions.hxx> #include <unotools/moduleoptions.hxx> #include <svtools/helpid.hrc> -#include <svl/pickerhelper.hxx> #include <comphelper/docpasswordrequest.hxx> #include <comphelper/docpasswordhelper.hxx> #include <ucbhelper/content.hxx> @@ -93,13 +92,13 @@ #include <sfx2/docfac.hxx> #include "openflag.hxx" #include <sfx2/passwd.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "filedlghelper.hrc" #include "filtergrouping.hxx" #include <sfx2/request.hxx> #include "filedlgimpl.hxx" - +#include <helpid.hrc> #include <sfxlocal.hrc> //----------------------------------------------------------------------------- @@ -222,55 +221,55 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve { //!!! todo: cache the help strings (here or TRA) - ULONG nHelpId = 0; + rtl::OString sHelpId; // mapping from element id -> help id switch ( aEvent.ElementId ) { case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION : - nHelpId = HID_FILESAVE_AUTOEXTENSION; + sHelpId = HID_FILESAVE_AUTOEXTENSION; break; case ExtendedFilePickerElementIds::CHECKBOX_PASSWORD : - nHelpId = HID_FILESAVE_SAVEWITHPASSWORD; + sHelpId = HID_FILESAVE_SAVEWITHPASSWORD; break; case ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS : - nHelpId = HID_FILESAVE_CUSTOMIZEFILTER; + sHelpId = HID_FILESAVE_CUSTOMIZEFILTER; break; case ExtendedFilePickerElementIds::CHECKBOX_READONLY : - nHelpId = HID_FILEOPEN_READONLY; + sHelpId = HID_FILEOPEN_READONLY; break; case ExtendedFilePickerElementIds::CHECKBOX_LINK : - nHelpId = HID_FILEDLG_LINK_CB; + sHelpId = HID_FILEDLG_LINK_CB; break; case ExtendedFilePickerElementIds::CHECKBOX_PREVIEW : - nHelpId = HID_FILEDLG_PREVIEW_CB; + sHelpId = HID_FILEDLG_PREVIEW_CB; break; case ExtendedFilePickerElementIds::PUSHBUTTON_PLAY : - nHelpId = HID_FILESAVE_DOPLAY; + sHelpId = HID_FILESAVE_DOPLAY; break; case ExtendedFilePickerElementIds::LISTBOX_VERSION_LABEL : case ExtendedFilePickerElementIds::LISTBOX_VERSION : - nHelpId = HID_FILEOPEN_VERSION; + sHelpId = HID_FILEOPEN_VERSION; break; case ExtendedFilePickerElementIds::LISTBOX_TEMPLATE_LABEL : case ExtendedFilePickerElementIds::LISTBOX_TEMPLATE : - nHelpId = HID_FILESAVE_TEMPLATE; + sHelpId = HID_FILESAVE_TEMPLATE; break; case ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE_LABEL : case ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE : - nHelpId = HID_FILEOPEN_IMAGE_TEMPLATE; + sHelpId = HID_FILEOPEN_IMAGE_TEMPLATE; break; case ExtendedFilePickerElementIds::CHECKBOX_SELECTION : - nHelpId = HID_FILESAVE_SELECTION; + sHelpId = HID_FILESAVE_SELECTION; break; default: @@ -280,7 +279,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve OUString aHelpText; Help* pHelp = Application::GetHelp(); if ( pHelp ) - aHelpText = String( pHelp->GetHelpText( nHelpId, NULL ) ); + aHelpText = String( pHelp->GetHelpText( String( ByteString(sHelpId), RTL_TEXTENCODING_UTF8), NULL ) ); return aHelpText; } @@ -1169,7 +1168,7 @@ void SAL_CALL PickerThread_Impl::run() } // ------------------------------------------------------------------------ -void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId ) +void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId ) { DBG_ASSERT( _pControlId && _pHelpId, "FileDialogHelper_Impl::setControlHelpIds: invalid array pointers!" ); if ( !_pControlId || !_pHelpId ) @@ -1178,17 +1177,16 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con // forward these ids to the file picker try { - const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); + const ::rtl::OUString sHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( INET_HID_SCHEME ) ); // the ids for the single controls uno::Reference< XFilePickerControlAccess > xControlAccess( mxFileDlg, UNO_QUERY ); if ( xControlAccess.is() ) { while ( *_pControlId ) { - // calc the help id of the element + DBG_ASSERT( INetURLObject( rtl::OStringToOUString( *_pHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" ); ::rtl::OUString sId( sHelpIdPrefix ); - sId += ::rtl::OUString::valueOf( *_pHelpId ); - // set the help id + sId += ::rtl::OUString( *_pHelpId, strlen( *_pHelpId ), RTL_TEXTENCODING_UTF8 ); xControlAccess->setValue( *_pControlId, ControlActions::SET_HELP_URL, makeAny( sId ) ); ++_pControlId; ++_pHelpId; @@ -1202,12 +1200,6 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con } // ------------------------------------------------------------------------ -void FileDialogHelper_Impl::setDialogHelpId( const sal_Int32 _nHelpId ) -{ - svt::SetDialogHelpId( mxFileDlg, _nHelpId ); -} - -// ------------------------------------------------------------------------ IMPL_LINK( FileDialogHelper_Impl, InitControls, void*, NOTINTERESTEDIN ) { (void)NOTINTERESTEDIN; @@ -1362,8 +1354,8 @@ void lcl_saveLastURLs(SvStringsDtor*& rpURLLi ::comphelper::SequenceAsVector< ::rtl::OUString >& lLastURLs ) { lLastURLs.clear(); - USHORT c = rpURLList->Count(); - USHORT i = 0; + sal_uInt16 c = rpURLList->Count(); + sal_uInt16 i = 0; for (i=0; i<c; ++i) lLastURLs.push_back(*(rpURLList->GetObject(i))); } @@ -1451,22 +1443,24 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, // check password checkbox if the document had password before if( mbHasPassword ) { - SFX_ITEMSET_ARG( rpSet, pPassItem, SfxStringItem, SID_PASSWORD, FALSE ); - mbPwdCheckBoxState = ( pPassItem != NULL ); + SFX_ITEMSET_ARG( rpSet, pPassItem, SfxBoolItem, SID_PASSWORDINTERACTION, sal_False ); + mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() ); // in case the document has password to modify, the dialog should be shown - SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, FALSE ); + SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, sal_False ); mbPwdCheckBoxState |= ( pPassToModifyItem && pPassToModifyItem->GetValue().hasValue() ); } - SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE ); + SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False ); if ( pSelectItem ) mbSelection = pSelectItem->GetValue(); else mbSelectionEnabled = sal_False; // the password will be set in case user decide so + rpSet->ClearItem( SID_PASSWORDINTERACTION ); rpSet->ClearItem( SID_PASSWORD ); + rpSet->ClearItem( SID_ENCRYPTIONDATA ); rpSet->ClearItem( SID_RECOMMENDREADONLY ); rpSet->ClearItem( SID_MODIFYPASSWORDINFO ); @@ -1581,7 +1575,30 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, if ( pPasswordRequest->isPassword() ) { if ( pPasswordRequest->getPassword().getLength() ) - rpSet->Put( SfxStringItem( SID_PASSWORD, pPasswordRequest->getPassword() ) ); + { + // TODO/LATER: The filters should show the password dialog themself in future + if ( bMSType ) + { + // all the current MS-filters use MSCodec_Std97 implementation + uno::Sequence< sal_Int8 > aUniqueID = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 ); + uno::Sequence< sal_Int8 > aEncryptionKey = ::comphelper::DocPasswordHelper::GenerateStd97Key( pPasswordRequest->getPassword(), aUniqueID ); + + if ( aEncryptionKey.getLength() ) + { + ::comphelper::SequenceAsHashMap aHashData; + aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ) ] <<= aEncryptionKey; + aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ) ] <<= aUniqueID; + + rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aHashData.getAsConstNamedValueList() ) ) ); + } + else + return ERRCODE_IO_NOTSUPPORTED; + } + else + { + rpSet->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( ::comphelper::OStorageHelper::CreatePackageEncryptionData( pPasswordRequest->getPassword() ) ) ) ); + } + } if ( pPasswordRequest->getRecommendReadOnly() ) rpSet->Put( SfxBoolItem( SID_RECOMMENDREADONLY, sal_True ) ); @@ -1790,7 +1807,16 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags, sQuery.appendAscii(":eflags=" ); sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nDontFlags)); - uno::Reference< XEnumeration > xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + uno::Reference< XEnumeration > xResult; + try + { + xResult = xFilterCont->createSubSetEnumerationByQuery(sQuery.makeStringAndClear()); + } + catch( uno::Exception& ) + { + DBG_ERRORFILE( "Could not get filters from the configuration!" ); + } + TSortedFilterList aIter (xResult); // no matcher any longer used ... @@ -1846,7 +1872,7 @@ void FileDialogHelper_Impl::addGraphicFilter() // create the list of filters mpGraphicFilter = new GraphicFilter; - USHORT i, j, nCount = mpGraphicFilter->GetImportFormatCount(); + sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount(); // compute the extension string for all known import filters String aExtensions; @@ -1855,7 +1881,7 @@ void FileDialogHelper_Impl::addGraphicFilter() { j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -1869,7 +1895,7 @@ void FileDialogHelper_Impl::addGraphicFilter() } } -#if defined(WIN) || defined(WNT) +#if defined(WNT) if ( aExtensions.Len() > 240 ) aExtensions = DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ); #endif @@ -1895,7 +1921,7 @@ void FileDialogHelper_Impl::addGraphicFilter() String aExt; j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -2373,17 +2399,11 @@ void FileDialogHelper::CreateMatcher( const String& rFactory ) } // ------------------------------------------------------------------------ -void FileDialogHelper::SetControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId ) +void FileDialogHelper::SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId ) { mpImp->setControlHelpIds( _pControlId, _pHelpId ); } -// ------------------------------------------------------------------------ -void FileDialogHelper::SetDialogHelpId( const sal_Int32 _nHelpId ) -{ - mpImp->setDialogHelpId( _nHelpId ); -} - void FileDialogHelper::SetContext( Context _eNewContext ) { mpImp->SetContext( _eNewContext ); diff --git a/sfx2/source/dialog/filedlghelper.src b/sfx2/source/dialog/filedlghelper.src index eeee5d36aab7..eeee5d36aab7 100644..100755 --- a/sfx2/source/dialog/filedlghelper.src +++ b/sfx2/source/dialog/filedlghelper.src diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 45f3277371f3..0a76cb1eca67 100644..100755 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -85,7 +85,7 @@ namespace sfx2 SfxFilterFlags m_nMustFlags; SfxFilterFlags m_nDontFlags; - ULONG mnPostUserEventId; + sal_uIntPtr mnPostUserEventId; ErrCode mnError; @@ -143,8 +143,7 @@ namespace sfx2 void correctVirtualDialogType(); - void setControlHelpIds( const sal_Int16* _pControlId, const sal_Int32* _pHelpId ); - void setDialogHelpId( const sal_Int32 _nHelpId ); + void setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId ); sal_Bool CheckFilterOptionsCapability( const SfxFilter* _pFilter ); diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 6e8de3c8ea5e..29e234c5500b 100644..100755 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -33,7 +33,7 @@ #include <sfx2/filedlghelper.hxx> #include <sfx2/sfx.hrc> #include <sfx2/docfac.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <osl/thread.h> #include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp> #include <com/sun/star/beans/StringPair.hpp> diff --git a/sfx2/source/dialog/filtergrouping.hxx b/sfx2/source/dialog/filtergrouping.hxx index 5702362298fd..5702362298fd 100644..100755 --- a/sfx2/source/dialog/filtergrouping.hxx +++ b/sfx2/source/dialog/filtergrouping.hxx diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx index 8bfed93e4cba..8bfed93e4cba 100644..100755 --- a/sfx2/source/dialog/intro.cxx +++ b/sfx2/source/dialog/intro.cxx diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx index b0d860df71c1..0cffdf5217ab 100644..100755 --- a/sfx2/source/dialog/itemconnect.cxx +++ b/sfx2/source/dialog/itemconnect.cxx @@ -53,31 +53,31 @@ TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFl // ---------------------------------------------------------------------------- -USHORT ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, USHORT nSlot ) +sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { return rItemSet.GetPool()->GetWhich( nSlot ); } -bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, USHORT nSlot ) +bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { - return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), TRUE ) != SFX_ITEM_UNKNOWN; + return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), sal_True ) != SFX_ITEM_UNKNOWN; } -const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, USHORT nSlot ) +const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { - USHORT nWhich = GetWhichId( rItemSet, nSlot ); - return (rItemSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, TRUE ) : 0; + sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot ); + return (rItemSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, sal_True ) : 0; } -const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, USHORT nSlot ) +const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot ) { return rItemSet.GetPool()->GetDefaultItem( GetWhichId( rItemSet, nSlot ) ); } -void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, USHORT nSlot ) +void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot ) { - USHORT nWhich = GetWhichId( rDestSet, nSlot ); - if( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT ) + sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot ); + if( rOldSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_DEFAULT ) rDestSet.ClearItem( nWhich ); } @@ -134,12 +134,12 @@ void CheckBoxWrapper::SetControlDontKnow( bool bSet ) GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK ); } -BOOL CheckBoxWrapper::GetControlValue() const +sal_Bool CheckBoxWrapper::GetControlValue() const { return GetControl().IsChecked(); } -void CheckBoxWrapper::SetControlValue( BOOL bValue ) +void CheckBoxWrapper::SetControlValue( sal_Bool bValue ) { GetControl().Check( bValue ); } @@ -303,7 +303,7 @@ TriState ItemConnectionBase::GetShowState( bool bKnown ) const // Standard connections // ============================================================================ -DummyItemConnection::DummyItemConnection( USHORT nSlot, Window& rWindow, ItemConnFlags nFlags ) : +DummyItemConnection::DummyItemConnection( sal_uInt16 nSlot, Window& rWindow, ItemConnFlags nFlags ) : ItemConnectionBase( nFlags ), DummyWindowWrapper( rWindow ), mnSlot( nSlot ) diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 43ec237bbba9..3433e74e2073 100644..100755 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -52,19 +52,19 @@ #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XExporter.hpp> - #include <rtl/textenc.h> #include <rtl/uri.h> #include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/msgbox.hxx> -#include <mailmodelapi.hxx> +#include <sfx2/mailmodelapi.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxsids.hrc> #include "dialog.hrc" @@ -81,6 +81,7 @@ #include <comphelper/mediadescriptor.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> +#include <cppuhelper/implbase1.hxx> // -------------------------------------------------------------- using namespace ::com::sun::star; @@ -95,6 +96,54 @@ using namespace ::com::sun::star::system; using namespace ::rtl; namespace css = ::com::sun::star; +// - class PrepareListener_Impl ------------------------------------------ +class PrepareListener_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener > +{ + bool m_bState; +public: + PrepareListener_Impl(); + virtual ~PrepareListener_Impl(); + + // css.frame.XStatusListener + virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& aEvent) + throw(css::uno::RuntimeException); + + // css.lang.XEventListener + virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) + throw(css::uno::RuntimeException); + + bool IsSet() const {return m_bState;} +}; + +/*-- 25.08.2010 14:32:49--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::PrepareListener_Impl() : + m_bState( false ) +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::~PrepareListener_Impl() +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::statusChanged(const css::frame::FeatureStateEvent& rEvent) throw(css::uno::RuntimeException) +{ + if( rEvent.IsEnabled ) + rEvent.State >>= m_bState; + else + m_bState = sal_False; +} +/*-- 25.08.2010 14:32:52--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) throw(css::uno::RuntimeException) +{ +} // class SfxMailModel ----------------------------------------------- @@ -537,46 +586,68 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aArgs[nNumArgs-1].Value = css::uno::makeAny( aPassword ); } - if ( bModified || !bHasLocation || bStoreTo ) + bool bNeedsPreparation = false; + css::util::URL aPrepareURL; + css::uno::Reference< css::frame::XDispatch > xPrepareDispatch; + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( + xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY ); + if( !bSendAsPDF ) { - // Document is modified, is newly created or should be stored in a special format try { - css::uno::Reference< css::util::XURLTransformer > xURLTransformer( - xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY ); - - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); - css::uno::Reference< css::frame::XDispatch > xDispatch; + // check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content) - css::util::URL aURL; - css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + if ( xURLTransformer.is() ) + { + aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); + xURLTransformer->parseStrict( aPrepareURL ); + } - if( !bSendAsPDF ) + if ( xDispatchProvider.is() ) { - if ( xURLTransformer.is() ) + xPrepareDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatchProvider->queryDispatch( aPrepareURL, ::rtl::OUString(), 0 )); + if ( xPrepareDispatch.is() ) { - aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); - xURLTransformer->parseStrict( aURL ); + PrepareListener_Impl* pPrepareListener; + uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl; + xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL ); + bNeedsPreparation = pPrepareListener->IsSet(); + xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL ); } + } + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) + { + } + } - if ( xDispatchProvider.is() ) + if ( bModified || !bHasLocation || bStoreTo || bNeedsPreparation ) + { + // Document is modified, is newly created or should be stored in a special format + try + { + if( bNeedsPreparation && xPrepareDispatch.is() ) + { + if ( xPrepareDispatch.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( - xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); - if ( xDispatch.is() ) + try + { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs ); + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) { - try - { - xDispatch->dispatch( aURL, aDispatchArgs ); - } - catch ( css::uno::RuntimeException& ) - { - throw; - } - catch ( css::uno::Exception& ) - { - } } } } @@ -598,6 +669,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if( !bSendAsPDF ) { + css::util::URL aURL; // #i30432# notify that export is finished - the Writer may want to restore removed content if ( xURLTransformer.is() ) { @@ -607,12 +679,13 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + css::uno::Reference< css::frame::XDispatch > xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { try { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; xDispatch->dispatch( aURL, aDispatchArgs ); } catch ( css::uno::RuntimeException& ) @@ -904,7 +977,7 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( const css::uno::Referenc // functions ------------------------------------------------------------- -BOOL CreateFromAddress_Impl( String& rFrom ) +sal_Bool CreateFromAddress_Impl( String& rFrom ) /* [Beschreibung] @@ -915,8 +988,8 @@ BOOL CreateFromAddress_Impl( String& rFrom ) [R"uckgabewert] - TRUE: Adresse konnte erzeugt werden. - FALSE: Adresse konnte nicht erzeugt werden. + sal_True: Adresse konnte erzeugt werden. + sal_False: Adresse konnte nicht erzeugt werden. */ { diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx deleted file mode 100644 index 19dcc3d45d81..000000000000 --- a/sfx2/source/dialog/mailmodelapi.cxx +++ /dev/null @@ -1,673 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sfx2.hxx" -// includes -------------------------------------------------------------- -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/io/XActiveDataSink.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/mozilla/XPluginInstance.hpp> -#include <com/sun/star/ucb/XDataContainer.hpp> -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/util/XURLTransformer.hpp> -#include <com/sun/star/frame/XStorable.hpp> -#include <com/sun/star/frame/XDispatchProvider.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/util/XModifiable.hpp> -#include <com/sun/star/system/XSimpleMailClientSupplier.hpp> -#include <com/sun/star/system/SimpleMailClientFlags.hpp> -#include <com/sun/star/frame/XModuleManager.hpp> -#include <rtl/textench.h> -#include <osl/mutex.hxx> -#include <rtl/uri.h> -#include <rtl/uri.hxx> -#include <rtl/ustrbuf.hxx> -#include <unotools/streamhelper.hxx> -#include <unotools/configitem.hxx> -#include <comphelper/mediadescriptor.hxx> -#include <osl/thread.hxx> -#include <vcl/msgbox.hxx> - -#include "mailmodelapi.hxx" -#include <sfx2/docfilt.hxx> -#include <sfx2/docfac.hxx> -#include "sfxtypes.hxx" - -#include "dialog.hrc" -#include "sfxresid.hxx" -#include <sfx2/sfxuno.hxx> -#include <sfx2/fcontnr.hxx> -#include "guisaveas.hxx" - -#include <unotools/tempfile.hxx> -#include <vcl/svapp.hxx> -#include <svl/stritem.hxx> -#include <svl/eitem.hxx> -#include <unotools/useroptions.hxx> -#include <comphelper/processfactory.hxx> -#include <comphelper/extract.hxx> -#include <ucbhelper/content.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <tools/urlobj.hxx> - -extern sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd ); - -// -------------------------------------------------------------- -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::mozilla; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::util; -using namespace ::com::sun::star::system; -using namespace ::rtl; - -namespace -{ - // functions ------------------------------------------------------------- - - BOOL CreateFromAddress_Impl( String& rFrom ) - - /* [Beschreibung] - - Diese Funktion versucht mit Hilfe des IniManagers eine From-Adresse - zu erzeugen. daf"ur werden die Felder 'Vorname', 'Name' und 'EMail' - aus der Applikations-Ini-Datei ausgelesen. Sollten diese Felder - nicht gesetzt sein, wird FALSE zur"uckgegeben. - - [R"uckgabewert] - - TRUE: Adresse konnte erzeugt werden. - FALSE: Adresse konnte nicht erzeugt werden. - */ - - { - SvtUserOptions aUserCFG; - String aName = aUserCFG.GetLastName (); - String aFirstName = aUserCFG.GetFirstName (); - if ( aFirstName.Len() || aName.Len() ) - { - if ( aFirstName.Len() ) - { - rFrom = TRIM( aFirstName ); - - if ( aName.Len() ) - rFrom += ' '; - } - rFrom += TRIM( aName ); - // unerlaubte Zeichen entfernen - rFrom.EraseAllChars( '<' ); - rFrom.EraseAllChars( '>' ); - rFrom.EraseAllChars( '@' ); - } - String aEmailName = aUserCFG.GetEmail(); - // unerlaubte Zeichen entfernen - aEmailName.EraseAllChars( '<' ); - aEmailName.EraseAllChars( '>' ); - - if ( aEmailName.Len() ) - { - if ( rFrom.Len() ) - rFrom += ' '; - ( ( rFrom += '<' ) += TRIM( aEmailName ) ) += '>'; - } - else - rFrom.Erase(); - return ( rFrom.Len() > 0 ); - } - -} - -// class osl::Thread -class OMailSendThreadImpl : public ::osl::Thread -{ - public: - OMailSendThreadImpl( - Reference< XSimpleMailClient > xSimpleMailClient, - Reference< XSimpleMailMessage > xSimpleMailMessage, - const Reference< XFrame >& _xCurrentFrame, - long nSendFlags ) : - m_nSendFlags( nSendFlags ), - m_bSend( sal_False ), - m_xSimpleMailClient( xSimpleMailClient ), - m_xSimpleMailMessage( xSimpleMailMessage ), - m_xCurrentFrame(_xCurrentFrame) {} - - virtual ~OMailSendThreadImpl(); - - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - - private: - long m_nSendFlags; - sal_Bool m_bSend; - Reference< XSimpleMailClient > m_xSimpleMailClient; - Reference< XSimpleMailMessage > m_xSimpleMailMessage; - Reference< XFrame > m_xCurrentFrame; -}; - -OMailSendThreadImpl::~OMailSendThreadImpl() -{ -} - -void SAL_CALL OMailSendThreadImpl::run() -{ - try - { - m_xSimpleMailClient->sendSimpleMailMessage( m_xSimpleMailMessage, m_nSendFlags ); - m_bSend = sal_True; - } - catch ( IllegalArgumentException& ) - { - m_bSend = sal_False; - } - catch ( Exception& ) - { - m_bSend = sal_False; - } - - if ( m_bSend == sal_False ) - { - SolarMutexGuard aGuard; - Reference< ::com::sun::star::awt::XWindow > xParentWindow = m_xCurrentFrame->getContainerWindow(); - Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - - ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG )); - aBox.Execute(); - } -} - -void SAL_CALL OMailSendThreadImpl::onTerminated() -{ - delete this; -} - -// class SfxMailModel ----------------------------------------------- - -void SfxMailModel::ClearList( AddressList_Impl* pList ) -{ - if ( pList ) - { - for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i ) - delete pList->at(i); - pList->clear(); - } -} - -void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList ) -{ - rValueList.Erase(); - if ( pList ) - { - for ( size_t i = 0, nCount = pList->size(); i < nCount; ++i ) - { - if ( rValueList.Len() > 0 ) - rValueList += ','; - rValueList += *pList->at(i); - } - } -} -namespace -{ - String lcl_getFactoryName(const Reference<XInterface>& _xModel) - { - rtl::OUString sModuleIdentifier; - rtl::OUString sFactoryShortName; - Reference < XModuleManager > xModuleManager( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), UNO_QUERY ); - - if ( _xModel.is() ) - { - try - { - sModuleIdentifier = xModuleManager->identify( _xModel ); - } - catch ( ::com::sun::star::frame::UnknownModuleException& ) - { - DBG_WARNING( "SfxHelp::GetHelpModuleName_Impl(): unknown module (help in help?)" ); - } - catch ( Exception& ) - { - DBG_ERRORFILE( "SfxHelp::GetHelpModuleName_Impl(): exception of XModuleManager::identif y()" ); - } - } - - return sModuleIdentifier; - } - - String lcl_createTempFileName(const Reference < XModel >& _xModel,const ::rtl::OUString& _sAttachmentTitle) - { - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - String aLeadingStr; - if ( xStor.is() ) - { - sal_Bool bHasName = xStor->hasLocation(); - - if ( !bHasName ) - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = String( DEFINE_CONST_UNICODE("noname") ); - } - else - { - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - { - aFileObj.removeExtension(); - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - else - { - if ( _sAttachmentTitle.getLength() ) - aLeadingStr = _sAttachmentTitle; - else - aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); - aLeadingStr += String::CreateFromAscii( "_" ); - } - } - } - return aLeadingStr; - } - -} -SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // detect filter - const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel)); - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String* pExt = NULL; - INetURLObject aFileObj(_xModel->getURL()); - if ( aFileObj.hasExtension() ) - pExt = new String( String::CreateFromAscii( "." ) + (OUString) aFileObj.getExtension() ); - - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - - if ( pFilter && !pExt ) - { - pExt = new String( pFilter->GetWildcard()().GetToken(0) ); - // erase the '*' from the extension (e.g. "*.sdw") - pExt->Erase( 0, 1 ); - } - - { - ::utl::TempFile aTempFile( aLeadingStr, pExt ); - rFileName = aTempFile.GetURL(); - } - delete pExt; - // save document to temp file - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - if ( pFilter ) - { - ::rtl::OUString sFilter(pFilter->GetFilterName()); - ::rtl::OUString sFilterName(RTL_CONSTASCII_USTRINGPARAM("FilterName")); - if ( !aMedia.createItemIfMissing(sFilterName,sFilter) ) - aMedia[sFilterName] <<= sFilter; - } - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - - ::rtl::OUString sSaveTo(RTL_CONSTASCII_USTRINGPARAM("SaveTo")); - if ( !aMedia.createItemIfMissing(sSaveTo,sal_True) ) - aMedia[sSaveTo] <<= sal_True; - - ::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly")); - if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) ) - aMedia[sReadOnly] <<= sal_False; - - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveAs")),aArgs, sal_False, ::rtl::OUString() ); - bRet = sal_True; - } - catch(Exception&) - { - } - } - - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_ERROR; - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAttachmentTitle - , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _xModel - , String& rFileName) -{ - SaveResult eRet = SAVE_CANCELLED; - try - { - Reference<XModifiable> xMod(_xModel,UNO_QUERY); - - // save the document - if ( xMod.is() ) - { - // Get PDF Filter from document - ::rtl::OUString sPDFMediaType(RTL_CONSTASCII_USTRINGPARAM("application/pdf")); - - sal_Bool bRet = sal_False; - // create temp file name with leading chars and extension - Reference < XStorable > xStor( _xModel, UNO_QUERY ); - if ( xStor.is() ) - { - String aLeadingStr = lcl_createTempFileName(_xModel,_sAttachmentTitle); - String aPDFExtension = String::CreateFromAscii( ".pdf" ); - ::utl::TempFile aTempFile( aLeadingStr, &aPDFExtension ); - - rFileName = aTempFile.GetURL(); - - // save document to temp file - Sequence < PropertyValue > aArgs( _xModel->getArgs() ); - ::comphelper::MediaDescriptor aMedia(aArgs); - - ::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType")); - if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) ) - aMedia[sMediaType] <<= sPDFMediaType; - - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL")); - if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) ) - aMedia[sURL] <<= ::rtl::OUString(rFileName); - aMedia >> aArgs; - - try - { - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - SfxStoringHelper aHelper(xMgr); - aHelper.GUIStoreModel(_xModel,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportToPDF")),aArgs, sal_False, ::rtl::OUString); - bRet = sal_True; - } - catch(Exception&) - { - } - - eRet = bRet ? SAVE_SUCCESSFULL : SAVE_CANCELLED; - } - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception catched!"); - } - - return eRet; -} -// ----------------------------------------------------------------------------- -SfxMailModel::SendMailResult SfxMailModel::AttachDocument( MailDocType _eMailDocType - , const Reference< XModel >& _xModel - , const ::rtl::OUString& _sAttachmentTitle) -{ - SaveResult eSaveResult; - String aFileName; - - if ( _eMailDocType == TYPE_SELF ) - eSaveResult = SaveDocument( _sAttachmentTitle,_xModel,aFileName); - else - eSaveResult = SaveDocAsPDF( _sAttachmentTitle,_xModel,aFileName); - - if ( eSaveResult == SAVE_SUCCESSFULL && aFileName.Len() ) - maAttachedDocuments.push_back(aFileName); - return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR; -} -// ----------------------------------------------------------------------------- - -IMPL_LINK_INLINE_START( SfxMailModel, DoneHdl, void*, EMPTYARG ) -{ - mbLoadDone = sal_True; - return 0; -} -// ----------------------------------------------------------------------------- -IMPL_LINK_INLINE_END( SfxMailModel, DoneHdl, void*, EMPTYARG ) - -SfxMailModel::SfxMailModel( const Reference< XFrame >& _xFrame) : - - mpToList ( NULL ), - mpCcList ( NULL ), - mpBccList ( NULL ), - m_xCurrentFrame ( _xFrame ), - mePriority ( PRIO_NORMAL ), - mbLoadDone ( sal_True ) - -{ -} - -SfxMailModel::~SfxMailModel() -{ - ClearList( mpToList ); - delete mpToList; - ClearList( mpCcList ); - delete mpCcList; - ClearList( mpBccList ); - delete mpBccList; -} - -void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole ) -{ - // don't add a empty address - if ( rAddress.Len() > 0 ) - { - AddressList_Impl* pList = NULL; - if ( ROLE_TO == eRole ) - { - if ( !mpToList ) - // create the list - mpToList = new AddressList_Impl(); - pList = mpToList; - } - else if ( ROLE_CC == eRole ) - { - if ( !mpCcList ) - // create the list - mpCcList = new AddressList_Impl(); - pList = mpCcList; - } - else if ( ROLE_BCC == eRole ) - { - if ( !mpBccList ) - // create the list - mpBccList = new AddressList_Impl(); - pList = mpBccList; - } - else - { - DBG_ERRORFILE( "invalid address role" ); - } - - if ( pList ) - { - // add address to list - AddressItemPtr_Impl pAddress = new String( rAddress ); - pList->push_back( pAddress ); - } - } -} - -SfxMailModel::SendMailResult SfxMailModel::Send( ) -{ - OSL_ENSURE(!maAttachedDocuments.empty(),"No document added!"); - SendMailResult eResult = SEND_MAIL_ERROR; - if ( !maAttachedDocuments.empty() ) - { - - Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory(); - if ( xMgr.is() ) - { - Reference< XSimpleMailClientSupplier > xSimpleMailClientSupplier; - - // Prefer the SimpleSystemMail service if available - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))), - UNO_QUERY ); - - if ( ! xSimpleMailClientSupplier.is() ) - { - xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( - xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))), - UNO_QUERY ); - } - - if ( xSimpleMailClientSupplier.is() ) - { - Reference< XSimpleMailClient > xSimpleMailClient = xSimpleMailClientSupplier->querySimpleMailClient(); - - if ( !xSimpleMailClient.is() ) - { - // no mail client support => message box! - return SEND_MAIL_ERROR; - } - - // we have a simple mail client - Reference< XSimpleMailMessage > xSimpleMailMessage = xSimpleMailClient->createSimpleMailMessage(); - if ( xSimpleMailMessage.is() ) - { - sal_Int32 nSendFlags = SimpleMailClientFlags::DEFAULTS; - if ( maFromAddress.Len() == 0 ) - { - // from address not set, try figure out users e-mail address - CreateFromAddress_Impl( maFromAddress ); - } - xSimpleMailMessage->setOriginator( maFromAddress ); - - sal_Int32 nToCount = mpToList ? mpToList->Count() : 0; - sal_Int32 nCcCount = mpCcList ? mpCcList->Count() : 0; - sal_Int32 nCcSeqCount = nCcCount; - - // set recipient (only one) for this simple mail server!! - if ( nToCount > 1 ) - { - nCcSeqCount = nToCount - 1 + nCcCount; - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - else if ( nToCount == 1 ) - { - xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 )); - nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE; - } - - // all other recipient must be handled with CC recipients! - if ( nCcSeqCount > 0 ) - { - sal_Int32 nIndex = 0; - Sequence< OUString > aCcRecipientSeq; - - aCcRecipientSeq.realloc( nCcSeqCount ); - if ( nCcSeqCount > nCcCount ) - { - for ( sal_Int32 i = 1; i < nToCount; ++i ) - { - aCcRecipientSeq[nIndex++] = *mpToList->GetObject(i); - } - } - - for ( sal_Int32 i = 0; i < nCcCount; i++ ) - { - aCcRecipientSeq[nIndex++] = *mpCcList->GetObject(i); - } - xSimpleMailMessage->setCcRecipient( aCcRecipientSeq ); - } - - sal_Int32 nBccCount = mpBccList ? mpBccList->Count() : 0; - if ( nBccCount > 0 ) - { - Sequence< OUString > aBccRecipientSeq( nBccCount ); - for ( sal_Int32 i = 0; i < nBccCount; ++i ) - { - aBccRecipientSeq[i] = *mpBccList->GetObject(i); - } - xSimpleMailMessage->setBccRecipient( aBccRecipientSeq ); - } - - Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size()); - - xSimpleMailMessage->setSubject( maSubject ); - xSimpleMailMessage->setAttachement( aAttachmentSeq ); - - // Due to the current clipboard implementation we cannot stop the main thread - // because the clipboard implementation calls the main thread from another thread - // and this would result in a deadlock! - // Currently we create a thread to send a message and process all remaining error - // handling in this thread!! - - OMailSendThreadImpl* pMailSendThread = new OMailSendThreadImpl( xSimpleMailClient, xSimpleMailMessage, m_xCurrentFrame,nSendFlags ); - pMailSendThread->create(); - - // Return always true as the real error handling occurss in the OMailSendThreadImpl-implementation! - eResult = SEND_MAIL_OK; - } - } - } - } - else - eResult = SEND_MAIL_CANCELLED; - - return eResult; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/mailwindow.src b/sfx2/source/dialog/mailwindow.src index e5648e7f414f..e5648e7f414f 100644..100755 --- a/sfx2/source/dialog/mailwindow.src +++ b/sfx2/source/dialog/mailwindow.src diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk deleted file mode 100755 index d223d5845cf2..000000000000 --- a/sfx2/source/dialog/makefile.mk +++ /dev/null @@ -1,115 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=sfx2 -TARGET=dialog - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/about.obj \ - $(SLO)$/alienwarn.obj \ - $(SLO)$/basedlgs.obj \ - $(SLO)$/dinfdlg.obj \ - $(SLO)$/dinfedt.obj \ - $(SLO)$/dockwin.obj \ - $(SLO)$/filedlghelper.obj \ - $(SLO)$/filtergrouping.obj \ - $(SLO)$/intro.obj \ - $(SLO)$/itemconnect.obj \ - $(SLO)$/mailmodel.obj \ - $(SLO)$/mgetempl.obj \ - $(SLO)$/navigat.obj \ - $(SLO)$/newstyle.obj \ - $(SLO)$/partwnd.obj \ - $(SLO)$/passwd.obj \ - $(SLO)$/printopt.obj \ - $(SLO)$/recfloat.obj \ - $(SLO)$/securitypage.obj \ - $(SLO)$/sfxdlg.obj \ - $(SLO)$/splitwin.obj \ - $(SLO)$/srchdlg.obj \ - $(SLO)$/styledlg.obj \ - $(SLO)$/tabdlg.obj \ - $(SLO)$/taskpane.obj \ - $(SLO)$/templdlg.obj \ - $(SLO)$/titledockwin.obj \ - $(SLO)$/tplcitem.obj \ - $(SLO)$/versdlg.obj - -SLOFILES =\ - $(EXCEPTIONSFILES) \ - $(SLO)$/styfitem.obj \ - $(SLO)$/tplpitem.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - recfloat.src \ - alienwarn.src \ - dialog.src \ - dinfdlg.src \ - dinfedt.src \ - filedlghelper.src \ - mailwindow.src \ - mgetempl.src \ - newstyle.src \ - passwd.src \ - templdlg.src \ - versdlg.src \ - printopt.src \ - srchdlg.src \ - securitypage.src \ - titledockwin.src \ - taskpane.src - -.IF "$(BUILD_VER_STRING)"!="" -.IF "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING='"$(BUILD_VER_STRING)"' -.ELSE # "$(GUI)"=="UNX" -CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" -.ENDIF # "$(GUI)"=="UNX" -.ENDIF - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(INCCOM)$/cuilib.hxx: makefile.mk -.IF "$(GUI)"=="UNX" - $(RM) $@ - @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ -.ELSE - @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ -.ENDIF - -$(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 7c4b2058ffb6..3f4ea4ddad16 100644..100755 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -42,7 +42,7 @@ #include <sfx2/mgetempl.hxx> #include <sfx2/objsh.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/module.hxx> #include <sfx2/sfx.hrc> @@ -59,6 +59,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aNameFt ( this, SfxResId( FT_NAME ) ), aNameEd ( this, SfxResId( ED_NAME ) ), + aNameMLE ( this, SfxResId( MLE_NAME ) ), aAutoCB ( this, SfxResId( CB_AUTO ) ), aFollowFt ( this, SfxResId( FT_NEXT ) ), @@ -70,14 +71,14 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aFilterFt ( this, SfxResId( FT_REGION ) ), aFilterLb ( this, SfxResId( LB_REGION ) ), + aDescGb ( this, SfxResId( GB_DESC ) ), aDescFt ( this, SfxResId( FT_DESC ) ), aDescED ( this, SfxResId( ED_DESC ) ), - aDescGb ( this, SfxResId( GB_DESC ) ), pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ), pItem ( 0 ), - bModified ( FALSE ), + bModified ( sal_False ), aName ( pStyle->GetName() ), aFollow ( pStyle->GetFollow() ), aParent ( pStyle->GetParent() ), @@ -123,7 +124,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem { // NullString als Name -> Name generieren String aNoName( SfxResId( STR_NONAME ) ); - USHORT nNo = 1; + sal_uInt16 nNo = 1; String aNo( aNoName ); aNoName += String::CreateFromInt32( nNo ); while ( pPool->Find( aNoName ) ) @@ -139,8 +140,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem } aNameEd.SetText(pStyle->GetName()); - if ( !pStyle->IsUserDefined() ) + // Set the field read-only if it is NOT an user-defined style + // but allow selecting and copying + if ( !pStyle->IsUserDefined() ) { aNameEd.SetReadOnly(); + aNameEd.Hide(); + + aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); + aNameMLE.SetText( pStyle->GetName() ); + aNameMLE.EnableCursor( sal_False ); + aNameMLE.Show(); + } if ( pStyle->HasFollowSupport() && pPool ) { @@ -203,12 +213,12 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem if ( i < nCount ) { - USHORT nStyleFilterIdx = 0xffff; + sal_uInt16 nStyleFilterIdx = 0xffff; // Filterflags const SfxStyleFilter& rList = pItem->GetFilterList(); nCount = rList.size(); - USHORT nIdx = 0; - USHORT nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF; + sal_uInt16 nIdx = 0; + sal_uInt16 nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF; if ( !nMask ) // Benutzervorlage? nMask = pStyle->GetMask(); @@ -297,7 +307,7 @@ void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox, if ( pBox->IsEnabled() ) { // ist der aktuelle Eintrag, dessen Namen modifizieren wurde - const BOOL bSelect = pBox->GetSelectEntry() == aBuf; + const sal_Bool bSelect = pBox->GetSelectEntry() == aBuf; pBox->RemoveEntry( aBuf ); pBox->InsertEntry( rNew ); @@ -382,7 +392,7 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit ) //------------------------------------------------------------------------- -BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) /* [Beschreibung] Handler f"ur das Setzen der (modifizierten) Daten. Wird aus @@ -392,9 +402,9 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) SfxItemSet &rAttrSet das Set, das die Daten entgegennimmt. [R"uckgabewert] - BOOL TRUE: es hat eine "Anderung der Daten + sal_Bool sal_True: es hat eine "Anderung der Daten stattgefunden - FALSE: es hat keine "Anderung der Daten + sal_False: es hat keine "Anderung der Daten stattgefunden [Querverweise] @@ -402,7 +412,7 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) */ { - const USHORT nFilterIdx = aFilterLb.GetSelectEntryPos(); + const sal_uInt16 nFilterIdx = aFilterLb.GetSelectEntryPos(); // Filter setzen @@ -410,14 +420,14 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) nFilterIdx != aFilterLb.GetSavedValue() && aFilterLb.IsEnabled() ) { - bModified = TRUE; + bModified = sal_True; DBG_ASSERT( pItem, "kein Item" ); // geht nur bei Benutzervorlagen #if OSL_DEBUG_LEVEL > 1 - USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx ); + sal_uInt16 nIdx = (sal_uInt16)(long)aFilterLb.GetEntryData( nFilterIdx ); SfxFilterTupel* p = pItem->GetFilterList()[ nIdx ]; #endif - USHORT nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF; + sal_uInt16 nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF; pStyle->SetMask( nMask ); } if(aAutoCB.IsVisible() && @@ -444,7 +454,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ ) */ { - bModified = FALSE; + bModified = sal_False; String sCmp( pStyle->GetName() ); if ( sCmp != aName ) @@ -486,7 +496,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ ) if ( aFilterLb.IsEnabled() ) { - USHORT nCmp = pStyle->GetMask(); + sal_uInt16 nCmp = pStyle->GetMask(); if ( nCmp != nFlags ) pStyle->SetMask( nFlags ); @@ -535,7 +545,7 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet) const SfxPoolItem* pPoolItem; if ( SFX_ITEM_SET == - rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, FALSE, &pPoolItem ) ) + rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, sal_False, &pPoolItem ) ) aAutoCB.Check( ( (const SfxBoolItem*)pPoolItem )->GetValue() ); aAutoCB.SaveValue(); } @@ -574,7 +584,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) aNameEd.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); return SfxTabPage::KEEP_PAGE; } - bModified = TRUE; + bModified = sal_True; } if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() ) @@ -590,7 +600,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) aFollowLb.GrabFocus(); return SfxTabPage::KEEP_PAGE; } - bModified = TRUE; + bModified = sal_True; } } @@ -610,7 +620,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) aBaseLb.GrabFocus(); return SfxTabPage::KEEP_PAGE; } - bModified = TRUE; + bModified = sal_True; nRet |= (int)SfxTabPage::REFRESH_SET; } } diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc index e998baba939d..a34700846f9c 100644..100755 --- a/sfx2/source/dialog/mgetempl.hrc +++ b/sfx2/source/dialog/mgetempl.hrc @@ -25,6 +25,7 @@ * ************************************************************************/ #define ED_NAME 2 +#define MLE_NAME 13 #define LB_NEXT 4 #define FT_BASE 5 #define LB_BASE 6 diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src index 5da3d69b1d7e..9d359813b82a 100644..100755 --- a/sfx2/source/dialog/mgetempl.src +++ b/sfx2/source/dialog/mgetempl.src @@ -44,12 +44,22 @@ TabPage TP_MANAGE_STYLES }; Edit ED_NAME { + HelpID = "sfx2:Edit:TP_MANAGE_STYLES:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 6 ) ; Size = MAP_APPFONT ( 184 , 12 ) ; }; + MultiLineEdit MLE_NAME + { + Pos = MAP_APPFONT ( 70 , 8 ) ; + Size = MAP_APPFONT ( 80 , 12 ) ; + Border = FALSE; + ReadOnly = TRUE; + Hide = TRUE; + }; CheckBox CB_AUTO { + HelpID = "sfx2:CheckBox:TP_MANAGE_STYLES:CB_AUTO"; Pos = MAP_APPFONT ( 164 , 8 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Hide = TRUE ; @@ -63,6 +73,7 @@ TabPage TP_MANAGE_STYLES }; ListBox LB_NEXT { + HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_NEXT"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 24 ) ; Size = MAP_APPFONT ( 184 , 65 ) ; @@ -77,6 +88,7 @@ TabPage TP_MANAGE_STYLES }; ListBox LB_BASE { + HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_BASE"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 42 ) ; Size = MAP_APPFONT ( 184 , 65 ) ; @@ -91,6 +103,7 @@ TabPage TP_MANAGE_STYLES }; ListBox LB_REGION { + HelpID = "sfx2:ListBox:TP_MANAGE_STYLES:LB_REGION"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 60 ) ; Size = MAP_APPFONT ( 184 , 64 ) ; @@ -105,6 +118,7 @@ TabPage TP_MANAGE_STYLES }; MultiLineEdit ED_DESC { + HelpID = "sfx2:MultiLineEdit:TP_MANAGE_STYLES:ED_DESC"; Pos = MAP_APPFONT ( 12 , 88 ) ; Size = MAP_APPFONT ( 236 , 85 ) ; ReadOnly = TRUE ; diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index a84496c65549..4839b3f88639 100644..100755 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -34,13 +34,13 @@ #include <sfx2/navigat.hxx> #include <sfx2/sfx.hrc> #include <sfx2/app.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "helpid.hrc" SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR ); SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd , - USHORT nId , + sal_uInt16 nId , SfxBindings* pBindings , SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentWnd , nId ) @@ -53,7 +53,7 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd , pWindow->SetOutputSizePixel( Size( 270, 240 ) ); ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo ); - SetHideNotDelete( TRUE ); + SetHideNotDelete( sal_True ); } SfxNavigator::SfxNavigator( SfxBindings* pBind , @@ -86,14 +86,14 @@ void SfxNavigator::Resizing( Size &rSize ) pCon->Resizing( rSize ); } -BOOL SfxNavigator::Close() +sal_Bool SfxNavigator::Close() { SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl(); DBG_ASSERT( pCon, "Kein Context!" ); if ( !pCon || pCon->Close() ) return SfxDockingWindow::Close(); else - return FALSE; + return sal_False; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 136c6232c6d6..0984e8c62010 100644..100755 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -35,7 +35,7 @@ #include <sfx2/newstyle.hxx> #include "dialog.hrc" #include "newstyle.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" // PRIVATE METHODES ------------------------------------------------------ @@ -90,6 +90,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl)); aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); + aColBox.SetAccessibleName(SfxResId(FL_COL)); SfxStyleSheetBase *pStyle = rPool.First(); while ( pStyle ) diff --git a/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc index 0efc04869ba9..0efc04869ba9 100644..100755 --- a/sfx2/source/dialog/newstyle.hrc +++ b/sfx2/source/dialog/newstyle.hrc diff --git a/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src index fa5fa62a2ee4..b5954028779b 100644..100755 --- a/sfx2/source/dialog/newstyle.src +++ b/sfx2/source/dialog/newstyle.src @@ -28,10 +28,11 @@ #include <sfx2/sfx.hrc> #include "dialog.hrc" #include "newstyle.hrc" +#include "sfx2/sfxcommands.h" ModalDialog DLG_NEW_STYLE_BY_EXAMPLE { - HelpId = SID_STYLE_NEW_BY_EXAMPLE ; + HelpId = CMD_SID_STYLE_NEW_BY_EXAMPLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 177 , 112 ) ; @@ -45,6 +46,7 @@ ModalDialog DLG_NEW_STYLE_BY_EXAMPLE }; ComboBox LB_COL { + HelpID = "sfx2:ComboBox:DLG_NEW_STYLE_BY_EXAMPLE:LB_COL"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 94 , 92 ) ; TabStop = TRUE ; diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 3bd4b97ae391..ee98f4c26970 100644..100755 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -81,7 +81,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl pWindow->SetSizePixel( Size( 175, 175 ) ); ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo ); - SetHideNotDelete( TRUE ); + SetHideNotDelete( sal_True ); } SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl() diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 76875a4a69ed..d3da6de72887 100644..100755 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -34,20 +34,21 @@ #include <sfx2/passwd.hxx> #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "dialog.hrc" #include "passwd.hrc" #include "vcl/sound.hxx" +#include "vcl/arrange.hxx" // ----------------------------------------------------------------------- -IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) +IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit ) { - if( mbAsciiOnly ) + if( mbAsciiOnly && (pEdit == &maPasswordED || pEdit == &maPassword2ED) ) { - rtl::OUString aTest( maPasswordED.GetText() ); + rtl::OUString aTest( pEdit->GetText() ); const sal_Unicode* pTest = aTest.getStr(); sal_Int32 nLen = aTest.getLength(); rtl::OUStringBuffer aFilter( nLen ); @@ -63,12 +64,15 @@ IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) if( bReset ) { Sound::Beep( SOUND_ERROR ); - maPasswordED.SetSelection( Selection( 0, nLen ) ); - maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() ); + pEdit->SetSelection( Selection( 0, nLen ) ); + pEdit->ReplaceSelected( aFilter.makeStringAndClear() ); } } - maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen ); + bool bEnable = maPasswordED.GetText().Len() >= mnMinLen; + if( maPassword2ED.IsVisible() ) + bEnable = (bEnable && (maPassword2ED.GetText().Len() >= mnMinLen)); + maOKBtn.Enable( bEnable ); return 0; } IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) @@ -77,8 +81,11 @@ IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( SfxPasswordDialog, OKHdl, OKButton *, EMPTYARG ) { - if ( ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) && - ( GetConfirm() != GetPassword() ) ) + bool bConfirmFailed = ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) && + ( GetConfirm() != GetPassword() ); + if( ( mnExtras & SHOWEXTRAS_CONFIRM2 ) == SHOWEXTRAS_CONFIRM2 && ( GetConfirm2() != GetPassword2() ) ) + bConfirmFailed = true; + if ( bConfirmFailed ) { ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) ); aBox.Execute(); @@ -96,20 +103,24 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText ModalDialog( pParent, SfxResId ( DLG_PASSWD ) ), + maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ), maUserFT ( this, SfxResId( FT_PASSWD_USER ) ), maUserED ( this, SfxResId( ED_PASSWD_USER ) ), maPasswordFT ( this, SfxResId( FT_PASSWD_PASSWORD ) ), maPasswordED ( this, SfxResId( ED_PASSWD_PASSWORD ) ), maConfirmFT ( this, SfxResId( FT_PASSWD_CONFIRM ) ), maConfirmED ( this, SfxResId( ED_PASSWD_CONFIRM ) ), + maMinLengthFT ( this, SfxResId( FT_PASSWD_MINLEN ) ), - maPasswordBox ( this, SfxResId( GB_PASSWD_PASSWORD ) ), + maPassword2Box ( this, 0 ), + maPassword2FT ( this, SfxResId( FT_PASSWD_PASSWORD2 ) ), + maPassword2ED ( this, SfxResId( ED_PASSWD_PASSWORD2 ) ), + maConfirm2FT ( this, SfxResId( FT_PASSWD_CONFIRM2 ) ), + maConfirm2ED ( this, SfxResId( ED_PASSWD_CONFIRM2 ) ), maOKBtn ( this, SfxResId( BTN_PASSWD_OK ) ), maCancelBtn ( this, SfxResId( BTN_PASSWD_CANCEL ) ), maHelpBtn ( this, SfxResId( BTN_PASSWD_HELP ) ), - maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ), - mnMinLen ( 5 ), maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ) ), maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ) ), maMainPwdStr ( ), @@ -117,10 +128,63 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText mbAsciiOnly ( false ) { + maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD))); FreeResource(); + // setup layout + boost::shared_ptr<vcl::RowOrColumn> xLayout = + boost::dynamic_pointer_cast<vcl::RowOrColumn>( getLayout() ); + xLayout->setOuterBorder( 0 ); + + // get edit size, should be used as minimum + Size aEditSize( maUserED.GetSizePixel() ); + + // add labelcolumn for the labeled edit fields + boost::shared_ptr<vcl::LabelColumn> xEdits( new vcl::LabelColumn( xLayout.get() ) ); + size_t nChildIndex = xLayout->addChild( xEdits ); + xLayout->setBorders( nChildIndex, -2, -2, -2, 0 ); + + // add group box + xEdits->addWindow( &maPasswordBox ); + + // add user line + xEdits->addRow( &maUserFT, &maUserED, -2, aEditSize ); + + // add password line + xEdits->addRow( &maPasswordFT, &maPasswordED, -2, aEditSize ); + + // add confirm line + xEdits->addRow( &maConfirmFT, &maConfirmED, -2, aEditSize ); + + // add second group box + xEdits->addWindow( &maPassword2Box ); + + // add second password line + xEdits->addRow( &maPassword2FT, &maPassword2ED, -2, aEditSize ); + + // add second confirm line + xEdits->addRow( &maConfirm2FT, &maConfirm2ED, -2, aEditSize ); + + // add a FixedLine + FixedLine* pLine = new FixedLine( this, 0 ); + pLine->Show(); + addWindow( pLine, true ); + xLayout->addWindow( pLine ); + + // add button column + Size aBtnSize( maCancelBtn.GetSizePixel() ); + boost::shared_ptr<vcl::RowOrColumn> xButtons( new vcl::RowOrColumn( xLayout.get(), false ) ); + nChildIndex = xLayout->addChild( xButtons ); + xLayout->setBorders( nChildIndex, -2, 0, -2, -2 ); + + size_t nBtnIndex = xButtons->addWindow( &maHelpBtn, 0, aBtnSize ); + xButtons->addChild( new vcl::Spacer( xButtons.get() ) ); + nBtnIndex = xButtons->addWindow( &maOKBtn, 0, aBtnSize ); + nBtnIndex = xButtons->addWindow( &maCancelBtn, 0, aBtnSize ); + Link aLink = LINK( this, SfxPasswordDialog, EditModifyHdl ); maPasswordED.SetModifyHdl( aLink ); + maPassword2ED.SetModifyHdl( aLink ); aLink = LINK( this, SfxPasswordDialog, OKHdl ); maOKBtn.SetClickHdl( aLink ); @@ -149,7 +213,7 @@ void SfxPasswordDialog::SetPasswdText( ) // ----------------------------------------------------------------------- -void SfxPasswordDialog::SetMinLen( USHORT nLen ) +void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen ) { mnMinLen = nLen; SetPasswdText(); @@ -158,7 +222,7 @@ void SfxPasswordDialog::SetMinLen( USHORT nLen ) // ----------------------------------------------------------------------- -void SfxPasswordDialog::SetMaxLen( USHORT nLen ) +void SfxPasswordDialog::SetMaxLen( sal_uInt16 nLen ) { maPasswordED.SetMaxTextLen( nLen ); maConfirmED.SetMaxTextLen( nLen ); @@ -169,8 +233,23 @@ void SfxPasswordDialog::SetMaxLen( USHORT nLen ) short SfxPasswordDialog::Execute() { - if ( mnExtras < SHOWEXTRAS_ALL ) + maUserFT.Hide(); + maUserED.Hide(); + maConfirmFT.Hide(); + maConfirmED.Hide(); + maPasswordFT.Hide(); + maPassword2Box.Hide(); + maPassword2FT.Hide(); + maPassword2ED.Hide(); + maPassword2FT.Hide(); + maConfirm2FT.Hide(); + maConfirm2ED.Hide(); + + if( mnExtras != SHOWEXTRAS_NONE ) + maPasswordFT.Show(); + if( (mnExtras & SHOWEXTRAS_USER ) ) { +#warning Inevitably this layout logic will be wrong post merge until we can see the dialog to test it. Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); long nMinHeight = maHelpBtn.GetPosPixel().Y() + @@ -229,7 +308,30 @@ short SfxPasswordDialog::Execute() Size aDlgSize = GetOutputSizePixel(); aDlgSize.Height() = nDlgHeight; SetOutputSizePixel( aDlgSize ); + + maUserFT.Show(); + maUserED.Show(); + } + if( (mnExtras & SHOWEXTRAS_CONFIRM ) ) + { + maConfirmFT.Show(); + maConfirmED.Show(); + } + if( (mnExtras & SHOWEXTRAS_PASSWORD2) ) + { + maPassword2Box.Show(); + maPassword2FT.Show(); + maPassword2ED.Show(); } + if( (mnExtras & SHOWEXTRAS_CONFIRM2 ) ) + { + maConfirm2FT.Show(); + maConfirm2ED.Show(); + } + + boost::shared_ptr<vcl::RowOrColumn> xLayout = + boost::dynamic_pointer_cast<vcl::RowOrColumn>( getLayout() ); + SetSizePixel( xLayout->getOptimalSize( WINDOWSIZE_PREFERRED ) ); return ModalDialog::Execute(); } diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc index b29af8bae9ee..8a82c853320e 100644..100755 --- a/sfx2/source/dialog/passwd.hrc +++ b/sfx2/source/dialog/passwd.hrc @@ -42,11 +42,16 @@ #define BTN_PASSWD_CANCEL 21 #define BTN_PASSWD_HELP 22 -#define STR_PASSWD_CONFIRM 30 -#define STR_PASSWD_MIN_LEN 31 -#define STR_PASSWD_EMPTY 32 +#define FT_PASSWD_PASSWORD2 25 +#define ED_PASSWD_PASSWORD2 26 +#define FT_PASSWD_CONFIRM2 27 +#define ED_PASSWD_CONFIRM2 28 -#endif +#define STR_PASSWD_CONFIRM 29 +#define STR_PASSWD_MIN_LEN 30 +#define STR_PASSWD_EMPTY 31 + +#define TEXT_PASSWD 32 -// ******************************************************************* EOF +#endif diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src index bba03b7e8fe9..cca8814d1526 100644..100755 --- a/sfx2/source/dialog/passwd.src +++ b/sfx2/source/dialog/passwd.src @@ -47,6 +47,7 @@ ModalDialog DLG_PASSWD }; Edit ED_PASSWD_USER { + HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_USER"; Border = TRUE; Pos = MAP_APPFONT( 57, 14 ); Size = MAP_APPFONT( 75, 12 ); @@ -59,6 +60,7 @@ ModalDialog DLG_PASSWD }; Edit ED_PASSWD_PASSWORD { + HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_PASSWORD"; Border = TRUE; PassWord = TRUE; Pos = MAP_APPFONT( 57, 29 ); @@ -72,6 +74,7 @@ ModalDialog DLG_PASSWD }; Edit ED_PASSWD_CONFIRM { + HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_CONFIRM"; Border = TRUE; PassWord = TRUE; Pos = MAP_APPFONT( 57, 44 ); @@ -99,6 +102,32 @@ ModalDialog DLG_PASSWD Size = MAP_APPFONT( 132, 8 ); Text [ en-US ] = "Password" ; }; + FixedText FT_PASSWD_PASSWORD2 + { + Pos = MAP_APPFONT( 12, 30 ); + Size = MAP_APPFONT( 42, 10 ); + Text [ en-US ] = "P~assword"; + }; + Edit ED_PASSWD_PASSWORD2 + { + Border = TRUE; + PassWord = TRUE; + Pos = MAP_APPFONT( 57, 29 ); + Size = MAP_APPFONT( 75, 12 ); + }; + FixedText FT_PASSWD_CONFIRM2 + { + Pos = MAP_APPFONT( 12, 45 ); + Size = MAP_APPFONT( 42, 10 ); + Text [ en-US ] = "Confir~m"; + }; + Edit ED_PASSWD_CONFIRM2 + { + Border = TRUE; + PassWord = TRUE; + Pos = MAP_APPFONT( 57, 44 ); + Size = MAP_APPFONT( 75, 12 ); + }; OKButton BTN_PASSWD_OK { Disable = TRUE; @@ -116,41 +145,10 @@ ModalDialog DLG_PASSWD Pos = MAP_APPFONT( 144, 43 ); Size = MAP_APPFONT( 50, 14 ); }; - String STR_PASSWD_CONFIRM + String TEXT_PASSWD { - Text [ en-US ] = "Confirm password" ; + Text [ en-US ] = "Password" ; }; -}; - -// ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +}; diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 01cb085b0f1d..bec9a5760c5c 100644..100755 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -38,12 +38,12 @@ #include "printopt.hrc" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/viewsh.hxx> #include <sfx2/printopt.hxx> -static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; -static BOOL bOutputForPrinter = TRUE; +static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; +static sal_Bool bOutputForPrinter = sal_True; SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ), @@ -78,12 +78,12 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con if( bOutputForPrinter ) { - aPrinterOutputRB.Check( TRUE ); + aPrinterOutputRB.Check( sal_True ); aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrinterOutputRB.GetText() ) ); } else { - aPrintFileOutputRB.Check( TRUE ); + aPrintFileOutputRB.Check( sal_True ); aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrintFileOutputRB.GetText() ) ); } @@ -143,12 +143,12 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow ) return SfxTabPage::GetParentLabelFor( pWindow ); } -BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { SvtPrintWarningOptions aWarnOptions; SvtPrinterOptions aPrinterOptions; SvtPrintFileOptions aPrintFileOptions; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( aPaperSizeCB.IsChecked() != aPaperSizeCB.GetSavedValue()) @@ -204,29 +204,29 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu aReduceTransparencyCB.Check( pCurrentOptions->IsReduceTransparency() ); if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO ) - aReduceTransparencyAutoRB.Check( TRUE ); + aReduceTransparencyAutoRB.Check( sal_True ); else - aReduceTransparencyNoneRB.Check( TRUE ); + aReduceTransparencyNoneRB.Check( sal_True ); aReduceGradientsCB.Check( pCurrentOptions->IsReduceGradients() ); if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES ) - aReduceGradientsStripesRB.Check( TRUE ); + aReduceGradientsStripesRB.Check( sal_True ); else - aReduceGradientsColorRB.Check( TRUE ); + aReduceGradientsColorRB.Check( sal_True ); aReduceGradientsStepCountNF.SetValue( pCurrentOptions->GetReducedGradientStepCount() ); aReduceBitmapsCB.Check( pCurrentOptions->IsReduceBitmaps() ); if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL ) - aReduceBitmapsOptimalRB.Check( TRUE ); + aReduceBitmapsOptimalRB.Check( sal_True ); else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL ) - aReduceBitmapsNormalRB.Check( TRUE ); + aReduceBitmapsNormalRB.Check( sal_True ); else - aReduceBitmapsResolutionRB.Check( TRUE ); + aReduceBitmapsResolutionRB.Check( sal_True ); - const USHORT nDPI = pCurrentOptions->GetReducedBitmapResolution(); + const sal_uInt16 nDPI = pCurrentOptions->GetReducedBitmapResolution(); if( nDPI < aDPIArray[ 0 ] ) aReduceBitmapsResolutionLB.SelectEntryPos( 0 ); @@ -236,7 +236,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu { if( nDPI >= aDPIArray[ i ] ) { - aReduceBitmapsResolutionLB.SelectEntryPos( (USHORT) i ); + aReduceBitmapsResolutionLB.SelectEntryPos( (sal_uInt16) i ); i = -1; } } @@ -356,12 +356,12 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt pCurrentOptions->SetReducedTransparencyMode( aReduceTransparencyAutoRB.IsChecked() ? PRINTER_TRANSPARENCY_AUTO : PRINTER_TRANSPARENCY_NONE ); pCurrentOptions->SetReduceGradients( aReduceGradientsCB.IsChecked() ); pCurrentOptions->SetReducedGradientMode( aReduceGradientsStripesRB.IsChecked() ? PRINTER_GRADIENT_STRIPES : PRINTER_GRADIENT_COLOR ); - pCurrentOptions->SetReducedGradientStepCount( (USHORT) aReduceGradientsStepCountNF.GetValue() ); + pCurrentOptions->SetReducedGradientStepCount( (sal_uInt16) aReduceGradientsStepCountNF.GetValue() ); pCurrentOptions->SetReduceBitmaps( aReduceBitmapsCB.IsChecked() ); pCurrentOptions->SetReducedBitmapMode( aReduceBitmapsOptimalRB.IsChecked() ? PRINTER_BITMAP_OPTIMAL : ( aReduceBitmapsNormalRB.IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) ); - pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) aReduceBitmapsResolutionLB.GetSelectEntryPos(), - (USHORT)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] ); + pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) aReduceBitmapsResolutionLB.GetSelectEntryPos(), + (sal_uInt16)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] ); pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() ); pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() ); } @@ -369,7 +369,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox ) { (void)pBox; //unused - const BOOL bReduceTransparency = aReduceTransparencyCB.IsChecked(); + const sal_Bool bReduceTransparency = aReduceTransparencyCB.IsChecked(); aReduceTransparencyAutoRB.Enable( bReduceTransparency ); aReduceTransparencyNoneRB.Enable( bReduceTransparency ); @@ -382,7 +382,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox* IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox ) { (void)pBox; //unused - const BOOL bEnable = aReduceGradientsCB.IsChecked(); + const sal_Bool bEnable = aReduceGradientsCB.IsChecked(); aReduceGradientsStripesRB.Enable( bEnable ); aReduceGradientsColorRB.Enable( bEnable ); @@ -396,7 +396,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox ) { (void)pBox; //unused - const BOOL bEnable = aReduceBitmapsCB.IsChecked(); + const sal_Bool bEnable = aReduceBitmapsCB.IsChecked(); aReduceBitmapsOptimalRB.Enable( bEnable ); aReduceBitmapsNormalRB.Enable( bEnable ); @@ -412,7 +412,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton ) { (void)pButton; //unused - const BOOL bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked(); + const sal_Bool bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked(); aReduceGradientsStepCountNF.Enable( bEnable ); @@ -422,7 +422,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, Radi IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton ) { (void)pButton; //unused - const BOOL bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked(); + const sal_Bool bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked(); aReduceBitmapsResolutionLB.Enable( bEnable ); @@ -435,7 +435,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, { aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) ); ImplUpdateControls( &maPrinterOptions ); - bOutputForPrinter = TRUE; + bOutputForPrinter = sal_True; // #i63982# ImplSetAccessibleNames(); } @@ -451,7 +451,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton { aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) ); ImplUpdateControls( &maPrintFileOptions ); - bOutputForPrinter = FALSE; + bOutputForPrinter = sal_False; // #i63982# ImplSetAccessibleNames(); } diff --git a/sfx2/source/dialog/printopt.hrc b/sfx2/source/dialog/printopt.hrc index 38c766c9f56a..38c766c9f56a 100644..100755 --- a/sfx2/source/dialog/printopt.hrc +++ b/sfx2/source/dialog/printopt.hrc diff --git a/sfx2/source/dialog/printopt.src b/sfx2/source/dialog/printopt.src index 4217539a3af8..01650f3e9275 100644..100755 --- a/sfx2/source/dialog/printopt.src +++ b/sfx2/source/dialog/printopt.src @@ -60,6 +60,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_PRINTEROUTPUT { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_PRINTEROUTPUT"; TabStop = TRUE; Pos = MAP_APPFONT ( 81, 14 ) ; Size = MAP_APPFONT ( 60, 10 ) ; @@ -67,6 +68,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_PRINTFILEOUTPUT { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_PRINTFILEOUTPUT"; TabStop = TRUE; Pos = MAP_APPFONT ( 142, 14 ) ; Size = MAP_APPFONT ( 100, 10 ) ; @@ -83,6 +85,7 @@ TabPage TP_COMMONPRINTOPTIONS CheckBox CB_REDUCETRANSPARENCY { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCETRANSPARENCY"; TabStop = TRUE; Pos = MAP_APPFONT ( 18, 38 ) ; Size = MAP_APPFONT ( 115, 10 ) ; @@ -90,6 +93,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCETRANSPARENCY_AUTO { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCETRANSPARENCY_AUTO"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 51 ) ; Size = MAP_APPFONT ( 105, 10 ) ; @@ -97,6 +101,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCETRANSPARENCY_NONE { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCETRANSPARENCY_NONE"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 64 ) ; Size = MAP_APPFONT ( 105, 10 ) ; @@ -107,6 +112,7 @@ TabPage TP_COMMONPRINTOPTIONS CheckBox CB_REDUCEGRADIENTS { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEGRADIENTS"; TabStop = TRUE; Pos = MAP_APPFONT ( 136, 38 ) ; Size = MAP_APPFONT ( 121, 10 ) ; @@ -114,6 +120,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCEGRADIENTS_STRIPES { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEGRADIENTS_STRIPES"; TabStop = TRUE; Pos = MAP_APPFONT ( 146, 51 ) ; Size = MAP_APPFONT ( 77, 10 ) ; @@ -121,6 +128,7 @@ TabPage TP_COMMONPRINTOPTIONS }; NumericField NF_REDUCEGRADIENTS_STEPCOUNT { + HelpID = "sfx2:NumericField:TP_COMMONPRINTOPTIONS:NF_REDUCEGRADIENTS_STEPCOUNT"; TabStop = TRUE; Border = TRUE ; Pos = MAP_APPFONT ( 224, 49 ) ; @@ -132,6 +140,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCEGRADIENTS_COLOR { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEGRADIENTS_COLOR"; TabStop = TRUE; Pos = MAP_APPFONT ( 146, 64 ) ; Size = MAP_APPFONT ( 108, 10 ) ; @@ -142,6 +151,7 @@ TabPage TP_COMMONPRINTOPTIONS CheckBox CB_REDUCEBITMAPS { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEBITMAPS"; TabStop = TRUE; Pos = MAP_APPFONT ( 18, 80 ) ; Size = MAP_APPFONT ( 115, 10 ) ; @@ -149,6 +159,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCEBITMAPS_OPTIMAL { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_OPTIMAL"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 93 ) ; Size = MAP_APPFONT ( 226, 10 ) ; @@ -156,6 +167,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCEBITMAPS_NORMAL { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_NORMAL"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 106 ) ; Size = MAP_APPFONT ( 226, 10 ) ; @@ -163,6 +175,7 @@ TabPage TP_COMMONPRINTOPTIONS }; RadioButton RB_REDUCEBITMAPS_RESOLUTION { + HelpID = "sfx2:RadioButton:TP_COMMONPRINTOPTIONS:RB_REDUCEBITMAPS_RESOLUTION"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 119 ) ; Size = MAP_APPFONT ( 52, 10 ) ; @@ -170,6 +183,7 @@ TabPage TP_COMMONPRINTOPTIONS }; ListBox LB_REDUCEBITMAPS_RESOLUTION { + HelpID = "sfx2:ListBox:TP_COMMONPRINTOPTIONS:LB_REDUCEBITMAPS_RESOLUTION"; TabStop = TRUE; Border = TRUE ; Pos = MAP_APPFONT ( 81, 117 ) ; @@ -188,6 +202,7 @@ TabPage TP_COMMONPRINTOPTIONS }; CheckBox CB_REDUCEBITMAPS_TRANSPARENCY { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_REDUCEBITMAPS_TRANSPARENCY"; TabStop = TRUE; Pos = MAP_APPFONT ( 28, 132 ) ; Size = MAP_APPFONT ( 226, 10 ) ; @@ -198,6 +213,7 @@ TabPage TP_COMMONPRINTOPTIONS CheckBox CB_CONVERTTOGREYSCALES { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_CONVERTTOGREYSCALES"; TabStop = TRUE; Pos = MAP_APPFONT ( 136, 80 ) ; Size = MAP_APPFONT ( 123, 10 ) ; @@ -214,6 +230,7 @@ TabPage TP_COMMONPRINTOPTIONS }; CheckBox CB_PAPERSIZE { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_PAPERSIZE"; TabStop = TRUE; Pos = MAP_APPFONT ( 12, 159 ) ; Size = MAP_APPFONT ( 123, 10 ) ; @@ -221,6 +238,7 @@ TabPage TP_COMMONPRINTOPTIONS }; CheckBox CB_PAPERORIENTATION { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_PAPERORIENTATION"; TabStop = TRUE; Pos = MAP_APPFONT ( 12, 172 ) ; Size = MAP_APPFONT ( 123 , 10 ) ; @@ -228,6 +246,7 @@ TabPage TP_COMMONPRINTOPTIONS }; CheckBox CB_TRANSPARENCY { + HelpID = "sfx2:CheckBox:TP_COMMONPRINTOPTIONS:CB_TRANSPARENCY"; TabStop = TRUE; Pos = MAP_APPFONT ( 136, 159 ) ; Size = MAP_APPFONT ( 123, 10 ) ; @@ -241,6 +260,7 @@ TabPage TP_COMMONPRINTOPTIONS ModalDialog RID_WARN_PRINTTRANSPARENCY { + HelpID = "sfx2:ModalDialog:RID_WARN_PRINTTRANSPARENCY"; OutputSize = TRUE ; Size = MAP_APPFONT ( 195 , 85 ) ; Text [ en-US ] = "Warning" ; @@ -266,6 +286,7 @@ ModalDialog RID_WARN_PRINTTRANSPARENCY }; PushButton BTN_PRINTTRANS_NO { + HelpID = "sfx2:PushButton:RID_WARN_PRINTTRANSPARENCY:BTN_PRINTTRANS_NO"; Pos = MAP_APPFONT ( 68 , 48 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~No" ; @@ -278,6 +299,7 @@ ModalDialog RID_WARN_PRINTTRANSPARENCY }; CheckBox CBX_NOPRINTTRANSWARN { + HelpID = "sfx2:CheckBox:RID_WARN_PRINTTRANSPARENCY:CBX_NOPRINTTRANSWARN"; Pos = MAP_APPFONT ( 6 , 68 ) ; Size = MAP_APPFONT ( 183 , 10 ) ; Text [ en-US ] = "~Do not show warning again" ; diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 766654e676d1..2fac778744d7 100644..100755 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -43,13 +43,13 @@ #include "recfloat.hxx" #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#include "imagemgr.hxx" +#include "sfx2/imagemgr.hxx" using namespace ::com::sun::star; @@ -149,21 +149,21 @@ static rtl::OUString GetLabelFromCommandURL( const rtl::OUString& rCommandURL, c SFX_IMPL_FLOATINGWINDOW( SfxRecordingFloatWrapper_Impl, SID_RECORDING_FLOATWINDOW ); SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( Window* pParentWnd , - USHORT nId , + sal_uInt16 nId , SfxBindings* pBind , SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentWnd, nId ) , pBindings( pBind ) { pWindow = new SfxRecordingFloat_Impl( pBindings, this, pParentWnd ); - SetWantsFocus( FALSE ); + SetWantsFocus( sal_False ); eChildAlignment = SFX_ALIGN_NOALIGNMENT; ( ( SfxFloatingWindow* ) pWindow )->Initialize( pInfo ); } SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl() { - SfxBoolItem aItem( FN_PARAM_1, TRUE ); + SfxBoolItem aItem( FN_PARAM_1, sal_True ); com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder(); if ( xRecorder.is() ) pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SFX_CALLMODE_SYNCHRON, &aItem, 0L ); @@ -172,7 +172,7 @@ SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl() sal_Bool SfxRecordingFloatWrapper_Impl::QueryClose() { // asking for recorded macro should be replaced if index access is available! - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder(); if ( xRecorder.is() && xRecorder->getRecordedMacro().getLength() ) { @@ -222,7 +222,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl( aTbx.SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) ); // start recording - SfxBoolItem aItem( SID_RECORDMACRO, TRUE ); + SfxBoolItem aItem( SID_RECORDMACRO, sal_True ); GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SFX_CALLMODE_SYNCHRON, &aItem, 0L ); } @@ -241,9 +241,9 @@ SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl() } } -BOOL SfxRecordingFloat_Impl::Close() +sal_Bool SfxRecordingFloat_Impl::Close() { - BOOL bRet = SfxFloatingWindow::Close(); + sal_Bool bRet = SfxFloatingWindow::Close(); return bRet; } diff --git a/sfx2/source/dialog/recfloat.src b/sfx2/source/dialog/recfloat.src index 7c35f2106cee..47e4803c1b5b 100644..100755 --- a/sfx2/source/dialog/recfloat.src +++ b/sfx2/source/dialog/recfloat.src @@ -33,6 +33,7 @@ FloatingWindow SID_RECORDING_FLOATWINDOW { + HelpID = "sfx2:FloatingWindow:SID_RECORDING_FLOATWINDOW"; Moveable = TRUE ; Closeable = TRUE ; Hide = TRUE ; diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 148c8dee03c1..535a74625fc3 100644..100755 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -62,7 +62,7 @@ namespace enum RedliningMode { RL_NONE, RL_WRITER, RL_CALC }; enum RedlineFunc { RF_ON, RF_PROTECT }; - bool QueryState( USHORT _nSlot, bool& _rValue ) + bool QueryState( sal_uInt16 _nSlot, bool& _rValue ) { bool bRet = false; SfxViewShell* pViewSh = SfxViewShell::Current(); @@ -84,7 +84,7 @@ namespace bool bRet = false; if (_eMode != RL_NONE) { - USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT; + sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT; bRet = QueryState( nSlot, _rValue ); } return bRet; @@ -96,7 +96,7 @@ namespace bool bRet = false; if (_eMode != RL_NONE) { - USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD; + sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD; bRet = QueryState( nSlot, _rValue ); } return bRet; @@ -183,7 +183,7 @@ struct SfxSecurityPage_Impl SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet ); ~SfxSecurityPage_Impl(); - BOOL FillItemSet_Impl( SfxItemSet & ); + sal_Bool FillItemSet_Impl( SfxItemSet & ); void Reset_Impl( const SfxItemSet & ); }; @@ -262,7 +262,7 @@ SfxSecurityPage_Impl::~SfxSecurityPage_Impl() } -BOOL SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & ) +sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & ) { bool bModified = false; @@ -334,7 +334,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) SfxDispatcher* pDisp = pViewSh->GetDispatcher(); if (SFX_ITEM_AVAILABLE <= pDisp->QueryState( SID_HTML_MODE, pItem )) { - USHORT nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); + sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue(); bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 ); } } @@ -381,9 +381,9 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) // A Calc document that is shared will have 'm_eRedlingMode == RL_NONE' // In shared documents change recording and protection must be disabled, // similar to documents that do not support change recording at all. - m_aRecordChangesCB.Check( FALSE ); + m_aRecordChangesCB.Check( sal_False ); m_aRecordChangesCB.Disable(); - m_aChangeProtectionPB.Check( FALSE ); + m_aChangeProtectionPB.Check( sal_False ); m_aChangeProtectionPB.Disable(); } } @@ -505,7 +505,7 @@ SfxSecurityPage::~SfxSecurityPage() } -BOOL SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet ) +sal_Bool SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet ) { bool bModified = false; DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" ); diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src index 87cc2e1af8d8..87cc2e1af8d8 100644..100755 --- a/sfx2/source/dialog/securitypage.src +++ b/sfx2/source/dialog/securitypage.src diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx index 8940e073240a..76010410b898 100644..100755 --- a/sfx2/source/dialog/sfxdlg.cxx +++ b/sfx2/source/dialog/sfxdlg.cxx @@ -30,7 +30,7 @@ #include "precompiled_sfx2.hxx" #include <sfx2/sfxdlg.hxx> -#include "cuilib.hxx" +//#include "cuilib.hxx" #include <osl/module.hxx> #include <tools/string.hxx> diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 065e8d773467..58535f062b3a 100644..100755 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -45,7 +45,7 @@ #include <sfx2/dockwin.hxx> #include <sfx2/app.hxx> #include "dialog.hrc" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/mnumgr.hxx> #include "virtmenu.hxx" #include <sfx2/msgpool.hxx> @@ -60,10 +60,10 @@ using namespace ::rtl; struct SfxDock_Impl { - USHORT nType; + sal_uInt16 nType; SfxDockingWindow* pWin; // SplitWindow hat dieses Fenster - BOOL bNewLine; - BOOL bHide; // SplitWindow hatte dieses Fenster + sal_Bool bNewLine; + sal_Bool bHide; // SplitWindow hatte dieses Fenster long nSize; }; @@ -82,21 +82,21 @@ class SfxEmptySplitWin_Impl : public SplitWindow friend class SfxSplitWindow; SfxSplitWindow* pOwner; - BOOL bFadeIn; - BOOL bAutoHide; - BOOL bSplit; - BOOL bEndAutoHide; + sal_Bool bFadeIn; + sal_Bool bAutoHide; + sal_Bool bSplit; + sal_Bool bEndAutoHide; Timer aTimer; Point aLastPos; - USHORT nState; + sal_uInt16 nState; SfxEmptySplitWin_Impl( SfxSplitWindow *pParent ) : SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) ) , pOwner( pParent ) - , bFadeIn( FALSE ) - , bAutoHide( FALSE ) - , bSplit( FALSE ) - , bEndAutoHide( FALSE ) + , bFadeIn( sal_False ) + , bAutoHide( sal_False ) + , bSplit( sal_False ) + , bEndAutoHide( sal_False ) , nState( 1 ) { aTimer.SetTimeoutHdl( @@ -105,7 +105,7 @@ friend class SfxSplitWindow; SetAlign( pOwner->GetAlign() ); Actualize(); ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() ); - ShowFadeInHideButton( TRUE ); + ShowFadeInHideButton( sal_True ); } ~SfxEmptySplitWin_Impl() @@ -141,7 +141,7 @@ void SfxEmptySplitWin_Impl::AutoHide() { pOwner->SetPinned_Impl( !pOwner->bPinned ); pOwner->SaveConfig_Impl(); - bAutoHide = TRUE; + bAutoHide = sal_True; FadeIn(); } @@ -149,7 +149,7 @@ void SfxEmptySplitWin_Impl::FadeIn() { if (!bAutoHide ) bAutoHide = IsFadeNoButtonMode(); - pOwner->SetFadeIn_Impl( TRUE ); + pOwner->SetFadeIn_Impl( sal_True ); pOwner->Show_Impl(); if ( bAutoHide ) { @@ -179,7 +179,7 @@ void SfxEmptySplitWin_Impl::MouseMove( const MouseEvent& rMEvt ) //------------------------------------------------------------------------- SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, - SfxWorkWindow *pW, BOOL bWithButtons, WinBits nBits ) + SfxWorkWindow *pW, sal_Bool bWithButtons, WinBits nBits ) /* [Beschreibung] @@ -193,15 +193,15 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, eAlign(eAl), pWorkWin(pW), pDockArr( new SfxDockArr_Impl ), - bLocked(FALSE), - bPinned(TRUE), + bLocked(sal_False), + bPinned(sal_True), pEmptyWin(NULL), pActive(NULL) { if ( bWithButtons ) { - ShowAutoHideButton( FALSE ); // no autohide button (pin) anymore - ShowFadeOutButton( TRUE ); + ShowAutoHideButton( sal_False ); // no autohide button (pin) anymore + ShowFadeOutButton( sal_True ); } // SV-Alignment setzen @@ -219,7 +219,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, break; case SFX_ALIGN_BOTTOM: eTbxAlign = WINDOWALIGN_BOTTOM; - bPinned = TRUE; + bPinned = sal_True; break; default: eTbxAlign = WINDOWALIGN_TOP; // some sort of default... @@ -230,7 +230,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, pEmptyWin = new SfxEmptySplitWin_Impl( this ); if ( bPinned ) { - pEmptyWin->bFadeIn = TRUE; + pEmptyWin->bFadeIn = sal_True; pEmptyWin->nState = 2; } @@ -245,26 +245,26 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, OUString aTemp; if ( aUserItem >>= aTemp ) aWinData = String( aTemp ); - if ( aWinData.Len() && aWinData.GetChar( (USHORT) 0 ) == 'V' ) + if ( aWinData.Len() && aWinData.GetChar( (sal_uInt16) 0 ) == 'V' ) { - pEmptyWin->nState = (USHORT) aWinData.GetToken( 1, ',' ).ToInt32(); + pEmptyWin->nState = (sal_uInt16) aWinData.GetToken( 1, ',' ).ToInt32(); if ( pEmptyWin->nState & 2 ) - pEmptyWin->bFadeIn = TRUE; - bPinned = TRUE; // always assume pinned - floating mode not used anymore + pEmptyWin->bFadeIn = sal_True; + bPinned = sal_True; // always assume pinned - floating mode not used anymore - USHORT i=2; - USHORT nCount = (USHORT) aWinData.GetToken(i++, ',').ToInt32(); - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 i=2; + sal_uInt16 nCount = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32(); + for ( sal_uInt16 n=0; n<nCount; n++ ) { SfxDock_Impl *pDock = new SfxDock_Impl; pDock->pWin = 0; - pDock->bNewLine = FALSE; - pDock->bHide = TRUE; - pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32(); + pDock->bNewLine = sal_False; + pDock->bHide = sal_True; + pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32(); if ( !pDock->nType ) { // K"onnte NewLine bedeuten - pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32(); + pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32(); if ( !pDock->nType ) { // Lesefehler @@ -272,7 +272,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, break; } else - pDock->bNewLine = TRUE; + pDock->bNewLine = sal_True; } pDockArr->Insert(pDock,n); @@ -281,8 +281,8 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, } else { - bPinned = TRUE; - pEmptyWin->bFadeIn = TRUE; + bPinned = sal_True; + pEmptyWin->bFadeIn = sal_True; pEmptyWin->nState = 2; } @@ -318,8 +318,8 @@ void SfxSplitWindow::SaveConfig_Impl() aWinData += String::CreateFromInt32( pEmptyWin->nState ); aWinData += ','; - USHORT nCount = 0; - USHORT n; + sal_uInt16 nCount = 0; + sal_uInt16 n; for ( n=0; n<pDockArr->Count(); n++ ) { SfxDock_Impl *pDock = (*pDockArr)[n]; @@ -355,8 +355,8 @@ void SfxSplitWindow::StartSplit() if ( pEmptyWin ) { - pEmptyWin->bFadeIn = TRUE; - pEmptyWin->bSplit = TRUE; + pEmptyWin->bFadeIn = sal_True; + pEmptyWin->bSplit = sal_True; } Rectangle aRect = pWorkWin->GetFreeArea( !bPinned ); @@ -393,17 +393,17 @@ void SfxSplitWindow::SplitResize() void SfxSplitWindow::Split() { if ( pEmptyWin ) - pEmptyWin->bSplit = FALSE; + pEmptyWin->bSplit = sal_False; SplitWindow::Split(); - USHORT nCount = pDockArr->Count(); - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nCount = pDockArr->Count(); + for ( sal_uInt16 n=0; n<nCount; n++ ) { SfxDock_Impl *pD = (*pDockArr)[n]; if ( pD->pWin ) { - USHORT nId = pD->nType; + sal_uInt16 nId = pD->nType; long nSize = GetItemSize( nId, SWIB_FIXED ); long nSetSize = GetItemSize( GetSet( nId ) ); Size aSize; @@ -439,13 +439,13 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize */ { short nLine = -1; // damit erstes Fenster nLine auf 0 hochsetzen kann - USHORT nL; - USHORT nPos = 0; - BOOL bNewLine = TRUE; - BOOL bSaveConfig = FALSE; + sal_uInt16 nL; + sal_uInt16 nPos = 0; + sal_Bool bNewLine = sal_True; + sal_Bool bSaveConfig = sal_False; SfxDock_Impl *pFoundDock=0; - USHORT nCount = pDockArr->Count(); - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nCount = pDockArr->Count(); + for ( sal_uInt16 n=0; n<nCount; n++ ) { SfxDock_Impl *pDock = (*pDockArr)[n]; if ( pDock->bNewLine ) @@ -457,7 +457,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize // Neue Zeile nPos = 0; - bNewLine = TRUE; + bNewLine = sal_True; } if ( pDock->pWin ) @@ -477,7 +477,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize } // Zeile ist schon er"offnet - bNewLine = FALSE; + bNewLine = sal_False; if ( pFoundDock ) break; } @@ -503,18 +503,18 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize { // Nicht gefunden, am Ende einf"ugen pFoundDock = new SfxDock_Impl; - pFoundDock->bHide = TRUE; + pFoundDock->bHide = sal_True; pDockArr->Insert( pFoundDock, nCount ); pFoundDock->nType = pDockWin->GetType(); nLine++; nPos = 0; - bNewLine = TRUE; + bNewLine = sal_True; pFoundDock->bNewLine = bNewLine; - bSaveConfig = TRUE; + bSaveConfig = sal_True; } pFoundDock->pWin = pDockWin; - pFoundDock->bHide = FALSE; + pFoundDock->bHide = sal_False; InsertWindow_Impl( pFoundDock, rSize, nLine, nPos, bNewLine ); if ( bSaveConfig ) SaveConfig_Impl(); @@ -522,7 +522,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize //------------------------------------------------------------------------- -void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave) +void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSave) /* [Beschreibung] @@ -531,18 +531,18 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave) { SfxDock_Impl *pDock=0; - USHORT nCount = pDockArr->Count(); - BOOL bFound = FALSE; - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nCount = pDockArr->Count(); + sal_Bool bFound = sal_False; + for ( sal_uInt16 n=0; n<nCount; n++ ) { pDock = (*pDockArr)[n]; if ( pDock->nType == pDockWin->GetType() ) { if ( pDock->bNewLine && n<nCount-1 ) - (*pDockArr)[n+1]->bNewLine = TRUE; + (*pDockArr)[n+1]->bNewLine = sal_True; // Fenster hat schon eine Position, die vergessen wir - bFound = TRUE; + bFound = sal_True; pDockArr->Remove(n); break; } @@ -558,7 +558,7 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave) //------------------------------------------------------------------------- void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize, - USHORT nLine, USHORT nPos, BOOL bNewLine) + sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine) /* [Beschreibung] @@ -567,7 +567,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize, */ { - USHORT nL, nP; + sal_uInt16 nL, nP; GetWindowPos( pDockWin, nL, nP ); if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 ) @@ -583,7 +583,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize, //------------------------------------------------------------------------- void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize, - USHORT nLine, USHORT nPos, BOOL bNewLine) + sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine) /* [Beschreibung] @@ -592,9 +592,9 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize */ { - ReleaseWindow_Impl( pDockWin, FALSE ); + ReleaseWindow_Impl( pDockWin, sal_False ); SfxDock_Impl *pDock = new SfxDock_Impl; - pDock->bHide = FALSE; + pDock->bHide = sal_False; pDock->nType = pDockWin->GetType(); pDock->bNewLine = bNewLine; pDock->pWin = pDockWin; @@ -605,12 +605,12 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize // Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die // gleiche oder eine gr"o\sere Position hat als pDockWin. - USHORT nCount = pDockArr->Count(); + sal_uInt16 nCount = pDockArr->Count(); USHORT nLastWindowIdx(0); // Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt - USHORT nInsertPos = 0; - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nInsertPos = 0; + for ( sal_uInt16 n=0; n<nCount; n++ ) { SfxDock_Impl *pD = (*pDockArr)[n]; @@ -621,7 +621,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize // gefunden wird, wird am Ende eingef"ugt nInsertPos = nCount; nLastWindowIdx = n; - USHORT nL=0, nP=0; + sal_uInt16 nL=0, nP=0; GetWindowPos( pD->pWin, nL, nP ); if ( (nL == nLine && nP == nPos) || nL > nLine ) @@ -632,8 +632,8 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize DBG_ASSERT(pD->bNewLine, "Keine neue Zeile?"); // Das Fenster wird auf nPos==0 eingeschoben - pD->bNewLine = FALSE; - pDock->bNewLine = TRUE; + pD->bNewLine = sal_False; + pDock->bNewLine = sal_True; } nInsertPos = n != 0 ? nLastWindowIdx + 1 : 0; // ignore all non-windows after the last window @@ -655,7 +655,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, const Size& rSize, - USHORT nLine, USHORT nPos, BOOL bNewLine) + sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine) /* [Beschreibung] @@ -666,7 +666,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, { SfxDockingWindow* pDockWin = pDock->pWin; - USHORT nItemBits = pDockWin->GetWinBits_Impl(); + sal_uInt16 nItemBits = pDockWin->GetWinBits_Impl(); long nWinSize, nSetSize; if ( IsHorizontal() ) @@ -682,24 +682,24 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, pDock->nSize = nWinSize; - BOOL bUpdateMode = IsUpdateMode(); + sal_Bool bUpdateMode = IsUpdateMode(); if ( bUpdateMode ) - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); if ( bNewLine || nLine == GetItemCount( 0 ) ) { // Es soll nicht in eine vorhandene Zeile eingef"ugt werden, sondern // eine neue erzeugt werden - USHORT nId = 1; - for ( USHORT n=0; n<GetItemCount(0); n++ ) + sal_uInt16 nId = 1; + for ( sal_uInt16 n=0; n<GetItemCount(0); n++ ) { if ( GetItemId(n) >= nId ) nId = GetItemId(n)+1; } // Eine neue nLine-te Zeile erzeugen - USHORT nBits = nItemBits; + sal_uInt16 nBits = nItemBits; if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM ) nBits |= SWIB_COLSET; InsertItem( nId, nSetSize, nLine, 0, nBits ); @@ -710,8 +710,8 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, // so macht, wie man erwartet; "Pixel" macht eigentlich nur Sinn, wenn // auch Items mit prozentualen oder relativen Gr"o\sen dabei sind. nItemBits |= SWIB_PERCENTSIZE; - bLocked = TRUE; - USHORT nSet = GetItemId( nLine ); + bLocked = sal_True; + sal_uInt16 nSet = GetItemId( nLine ); InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits ); // Splitwindows werden im SFX einmal angelegt und beim Einf"ugen des ersten @@ -722,21 +722,21 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, // wird vom SfxDockingwindow veranla\st (->SfxWorkWindow::ConfigChild_Impl) if ( !bPinned && !IsFloatingMode() ) { - bPinned = TRUE; - BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0; - pEmptyWin->bFadeIn = FALSE; - SetPinned_Impl( FALSE ); + bPinned = sal_True; + sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0; + pEmptyWin->bFadeIn = sal_False; + SetPinned_Impl( sal_False ); pEmptyWin->Actualize(); DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" ); - pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE; pWorkWin->ArrangeChilds_Impl(); if ( bFadeIn ) FadeIn(); } else { - BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0; - pEmptyWin->bFadeIn = FALSE; + sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0; + pEmptyWin->bFadeIn = sal_False; pEmptyWin->Actualize(); #ifdef DBG_UTIL if ( !bPinned || !pEmptyWin->bFadeIn ) @@ -748,7 +748,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" ); } #endif - pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE; pWorkWin->ArrangeChilds_Impl(); if ( bFadeIn ) FadeIn(); @@ -758,13 +758,13 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, } if ( bUpdateMode ) - SetUpdateMode( TRUE ); - bLocked = FALSE; + SetUpdateMode( sal_True ); + bLocked = sal_False; } //------------------------------------------------------------------------- -void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) +void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide ) /* [Beschreibung] @@ -772,7 +772,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) gehidet. */ { - USHORT nSet = GetSet( pDockWin->GetType() ); + sal_uInt16 nSet = GetSet( pDockWin->GetType() ); // Splitwindows werden im SFX einmal angelegt und nach dem Entfernen // des letzten DockingWindows unsichtbar gemacht. @@ -782,7 +782,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) // veranla\st! Hide(); pEmptyWin->aTimer.Stop(); - USHORT nRealState = pEmptyWin->nState; + sal_uInt16 nRealState = pEmptyWin->nState; FadeOut_Impl(); pEmptyWin->Hide(); #ifdef DBG_UTIL @@ -801,8 +801,8 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) } SfxDock_Impl *pDock=0; - USHORT nCount = pDockArr->Count(); - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nCount = pDockArr->Count(); + for ( sal_uInt16 n=0; n<nCount; n++ ) { pDock = (*pDockArr)[n]; if ( pDock->nType == pDockWin->GetType() ) @@ -815,10 +815,10 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) // Fenster removen, und wenn es das letzte der Zeile war, auch die Zeile // ( Zeile = ItemSet ) - BOOL bUpdateMode = IsUpdateMode(); + sal_Bool bUpdateMode = IsUpdateMode(); if ( bUpdateMode ) - SetUpdateMode( FALSE ); - bLocked = TRUE; + SetUpdateMode( sal_False ); + bLocked = sal_True; RemoveItem( pDockWin->GetType() ); @@ -826,14 +826,14 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide ) RemoveItem( nSet ); if ( bUpdateMode ) - SetUpdateMode( TRUE ); - bLocked = FALSE; + SetUpdateMode( sal_True ); + bLocked = sal_False; }; //------------------------------------------------------------------------- -BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow, - USHORT& rLine, USHORT& rPos ) const +sal_Bool SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow, + sal_uInt16& rLine, sal_uInt16& rPos ) const /* [Beschreibung] Liefert die Id des Itemsets und die des Items f"ur das "ubergebene @@ -841,19 +841,19 @@ BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow, */ { - USHORT nSet = GetSet ( pWindow->GetType() ); + sal_uInt16 nSet = GetSet ( pWindow->GetType() ); if ( nSet == SPLITWINDOW_ITEM_NOTFOUND ) - return FALSE; + return sal_False; rPos = GetItemPos( pWindow->GetType(), nSet ); rLine = GetItemPos( nSet ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------- -BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos, - USHORT& rLine, USHORT& rPos ) const +sal_Bool SfxSplitWindow::GetWindowPos( const Point& rTestPos, + sal_uInt16& rLine, sal_uInt16& rPos ) const /* [Beschreibung] Liefert die Id des Itemsets und die des Items f"ur das DockingWindow @@ -862,19 +862,19 @@ BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos, */ { - USHORT nId = GetItemId( rTestPos ); + sal_uInt16 nId = GetItemId( rTestPos ); if ( nId == 0 ) - return FALSE; + return sal_False; - USHORT nSet = GetSet ( nId ); + sal_uInt16 nSet = GetSet ( nId ); rPos = GetItemPos( nId, nSet ); rLine = GetItemPos( nSet ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------- -USHORT SfxSplitWindow::GetLineCount() const +sal_uInt16 SfxSplitWindow::GetLineCount() const /* [Beschreibung] @@ -886,33 +886,33 @@ USHORT SfxSplitWindow::GetLineCount() const //------------------------------------------------------------------------- -long SfxSplitWindow::GetLineSize( USHORT nLine ) const +long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const /* [Beschreibung] Liefert die "Zeilenh"ohe" des nLine-ten Itemsets. */ { - USHORT nId = GetItemId( nLine ); + sal_uInt16 nId = GetItemId( nLine ); return GetItemSize( nId ); } //------------------------------------------------------------------------- -USHORT SfxSplitWindow::GetWindowCount( USHORT nLine ) const +sal_uInt16 SfxSplitWindow::GetWindowCount( sal_uInt16 nLine ) const /* [Beschreibung] Liefert die */ { - USHORT nId = GetItemId( nLine ); + sal_uInt16 nId = GetItemId( nLine ); return GetItemCount( nId ); } //------------------------------------------------------------------------- -USHORT SfxSplitWindow::GetWindowCount() const +sal_uInt16 SfxSplitWindow::GetWindowCount() const /* [Beschreibung] @@ -936,11 +936,11 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer) if ( pTimer ) pTimer->Stop(); - if ( CursorIsOverRect( FALSE ) || !pTimer ) + if ( CursorIsOverRect( sal_False ) || !pTimer ) { // Wenn der Mauszeiger innerhalb des Fensters liegt, SplitWindow anzeigen // und Timer zum Schlie\sen aufsetzen - pEmptyWin->bAutoHide = TRUE; + pEmptyWin->bAutoHide = sal_True; if ( !IsVisible() ) pEmptyWin->FadeIn(); @@ -963,16 +963,16 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer) // (Benutzer ist einfach mit der Maus "uber pEmptyWin gefahren) if ( IsVisible() ) { - pEmptyWin->bEndAutoHide = FALSE; + pEmptyWin->bEndAutoHide = sal_False; if ( !Application::IsInModalMode() && !PopupMenu::IsInExecute() && - !pEmptyWin->bSplit && !HasChildPathFocus( TRUE ) ) + !pEmptyWin->bSplit && !HasChildPathFocus( sal_True ) ) { // W"ahrend ein modaler Dialog oder ein Popupmenu offen sind // oder w"ahrend des Splittens auf keinen Fall zumachen; auch // solange eines der Children den Focus hat, bleibt das // das Fenster offen - pEmptyWin->bEndAutoHide = TRUE; + pEmptyWin->bEndAutoHide = sal_True; } if ( pEmptyWin->bEndAutoHide ) @@ -1004,9 +1004,9 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer) //------------------------------------------------------------------------- -BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const +sal_Bool SfxSplitWindow::CursorIsOverRect( sal_Bool bForceAdding ) const { - BOOL bVisible = IsVisible(); + sal_Bool bVisible = IsVisible(); // Auch das kollabierte SplitWindow ber"ucksichtigen Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() ); @@ -1039,8 +1039,8 @@ BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const } if ( aRect.IsInside( OutputToScreenPixel( ((Window*)this)->GetPointerPosPixel() ) ) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } //------------------------------------------------------------------------- @@ -1053,19 +1053,19 @@ SplitWindow* SfxSplitWindow::GetSplitWindow() } //------------------------------------------------------------------------- -BOOL SfxSplitWindow::IsFadeIn() const +sal_Bool SfxSplitWindow::IsFadeIn() const { return pEmptyWin->bFadeIn; } -BOOL SfxSplitWindow::IsAutoHide( BOOL bSelf ) const +sal_Bool SfxSplitWindow::IsAutoHide( sal_Bool bSelf ) const { return bSelf ? pEmptyWin->bAutoHide && !pEmptyWin->bEndAutoHide : pEmptyWin->bAutoHide; } //------------------------------------------------------------------------- -void SfxSplitWindow::SetPinned_Impl( BOOL bOn ) +void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn ) { if ( bPinned == bOn ) return; @@ -1085,13 +1085,13 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn ) Hide(); pEmptyWin->Actualize(); DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" ); - pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE; } Point aPos( GetPosPixel() ); aPos = GetParent()->OutputToScreenPixel( aPos ); SetFloatingPos( aPos ); - SetFloatingMode( TRUE ); + SetFloatingMode( sal_True ); GetFloatingWindow()->SetOutputSizePixel( GetOutputSizePixel() ); if ( pEmptyWin->bFadeIn ) @@ -1101,7 +1101,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn ) { pEmptyWin->nState &= ~1; SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() ); - SetFloatingMode( FALSE ); + SetFloatingMode( sal_False ); if ( pEmptyWin->bFadeIn ) { @@ -1110,7 +1110,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn ) pWorkWin->ReleaseChild_Impl( *pEmptyWin ); pEmptyWin->Hide(); DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" ); - pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE; } } @@ -1120,7 +1120,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn ) //------------------------------------------------------------------------- -void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn ) +void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn ) { if ( bOn == pEmptyWin->bFadeIn ) return; @@ -1144,14 +1144,14 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn ) pWorkWin->ReleaseChild_Impl( *pEmptyWin ); pEmptyWin->Hide(); DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" ); - pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE; pWorkWin->ArrangeChilds_Impl(); pWorkWin->ShowChilds_Impl(); } } else { - pEmptyWin->bAutoHide = FALSE; + pEmptyWin->bAutoHide = sal_False; pEmptyWin->nState &= ~2; if ( !IsFloatingMode() ) { @@ -1161,7 +1161,7 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn ) Hide(); pEmptyWin->Actualize(); DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" ); - pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE; + pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE; pWorkWin->ArrangeChilds_Impl(); pWorkWin->ShowChilds_Impl(); pWorkWin->ArrangeAutoHideWindows( this ); @@ -1181,13 +1181,13 @@ void SfxSplitWindow::AutoHide() if ( !bPinned ) { // Es "schwebt", also wieder andocken - SetPinned_Impl( TRUE ); + SetPinned_Impl( sal_True ); pWorkWin->ArrangeChilds_Impl(); } else { // In den "Schwebezustand" bringen - SetPinned_Impl( FALSE ); + SetPinned_Impl( sal_False ); pWorkWin->ArrangeChilds_Impl(); pWorkWin->ArrangeAutoHideWindows( this ); } @@ -1200,11 +1200,11 @@ void SfxSplitWindow::FadeOut_Impl() { if ( pEmptyWin->aTimer.IsActive() ) { - pEmptyWin->bAutoHide = FALSE; + pEmptyWin->bAutoHide = sal_False; pEmptyWin->aTimer.Stop(); } - SetFadeIn_Impl( FALSE ); + SetFadeIn_Impl( sal_False ); Show_Impl(); } @@ -1216,14 +1216,14 @@ void SfxSplitWindow::FadeOut() void SfxSplitWindow::FadeIn() { - SetFadeIn_Impl( TRUE ); + SetFadeIn_Impl( sal_True ); Show_Impl(); } void SfxSplitWindow::Show_Impl() { - USHORT nCount = pDockArr->Count(); - for ( USHORT n=0; n<nCount; n++ ) + sal_uInt16 nCount = pDockArr->Count(); + for ( sal_uInt16 n=0; n<nCount; n++ ) { SfxDock_Impl *pDock = (*pDockArr)[n]; if ( pDock->pWin ) @@ -1231,11 +1231,11 @@ void SfxSplitWindow::Show_Impl() } } -BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward ) +sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward ) { // Wenn kein pActive, auf erstes bzw. letztes Fenster gehen ( bei !bForward wird erst in der loop dekrementiert ) - USHORT nCount = pDockArr->Count(); - USHORT n = bForward ? 0 : nCount; + sal_uInt16 nCount = pDockArr->Count(); + sal_uInt16 n = bForward ? 0 : nCount; // Wenn Focus innerhalb, dann ein Fenster vor oder zur"uck, wenn m"oglich if ( pActive ) @@ -1256,31 +1256,31 @@ BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward ) if ( bForward ) { // N"achstes Fenster suchen - for ( USHORT nNext=n; nNext<nCount; nNext++ ) + for ( sal_uInt16 nNext=n; nNext<nCount; nNext++ ) { SfxDock_Impl *pD = (*pDockArr)[nNext]; if ( pD->pWin ) { pD->pWin->GrabFocus(); - return TRUE; + return sal_True; } } } else { // Vorheriges Fenster suchen - for ( USHORT nNext=n; nNext--; ) + for ( sal_uInt16 nNext=n; nNext--; ) { SfxDock_Impl *pD = (*pDockArr)[nNext]; if ( pD->pWin ) { pD->pWin->GrabFocus(); - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin ) diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index fbfdcd823e81..c385bad34df3 100644..100755 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -30,7 +30,7 @@ #include "precompiled_sfx2.hxx" #include "srchdlg.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "srchdlg.hrc" @@ -45,7 +45,7 @@ using namespace ::com::sun::star::uno; namespace sfx2 { #define USERITEM_NAME DEFINE_CONST_OUSTRING("UserItem") -#define MAX_SAVE_COUNT (USHORT)10 +#define MAX_SAVE_COUNT (sal_uInt16)10 // ============================================================================ // SearchDialog @@ -114,7 +114,7 @@ void SearchDialog::LoadConfig() } } else - m_aWrapAroundBox.Check( TRUE ); + m_aWrapAroundBox.Check( sal_True ); } void SearchDialog::SaveConfig() @@ -122,7 +122,7 @@ void SearchDialog::SaveConfig() SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName ); aViewOpt.SetWindowState( rtl::OUString::createFromAscii( m_sWinState.GetBuffer() ) ); String sUserData; - USHORT i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT ); + sal_uInt16 i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT ); for ( ; i < nCount; ++i ) { sUserData += m_aSearchEdit.GetEntry(i); @@ -145,7 +145,7 @@ void SearchDialog::SaveConfig() IMPL_LINK( SearchDialog, FindHdl, PushButton*, EMPTYARG ) { String sSrchTxt = m_aSearchEdit.GetText(); - USHORT nPos = m_aSearchEdit.GetEntryPos( sSrchTxt ); + sal_uInt16 nPos = m_aSearchEdit.GetEntryPos( sSrchTxt ); if ( nPos > 0 && nPos != COMBOBOX_ENTRY_NOTFOUND ) m_aSearchEdit.RemoveEntry( nPos ); if ( nPos > 0 ) @@ -169,9 +169,9 @@ void SearchDialog::SetFocusOnEdit() m_aSearchEdit.GrabFocus(); } -BOOL SearchDialog::Close() +sal_Bool SearchDialog::Close() { - BOOL bRet = ModelessDialog::Close(); + sal_Bool bRet = ModelessDialog::Close(); m_aCloseHdl.Call( this ); return bRet; } @@ -182,7 +182,7 @@ void SearchDialog::StateChanged( StateChangedType nStateChange ) { if ( m_sWinState.Len() ) SetWindowState( m_sWinState ); - m_bIsConstructed = TRUE; + m_bIsConstructed = sal_True; } ModelessDialog::StateChanged( nStateChange ); diff --git a/sfx2/source/dialog/srchdlg.hrc b/sfx2/source/dialog/srchdlg.hrc index 55fe9ce47d26..55fe9ce47d26 100644..100755 --- a/sfx2/source/dialog/srchdlg.hrc +++ b/sfx2/source/dialog/srchdlg.hrc diff --git a/sfx2/source/dialog/srchdlg.src b/sfx2/source/dialog/srchdlg.src index 0947f3932981..d1cee69e9157 100644..100755 --- a/sfx2/source/dialog/srchdlg.src +++ b/sfx2/source/dialog/srchdlg.src @@ -52,6 +52,7 @@ ModelessDialog RID_DLG_SEARCH }; ComboBox ED_SEARCH { + HelpID = "sfx2:ComboBox:RID_DLG_SEARCH:ED_SEARCH"; Border = TRUE; Pos = MAP_APPFONT( 6, 14 ); Size = MAP_APPFONT( 150, 50 ); @@ -60,6 +61,7 @@ ModelessDialog RID_DLG_SEARCH }; CheckBox CB_WHOLEWORDS { + HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WHOLEWORDS"; Pos = MAP_APPFONT( 6, 29 ); Size = MAP_APPFONT( 150, 10 ); Text [ en-US ] = "~Whole words only" ; @@ -67,6 +69,7 @@ ModelessDialog RID_DLG_SEARCH }; CheckBox CB_MATCHCASE { + HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_MATCHCASE"; Pos = MAP_APPFONT( 6, 42 ); Size = MAP_APPFONT( 150, 10 ); Text[ en-US ] = "~Match case"; @@ -74,6 +77,7 @@ ModelessDialog RID_DLG_SEARCH }; CheckBox CB_WRAPAROUND { + HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_WRAPAROUND"; Pos = MAP_APPFONT( 6, 55 ); Size = MAP_APPFONT( 150, 10 ); Text [ en-US ] = "Wrap ~around" ; @@ -81,6 +85,7 @@ ModelessDialog RID_DLG_SEARCH }; CheckBox CB_BACKWARDS { + HelpID = "sfx2:CheckBox:RID_DLG_SEARCH:CB_BACKWARDS"; Pos = MAP_APPFONT( 6, 68 ); Size = MAP_APPFONT( 150, 10 ); Text [ en-US ] = "~Backwards" ; @@ -88,6 +93,7 @@ ModelessDialog RID_DLG_SEARCH }; PushButton PB_FIND { + HelpID = "sfx2:PushButton:RID_DLG_SEARCH:PB_FIND"; Pos = MAP_APPFONT( 162, 6 ); Size = MAP_APPFONT( 50, 14 ); Text [ en-US ] = "~Find" ; diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx index da846965b2f2..74008de1ff51 100644..100755 --- a/sfx2/source/dialog/styfitem.cxx +++ b/sfx2/source/dialog/styfitem.cxx @@ -52,17 +52,17 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) : Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILY_ITEM ) ) { - ULONG nMask = ReadLongRes(); + sal_uIntPtr nMask = ReadLongRes(); if(nMask & RSC_SFX_STYLE_ITEM_LIST) { - ULONG nCount = ReadLongRes(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uIntPtr nCount = ReadLongRes(); + for( sal_uIntPtr i = 0; i < nCount; i++ ) { SfxFilterTupel *pTupel = new SfxFilterTupel; pTupel->aName = ReadStringRes(); long lFlags = ReadLongRes(); - pTupel->nFlags = (USHORT)lFlags; + pTupel->nFlags = (sal_uInt16)lFlags; aFilterList.push_back( pTupel ); } } @@ -81,7 +81,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) : } if(nMask & RSC_SFX_STYLE_ITEM_STYLEFAMILY) { - nFamily = (USHORT)ReadLongRes(); + nFamily = (sal_uInt16)ReadLongRes(); } else nFamily = SFX_STYLE_FAMILY_PARA; @@ -110,10 +110,10 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem() // Implementierung des Resource-Konstruktors SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) : - Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( FALSE ) ) + Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( false ) ) { - ULONG nCount = ReadLongRes(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uIntPtr nCount = ReadLongRes(); + for( sal_uIntPtr i = 0; i < nCount; i++ ) { const ResId aResId((RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr()); SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId); diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index c122944d1fb4..d9ea1321adf1 100644..100755 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -36,7 +36,7 @@ #include <sfx2/styledlg.hxx> #include <sfx2/mgetempl.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/sfxuno.hxx> #include "dialog.hrc" @@ -48,7 +48,7 @@ SfxStyleDialog::SfxStyleDialog Window* pParent, // Parent const ResId& rResId, // ResId SfxStyleSheetBase& rStyle, // zu bearbeitendes StyleSheet - BOOL bFreeRes, // Flag Resourcen freigeben + sal_Bool bFreeRes, // Flag Resourcen freigeben const String* pUserBtnTxt ) : @@ -61,7 +61,7 @@ SfxStyleDialog::SfxStyleDialog rStyle.GetItemSet().Clone(), // auch ohne ParentSupport TRUE "ubergeben, aber erweitert // um den StandardButton zu unterdr"ucken - rStyle.HasParentSupport() ? TRUE : 2, + rStyle.HasParentSupport() ? sal_True : 2, pUserBtnTxt ), pStyle( &rStyle ) @@ -69,7 +69,7 @@ SfxStyleDialog::SfxStyleDialog { AddTabPage( ID_TABPAGE_MANAGESTYLES, String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ), - SfxManageStyleSheetPage::Create, 0, FALSE, 0 ); + SfxManageStyleSheetPage::Create, 0, sal_False, 0 ); // bei neuer Vorlage immer die Verwaltungsseite als aktuelle // Seite setzen @@ -151,11 +151,11 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) const SfxItemSet* pInSet = GetInputSetImpl(); SfxWhichIter aIter( *pInSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - SfxItemState eState = pInSet->GetItemState( nWhich, FALSE ); + SfxItemState eState = pInSet->GetItemState( nWhich, sal_False ); if ( SFX_ITEM_DEFAULT == eState ) pExampleSet->ClearItem( nWhich ); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index c2b0e32fa218..8a10a84137b7 100644..100755 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -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; // Die ID + sal_uInt16 nId; // Die ID CreateTabPage fnCreatePage; // Pointer auf die Factory GetTabPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion SfxTabPage* pTabPage; // die TabPage selber - BOOL bOnDemand; // Flag: ItemSet onDemand - BOOL bRefresh; // Flag: Seite mu\s neu initialisiert werden + sal_Bool bOnDemand; // Flag: ItemSet onDemand + sal_Bool bRefresh; // Flag: Seite mu\s neu initialisiert werden // Konstruktor - 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() ); } @@ -368,14 +368,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 ) /* [Beschreibung] @@ -386,7 +386,7 @@ 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 ); @@ -398,7 +398,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 ) /* [Beschreibung] @@ -408,7 +408,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() ) @@ -424,7 +424,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, // ----------------------------------------------------------------------- const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet, - USHORT nSlot ) + sal_uInt16 nSlot ) /* [Beschreibung] @@ -480,11 +480,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 ) @@ -503,7 +503,7 @@ SfxTabDialog::SfxTabDialog const ResId& rResId, // ResourceId const SfxItemSet* pItemSet, // Itemset mit den Daten; // kann NULL sein, wenn Pages onDemand - BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet + sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet // wenn ja -> zus"atzlicher Button f"ur Standard const String* pUserButtonText // Text fuer BenutzerButton; // wenn != 0, wird der UserButton erzeugt @@ -529,7 +529,7 @@ SfxTabDialog::SfxTabDialog const ResId& rResId, // ResourceId const SfxItemSet* pItemSet, // Itemset mit den Daten; kann NULL sein, // wenn Pages onDemand - BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet + sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet // wenn ja -> zus"atzlicher Button f"ur Standard const String* pUserButtonText // Text f"ur BenutzerButton; // wenn != 0, wird der UserButton erzeugt @@ -552,9 +552,9 @@ SfxTabDialog::SfxTabDialog ( Window* pParent, // Parent-Fenster const ResId& rResId, // ResourceId - USHORT nSetId, + sal_uInt16 nSetId, SfxBindings& rBindings, - BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet + sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet // wenn ja -> zus"atzlicher Button f"ur Standard const String* pUserButtonText // Text f"ur BenutzerButton; // wenn != 0, wird der UserButton erzeugt @@ -567,7 +567,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 ); @@ -599,8 +599,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); @@ -635,7 +635,7 @@ SfxTabDialog::~SfxTabDialog() // ----------------------------------------------------------------------- -void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText ) +void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText ) /* [Beschreibung] @@ -674,13 +674,13 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText ) aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN ); // bFmt = tempor"ares Flag im Ctor() "ubergeben, - // wenn bFmt == 2, dann auch TRUE, + // wenn bFmt == 2, dann auch sal_True, // zus"atzlich Ausblendung vom StandardButton, - // nach der Initialisierung wieder auf TRUE setzen + // nach der Initialisierung wieder auf sal_True setzen if ( bFmtFlag != 2 ) aBaseFmtBtn.Show(); else - bFmtFlag = TRUE; + bFmtFlag = sal_True; } if ( pSet ) @@ -688,6 +688,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 ); } // ----------------------------------------------------------------------- @@ -695,7 +700,7 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText ) void SfxTabDialog::RemoveResetButton() { aResetBtn.Hide(); - pImpl->bHideResetBtn = TRUE; + pImpl->bHideResetBtn = sal_True; } // ----------------------------------------------------------------------- @@ -729,10 +734,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 ) @@ -761,7 +766,7 @@ Link SfxTabDialog::GetApplyHandler() const // ----------------------------------------------------------------------- -void SfxTabDialog::EnableApplyButton(BOOL bEnable) +void SfxTabDialog::EnableApplyButton(sal_Bool bEnable) { if ( IsApplyButtonEnabled() == bEnable ) // nothing to do @@ -795,7 +800,7 @@ void SfxTabDialog::EnableApplyButton(BOOL bEnable) // ----------------------------------------------------------------------- -BOOL SfxTabDialog::IsApplyButtonEnabled() const +sal_Bool SfxTabDialog::IsApplyButtonEnabled() const { return ( NULL != pImpl->pApplyButton ); } @@ -819,7 +824,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 ) ); @@ -830,13 +835,13 @@ void SfxTabDialog::Start_Impl() #endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */ // initiale TabPage aus Programm/Hilfe/Konfig - 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; } @@ -851,19 +856,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 ); } @@ -882,11 +887,11 @@ void SfxTabDialog::AddTabPage */ ( - USHORT nId, // ID der Seite + sal_uInt16 nId, // ID der Seite CreateTabPage pCreateFunc, // Pointer auf die Factory-Methode GetTabPageRanges pRangesFunc, // Pointer auf die Methode f"ur das // Erfragen der Ranges onDemand - BOOL bItemsOnDemand // gibt an, ob das Set dieser Seite beim + sal_Bool bItemsOnDemand // gibt an, ob das Set dieser Seite beim // Erzeugen der Seite erfragt wird ) { @@ -906,12 +911,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 ), @@ -934,12 +939,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 ), @@ -952,7 +957,7 @@ void SfxTabDialog::AddTabPage // ----------------------------------------------------------------------- -void SfxTabDialog::RemoveTabPage( USHORT nId ) +void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) /* [Beschreibung] @@ -960,7 +965,7 @@ void SfxTabDialog::RemoveTabPage( USHORT nId ) */ { - USHORT nPos = 0; + sal_uInt16 nPos = 0; aTabCtrl.RemovePage( nId ); Data_Impl* pDataObject = Find( *pImpl->pData, nId, &nPos ); @@ -1003,7 +1008,7 @@ void SfxTabDialog::PageCreated */ ( - USHORT, // Id der erzeugten Seite + sal_uInt16, // Id der erzeugten Seite SfxTabPage& // Referenz auf die erzeugte Seite ) { @@ -1026,7 +1031,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl() // ----------------------------------------------------------------------- -SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const +SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const /* [Beschreibung] @@ -1034,7 +1039,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const */ { - USHORT nPos = 0; + sal_uInt16 nPos = 0; Data_Impl* pDataObject = Find( *pImpl->pData, nPageId, &nPos ); if ( pDataObject ) @@ -1044,7 +1049,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const // ----------------------------------------------------------------------- -BOOL SfxTabDialog::IsInOK() const +sal_Bool SfxTabDialog::IsInOK() const { return pImpl->bInOK; } @@ -1063,25 +1068,25 @@ short SfxTabDialog::Ok() [R"uckgabewert] - RET_OK: wenn mindestens eine Seite TRUE als Returnwert von + RET_OK: wenn mindestens eine Seite sal_True als Returnwert von FillItemSet geliefert hat, sonst RET_CANCEL. */ { - pImpl->bInOK = TRUE; + pImpl->bInOK = sal_True; if ( !pOutSet ) { if ( !pExampleSet && pSet ) - pOutSet = pSet->Clone( FALSE ); // ohne Items + pOutSet = pSet->Clone( sal_False ); // ohne 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; @@ -1100,7 +1105,7 @@ short SfxTabDialog::Ok() if ( pTabPage->FillItemSet( aTmp ) ) { - bModified |= TRUE; + bModified |= sal_True; pExampleSet->Put( aTmp ); pOutSet->Put( aTmp ); } @@ -1109,10 +1114,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; } @@ -1127,7 +1132,7 @@ IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton ) // ----------------------------------------------------------------------- -SfxItemSet* SfxTabDialog::CreateInputItemSet( USHORT ) +SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 ) /* [Beschreibung] @@ -1170,7 +1175,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG ) */ { - pImpl->bInOK = TRUE; + pImpl->bInOK = sal_True; if ( OK_Impl() ) { @@ -1189,7 +1194,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; @@ -1261,7 +1266,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 nicht bekannt" ); @@ -1289,7 +1294,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 nicht bekannt" ); bFmt = 2; @@ -1300,17 +1305,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 mit zwei gleichen Werten -> nur ein Item setzen - USHORT nWh = pPool->GetWhich( *pTmpRanges ); + sal_uInt16 nWh = pPool->GetWhich( *pTmpRanges ); pExampleSet->ClearItem( nWh ); aTmpSet.ClearItem( nWh ); // am OutSet mit InvalidateItem, @@ -1320,13 +1325,13 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG ) else { // richtiger Range mit mehreren Werten - USHORT nTmp = *pTmpRanges, nTmpEnd = *pU; + sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU; DBG_ASSERT( nTmp <= nTmpEnd, "Range ist falsch sortiert" ); if ( nTmp > nTmpEnd ) { // wenn wirklich falsch sortiert, dann neu setzen - USHORT nTmp1 = nTmp; + sal_uInt16 nTmp1 = nTmp; nTmp = nTmpEnd; nTmpEnd = nTmp1; } @@ -1334,7 +1339,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG ) while ( nTmp <= nTmpEnd ) { // "uber den Range iterieren, und die Items setzen - USHORT nWh = pPool->GetWhich( nTmp ); + sal_uInt16 nWh = pPool->GetWhich( nTmp ); pExampleSet->ClearItem( nWh ); aTmpSet.ClearItem( nWh ); // am OutSet mit InvalidateItem, @@ -1349,7 +1354,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG ) // alle Items neu gesetzt -> dann an der aktuellen Page Reset() rufen DBG_ASSERT( pDataObject->pTabPage, "die Page ist weg" ); pDataObject->pTabPage->Reset( aTmpSet ); - pDataObject->pTabPage->pImpl->mbStandard = TRUE; + pDataObject->pTabPage->pImpl->mbStandard = sal_True; } return 1; } @@ -1369,14 +1374,14 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) Handler, der vor dem Umschalten auf eine andere Seite durch Starview gerufen wird. Existiert die Seite noch nicht, so wird sie erzeugt und - die virtuelle Methode <SfxTabDialog::PageCreated( USHORT, SfxTabPage &)> + die virtuelle Methode <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)> gerufen. Existiert die Seite bereits, so wird ggf. <SfxTabPage::Reset(const SfxItemSet &)> oder <SfxTabPage::ActivatePage(const SfxItemSet &)> gerufen. */ { - USHORT const nId = pTabCtrl->GetCurPageId(); + sal_uInt16 const nId = pTabCtrl->GetCurPageId(); DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" ); SFX_APP(); @@ -1458,7 +1463,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); @@ -1466,7 +1471,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; } @@ -1485,7 +1490,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, "keine aktive Page" ); @@ -1540,22 +1545,22 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl ) pSet = GetRefreshedSet(); DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" ); // alle Pages als neu zu initialsieren flaggen - 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 ) // eigene Page nicht mehr refreshen - 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; } // ----------------------------------------------------------------------- @@ -1568,13 +1573,13 @@ const SfxItemSet* SfxTabDialog::GetOutputItemSet [Querverweise] - <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 // die Id, unter der die Seite bei AddTabPage() + sal_uInt16 nId // die Id, unter der die Seite bei AddTabPage() // hinzugef"ugt wurde. ) const { @@ -1623,12 +1628,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 ) /* [Beschreibung] @@ -1642,7 +1647,7 @@ void SfxTabDialog::ShowPage( USHORT nId ) // ----------------------------------------------------------------------- -const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) +const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) /* [Beschreibung] @@ -1652,9 +1657,9 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) [Querverweise] - <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)> [R"uckgabewert] @@ -1673,19 +1678,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() ); @@ -1706,10 +1711,10 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) // sortieren 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; } @@ -1744,15 +1749,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 ); } } diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index d1de5e0aec68..4d88ad76a500 100644..100755 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -61,7 +61,7 @@ #include <vcl/menu.hxx> #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> - +#include <tools/urlobj.hxx> #include <boost/noncopyable.hpp> //...................................................................................................................... @@ -244,7 +244,7 @@ namespace sfx2 SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE ); //------------------------------------------------------------------------------------------------------------------ - TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) + TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, sal_uInt16 i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) :SfxChildWindow( i_pParent, i_nId ) { pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent, @@ -255,7 +255,7 @@ namespace sfx2 pWindow->SetOutputSizePixel( Size( 300, 450 ) ); dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo ); - SetHideNotDelete( TRUE ); + SetHideNotDelete( sal_True ); pWindow->Show(); } @@ -310,7 +310,7 @@ namespace sfx2 virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; - virtual SmartId GetHelpID() const; + virtual rtl::OString GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); @@ -409,10 +409,19 @@ namespace sfx2 return m_aPanelImage; } + static rtl::OString lcl_getHelpId( const ::rtl::OUString& _rHelpURL ) + { + INetURLObject aHID( _rHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ); + else + return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 ); + } + //------------------------------------------------------------------------------------------------------------------ - SmartId CustomToolPanel::GetHelpID() const + rtl::OString CustomToolPanel::GetHelpID() const { - return SmartId( m_aPanelHelpURL ); + return lcl_getHelpId( m_aPanelHelpURL ); } //------------------------------------------------------------------------------------------------------------------ @@ -914,7 +923,7 @@ namespace sfx2 ModuleTaskPane& m_rTaskPane; TitledDockingWindow& m_rDockingWindow; - USHORT m_nViewMenuID; + sal_uInt16 m_nViewMenuID; PanelSelectorLayout m_eCurrentLayout; PanelDescriptors m_aPanelRepository; bool m_bTogglingPanelVisibility; @@ -1033,11 +1042,11 @@ namespace sfx2 switch ( i_pMenu->GetCurItemId() ) { case MID_UNLOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( TRUE ); + m_rDockingWindow.SetFloatingMode( sal_True ); break; case MID_LOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( FALSE ); + m_rDockingWindow.SetFloatingMode( sal_False ); break; case MID_LAYOUT_DRAWERS: @@ -1224,7 +1233,7 @@ namespace sfx2 // Add one entry for every tool panel element to individually make // them visible or hide them. - USHORT nIndex = MID_FIRST_PANEL; + sal_uInt16 nIndex = MID_FIRST_PANEL; for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex ) { const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] ); @@ -1254,7 +1263,7 @@ namespace sfx2 String( SfxResId( STR_SFX_UNDOCK ) ) ); - pMenu->RemoveDisabledEntries( FALSE, FALSE ); + pMenu->RemoveDisabledEntries( sal_False, sal_False ); return pMenu; } diff --git a/sfx2/source/dialog/taskpane.src b/sfx2/source/dialog/taskpane.src index 5a955e8587d1..5a955e8587d1 100644..100755 --- a/sfx2/source/dialog/taskpane.src +++ b/sfx2/source/dialog/taskpane.src diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 67070c3bd303..5e1f75571127 100644..100755 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -45,7 +45,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XModuleManager.hpp> -#include "sfxhelp.hxx" +#include "sfx2/sfxhelp.hxx" #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> @@ -57,8 +57,8 @@ #include <sfx2/objsh.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/newstyle.hxx> -#include "tplpitem.hxx" -#include "sfxresid.hxx" +#include "sfx2/tplpitem.hxx" +#include "sfx2/sfxresid.hxx" #include "templdlg.hrc" #include <sfx2/sfx.hrc> @@ -70,7 +70,7 @@ #include "docvor.hxx" #include <sfx2/doctempl.hxx> #include <sfx2/module.hxx> -#include "imgmgr.hxx" +#include "sfx2/imgmgr.hxx" #include "helpid.hrc" #include "appdata.hxx" #include <sfx2/viewfrm.hxx> @@ -95,7 +95,7 @@ using namespace ::com::sun::star::uno; #define SFX_TEMPLDLG_MIDVSPACE 3 #define SFX_TEMPLDLG_FILTERHEIGHT 100 -static USHORT nLastItemId = USHRT_MAX; +static sal_uInt16 nLastItemId = USHRT_MAX; // filter box has maximum 12 entries visible #define MAX_FILTER_ENTRIES 12 @@ -236,7 +236,7 @@ void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt ) { nModifier = rMEvt.GetModifier(); - BOOL bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), TRUE ) ); + sal_Bool bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), sal_True ) ); if( bHitEmptySpace && ( rMEvt.GetClicks() == 2 ) && rMEvt.IsMod1() ) Control::MouseButtonDown( rMEvt ); else @@ -382,8 +382,8 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void ) if( !( GetSelectionCount() > 0 ) ) { - pDialog->EnableEdit( FALSE ); - pDialog->EnableDel( FALSE ); + pDialog->EnableEdit( sal_False ); + pDialog->EnableDel( sal_False ); } return pDialog->CreateContextMenu(); } @@ -391,7 +391,7 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void ) //------------------------------------------------------------------------- SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(Window *pParentWnd, - USHORT nId, SfxBindings *p, SfxChildWinInfo *pInfo) : + sal_uInt16 nId, SfxBindings *p, SfxChildWinInfo *pInfo) : SfxChildWindow(pParentWnd, nId) { SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParentWnd); @@ -432,13 +432,13 @@ private: protected: virtual void Command( const CommandEvent& rMEvt ); virtual long Notify( NotifyEvent& rNEvt ); - virtual BOOL DoubleClickHdl(); + virtual sal_Bool DoubleClickHdl(); virtual long ExpandingHdl(); virtual void ExpandedHdl(); - virtual BOOL NotifyMoving(SvLBoxEntry* pTarget, + virtual sal_Bool NotifyMoving(SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos); + sal_uIntPtr& rNewChildPos); public: StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle = 0); @@ -458,7 +458,7 @@ public: void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries& rEntries) const { SvLBoxEntry *pEntry; - USHORT nCount=0; + sal_uInt16 nCount=0; for(pEntry=(SvLBoxEntry*)FirstVisible();pEntry;pEntry=(SvLBoxEntry*)NextVisible(pEntry)) { if(IsExpanded(pEntry)) @@ -474,7 +474,7 @@ PopupMenu* StyleTreeListBox_Impl::CreateContextMenu() return pDialog->CreateContextMenu(); } -BOOL StyleTreeListBox_Impl::DoubleClickHdl() +sal_Bool StyleTreeListBox_Impl::DoubleClickHdl() /* [Beschreibung] @@ -485,7 +485,7 @@ BOOL StyleTreeListBox_Impl::DoubleClickHdl() */ { aDoubleClickLink.Call(this); - return FALSE; + return sal_False; } //------------------------------------------------------------------------- @@ -528,10 +528,10 @@ long StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt ) //------------------------------------------------------------------------- -BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget, +sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& lPos) + sal_uIntPtr& lPos) /* [Beschreibung] NotifyMoving Handler; dieser leitet per Link das Event an den Dialog @@ -541,10 +541,10 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget, */ { if(!pTarget || !pEntry) - return FALSE; + return sal_False; aParent = GetEntryText(pTarget); aStyle = GetEntryText(pEntry); - const BOOL bRet = (BOOL)aDropLink.Call(this); + const sal_Bool bRet = (sal_Bool)aDropLink.Call(this); rpNewParent = pTarget; lPos=0; IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); @@ -554,7 +554,7 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget, GetEntryText(pTmpEntry),GetEntryText(pEntry)); pTmpEntry=NextSibling(pTmpEntry),lPos++) ; - return bRet? (BOOL)2: FALSE; + return bRet? (sal_Bool)2: sal_False; } //------------------------------------------------------------------------- @@ -572,7 +572,7 @@ long StyleTreeListBox_Impl::ExpandingHdl() */ { pCurEntry = GetCurEntry(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------- @@ -592,7 +592,7 @@ void StyleTreeListBox_Impl::ExpandedHdl() { SvLBoxEntry *pEntry = GetHdlEntry(); if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry()) - SelectAll( FALSE ); + SelectAll( sal_False ); pCurEntry = 0; } @@ -630,14 +630,14 @@ struct StyleTree_Impl String aName; String aParent; StyleTreeArr_Impl *pChilds; - BOOL bIsExpanded; - BOOL HasParent() const { return aParent.Len() != 0; } + sal_Bool bIsExpanded; + sal_Bool HasParent() const { return aParent.Len() != 0; } StyleTree_Impl(const String &rName, const String &rParent): aName(rName), aParent(rParent), pChilds(0), bIsExpanded(0) {} ~StyleTree_Impl(); - void Put(StyleTree_Impl* pIns, ULONG lPos=ULONG_MAX); - ULONG Count(); + void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX); + sal_uIntPtr Count(); }; typedef StyleTree_Impl* StyleTree_ImplPtr; @@ -645,7 +645,7 @@ SV_DECL_PTRARR_DEL(StyleTreeArr_Impl, StyleTree_ImplPtr, 16, 8) SV_IMPL_PTRARR(StyleTreeArr_Impl, StyleTree_ImplPtr) -ULONG StyleTree_Impl::Count() +sal_uIntPtr StyleTree_Impl::Count() { return pChilds ? pChilds->Count() : 0L; } @@ -659,40 +659,40 @@ StyleTree_Impl::~StyleTree_Impl() //------------------------------------------------------------------------- -void StyleTree_Impl::Put(StyleTree_Impl* pIns, ULONG lPos) +void StyleTree_Impl::Put(StyleTree_Impl* pIns, sal_uIntPtr lPos) { if ( !pChilds ) pChilds = new StyleTreeArr_Impl; if ( ULONG_MAX == lPos ) lPos = pChilds->Count(); - pChilds->Insert( pIns, (USHORT)lPos ); + pChilds->Insert( pIns, (sal_uInt16)lPos ); } //------------------------------------------------------------------------- StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) { - const USHORT nCount = rArr.Count(); + const sal_uInt16 nCount = rArr.Count(); comphelper::string::NaturalStringSorter aSorter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetLocale()); // Alle unter ihren Parents einordnen - USHORT i; + sal_uInt16 i; for(i = 0; i < nCount; ++i) { StyleTree_ImplPtr pEntry = rArr[i]; if(pEntry->HasParent()) { - for(USHORT j = 0; j < nCount; ++j) + for(sal_uInt16 j = 0; j < nCount; ++j) { StyleTree_ImplPtr pCmp = rArr[j]; if(pCmp->aName == pEntry->aParent) { // initial sortiert einfuegen - USHORT nPos; + sal_uInt16 ii; for( nPos = 0 ; nPos < pCmp->Count() && aSorter.compare((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++); pCmp->Put(pEntry,nPos); @@ -716,14 +716,14 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) //------------------------------------------------------------------------- -inline BOOL IsExpanded_Impl( const ExpandedEntries& rEntries, +inline sal_Bool IsExpanded_Impl( const ExpandedEntries& rEntries, const String &rStr) { - USHORT nCount=rEntries.Count(); - for(USHORT n=0;n<nCount;n++) + sal_uInt16 nCount=rEntries.Count(); + for(sal_uInt16 n=0;n<nCount;n++) if(*rEntries[n]==rStr) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } @@ -734,8 +734,8 @@ SvLBoxEntry* FillBox_Impl(SvTreeListBox *pBox, SvLBoxEntry* pParent = 0) { SvLBoxEntry* pNewEntry = pBox->InsertEntry(pEntry->aName, pParent); - const USHORT nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0; - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0; + for(sal_uInt16 i = 0; i < nCount; ++i) FillBox_Impl(pBox, (*pEntry->pChilds)[i], rEntries, pNewEntry); return pNewEntry; } @@ -759,31 +759,32 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ), pbDeleted ( NULL ), - aFmtLb ( this, WB_BORDER | WB_TABSTOP ), + aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH ), aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ), nActFamily ( 0xffff ), nActFilter ( 0 ), nAppFilter ( 0 ), - bDontUpdate ( FALSE ), - bIsWater ( FALSE ), - bEnabled ( TRUE ), - bUpdate ( FALSE ), - bUpdateFamily ( FALSE ), - bCanEdit ( FALSE ), - bCanDel ( FALSE ), - bCanNew ( TRUE ), - bWaterDisabled ( FALSE ), - bNewByExampleDisabled ( FALSE ), - bUpdateByExampleDisabled( FALSE ), - bTreeDrag ( TRUE ), - bHierarchical ( FALSE ), - bBindingUpdate ( TRUE ) -{ + bDontUpdate ( sal_False ), + bIsWater ( sal_False ), + bEnabled ( sal_True ), + bUpdate ( sal_False ), + bUpdateFamily ( sal_False ), + bCanEdit ( sal_False ), + bCanDel ( sal_False ), + bCanNew ( sal_True ), + bWaterDisabled ( sal_False ), + bNewByExampleDisabled ( sal_False ), + bUpdateByExampleDisabled( sal_False ), + bTreeDrag ( sal_True ), + bHierarchical ( sal_False ), + bBindingUpdate ( sal_True ) +{ + aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); aFmtLb.SetHelpId( HID_TEMPLATE_FMT ); aFilterLb.SetHelpId( HID_TEMPLATE_FILTER ); - aFmtLb.SetWindowBits( WB_HIDESELECTION ); + aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION ); Font aFont = aFmtLb.GetFont(); aFont.SetWeight( WEIGHT_NORMAL ); aFmtLb.SetFont( aFont ); @@ -810,28 +811,28 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod nActFilter ( 0 ), nAppFilter ( 0 ), - bDontUpdate ( FALSE ), - bIsWater ( FALSE ), - bEnabled ( TRUE ), - bUpdate ( FALSE ), - bUpdateFamily ( FALSE ), - bCanEdit ( FALSE ), - bCanDel ( FALSE ), - bCanNew ( TRUE ), - bWaterDisabled ( FALSE ), - bNewByExampleDisabled ( FALSE ), - bUpdateByExampleDisabled( FALSE ), - bTreeDrag ( TRUE ), - bHierarchical ( FALSE ), - bBindingUpdate ( TRUE ) + bDontUpdate ( sal_False ), + bIsWater ( sal_False ), + bEnabled ( sal_True ), + bUpdate ( sal_False ), + bUpdateFamily ( sal_False ), + bCanEdit ( sal_False ), + bCanDel ( sal_False ), + bCanNew ( sal_True ), + bWaterDisabled ( sal_False ), + bNewByExampleDisabled ( sal_False ), + bUpdateByExampleDisabled( sal_False ), + bTreeDrag ( sal_True ), + bHierarchical ( sal_False ), + bBindingUpdate ( sal_True ) { - aFmtLb.SetWindowBits( WB_SORT ); + aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT ); } //------------------------------------------------------------------------- -USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId) +sal_uInt16 SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(sal_uInt16 nId) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nId ); return SfxFamilyIdToNId(pItem->GetFamily())-1; @@ -839,7 +840,7 @@ USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId) //------------------------------------------------------------------------- -void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable) +void SfxTemplateDialog_Impl::EnableEdit(sal_Bool bEnable) { SfxCommonTemplateDialog_Impl::EnableEdit( bEnable ); if( !bEnable || !bUpdateByExampleDisabled ) @@ -849,7 +850,7 @@ void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable) //------------------------------------------------------------------------- -USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId) +sal_uInt16 SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(sal_uInt16 nId) { for ( size_t i = 0; i < pStyleFamilies->size(); i++ ) if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 ) @@ -864,7 +865,8 @@ USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId) void SfxCommonTemplateDialog_Impl::ReadResource() { // globale Benutzer-Resource auslesen - for(USHORT i = 0; i < MAX_FAMILIES; ++i) + sal_uInt16 i; + for(i = 0; i < MAX_FAMILIES; ++i) pFamilyState[i] = 0; SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); @@ -879,7 +881,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource() else pStyleFamilies = new SfxStyleFamilies( aFamId ); - nActFilter = pCurObjShell ? static_cast< USHORT >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF; + nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF; if ( pCurObjShell && 0xFFFF == nActFilter ) nActFilter = pCurObjShell->GetAutoStyleFilterIndex(); @@ -892,7 +894,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource() size_t i; for(i = 0; i < nCount; ++i) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; switch( (USHORT)pStyleFamilies->at( i )->GetFamily() ) { case SFX_STYLE_FAMILY_CHAR: nSlot = SID_STYLE_FAMILY1; break; @@ -945,14 +947,14 @@ void SfxCommonTemplateDialog_Impl::ReadResource() for( ; nCount--; ) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nCount ); - USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() ); + sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() ); InsertFamilyItem( nId, pItem ); } LoadedFamilies(); - USHORT nStart = SID_STYLE_FAMILY1; - USHORT nEnd = SID_STYLE_FAMILY4; + sal_uInt16 nStart = SID_STYLE_FAMILY1; + sal_uInt16 nEnd = SID_STYLE_FAMILY4; for ( i = nStart; i <= nEnd; i++ ) pBindings->Update(i); @@ -966,7 +968,7 @@ void SfxCommonTemplateDialog_Impl::ClearResource() { ClearFamilyList(); DELETEX(pStyleFamilies); - USHORT i; + sal_uInt16 i; for ( i = 0; i < MAX_FAMILIES; ++i ) DELETEX(pFamilyState[i]); for ( i = 0; i < COUNT_BOUND_FUNC; ++i ) @@ -1004,7 +1006,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() GetWindow()->Hide(); DELETEX(pStyleFamilies); DELETEZ( m_pStyleFamiliesId ); - USHORT i; + sal_uInt16 i; for ( i = 0; i < MAX_FAMILIES; ++i ) DELETEX(pFamilyState[i]); for ( i = 0; i < COUNT_BOUND_FUNC; ++i ) @@ -1023,7 +1025,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() //------------------------------------------------------------------------- -USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily ) +sal_uInt16 SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily ) { switch ( nFamily ) { @@ -1038,10 +1040,10 @@ USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily ) void SfxCommonTemplateDialog_Impl::SetAutomaticFilter() { - USHORT nCount = aFilterLb.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = aFilterLb.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { - ULONG nFlags = (ULONG)aFilterLb.GetEntryData(i); + sal_uIntPtr nFlags = (sal_uIntPtr)aFilterLb.GetEntryData(i); if ( SFXSTYLEBIT_AUTO == nFlags ) { // automatic entry found -> select it @@ -1062,7 +1064,7 @@ const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() con for(size_t i = 0; i < nCount; ++i) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( i ); - USHORT nId = SfxFamilyIdToNId(pItem->GetFamily()); + sal_uInt16 nId = SfxFamilyIdToNId(pItem->GetFamily()); if(nId == nActFamily) return pItem; } @@ -1081,7 +1083,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) if( pStyle ) EnableEdit( !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) ); else - EnableEdit(FALSE); + EnableEdit(sal_False); if ( pTreeBox ) { @@ -1100,18 +1102,18 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) } } else - pTreeBox->SelectAll( FALSE ); + pTreeBox->SelectAll( sal_False ); } else { - BOOL bSelect = ( rStr.Len() > 0 ); + sal_Bool bSelect = ( rStr.Len() > 0 ); if ( bSelect ) { SvLBoxEntry* pEntry = (SvLBoxEntry*)aFmtLb.FirstVisible(); while ( pEntry && aFmtLb.GetEntryText( pEntry ) != rStr ) pEntry = (SvLBoxEntry*)aFmtLb.NextVisible( pEntry ); if ( !pEntry ) - bSelect = FALSE; + bSelect = sal_False; else { aFmtLb.MakeVisible( pEntry ); @@ -1123,8 +1125,8 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) if ( !bSelect ) { - aFmtLb.SelectAll( FALSE ); - EnableEdit(FALSE); + aFmtLb.SelectAll( sal_False ); + EnableEdit(sal_False); } } } @@ -1151,7 +1153,7 @@ String SfxCommonTemplateDialog_Impl::GetSelectedEntry() const //------------------------------------------------------------------------- -void SfxCommonTemplateDialog_Impl::EnableTreeDrag( BOOL bEnable ) +void SfxCommonTemplateDialog_Impl::EnableTreeDrag( sal_Bool bEnable ) { if ( pStyleSheetPool ) { @@ -1194,13 +1196,13 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() if(pTreeBox) ((const StyleTreeListBox_Impl *)pTreeBox)-> MakeExpanded_Impl( aEntries); - pTreeBox->SetUpdateMode( FALSE ); + pTreeBox->SetUpdateMode( sal_False ); pTreeBox->Clear(); - const USHORT nCount = aArr.Count(); - for(USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = aArr.Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) FillBox_Impl(pTreeBox, aArr[i], aEntries); ; - EnableItem(SID_STYLE_WATERCAN,FALSE); + EnableItem(SID_STYLE_WATERCAN,sal_False); SfxTemplateItem* pState = pFamilyState[nActFamily-1]; @@ -1213,7 +1215,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() pTreeBox->Expand( pEntry ); } - pTreeBox->SetUpdateMode( TRUE ); + pTreeBox->SetUpdateMode( sal_True ); String aStyle; if(pState) //Aktuellen Eintrag selektieren @@ -1224,7 +1226,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() } //------------------------------------------------------------------------- -BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const +sal_Bool SfxCommonTemplateDialog_Impl::HasSelectedStyle() const { return pTreeBox? pTreeBox->FirstSelected() != 0: aFmtLb.GetSelectionCount() != 0; @@ -1235,7 +1237,7 @@ BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const // internal: Refresh the display // nFlags: what we should update. -void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) +void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) { DBG_ASSERT(nFlags, "nothing to do"); const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); @@ -1259,7 +1261,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) const SfxStyleFamily eFam = pItem->GetFamily(); SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL ); - USHORT nFilter = pT ? pT->nFlags : 0; + sal_uInt16 nFilter = pT ? pT->nFlags : 0; if(!nFilter) // automatisch nFilter = nAppFilter; @@ -1270,16 +1272,16 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) pItem = GetFamilyItem_Impl(); if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY) // Update view type list (Hierarchical, All, etc. { - CheckItem(nActFamily, TRUE); // Button in Toolbox checken - aFilterLb.SetUpdateMode(FALSE); + CheckItem(nActFamily, sal_True); // Button in Toolbox checken + aFilterLb.SetUpdateMode(sal_False); aFilterLb.Clear(); //insert hierarchical at the beginning - USHORT nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0); - aFilterLb.SetEntryData( nPos, (void*)(ULONG)SFXSTYLEBIT_ALL ); + sal_uInt16 nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0); + aFilterLb.SetEntryData( nPos, (void*)(sal_uIntPtr)SFXSTYLEBIT_ALL ); const SfxStyleFilter& rFilter = pItem->GetFilterList(); for( size_t i = 0; i < rFilter.size(); ++i) { - ULONG nFilterFlags = rFilter[ i ]->nFlags; + sal_uIntPtr nFilterFlags = rFilter[ i ]->nFlags; nPos = aFilterLb.InsertEntry( rFilter[ i ]->aName ); aFilterLb.SetEntryData( nPos, (void*)nFilterFlags ); } @@ -1290,7 +1292,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) nActFilter = 0; aFilterLb.SelectEntryPos(1); SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL; - USHORT nFilterFlags = pActT ? pActT->nFlags : 0; + sal_uInt16 nFilterFlags = pActT ? pActT->nFlags : 0; pStyleSheetPool->SetSearchMask(eFam, nFilterFlags); } @@ -1300,7 +1302,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // show maximum 12 entries aFilterLb.SetDropDownLineCount( MAX_FILTER_ENTRIES ); - aFilterLb.SetUpdateMode(TRUE); + aFilterLb.SetUpdateMode(sal_True); } else { @@ -1315,7 +1317,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) if(nFlags & UPDATE_FAMILY_LIST) { - EnableItem(SID_STYLE_WATERCAN,FALSE); + EnableItem(SID_STYLE_WATERCAN,sal_False); SfxStyleSheetBase *pStyle = pStyleSheetPool->First(); SvLBoxEntry* pEntry = aFmtLb.First(); @@ -1328,7 +1330,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) while( pStyle ) { //Bubblesort - USHORT nPos; + sal_uInt16 nPos; for( nPos = aStrings.Count() ; nPos && aSorter.compare(*(aStrings[nPos-1]), pStyle->GetName()) > 0 ; nPos--); aStrings.Insert( new String( pStyle->GetName() ), nPos ); @@ -1336,8 +1338,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) } - USHORT nCount = aStrings.Count(); - USHORT nPos = 0; + sal_uInt16 nCount = aStrings.Count(); + sal_uInt16 nPos = 0; while( nPos < nCount && pEntry && *aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) ) { @@ -1348,7 +1350,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) if( nPos < nCount || pEntry ) { // Fills the display box - aFmtLb.SetUpdateMode(FALSE); + aFmtLb.SetUpdateMode(sal_False); aFmtLb.Clear(); nPos = 0; @@ -1356,7 +1358,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) { aFmtLb.InsertEntry( *aStrings.GetObject( nPos ), 0, FALSE, nPos); } - aFmtLb.SetUpdateMode(TRUE); + aFmtLb.SetUpdateMode(true); } // Selects the current style if any SfxTemplateItem *pState = pFamilyState[nActFamily-1]; @@ -1382,13 +1384,13 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) if(pItem && !bWaterDisabled) { CheckItem(SID_STYLE_WATERCAN, pItem->GetValue()); - EnableItem( SID_STYLE_WATERCAN, TRUE ); + EnableItem( SID_STYLE_WATERCAN, sal_True ); } else if(!bWaterDisabled) - EnableItem(SID_STYLE_WATERCAN, TRUE); + EnableItem(SID_STYLE_WATERCAN, sal_True); else - EnableItem(SID_STYLE_WATERCAN, FALSE); + EnableItem(SID_STYLE_WATERCAN, sal_False); //Waehrend Giesskannenmodus Statusupdates ignorieren. @@ -1397,7 +1399,7 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) for(size_t n = 0; n < nCount; n++) { SfxControllerItem *pCItem=pBoundItems[n]; - BOOL bChecked = pItem && pItem->GetValue(); + sal_Bool bChecked = pItem && pItem->GetValue(); if( pCItem->IsBound() == bChecked ) { if( !bChecked ) @@ -1415,16 +1417,16 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) // (Aktualisierung erfolgt, wenn alle Stati aktualisiert worden sind. // Siehe auch: <SfxBindings::AddDoneHdl(const Link &)> -void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemplateItem* pItem ) +void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* pItem ) { - USHORT nIdx = nSlotId - SID_STYLE_FAMILY_START; + sal_uInt16 nIdx = nSlotId - SID_STYLE_FAMILY_START; DELETEZ(pFamilyState[nIdx]); if ( pItem ) pFamilyState[nIdx] = new SfxTemplateItem(*pItem); - bUpdate = TRUE; + bUpdate = sal_True; // Wenn verwendete Vorlagen ( wie zum Teufel findet man das heraus ?? ) - bUpdateFamily = TRUE; + bUpdateFamily = sal_True; } //------------------------------------------------------------------------- @@ -1434,7 +1436,7 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemp void SfxCommonTemplateDialog_Impl::Update_Impl() { - BOOL bDocChanged=FALSE; + sal_Bool bDocChanged=sal_False; SfxStyleSheetBasePool* pNewPool = NULL; SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); SfxObjectShell* pDocShell = pViewFrame->GetObjectShell(); @@ -1459,14 +1461,14 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() { StartListening(*pNewPool); pStyleSheetPool = pNewPool; - bDocChanged=TRUE; + bDocChanged=sal_True; } } if (bUpdateFamily) UpdateFamily_Impl(); - USHORT i; + sal_uInt16 i; for(i = 0; i < MAX_FAMILIES; ++i) if(pFamilyState[i]) break; @@ -1479,7 +1481,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() // oder Default if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) ) { - CheckItem(nActFamily, FALSE); + CheckItem(nActFamily, sal_False); SfxTemplateItem **ppItem = pFamilyState; const size_t nFamilyCount = pStyleFamilies->size(); size_t n; @@ -1495,8 +1497,8 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() else if( bDocChanged ) { // andere DocShell -> alles neu - CheckItem( nActFamily, TRUE ); - nActFilter = static_cast< USHORT >( LoadFactoryStyleFilter( pDocShell ) ); + CheckItem( nActFamily, sal_True ); + nActFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pDocShell ) ); if ( 0xFFFF == nActFilter ) nActFilter = pDocShell->GetAutoStyleFilterIndex(); @@ -1511,7 +1513,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() else { // anderer Filter fuer automatisch - CheckItem( nActFamily, TRUE ); + CheckItem( nActFamily, sal_True ); const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl(); #if OSL_DEBUG_LEVEL > 1 SfxFilterTupel *pT; @@ -1542,7 +1544,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) (void)pTim; // unused if(!bDontUpdate) { - bDontUpdate=TRUE; + bDontUpdate=sal_True; if(!pTreeBox) UpdateStyles_Impl(UPDATE_FAMILY_LIST); else @@ -1556,7 +1558,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) EnableDelete(); } } - bDontUpdate=FALSE; + bDontUpdate=sal_False; DELETEZ(pTimer); } else @@ -1585,7 +1587,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint ) ) { - bUpdate = FALSE; + bUpdate = sal_False; Update_Impl(); } else if ( bUpdateFamily ) @@ -1608,7 +1610,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint EnableEdit( !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) ); else - EnableEdit(FALSE); + EnableEdit(sal_False); } } break; @@ -1618,7 +1620,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint // Nicht sofort Update_Impl rufen, fuer den Fall da\s eines // der Dokumente ein internes InPlaceObjekt ist! case SFX_HINT_DOCCHANGED: - bUpdate = TRUE; + bUpdate = sal_True; break; case SFX_HINT_DYING: { @@ -1633,7 +1635,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint // es kann sein, da\s sich ein neuer erst anmeldet, nachdem der Timer // abgelaufen ist - macht sich schlecht in UpdateStyles_Impl() ! - ULONG nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0; + sal_uIntPtr nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0; if(!bDontUpdate && nId != SFX_HINT_DYING && (rHint.Type() == TYPE(SfxStyleSheetPoolHint)|| @@ -1658,8 +1660,8 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint // oder als Folge von Neu oder Bearbeiten, wenn die aktuelle // Vorlage einem anderen Filter zugewiesen wurde. void SfxCommonTemplateDialog_Impl::FilterSelect( - USHORT nEntry, // Idx des neuen Filters - BOOL bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist + sal_uInt16 nEntry, // Idx des neuen Filters + sal_Bool bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist { if( nEntry != nActFilter || bForce ) { @@ -1689,9 +1691,9 @@ void SfxCommonTemplateDialog_Impl::FilterSelect( //------------------------------------------------------------------------- // Intern: Ausf"uhren von Funktionen "uber den Dispatcher -BOOL SfxCommonTemplateDialog_Impl::Execute_Impl( - USHORT nId, const String &rStr, const String& rRefStr, USHORT nFamily, - USHORT nMask, USHORT *pIdx, const USHORT* pModifier) +sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl( + sal_uInt16 nId, const String &rStr, const String& rRefStr, sal_uInt16 nFamily, + sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier) { SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl(); SfxStringItem aItem(nId, rStr); @@ -1700,7 +1702,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl( SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr); SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr ); const SfxPoolItem* pItems[ 6 ]; - USHORT nCount = 0; + sal_uInt16 nCount = 0; if( rStr.Len() ) pItems[ nCount++ ] = &aItem; pItems[ nCount++ ] = &aFamily; @@ -1720,20 +1722,20 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl( Deleted aDeleted; pbDeleted = &aDeleted; - USHORT nModi = pModifier ? *pModifier : 0; + sal_uInt16 nModi = pModifier ? *pModifier : 0; const SfxPoolItem* pItem = rDispatcher.Execute( nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL, pItems, nModi ); // FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag! if ( !pItem || aDeleted() ) - return FALSE; + return sal_False; if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId ) { SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem); DBG_ASSERT(pFilterItem, "SfxUINT16Item erwartet"); - USHORT nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF; + sal_uInt16 nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF; if(!nFilterFlags) // Benutzervorlage? nFilterFlags = pFilterItem->GetValue(); const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl(); @@ -1752,7 +1754,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl( // where the local stack object is already destroyed. This would // overwrite objects on the stack!! See #i100110 pbDeleted = NULL; - return TRUE; + return sal_True; } //------------------------------------------------------------------------- @@ -1765,14 +1767,14 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) if ( !bHierarchical ) { // TreeView einschalten - bHierarchical=TRUE; + bHierarchical=sal_True; const String aSelectEntry( GetSelectedEntry()); aFmtLb.Hide(); pTreeBox = new StyleTreeListBox_Impl( this, WB_HASBUTTONS | WB_HASLINES | WB_BORDER | WB_TABSTOP | WB_HASLINESATROOT | - WB_HASBUTTONSATROOT | WB_HIDESELECTION ); + WB_HASBUTTONSATROOT | WB_HIDESELECTION | WB_QUICK_SEARCH ); pTreeBox->SetFont( aFmtLb.GetFont() ); pTreeBox->SetPosSizePixel(aFmtLb.GetPosPixel(), aFmtLb.GetSizePixel()); @@ -1791,6 +1793,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) SaveFactoryStyleFilter( pDocShell, HIERARCHICAL_FILTER_INDEX ); FillTreeBox(); SelectStyle(aSelectEntry); + pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); pTreeBox->Show(); } } @@ -1803,7 +1806,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) // Falls bHierarchical, kann sich die Familie geaendert haben // minus one since hierarchical is inserted at the start FilterSelect(pBox->GetSelectEntryPos() - 1, bHierarchical ); - bHierarchical=FALSE; + bHierarchical=sal_False; } return 0; @@ -1812,11 +1815,11 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) //------------------------------------------------------------------------- // Select-Handler der Toolbox -void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry) +void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry) { if( nEntry != nActFamily ) { - CheckItem( nActFamily, FALSE ); + CheckItem( nActFamily, sal_False ); nActFamily = nEntry; SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl(); SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry ); @@ -1829,15 +1832,15 @@ void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry) //------------------------------------------------------------------------- -void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) +void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry) { String aEmpty; switch(nEntry) { case SID_STYLE_WATERCAN: { - const BOOL bState = IsCheckedItem(nEntry); - BOOL bCheck; + const sal_Bool bState = IsCheckedItem(nEntry); + sal_Bool bCheck; SfxBoolItem aBool; // wenn eine Vorlage ausgewaehlt ist. if(!bState && aFmtLb.GetSelectionCount()) @@ -1846,13 +1849,13 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) GetSelectedEntry()); Execute_Impl( SID_STYLE_WATERCAN, aTemplName, aEmpty, - (USHORT)GetFamilyItem_Impl()->GetFamily() ); - bCheck = TRUE; + (sal_uInt16)GetFamilyItem_Impl()->GetFamily() ); + bCheck = sal_True; } else { Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0); - bCheck = FALSE; + bCheck = sal_False; } CheckItem(nEntry, bCheck); aBool.SetValue(bCheck); @@ -1865,7 +1868,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) { const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily(); const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); - USHORT nFilter; + sal_uInt16 nFilter; if( pItem && nActFilter != 0xffff ) { nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags; @@ -1884,7 +1887,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) const String aTemplName(pDlg->GetName()); Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE, aTemplName, aEmpty, - (USHORT)GetFamilyItem_Impl()->GetFamily(), + (sal_uInt16)GetFamilyItem_Impl()->GetFamily(), nFilter); } pStyleSheetPool->SetSearchMask( eFam, nFilter ); @@ -1896,7 +1899,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry) { Execute_Impl(SID_STYLE_UPDATE_BY_EXAMPLE, aEmpty, aEmpty, - (USHORT)GetFamilyItem_Impl()->GetFamily()); + (sal_uInt16)GetFamilyItem_Impl()->GetFamily()); break; } case SID_TEMPLATE_LOAD: @@ -1970,11 +1973,11 @@ void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell* i_pOb IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox ) { - bDontUpdate=TRUE; + bDontUpdate=sal_True; const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); const SfxStyleFamily eFam = pItem->GetFamily(); long ret= pStyleSheetPool->SetParent(eFam,pBox->GetStyle(), pBox->GetParent())? 1L: 0L; - bDontUpdate=FALSE; + bDontUpdate=sal_False; return ret; } @@ -1995,7 +1998,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *) const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); const SfxStyleFamily eFam=pItem->GetFamily(); - USHORT nMask; + sal_uInt16 nMask; if( pItem && nActFilter != 0xffff ) { nMask = pItem->GetFilterList()[ nActFilter ]->nFlags; @@ -2009,7 +2012,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *) Execute_Impl(SID_STYLE_NEW, aEmpty, GetSelectedEntry(), - ( USHORT )GetFamilyItem_Impl()->GetFamily(), + ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(), nMask); Application::SetDefDialogParent( pTmp ); @@ -2024,7 +2027,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *) { if(IsInitialized() && HasSelectedStyle()) { - USHORT nFilter = nActFilter; + sal_uInt16 nFilter = nActFilter; String aTemplName(GetSelectedEntry()); const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); const SfxStyleFamily eFam = pItem->GetFamily(); @@ -2038,7 +2041,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *) else Application::SetDefDialogParent( pWindow ); if ( Execute_Impl( SID_STYLE_EDIT, aTemplName, String(), - (USHORT)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) ) + (sal_uInt16)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) ) { } Application::SetDefDialogParent( pTmp ); @@ -2074,15 +2077,15 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *) if ( pTreeBox ) // Damit die Treelistbox beim L"oschen nicht zuklappt { - bDontUpdate = TRUE; + bDontUpdate = sal_True; } Execute_Impl( SID_STYLE_DELETE, aTemplName, - String(), (USHORT)GetFamilyItem_Impl()->GetFamily() ); + String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() ); if ( pTreeBox ) { pTreeBox->RemoveParentKeepChilds( pTreeBox->FirstSelected() ); - bDontUpdate = FALSE; + bDontUpdate = sal_False; } } } @@ -2099,7 +2102,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete() const String aTemplName(GetSelectedEntry()); const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); const SfxStyleFamily eFam = pItem->GetFamily(); - USHORT nFilter = 0; + sal_uInt16 nFilter = 0; if(pItem->GetFilterList().size() > nActFilter) nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags; if(!nFilter) // automatisch @@ -2110,16 +2113,16 @@ void SfxCommonTemplateDialog_Impl::EnableDelete() DBG_ASSERT(pStyle, "Style nicht gefunden"); if(pStyle && pStyle->IsUserDefined()) { - EnableDel(TRUE); + EnableDel(sal_True); } else { - EnableDel(FALSE); + EnableDel(sal_False); } } else { - EnableDel(FALSE); + EnableDel(sal_False); } } @@ -2149,10 +2152,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl ) if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] && GetSelectedEntry().Len() ) { - USHORT nModifier = aFmtLb.GetModifier(); + sal_uInt16 nModifier = aFmtLb.GetModifier(); Execute_Impl(SID_STYLE_APPLY, GetSelectedEntry(), String(), - ( USHORT )GetFamilyItem_Impl()->GetFamily(), + ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(), 0, 0, &nModifier ); if(ISA(SfxTemplateCatalog_Impl)) ((SfxTemplateCatalog_Impl*) this)->pReal->EndDialog(RET_OK); @@ -2180,7 +2183,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox aEmpty, aEmpty, 0); Execute_Impl(SID_STYLE_WATERCAN, GetSelectedEntry(), aEmpty, - ( USHORT )GetFamilyItem_Impl()->GetFamily()); + ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily()); } EnableItem(SID_STYLE_WATERCAN, !bWaterDisabled); EnableDelete(); @@ -2200,16 +2203,16 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu ) nLastItemId = pMenu->GetCurItemId(); Application::PostUserEvent( LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ), 0 ); - return TRUE; + return sal_True; } switch(nLastItemId) { case ID_NEW: NewHdl(0); break; case ID_EDIT: EditHdl(0); break; case ID_DELETE: DeleteHdl(0); break; - default: return FALSE; + default: return sal_False; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -2217,7 +2220,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu ) void SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl( const Point& rPos, Window* pWin ) { // Bug# 94152: This part should never be called, because before this happens, the TreeListBox should captured this! - DBG_ASSERT( FALSE, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" ); + DBG_ASSERT( sal_False, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" ); PopupMenu* pMenu = CreateContextMenu(); pMenu->Execute( pWin, rPos ); @@ -2237,7 +2240,7 @@ SfxStyleFamily SfxCommonTemplateDialog_Impl::GetActualFamily() const // ----------------------------------------------------------------------- -void SfxCommonTemplateDialog_Impl::EnableExample_Impl(USHORT nId, BOOL bEnable) +void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, sal_Bool bEnable) { if( nId == SID_STYLE_NEW_BY_EXAMPLE ) bNewByExampleDisabled = !bEnable; @@ -2256,9 +2259,9 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu( void ) { if ( bBindingUpdate ) { - pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE ); + pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False ); pBindings->Update( SID_STYLE_NEW ); - bBindingUpdate = FALSE; + bBindingUpdate = sal_False; } PopupMenu* pMenu = new PopupMenu( SfxResId( MN_CONTEXT_TEMPLDLG ) ); pMenu->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ) ); @@ -2277,7 +2280,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( SfxCommonTemplateDialog_Impl( pB, pDlgWindow ), m_pFloat ( pDlgWindow ), - m_bZoomIn ( FALSE ), + m_bZoomIn ( sal_False ), m_aActionTbL ( pDlgWindow, this ), m_aActionTbR ( pDlgWindow, SfxResId( TB_ACTION ) ) @@ -2307,7 +2310,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( // ------------------------------------------------------------------------ -void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable ) +void SfxTemplateDialog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable ) { m_aActionTbL.EnableItem( nId, bEnable ); } @@ -2315,20 +2318,20 @@ void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable ) //------------------------------------------------------------------------- // Insert element into dropdown filter "Frame Styles", "List Styles", etc. -void SfxTemplateDialog_Impl::InsertFamilyItem(USHORT nId,const SfxStyleFamilyItem *pItem) +void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 nId,const SfxStyleFamilyItem *pItem) { - USHORT nHelpId = 0; - switch( (USHORT) pItem->GetFamily() ) + rtl::OString sHelpId; + switch( (sal_uInt16) pItem->GetFamily() ) { - case SFX_STYLE_FAMILY_CHAR: nHelpId = SID_STYLE_FAMILY1; break; - case SFX_STYLE_FAMILY_PARA: nHelpId = SID_STYLE_FAMILY2; break; - case SFX_STYLE_FAMILY_FRAME:nHelpId = SID_STYLE_FAMILY3; break; - case SFX_STYLE_FAMILY_PAGE: nHelpId = SID_STYLE_FAMILY4; break; - case SFX_STYLE_FAMILY_PSEUDO: nHelpId = SID_STYLE_FAMILY5; break; + case SFX_STYLE_FAMILY_CHAR: sHelpId = ".uno:CharStyle"; break; + case SFX_STYLE_FAMILY_PARA: sHelpId = ".uno:ParaStyle"; break; + case SFX_STYLE_FAMILY_FRAME: sHelpId = ".uno:FrameStyle"; break; + case SFX_STYLE_FAMILY_PAGE: sHelpId = ".uno:PageStyle"; break; + case SFX_STYLE_FAMILY_PSEUDO: sHelpId = ".uno:ListStyle"; break; default: OSL_FAIL("unknown StyleFamily"); break; } m_aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), 0, 0); - m_aActionTbL.SetHelpId( nId, nHelpId ); + m_aActionTbL.SetHelpId( nId, sHelpId ); } // ------------------------------------------------------------------------ @@ -2355,7 +2358,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() for( ; nLoop--; ) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nLoop ); - USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() ); + sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() ); m_aActionTbL.SetItemImage( nId, pItem->GetImage() ); } } @@ -2377,15 +2380,15 @@ void SfxTemplateDialog_Impl::ClearFamilyList() void SfxCommonTemplateDialog_Impl::InvalidateBindings() { - pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, TRUE, FALSE); + pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, sal_True, sal_False); pBindings->Update( SID_STYLE_NEW_BY_EXAMPLE ); - pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, TRUE, FALSE); + pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, sal_True, sal_False); pBindings->Update( SID_STYLE_UPDATE_BY_EXAMPLE ); - pBindings->Invalidate( SID_STYLE_WATERCAN, TRUE, FALSE); + pBindings->Invalidate( SID_STYLE_WATERCAN, sal_True, sal_False); pBindings->Update( SID_STYLE_WATERCAN ); - pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE ); + pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False ); pBindings->Update( SID_STYLE_NEW ); - pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, TRUE, FALSE ); + pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, sal_True, sal_False ); pBindings->Update( SID_STYLE_DRAGHIERARCHIE ); } @@ -2500,7 +2503,7 @@ void SfxTemplateDialog_Impl::Command( const CommandEvent& rCEvt ) //------------------------------------------------------------------------- -void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck) +void SfxTemplateDialog_Impl::EnableItem(sal_uInt16 nMesId, sal_Bool bCheck) { String aEmpty; switch(nMesId) @@ -2517,7 +2520,7 @@ void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck) //------------------------------------------------------------------------- -void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck) +void SfxTemplateDialog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool bCheck) { switch(nMesId) { @@ -2532,7 +2535,7 @@ void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck) //------------------------------------------------------------------------- -BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId) +sal_Bool SfxTemplateDialog_Impl::IsCheckedItem(sal_uInt16 nMesId) { switch(nMesId) { @@ -2547,7 +2550,7 @@ BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId) IMPL_LINK_INLINE_START( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox ) { - const USHORT nEntry = pBox->GetCurItemId(); + const sal_uInt16 nEntry = pBox->GetCurItemId(); FamilySelect(nEntry); return 0; } @@ -2575,7 +2578,7 @@ IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox ) IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox ) { - const USHORT nEntry = pBox->GetCurItemId(); + const sal_uInt16 nEntry = pBox->GetCurItemId(); if(nEntry != SID_STYLE_NEW_BY_EXAMPLE || TIB_DROPDOWN != (pBox->GetItemBits(nEntry)&TIB_DROPDOWN)) ActionSelect(nEntry); @@ -2584,7 +2587,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox ) //------------------------------------------------------------------------- IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox ) { - const USHORT nEntry = pBox->GetCurItemId(); + const sal_uInt16 nEntry = pBox->GetCurItemId(); if(nEntry == SID_STYLE_NEW_BY_EXAMPLE && TIB_DROPDOWN == (pBox->GetItemBits(nEntry)&TIB_DROPDOWN)) { @@ -2623,7 +2626,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox ) aCommand = xUICommands->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:LoadStyles"))); sLabel = lcl_GetLabel( aCommand ); pMenu->InsertItem( SID_TEMPLATE_LOAD, sLabel ); - pMenu->SetHelpId(SID_TEMPLATE_LOAD, SID_TEMPLATE_LOAD); + pMenu->SetHelpId(SID_TEMPLATE_LOAD, ".uno:LoadStyles"); pMenu->SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, MenuSelectHdl)); pMenu->Execute( pBox, @@ -2642,7 +2645,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox ) //------------------------------------------------------------------------- IMPL_LINK( SfxTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu) { - USHORT nMenuId = pMenu->GetCurItemId(); + sal_uInt16 nMenuId = pMenu->GetCurItemId(); ActionSelect(nMenuId); return 0; } @@ -2763,7 +2766,7 @@ IMPL_LINK( SfxTemplateCatalog_Impl, OrgHdl, Button *, pButton ) //------------------------------------------------------------------------- -void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable ) +void SfxTemplateCatalog_Impl::EnableEdit( sal_Bool bEnable ) { SfxCommonTemplateDialog_Impl::EnableEdit( bEnable ); aChangeBtn.Enable( bEnable ); @@ -2771,13 +2774,13 @@ void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable ) //------------------------------------------------------------------------- -void SfxTemplateCatalog_Impl::EnableDel( BOOL bEnable ) +void SfxTemplateCatalog_Impl::EnableDel( sal_Bool bEnable ) { SfxCommonTemplateDialog_Impl::EnableDel( bEnable ); aDelBtn.Enable( bEnable ); } -void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable) +void SfxTemplateCatalog_Impl::EnableNew(sal_Bool bEnable) { SfxCommonTemplateDialog_Impl::EnableNew( bEnable ); aNewBtn.Enable( bEnable ); @@ -2787,7 +2790,7 @@ void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable) IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList ) { - const USHORT nEntry = aFamIds[pList->GetSelectEntryPos()]; + const sal_uInt16 nEntry = aFamIds[pList->GetSelectEntryPos()]; FamilySelect(nEntry); return 0; } @@ -2795,7 +2798,7 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList ) //------------------------------------------------------------------------- -void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck ) +void SfxTemplateCatalog_Impl::EnableItem( sal_uInt16 nMesId, sal_Bool bCheck ) { if ( nMesId == SID_STYLE_WATERCAN ) aOkBtn.Enable( bCheck ); @@ -2805,22 +2808,22 @@ void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck ) //------------------------------------------------------------------------- -void SfxTemplateCatalog_Impl::CheckItem(USHORT nMesId, BOOL /*bCheck*/) +void SfxTemplateCatalog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool /*bCheck*/) { if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR ) return; - USHORT i; + sal_uInt16 i; for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ; aFamList.SelectEntryPos(i); } //------------------------------------------------------------------------- -BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId) +sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId) { if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR ) - return FALSE; - USHORT i; + return sal_False; + sal_uInt16 i; for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ; return aFamList.IsEntrySelected( String::CreateFromInt32(i) ); @@ -2830,10 +2833,10 @@ BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId) // Der Katalog muss nur das Disablen beherrschen, da waehrend seiner // Lebenszeit keine Selektionsaenderungen vorgenommen werden koennen -void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable ) +void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable ) { if ( !bEnable ) - for ( USHORT nPos = aFamIds.Count(); nPos--; ) + for ( sal_uInt16 nPos = aFamIds.Count(); nPos--; ) if ( aFamIds[ nPos ] == nId ) { aFamIds.Remove( nPos ); @@ -2841,7 +2844,7 @@ void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable ) } } -void SfxTemplateCatalog_Impl::InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pItem ) +void SfxTemplateCatalog_Impl::InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pItem ) { if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR ) return; @@ -2862,21 +2865,21 @@ void SfxTemplateCatalog_Impl::PrepareDeleteAction() } -void SfxCommonTemplateDialog_Impl::SetFamily( USHORT nId ) +void SfxCommonTemplateDialog_Impl::SetFamily( sal_uInt16 nId ) { if ( nId != nActFamily ) { if ( nActFamily != 0xFFFF ) - CheckItem( nActFamily, FALSE ); + CheckItem( nActFamily, sal_False ); nActFamily = nId; if ( nId != 0xFFFF ) - bUpdateFamily = TRUE; + bUpdateFamily = sal_True; } } void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl() { - bUpdateFamily = FALSE; + bUpdateFamily = sal_False; SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl(); SfxViewFrame *pViewFrame = pDispat->GetFrame(); @@ -2892,10 +2895,10 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl() StartListening(*pOldStyleSheetPool); } - bWaterDisabled = FALSE; - bCanNew = TRUE; - bTreeDrag = TRUE; - bUpdateByExampleDisabled = FALSE; + bWaterDisabled = sal_False; + bCanNew = sal_True; + bTreeDrag = sal_True; + bUpdateByExampleDisabled = sal_False; if ( pStyleSheetPool ) { @@ -2914,7 +2917,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl() // nur, wenn dieser Bereich erlaubt ist 0 != pFamilyState[ nActFamily - 1 ] ) Execute_Impl( SID_STYLE_APPLY, GetSelectedEntry(), - String(), (USHORT)GetFamilyItem_Impl()->GetFamily() ); + String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() ); } void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu() { @@ -2954,7 +2957,7 @@ DropToolBox_Impl::~DropToolBox_Impl() sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt ) { sal_Int8 nReturn = DND_ACTION_NONE; - USHORT nItemId = GetItemId( rEvt.maPosPixel ); + sal_uInt16 nItemId = GetItemId( rEvt.maPosPixel ); if(USHRT_MAX != nItemId && !IsItemChecked( nItemId )) { SetCurItemId(nItemId); diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc index 58563fb9c160..e39108ce57a9 100644..100755 --- a/sfx2/source/dialog/templdlg.hrc +++ b/sfx2/source/dialog/templdlg.hrc @@ -49,4 +49,7 @@ #define BT_VLIST 9 #define BT_TOOL 10 +//IAccessibility2 Implementation 2009----- +#define STR_STYLE_ELEMTLIST 18 +//-----IAccessibility2 Implementation 2009 diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src index fcd6d33e55c6..51b6e9802147 100644..100755 --- a/sfx2/source/dialog/templdlg.src +++ b/sfx2/source/dialog/templdlg.src @@ -46,7 +46,7 @@ ImageList DLG_STYLE_DESIGNER // RID_STYLECATALOG ------------------------------------------------------ ModalDialog RID_STYLECATALOG { - HelpId = SID_STYLE_CATALOG ; + HelpId = CMD_SID_STYLE_CATALOG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 181 , 134 ) ; @@ -67,6 +67,7 @@ ModalDialog RID_STYLECATALOG }; PushButton BT_ORG { + HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_ORG"; Pos = MAP_APPFONT ( 123 , 97 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Organizer..." ; @@ -74,6 +75,7 @@ ModalDialog RID_STYLECATALOG }; PushButton BT_DEL { + HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_DEL"; Pos = MAP_APPFONT ( 123 , 78 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -81,6 +83,7 @@ ModalDialog RID_STYLECATALOG }; PushButton BT_EDIT { + HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_EDIT"; Pos = MAP_APPFONT ( 123 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -88,6 +91,7 @@ ModalDialog RID_STYLECATALOG }; PushButton BT_NEW { + HelpID = "sfx2:PushButton:RID_STYLECATALOG:BT_NEW"; Pos = MAP_APPFONT ( 123 , 43 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~New..." ; @@ -101,6 +105,7 @@ ModalDialog RID_STYLECATALOG }; ListBox BT_TOOL { + HelpID = "sfx2:ListBox:RID_STYLECATALOG:BT_TOOL"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 110 , 55 ) ; @@ -117,6 +122,7 @@ ModalDialog RID_STYLECATALOG }; ListBox BT_FLIST { + HelpID = "sfx2:ListBox:RID_STYLECATALOG:BT_FLIST"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 114 ) ; Size = MAP_APPFONT ( 110 , 77 ) ; @@ -127,6 +133,10 @@ ModalDialog RID_STYLECATALOG }; // Strings --------------------------------------------------------------- +String STR_STYLE_ELEMTLIST +{ + Text [ en-US ] = "Style List" ; +}; String STR_STYLE_FILTER_HIERARCHICAL { Text [ en-US ] = "Hierarchical" ; @@ -137,7 +147,7 @@ DockingWindow DLG_STYLE_DESIGNER { Text [ en-US ] = "Styles and Formatting" ; - HelpId = SID_STYLE_DESIGNER ; + HelpId = CMD_SID_STYLE_DESIGNER ; OutputSize = TRUE ; Hide = TRUE ; SVLook = TRUE ; diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index ed5940cace31..f017ad454063 100644..100755 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -52,6 +52,7 @@ namespace sfx2 ,m_aContentWindow( this, WB_DIALOGCONTROL ) ,m_aBorder( 3, 1, 3, 3 ) ,m_bLayoutPending( false ) + ,m_nTitleBarHeight(0) { impl_construct(); } @@ -140,23 +141,23 @@ namespace sfx2 Size aWindowSize( GetOutputSizePixel() ); // position the tool box - int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() ); - if ( aToolBoxSize.Height() > nTitleBarHeight ) - nTitleBarHeight = aToolBoxSize.Height(); + m_nTitleBarHeight = GetSettings().GetStyleSettings().GetTitleHeight(); + if ( aToolBoxSize.Height() > m_nTitleBarHeight ) + m_nTitleBarHeight = aToolBoxSize.Height(); m_aToolbox.SetPosSizePixel( Point( aWindowSize.Width() - aToolBoxSize.Width(), - ( nTitleBarHeight - aToolBoxSize.Height() ) / 2 + ( m_nTitleBarHeight - aToolBoxSize.Height() ) / 2 ), aToolBoxSize ); // Place the content window. - if ( nTitleBarHeight < aToolBoxSize.Height() ) - nTitleBarHeight = aToolBoxSize.Height(); - aWindowSize.Height() -= nTitleBarHeight; + if ( m_nTitleBarHeight < aToolBoxSize.Height() ) + m_nTitleBarHeight = aToolBoxSize.Height(); + aWindowSize.Height() -= m_nTitleBarHeight; m_aContentWindow.SetPosSizePixel( - Point( m_aBorder.Left(), nTitleBarHeight + m_aBorder.Top() ), + Point( m_aBorder.Left(), m_nTitleBarHeight + m_aBorder.Top() ), Size( aWindowSize.Width() - m_aBorder.Left() - m_aBorder.Right(), aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom() @@ -176,11 +177,6 @@ namespace sfx2 Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR ); - int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() ); - const Size aToolBoxSize = m_aToolbox.CalcWindowSizePixel(); - if ( aToolBoxSize.Height() > nTitleBarHeight ) - nTitleBarHeight = aToolBoxSize.Height(); - SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() ); SetLineColor(); @@ -195,7 +191,7 @@ namespace sfx2 int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1; int nOuterRight = aWindowSize.Width() - 1; int nInnerRight = nOuterRight - m_aBorder.Right() + 1; - int nInnerTop = nTitleBarHeight + m_aBorder.Top() - 1; + int nInnerTop = m_nTitleBarHeight + m_aBorder.Top() - 1; int nOuterBottom = aWindowSize.Height() - 1; int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1; @@ -256,11 +252,11 @@ namespace sfx2 } //------------------------------------------------------------------------------------------------------------------ - USHORT TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback ) + sal_uInt16 TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback ) { // Add the menu before the closer button. - const USHORT nItemCount( m_aToolbox.GetItemCount() ); - const USHORT nItemId( nItemCount + 1 ); + const sal_uInt16 nItemCount( m_aToolbox.GetItemCount() ); + const sal_uInt16 nItemId( nItemCount + 1 ); m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND ); m_aToolbox.SetHelpId( nItemId, i_nHelpId ); m_aToolbox.SetClickHdl( i_rCallback ); @@ -277,14 +273,14 @@ namespace sfx2 //------------------------------------------------------------------------------------------------------------------ IMPL_LINK( TitledDockingWindow, OnToolboxItemSelected, ToolBox*, pToolBox ) { - const USHORT nId = pToolBox->GetCurItemId(); + const sal_uInt16 nId = pToolBox->GetCurItemId(); if ( nId == 1 ) { // the closer EndTracking(); const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() ); - const SfxBoolItem aVisibility( nChildWindowId, FALSE ); + const SfxBoolItem aVisibility( nChildWindowId, sal_False ); GetBindings().GetDispatcher()->Execute( nChildWindowId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, @@ -309,7 +305,7 @@ namespace sfx2 } //------------------------------------------------------------------------------------------------------------------ - void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, BOOL i_bFloatMode ) + void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, sal_Bool i_bFloatMode ) { SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode ); diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src index ede6c4b8c4d1..ede6c4b8c4d1 100644..100755 --- a/sfx2/source/dialog/titledockwin.src +++ b/sfx2/source/dialog/titledockwin.src diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index f74b892131c3..5a831b162cf2 100644..100755 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -36,7 +36,7 @@ #include <sfx2/templdlg.hxx> #include <sfx2/bindings.hxx> -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include "tplcitem.hxx" #include "templdgi.hxx" @@ -48,7 +48,7 @@ // Konstruktor SfxTemplateControllerItem::SfxTemplateControllerItem( - USHORT nSlotId, // ID + sal_uInt16 nSlotId, // ID SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instanz, dem dieses Item zugeordnet ist. SfxBindings &rBindings): SfxControllerItem(nSlotId, rBindings), @@ -69,7 +69,7 @@ SfxTemplateControllerItem::~SfxTemplateControllerItem() // Benachrichtigung "uber Status"anderung; wird an den // im Konstruktor "ubergebenen Controller propagiert -void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState, +void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ) { switch(nSID) @@ -89,9 +89,9 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState, DBG_ASSERT(pStateItem != 0, "SfxTemplateItem erwartet"); rTemplateDlg.SetFamilyState( GetId(), pStateItem ); } - BOOL bDisable = eState == SFX_ITEM_DISABLED; + sal_Bool bDisable = eState == SFX_ITEM_DISABLED; // Familie Disablen - USHORT nFamily = 0; + sal_uInt16 nFamily = 0; switch( GetId()) { case SID_STYLE_FAMILY1: @@ -171,7 +171,7 @@ IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, { case 0 : case 1 : - pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? TRUE : FALSE); + pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? sal_True : sal_False); break; } pThis->rTemplateDlg.SetWaterCanState(pState); diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 57502d4a649d..67e1b004b4f0 100644..100755 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -31,7 +31,7 @@ // INCLUDE --------------------------------------------------------------- -#include "tplpitem.hxx" +#include "sfx2/tplpitem.hxx" #include <com/sun/star/frame/status/Template.hpp> @@ -48,9 +48,9 @@ SfxTemplateItem::SfxTemplateItem() : SfxTemplateItem::SfxTemplateItem ( - USHORT nWhichId, // Slot-ID + sal_uInt16 nWhichId, // Slot-ID const String& rStyle, // Name des aktuellen Styles - USHORT nValue // Flags f"ur das Filtern bei automatischer Anzeige + sal_uInt16 nValue // Flags f"ur das Filtern bei automatischer Anzeige ) : SfxFlagItem( nWhichId, nValue ), aStyle( rStyle ) { @@ -85,7 +85,7 @@ SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const } //------------------------------------------------------------------------- -bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { ::com::sun::star::frame::status::Template aTemplate; @@ -97,13 +97,13 @@ bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMember } //------------------------------------------------------------------------- -bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { ::com::sun::star::frame::status::Template aTemplate; if ( rVal >>= aTemplate ) { - SetValue( sal::static_int_cast< USHORT >( aTemplate.Value ) ); + SetValue( sal::static_int_cast< sal_uInt16 >( aTemplate.Value ) ); aStyle = aTemplate.StyleName; return true; } @@ -113,9 +113,9 @@ bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMe //------------------------------------------------------------------------- -BYTE SfxTemplateItem::GetFlagCount() const +sal_uInt8 SfxTemplateItem::GetFlagCount() const { - return sizeof(USHORT) * 8; + return sizeof(sal_uInt16) * 8; } diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 0f97fc0de2a3..afdc3f934065 100644..100755 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -45,7 +45,7 @@ #include "versdlg.hrc" #include "versdlg.hxx" #include <sfx2/viewfrm.hxx> -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxsids.hrc> @@ -153,7 +153,7 @@ static String ConvertDateTime_Impl(const DateTime& rTime, const LocaleDataWrappe const String pDelim ( DEFINE_CONST_UNICODE( ", ")); String aStr(rWrapper.getDate(rTime)); aStr += pDelim; - aStr += rWrapper.getTime(rTime, TRUE, FALSE); + aStr += rWrapper.getTime(rTime, sal_True, sal_False); return aStr; } @@ -201,7 +201,7 @@ SfxVersionsTabListBox_Impl::SfxVersionsTabListBox_Impl( Window* pParent, const R { } -SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersionOnClose ) +SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, sal_Bool bIsSaveVersionOnClose ) : SfxModalDialog( NULL, SfxResId( DLG_VERSIONS ) ) , aNewGroup( this, SfxResId( GB_NEWVERSIONS ) ) , aSaveButton( this, SfxResId( PB_SAVE ) ) @@ -236,7 +236,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersion aVersionBox.SetDoubleClickHdl( LINK( this, SfxVersionDialog, DClickHdl_Impl ) ); aVersionBox.GrabFocus(); - aVersionBox.SetWindowBits( WB_HSCROLL | WB_CLIPCHILDREN ); + aVersionBox.SetStyle( aVersionBox.GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN ); aVersionBox.SetSelectionMode( SINGLE_SELECTION ); aVersionBox.SetTabs( &nTabs_Impl[0], MAP_APPFONT ); aVersionBox.Resize(); // OS: Hack fuer richtige Selektion @@ -297,7 +297,7 @@ void SfxVersionDialog::Init_Impl() aSaveCheckBox.Check( mbIsSaveVersionOnClose ); - BOOL bEnable = !pObjShell->IsReadOnly(); + sal_Bool bEnable = !pObjShell->IsReadOnly(); aSaveButton.Enable( bEnable ); aSaveCheckBox.Enable( bEnable ); @@ -320,19 +320,19 @@ void SfxVersionDialog::Open_Impl() SfxObjectShell *pObjShell = pViewFrame->GetObjectShell(); SvLBoxEntry *pEntry = aVersionBox.FirstSelected(); - ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry ); + sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry ); SfxInt16Item aItem( SID_VERSION, (short)nPos+1 ); SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ); SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") ); SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ); - ::rtl::OUString aPassString; - if ( GetPasswd_Impl( pObjShell->GetMedium()->GetItemSet(), aPassString ) ) + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( GetEncryptionData_Impl( pObjShell->GetMedium()->GetItemSet(), aEncryptionData ) ) { // there is a password, it should be used during the opening - SfxStringItem aPassItem( SID_PASSWORD, aPassString ); + SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ); pViewFrame->GetDispatcher()->Execute( - SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aPassItem, 0L ); + SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L ); } else pViewFrame->GetDispatcher()->Execute( @@ -407,20 +407,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) { SfxVersionInfo aInfo; aInfo.aAuthor = SvtUserOptions().GetFullName(); - SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, TRUE ); + SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, sal_True ); short nRet = pDlg->Execute(); if ( nRet == RET_OK ) { SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment ); - pObjShell->SetModified( TRUE ); + pObjShell->SetModified( sal_True ); const SfxPoolItem* aItems[2]; aItems[0] = &aComment; aItems[1] = NULL; pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems, 0 ); - aVersionBox.SetUpdateMode( FALSE ); + aVersionBox.SetUpdateMode( sal_False ); aVersionBox.Clear(); Init_Impl(); - aVersionBox.SetUpdateMode( TRUE ); + aVersionBox.SetUpdateMode( sal_True ); } delete pDlg; @@ -428,11 +428,11 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) if ( pButton == &aDeleteButton && pEntry ) { pObjShell->GetMedium()->RemoveVersion_Impl( ((SfxVersionInfo*) pEntry->GetUserData())->aName ); - pObjShell->SetModified( TRUE ); - aVersionBox.SetUpdateMode( FALSE ); + pObjShell->SetModified( sal_True ); + aVersionBox.SetUpdateMode( sal_False ); aVersionBox.Clear(); Init_Impl(); - aVersionBox.SetUpdateMode( TRUE ); + aVersionBox.SetUpdateMode( sal_True ); } else if ( pButton == &aOpenButton && pEntry ) { @@ -441,20 +441,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) else if ( pButton == &aViewButton && pEntry ) { SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData(); - SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, FALSE ); + SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, sal_False ); pDlg->Execute(); delete pDlg; } else if ( pEntry && pButton == &aCompareButton ) { SfxAllItemSet aSet( pObjShell->GetPool() ); - ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry ); + sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry ); aSet.Put( SfxInt16Item( SID_VERSION, (short)nPos+1 ) ); aSet.Put( SfxStringItem( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ) ); SfxItemSet* pSet = pObjShell->GetMedium()->GetItemSet(); - SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, FALSE ); - SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, FALSE ); + SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False ); + SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False ); if ( pFilterItem ) aSet.Put( *pFilterItem ); if ( pFilterOptItem ) @@ -467,7 +467,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) return 0L; } -SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, BOOL bEdit ) +SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, sal_Bool bEdit ) : SfxModalDialog( pParent, SfxResId( DLG_COMMENTS ) ) , aDateTimeText( this, SfxResId( FT_DATETIME ) ) , aSavedByText( this, SfxResId( FT_SAVEDBY ) ) @@ -493,7 +493,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi { aOKButton.Hide(); aCancelButton.Hide(); - aEdit.SetReadOnly( TRUE ); + aEdit.SetReadOnly( sal_True ); } else aCloseButton.Hide(); diff --git a/sfx2/source/dialog/versdlg.hrc b/sfx2/source/dialog/versdlg.hrc index 2de7596221e1..2de7596221e1 100644..100755 --- a/sfx2/source/dialog/versdlg.hrc +++ b/sfx2/source/dialog/versdlg.hrc diff --git a/sfx2/source/dialog/versdlg.src b/sfx2/source/dialog/versdlg.src index 60aeb2777542..927c940e6506 100644..100755 --- a/sfx2/source/dialog/versdlg.src +++ b/sfx2/source/dialog/versdlg.src @@ -28,6 +28,7 @@ #include "versdlg.hrc" ModalDialog DLG_VERSIONS { + HelpID = "sfx2:ModalDialog:DLG_VERSIONS"; OutputSize = TRUE ; Size = MAP_APPFONT ( 340 , 184 ) ; SvLook = TRUE ; @@ -41,6 +42,7 @@ ModalDialog DLG_VERSIONS }; PushButton PB_SAVE { + HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_SAVE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 90 , 14 ) ; TabStop = TRUE ; @@ -48,6 +50,7 @@ ModalDialog DLG_VERSIONS }; CheckBox CB_SAVEONCLOSE { + HelpID = "sfx2:CheckBox:DLG_VERSIONS:CB_SAVEONCLOSE"; Pos = MAP_APPFONT ( 108 , 16 ) ; Size = MAP_APPFONT ( 164 , 10 ) ; TabStop = TRUE ; @@ -93,6 +96,7 @@ ModalDialog DLG_VERSIONS }; PushButton PB_OPEN { + HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_OPEN"; Pos = MAP_APPFONT ( 284 , 26 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -100,6 +104,7 @@ ModalDialog DLG_VERSIONS }; PushButton PB_VIEW { + HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_VIEW"; Pos = MAP_APPFONT ( 284 , 43 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -108,6 +113,7 @@ ModalDialog DLG_VERSIONS }; PushButton PB_DELETE { + HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_DELETE"; Pos = MAP_APPFONT ( 284 , 60 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -115,6 +121,7 @@ ModalDialog DLG_VERSIONS }; PushButton PB_COMPARE { + HelpID = "sfx2:PushButton:DLG_VERSIONS:PB_COMPARE"; Pos = MAP_APPFONT ( 284 , 77 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -130,6 +137,7 @@ ModalDialog DLG_VERSIONS }; ModalDialog DLG_COMMENTS { + HelpID = "sfx2:ModalDialog:DLG_COMMENTS"; OutputSize = TRUE ; Size = MAP_APPFONT ( 180 , 118 ) ; SvLook = TRUE ; @@ -148,6 +156,7 @@ ModalDialog DLG_COMMENTS }; MultiLineEdit ME_VERSIONS { + HelpID = "sfx2:MultiLineEdit:DLG_COMMENTS:ME_VERSIONS"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 32 ) ; Size = MAP_APPFONT ( 168 , 60 ) ; @@ -168,6 +177,7 @@ ModalDialog DLG_COMMENTS }; PushButton PB_CLOSE { + HelpID = "sfx2:PushButton:DLG_COMMENTS:PB_CLOSE"; Pos = MAP_APPFONT ( 68 , 98 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; |