summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/app.cxx46
-rw-r--r--sfx2/source/appl/app.hrc91
-rw-r--r--sfx2/source/appl/app.src470
-rw-r--r--sfx2/source/appl/appbas.cxx261
-rw-r--r--sfx2/source/appl/appcfg.cxx270
-rw-r--r--sfx2/source/appl/appchild.cxx12
-rw-r--r--sfx2/source/appl/appdata.cxx3
-rw-r--r--sfx2/source/appl/appdde.cxx81
-rw-r--r--sfx2/source/appl/appinit.cxx7
-rw-r--r--sfx2/source/appl/appmain.cxx29
-rw-r--r--sfx2/source/appl/appmisc.cxx123
-rw-r--r--sfx2/source/appl/appopen.cxx140
-rw-r--r--sfx2/source/appl/appquit.cxx22
-rw-r--r--sfx2/source/appl/appreg.cxx10
-rw-r--r--sfx2/source/appl/appserv.cxx183
-rw-r--r--sfx2/source/appl/appuno.cxx197
-rw-r--r--sfx2/source/appl/childwin.cxx18
-rw-r--r--sfx2/source/appl/fileobj.cxx94
-rw-r--r--sfx2/source/appl/fileobj.hxx42
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx12
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx2
-rw-r--r--sfx2/source/appl/imagemgr.cxx6
-rw-r--r--sfx2/source/appl/impldde.cxx58
-rw-r--r--sfx2/source/appl/impldde.hxx16
-rw-r--r--sfx2/source/appl/linkmgr2.cxx118
-rw-r--r--sfx2/source/appl/linksrc.cxx64
-rw-r--r--sfx2/source/appl/lnkbase2.cxx100
-rw-r--r--sfx2/source/appl/module.cxx44
-rw-r--r--sfx2/source/appl/newhelp.cxx184
-rw-r--r--sfx2/source/appl/newhelp.hxx8
-rw-r--r--sfx2/source/appl/opengrf.cxx20
-rw-r--r--sfx2/source/appl/panelist.hxx6
-rw-r--r--sfx2/source/appl/sfxhelp.cxx14
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx12
-rw-r--r--sfx2/source/appl/shutdownicon.cxx4
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx18
-rw-r--r--sfx2/source/appl/workwin.cxx428
37 files changed, 1123 insertions, 2090 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index eb9307ad7538..d8442bb215f6 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -41,6 +41,8 @@
#include <tools/simplerm.hxx>
#include <tools/config.hxx>
#include <basic/basrdll.hxx>
+#include <basic/sbmeth.hxx>
+#include <basic/sbmod.hxx>
#include <svtools/asynclink.hxx>
#include <svl/stritem.hxx>
#include <vcl/sound.hxx>
@@ -224,7 +226,7 @@ void SfxPropertyHandler::Property( ApplicationProperty& rProp )
String aFactory = String::CreateFromAscii("private:factory/");
if ( pArgs && *pArgs )
{
- SFX_ITEMSET_ARG( &aSet, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, FALSE );
+ SFX_ITEMSET_ARG( &aSet, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, sal_False );
if ( pFactoryName )
aFactory += pFactoryName->GetValue();
else
@@ -302,7 +304,7 @@ SfxApplication* SfxApplication::GetOrCreate()
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SetApp" );
pApp = pNew;
- // at the moment a bug may occur when Initialize_Impl returns FALSE, but this is only temporary because all code that may cause such a
+ // at the moment a bug may occur when Initialize_Impl returns sal_False, but this is only temporary because all code that may cause such a
// fault will be moved outside the SFX
pApp->Initialize_Impl();
@@ -361,15 +363,8 @@ SfxApplication::SfxApplication()
#endif
#endif
- if ( !InitLabelResMgr( "iso" ) )
- // no "iso" resource -> search for "ooo" resource
- InitLabelResMgr( "ooo", true );
pBasic = new BasicDLL;
-
StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
-
-
-
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" );
}
@@ -478,9 +473,9 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
// DocWinActivate : both frames belong to the same TopWindow
// TopWinActivate : both frames belong to different TopWindows
// not used anymore!
-// BOOL bDocWinActivate = pOldContainerFrame && pNewContainerFrame &&
+// sal_Bool bDocWinActivate = pOldContainerFrame && pNewContainerFrame &&
// pOldContainerFrame->GetTopViewFrame() == pNewContainerFrame->GetTopViewFrame();
- BOOL bTaskActivate = pOldContainerFrame != pNewContainerFrame;
+ sal_Bool bTaskActivate = pOldContainerFrame != pNewContainerFrame;
if ( pOldContainerFrame )
{
@@ -587,13 +582,6 @@ ResMgr* SfxApplication::GetSfxResManager()
//--------------------------------------------------------------------
-ResMgr* SfxApplication::GetLabelResManager() const
-{
- return pAppData_Impl->pLabelResMgr;
-}
-
-//--------------------------------------------------------------------
-
SimpleResMgr* SfxApplication::GetSimpleResManager()
{
if ( !pAppData_Impl->pSimpleResManager )
@@ -653,7 +641,7 @@ void SfxApplication::LeaveAsynchronCall_Impl()
//--------------------------------------------------------------------
-FASTBOOL SfxApplication::IsInAsynchronCall_Impl() const
+bool SfxApplication::IsInAsynchronCall_Impl() const
{
return pAppData_Impl->nAsynchronCalls > 0;
}
@@ -710,7 +698,7 @@ SfxObjectShellArr_Impl& SfxApplication::GetObjectShells_Impl() const
return *pAppData_Impl->pObjShells;
}
-void SfxApplication::Invalidate( USHORT nId )
+void SfxApplication::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
Invalidate_Impl( pFrame->GetBindings(), nId );
@@ -720,8 +708,8 @@ void SfxApplication::Invalidate( USHORT nId )
#define STRING( x ) DOSTRING( x )
typedef long (SAL_CALL *basicide_handle_basic_error)(void*);
-typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, BOOL, rtl_uString*);
-typedef void* (SAL_CALL *basicide_macro_organizer)(INT16);
+typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, sal_Bool, rtl_uString*);
+typedef void* (SAL_CALL *basicide_macro_organizer)(sal_Int16);
extern "C" { static void SAL_CALL thisModule() {} }
@@ -746,7 +734,7 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
{
- sal_Bool result = FALSE;
+ sal_Bool result = sal_False;
::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory > xSMgr =
@@ -770,7 +758,7 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
if ( xUrl.is() )
{
- result = TRUE;
+ result = sal_True;
}
}
catch ( ::com::sun::star::uno::RuntimeException& )
@@ -796,11 +784,11 @@ SfxApplication::ChooseScript()
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
AbstractScriptSelectorDialog* pDlg =
- pFact->CreateScriptSelectorDialog( NULL, FALSE, xFrame );
+ pFact->CreateScriptSelectorDialog( NULL, sal_False, xFrame );
OSL_TRACE("done, now exec it");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
OSL_TRACE("has returned");
@@ -814,7 +802,7 @@ SfxApplication::ChooseScript()
return aScriptURL;
}
-void SfxApplication::MacroOrganizer( INT16 nTabId )
+void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
{
// get basctl dllname
static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
@@ -831,3 +819,7 @@ void SfxApplication::MacroOrganizer( INT16 nTabId )
pSymbol( nTabId );
}
+ErrCode SfxApplication::CallBasic( const String& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet )
+{
+ return pMgr->ExecuteMacro( rCode, pArgs, pRet);
+}
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index dca172269443..ff01fd358d4d 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -32,11 +32,6 @@
// #defines *****************************************************************
#define ACC_IBM (RID_SFX_APP_START+2)
-#define MSG_ERR_WRITE_CFG (RID_SFX_APP_START+2)
-#define MSG_ERR_READ_CFG (RID_SFX_APP_START+3)
-#define MSG_ERR_OPEN_CFG (RID_SFX_APP_START+4)
-#define MSG_ERR_FILETYPE_CFG (RID_SFX_APP_START+5)
-#define MSG_ERR_VERSION_CFG (RID_SFX_APP_START+6)
#define MSG_ERR_NO_WEBBROWSER_FOUND (RID_SFX_APP_START+7)
// Note: no longer in use
@@ -45,101 +40,22 @@
#define MSG_ISPRINTING_QUERYABORT (RID_SFX_APP_START+9)
#define MSG_CANT_QUIT (RID_SFX_APP_START+10)
#define STR_ISMODIFIED (RID_SFX_APP_START+11)
-#define STR_AUTOSAVE (RID_SFX_APP_START+12)
-#define STR_MAIL (RID_SFX_APP_START+13)
-#define MSG_ERR_WRITE_SBL (RID_SFX_APP_START+14)
-#define MSG_IS_SERVER (RID_SFX_APP_START+15)
-
-#define STR_RESEXCEPTION (RID_SFX_APP_START+21)
-#define STR_SYSRESEXCEPTION (RID_SFX_APP_START+22)
-#define STR_DOUBLEEXCEPTION (RID_SFX_APP_START+23)
-#define STR_RESWARNING (RID_SFX_APP_START+24)
-#define STR_ERR_NOTEMPLATE (RID_SFX_APP_START+27)
-#define STR_RECOVER_TITLE (RID_SFX_APP_START+28)
-#define STR_RECOVER_QUERY (RID_SFX_APP_START+29)
-#define STR_RECOVER_PREPARED (RID_SFX_APP_START+30)
-#define MSG_ERR_SOINIT (RID_SFX_APP_START+31)
-
-#define MSG_IOERR_FILE_NOT_FOUND (RID_SFX_APP_START+32)
-#define MSG_IOERR_PATH_NOT_FOUND (RID_SFX_APP_START+33)
-#define MSG_IOERR_TOO_MANY_OPEN_FILES (RID_SFX_APP_START+34)
-#define MSG_IOERR_ACCESS_DENIED (RID_SFX_APP_START+35)
-#define MSG_IOERR_INVALID_ACCESS (RID_SFX_APP_START+36)
-#define MSG_IOERR_INVALID_HANDLE (RID_SFX_APP_START+37)
-#define MSG_IOERR_CANNOT_MAKE (RID_SFX_APP_START+38)
-#define MSG_IOERR_SHARING (RID_SFX_APP_START+39)
-#define MSG_IOERR_INVALID_PARAMETER (RID_SFX_APP_START+40)
-#define MSG_IOERR_GENERAL (RID_SFX_APP_START+41)
#define RID_FULLSCREENTOOLBOX (RID_SFX_APP_START+42)
#define RID_RECORDINGTOOLBOX (RID_SFX_APP_START+43)
#define RID_ENVTOOLBOX (RID_SFX_APP_START+44)
#define STR_QUITAPP (RID_SFX_APP_START+59)
-#define STR_EXITANDRETURN (RID_SFX_APP_START+60)
-#define STR_ERR_NOFILE (RID_SFX_APP_START+61)
-#define STR_EXTHELPSTATUS (RID_SFX_APP_START+62)
-
-#define STR_ADDRESS_NAME (RID_SFX_APP_START+65)
#define RID_STR_HLPFILENOTEXIST (RID_SFX_APP_START+68)
-#define RID_STR_HLPAPPNOTSTARTED (RID_SFX_APP_START+69)
-
-#define STR_NODOUBLE (RID_SFX_APP_START+75)
-#define STR_NOPRINTER (RID_SFX_APP_START+76)
-
-#define MSG_SIGNAL (RID_SFX_APP_START+77)
#define RID_STR_HELP (RID_SFX_APP_START+79)
#define RID_STR_NOAUTOSTARTHELPAGENT (RID_SFX_APP_START+80)
#define RID_HELPBAR (RID_SFX_APP_START+81)
#define RID_SPECIALCONFIG_ERROR (RID_SFX_APP_START+82)
-#define STR_MEMINFO_HEADER (RID_SFX_APP_START+84)
-#define STR_MEMINFO_FOOTER (RID_SFX_APP_START+85)
-#define STR_MEMINFO_OBJINFO (RID_SFX_APP_START+86)
-
-#define RID_PLUGIN (RID_SFX_APP_START+87)
-
-#define RID_WARN_POST_MAILTO (RID_SFX_APP_START+88)
-
-#define RID_STR_NOWELCOMESCREEN (RID_SFX_APP_START+91)
-
-// --> PB 2004-08-20 #i33095#
-/* obsolete
-#define STR_EDITOBJECT (RID_SFX_APP_START+92)
-#define STR_OPENOBJECT (RID_SFX_APP_START+93)
-*/
-
-#define STR_CORRUPT_INSTALLATION (RID_SFX_APP_START+94)
-#define IDS_SBERR_STOREREF (RID_SFX_APP_START+97)
-
#define CONFIG_PATH_START (RID_SFX_APP_START+98)
-#define STR_KEY_ADDINS_PATH (CONFIG_PATH_START+0)
-#define STR_KEY_AUTOCORRECT_DIR (CONFIG_PATH_START+1)
-#define STR_KEY_GLOSSARY_PATH (CONFIG_PATH_START+2)
-#define STR_KEY_BACKUP_PATH (CONFIG_PATH_START+3)
-#define STR_KEY_BASIC_PATH (CONFIG_PATH_START+4)
-#define STR_KEY_BITMAP_PATH (CONFIG_PATH_START+5)
-#define STR_KEY_CONFIG_DIR (CONFIG_PATH_START+6)
-#define STR_KEY_DICTIONARY_PATH (CONFIG_PATH_START+7)
-#define STR_KEY_FAVORITES_DIR (CONFIG_PATH_START+8)
-#define STR_KEY_FILTER_PATH (CONFIG_PATH_START+9)
-#define STR_KEY_GALLERY_DIR (CONFIG_PATH_START+10)
-#define STR_KEY_GRAPHICS_PATH (CONFIG_PATH_START+11)
-#define STR_KEY_HELP_DIR (CONFIG_PATH_START+12)
-#define STR_KEY_LINGUISTIC_DIR (CONFIG_PATH_START+13)
-#define STR_KEY_MODULES_PATH (CONFIG_PATH_START+14)
-#define STR_KEY_PALETTE_PATH (CONFIG_PATH_START+15)
-#define STR_KEY_PLUGINS_PATH (CONFIG_PATH_START+16)
-#define STR_KEY_STORAGE_DIR (CONFIG_PATH_START+17)
-#define STR_KEY_TEMP_PATH (CONFIG_PATH_START+18)
-#define STR_KEY_TEMPLATE_PATH (CONFIG_PATH_START+19)
-#define STR_KEY_USERCONFIG_PATH (CONFIG_PATH_START+20)
-#define STR_KEY_USERDICTIONARY_DIR (CONFIG_PATH_START+21)
-#define STR_KEY_WORK_PATH (CONFIG_PATH_START+22)
-
#define WIN_HELPINDEX (RID_SFX_APP_START+99)
#define TP_HELP_CONTENT (RID_SFX_APP_START+100)
#define TP_HELP_INDEX (RID_SFX_APP_START+101)
@@ -168,11 +84,6 @@
#define IMG_HELP_CONTENT_DOC_HC (RID_SFX_APP_START+125) // image
-#define IMG_MISSING_1 (RID_SFX_APP_START+126) // image
-#define IMG_MISSING_2 (RID_SFX_APP_START+127) // image
-#define IMG_MISSING_3 (RID_SFX_APP_START+128) // image
-#define IMG_MISSING_4 (RID_SFX_APP_START+129) // image
-
#define STR_HELP_WINDOW_TITLE (RID_SFX_APP_START+125) // string
#define STR_HELP_BUTTON_INDEX_ON (RID_SFX_APP_START+126)
@@ -236,8 +147,6 @@
#define RID_SECURITY_WARNING_HYPERLINK (RID_SFX_APP_START + 180)
#define RID_SECURITY_WARNING_TITLE (RID_SFX_APP_START + 181)
-#define RID_INVALID_URL_MSG (RID_SFX_APP_START + 182)
-#define RID_INVALID_URL_TITLE (RID_SFX_APP_START + 183)
#define RID_DESKTOP (RID_SFX_APP_START + 184)
// #define RID_XMLSEC_WARNING_BROKENSIGNATURE (RID_SFX_APP_START + 185)
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index f8a387bba79b..fa5a1fc1c335 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -75,60 +75,6 @@ InfoBox RID_DOCALREADYLOADED_DLG
Message [ en-US ] = "Document already open." ;
};
-ErrorBox RID_CANTLOADDOC_DLG
-{
- Message [ en-US ] = "Cannot open document." ;
-};
-
-ErrorBox MSG_ERR_READ_CFG
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error reading configuration file." ;
-};
-
-ErrorBox MSG_ERR_WRITE_CFG
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error writing configuration file." ;
-};
-
-ErrorBox MSG_ERR_OPEN_CFG
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error opening configuration file." ;
-};
-
-ErrorBox MSG_ERR_FILETYPE_CFG
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "File is not a configuration file." ;
-};
-
-ErrorBox MSG_ERR_VERSION_CFG
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Configuration file contains the wrong version." ;
-};
-
-ErrorBox MSG_ERR_WRITE_SBL
-{
- BUTTONS = WB_OK ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "Error recording BASIC library in\n'@'." ;
-};
-
-ErrorBox MSG_SIGNAL
-{
- BUTTONS = WB_YES_NO ;
- DEFBUTTON = WB_DEF_YES ;
- Message [ en-US ] = "An unexpected program error has occurred.\n\nDo you want to try to save your changes in all open documents before the program is terminated?" ;
-};
-
ErrorBox MSG_ERR_NO_WEBBROWSER_FOUND
{
BUTTONS = WB_OK ;
@@ -141,89 +87,6 @@ Resource SID_UNKNOWN
String 1 "-" ;
};
-Resource BMP_SFX_COLOR
-{
- ExtraData =
- {
- SID_NEWDOC; // 043
- SID_OPENDOC; // 044
- SID_CLOSEDOC; // 045
- SID_RELOAD; // 046
- SID_SAVEASDOC; // 047
- SID_PRINTDOC; // 051
- SID_SETUPPRINTER; // 053
- SID_QUITAPP; // 054
- SID_UNDO; // 055
- SID_REDO; // 056
- SID_REPEAT; // 057
- SID_CUT; // 058
- SID_COPY; // 059
- SID_PASTE; // 060
- SID_DELETE; // 061
- SID_SELECTALL; // 062
- SID_SAVEDOC; // 063 vormals 046
- SID_EXITANDRETURN; // 064 vormals 054
- SID_RECORDMACRO; // 095
- SID_EDITMACRO; // 096
- SID_HELPMENU; // 098
- SID_CONFIG; // 123
- SID_CONFIGTOOLBOX; // 124
- 0;
- };
- Bitmap BMP_SFX_SMALL { File = "sco.bmp" ; };
- Bitmap BMP_SFX_LARGE { File = "lco.bmp" ; };
-};
-
-Resource BMP_SFX_MONO
-{
- ExtraData =
- {
- SID_NEWDOC; // 043
- SID_OPENDOC; // 044
- SID_CLOSEDOC; // 045
- SID_RELOAD; // 046
- SID_SAVEASDOC; // 047
- SID_PRINTDOC; // 051
- SID_SETUPPRINTER; // 053
- SID_QUITAPP; // 054
- SID_UNDO; // 055
- SID_REDO; // 056
- SID_REPEAT; // 057
- SID_CUT; // 058
- SID_COPY; // 059
- SID_PASTE; // 060
- SID_DELETE; // 061
- SID_SELECTALL; // 062
- SID_SAVEDOC; // 063 vormals 046
- SID_EXITANDRETURN; // 064 vormals 054
- SID_RECORDMACRO; // 095
- SID_EDITMACRO; // 096
- SID_HELPMENU; // 098
- SID_CONFIG; // 123
- SID_CONFIGTOOLBOX; // 124
- 0;
- };
- Bitmap BMP_SFX_SMALL { File = "smo.bmp" ; };
- Bitmap BMP_SFX_LARGE { File = "lmo.bmp" ; };
-};
-
-WarningBox RID_WARN_POST_MAILTO
-{
- BUTTONS = WB_OK_CANCEL ;
- DEFBUTTON = WB_DEF_OK ;
- Message [ en-US ] = "A form is to be sent by e-mail.\nThis means that the receiver will get to see your e-mail address." ;
-};
-
-String STR_RECOVER_TITLE
-{
- Text [ en-US ] = "File Recovery" ;
-};
-
-String STR_RECOVER_QUERY
-{
- Text [ en-US ] = "Should the file \"$1\" be restored?" ;
-};
-
String GID_INTERN
{
Text [ en-US ] = "Internal" ;
@@ -354,155 +217,16 @@ String GID_CONTROLS
Text [ en-US ] = "Controls" ;
};
-TabDialog SID_OPTIONS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 244 , 155 ) ;
- Text [ en-US ] = "Options" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- TabControl 1
- {
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 3 , 15 ) ;
- Size = MAP_APPFONT ( 221 , 130 ) ;
- PageList =
- {
- PageItem
- {
- Identifier = RID_SFXPAGE_GENERAL ;
- Text [ en-US ] = "General" ;
- PageResID = 256 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_SAVE ;
- Text [ en-US ] = "Save" ;
- PageResID = 257 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_PATH ;
- Text [ en-US ] = "Paths" ;
- PageResID = 258 ;
- };
- PageItem
- {
- Identifier = RID_SFXPAGE_SPELL ;
- Text [ en-US ] = "Spellcheck" ;
- PageResID = 259 ;
- };
- };
- };
-};
-
InfoBox MSG_CANT_QUIT
{
Message [ en-US ] = "The application cannot be terminated at the moment.\nPlease wait until all print jobs and/or\nOLE actions have finished and close all dialogs." ;
};
-QueryBox MSG_IS_SERVER
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "This application is as object or print server active.\nDo you want to terminate anyway?" ;
-};
-
-String STR_NODOUBLE
-{
- Text [ en-US ] = "%PRODUCTNAME cannot be started more than once." ;
-};
-
-String STR_NOPRINTER
-{
- Text [ en-US ] = "Some %PRODUCTNAME functions will not work properly without a printer driver.\nPlease install a printer driver." ;
-};
-
String STR_ISMODIFIED
{
Text [ en-US ] = "Do you want to save the changes to %1?" ;
};
-String STR_AUTOSAVE
-{
- Text [ en-US ] = "AutoSave" ;
-};
-
-String STR_RESWARNING
-{
- Text [ en-US ] = "Limited system resources. Please quit other applications or close some windows before continuing." ;
-};
-String STR_RESEXCEPTION
-{
- Text [ en-US ] = "There are files missing. Please check application setup." ;
-};
-
-String STR_DOUBLEEXCEPTION
-{
- Text [ en-US ] = "Another error occurred during the save recovery.\nPossibly, the data could not be entirely saved." ;
-};
-
-String STR_SYSRESEXCEPTION
-{
- Text [ en-US ] = "System resources exhausted. Please restart the application." ;
-};
-
-ErrorBox MSG_ERR_SOINIT
-{
- Message [ en-US ] = "Error initializing object-system." ;
-};
-
-String MSG_IOERR_FILE_NOT_FOUND
-{
- Text [ en-US ] = "The file $(FILE) doesn't exist." ;
-};
-
-String MSG_IOERR_PATH_NOT_FOUND
-{
- Text [ en-US ] = "The path to file $(FILE) doesn't exist." ;
-};
-
-String MSG_IOERR_TOO_MANY_OPEN_FILES
-{
- Text [ en-US ] = "The file $(FILE) could not be opened,\nbecause too many files are open.\nPlease close some files and try again." ;
-};
-
-String MSG_IOERR_ACCESS_DENIED
-{
- Text [ en-US ] = "The file $(FILE) could not be opened due to missing access rights." ;
-};
-
-String MSG_IOERR_INVALID_ACCESS
-{
- Text [ en-US ] = "The file $(FILE) could not be accessed." ;
-};
-
-String MSG_IOERR_INVALID_HANDLE
-{
- Text [ en-US ] = "The file $(FILE) could not be opened due to an invalid file handle." ;
-};
-
-String MSG_IOERR_CANNOT_MAKE
-{
- Text [ en-US ] = "The file $(FILE) could not be created." ;
-};
-
-String MSG_IOERR_SHARING
-{
- Text [ en-US ] = "Error by shared access to $(FILE)." ;
-};
-
-String MSG_IOERR_INVALID_PARAMETER
-{
- Text [ en-US ] = "" ;
-};
-
-String MSG_IOERR_GENERAL
-{
- Text [ en-US ] = "General I/O error accessing $(FILE)." ;
-};
-
String RID_FULLSCREENTOOLBOX
{
Text = "" ;
@@ -538,41 +262,11 @@ ToolBox RID_FULLSCREENTOOLBOX
};
};
-String STR_ERR_NOTEMPLATE
-{
- Text [ en-US ] = "The selected template has an incorrect format" ;
-};
-
-String STR_ERR_NOFILE
-{
- Text [ en-US ] = "Can't open file $." ;
-};
-
String STR_QUITAPP
{
Text [ en-US ] = "E~xit" ;
};
-String STR_EXITANDRETURN
-{
- Text [ en-US ] = "E~xit & return to " ;
-};
-
-String STR_EXTHELPSTATUS
-{
- Text [ en-US ] = "Select a command or click to select a theme." ;
-};
-
-String STR_MAIL
-{
- Text [ en-US ] = "Mail" ;
-};
-
-String STR_ADDRESS_NAME
-{
- Text [ en-US ] = "Addresses" ;
-};
-
String RID_STR_HELP
{
Text [ en-US ] = "Help" ;
@@ -583,11 +277,6 @@ String RID_STR_NOAUTOSTARTHELPAGENT
Text [ en-US ] = "No automatic start at 'XX'" ;
};
-String RID_STR_NOWELCOMESCREEN
-{
- Text [ en-US ] = "Don't display tips" ;
-};
-
String RID_HELPBAR
{
Text [ en-US ] = "Help Bar" ;
@@ -653,11 +342,6 @@ String RID_STR_HLPFILENOTEXIST
Text [ en-US ] = "The help file for this topic is not installed." ;
};
-String RID_STR_HLPAPPNOTSTARTED
-{
- Text [ en-US ] = "The help system could not be started" ;
-};
-
//----------------------------------------------------------------------------
String RID_ENVTOOLBOX
@@ -670,129 +354,6 @@ String RID_SPECIALCONFIG_ERROR
Text [ en-US ] = "An error has occurred in the special configuration.\nPlease contact your administrator." ;
};
-String STR_MEMINFO_HEADER
-{
-};
-
-String STR_MEMINFO_FOOTER
-{
- Text = "</table>" ;
-};
-
-String STR_MEMINFO_OBJINFO
-{
- Text = "<tr><td >$(VISIBLE)</td><td>$(CACHED)</td><td>$(EXPIRE)</td><td>$(JSDIRTY)</td><td>$(JSEXEC)</td><td>$(FORBID)</td><td>$(FACTORY)</td><td>$(URL)</td><td>$(ORIGURL)</td><td>$(POSTSTRING)</td></tr>" ;
-};
-
-String RID_PLUGIN
-{
- Text [ en-US ] = "Enable plug-ins" ;
-};
-
-String STR_CORRUPT_INSTALLATION
-{
- Text [ en-US ] = "Important program components could not be initialized correctly.\nPlease start the setup program with the option /Repair." ;
-};
-
-String IDS_SBERR_STOREREF
-{
- Text [ en-US ] = "Reference will not be saved: " ;
-};
-
-String STR_KEY_CONFIG_DIR
-{
- Text [ en-US ] = "Configuration" ;
-};
-String STR_KEY_WORK_PATH
-{
- Text [ en-US ] = "My Documents" ;
-};
-String STR_KEY_GRAPHICS_PATH
-{
- Text [ en-US ] = "Graphics" ;
-};
-String STR_KEY_BITMAP_PATH
-{
- Text [ en-US ] = "Icons" ;
-};
-String STR_KEY_BASIC_PATH
-{
- Text = "BASIC" ;
-};
-
-String STR_KEY_PALETTE_PATH
-{
- Text [ en-US ] = "Palettes" ;
-};
-String STR_KEY_BACKUP_PATH
-{
- Text [ en-US ] = "Backups" ;
-};
-String STR_KEY_MODULES_PATH
-{
- Text [ en-US ] = "Modules" ;
-};
-String STR_KEY_TEMPLATE_PATH
-{
- Text [ en-US ] = "Templates" ;
-};
-String STR_KEY_GLOSSARY_PATH
-{
- Text [ en-US ] = "AutoText" ;
-};
-String STR_KEY_DICTIONARY_PATH
-{
- Text [ en-US ] = "Dictionaries" ;
-};
-String STR_KEY_HELP_DIR
-{
- Text [ en-US ] = "Help" ;
-};
-String STR_KEY_GALLERY_DIR
-{
- Text [ en-US ] = "Gallery" ;
-};
-
-String STR_KEY_STORAGE_DIR
-{
- Text [ en-US ] = "Message Storage" ;
-};
-String STR_KEY_TEMP_PATH
-{
- Text [ en-US ] = "Temporary files" ;
-};
-String STR_KEY_PLUGINS_PATH
-{
- Text [ en-US ] = "Plug-ins" ;
-};
-String STR_KEY_FAVORITES_DIR
-{
- Text [ en-US ] = "Folder Bookmarks" ;
-};
-String STR_KEY_FILTER_PATH
-{
- Text [ en-US ] = "Filters" ;
-};
-String STR_KEY_ADDINS_PATH
-{
- Text [ en-US ] = "Add-ins" ;
-};
-String STR_KEY_USERCONFIG_PATH
-{
- Text [ en-US ] = "User Configuration" ;
-};
-String STR_KEY_USERDICTIONARY_DIR
-{
- Text [ en-US ] = "User-defined dictionaries" ;
-};
-String STR_KEY_AUTOCORRECT_DIR
-{
- Text [ en-US ] = "AutoCorrect" ;
-};
-String STR_KEY_LINGUISTIC_DIR
-{
- Text [ en-US ] = "Writing aids" ;
-};
String STR_QUICKSTART_EXIT
{
Text [ en-US ] = "Exit Quickstarter" ;
@@ -867,17 +428,6 @@ String RID_SECURITY_WARNING_TITLE
Text [ en-US ] = "Security Warning" ;
};
-ErrorBox RID_INVALID_URL_MSG
-{
- Buttons = WB_OK ;
- Message [ en-US ] = "The URL is not valid." ;
-};
-
-String RID_INVALID_URL_TITLE
-{
- Text = "%PRODUCTNAME %PRODUCTVERSION" ;
-};
-
String RID_DESKTOP
{
Text = "%PRODUCTNAME" ;
@@ -910,26 +460,6 @@ String RID_XMLSEC_DOCUMENTSIGNED
Text [ en-US ] = " (Signed)" ;
};
-Image IMG_MISSING_1
-{
- ImageBitmap = Bitmap { File = "sc05539.bmp" ; };
-};
-
-Image IMG_MISSING_2
-{
- ImageBitmap = Bitmap { File = "sc05700.bmp" ; };
-};
-
-Image IMG_MISSING_3
-{
- ImageBitmap = Bitmap { File = "sc06302.bmp" ; };
-};
-
-Image IMG_MISSING_4
-{
- ImageBitmap = Bitmap { File = "sn064.bmp" ; };
-};
-
String STR_STANDARD
{
Text [ en-US ] = "Standard" ;
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 7e775cbbb502..6d6c8ace5a09 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -73,7 +73,6 @@
#include "sfx2/minfitem.hxx"
#include "app.hrc"
#include <sfx2/evntconf.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dinfdlg.hxx>
#include "appdata.hxx"
@@ -100,75 +99,6 @@ using namespace ::com::sun::star::script;
using ::basic::BasicManagerRepository;
-// #ifndef STR_VERSION_ID
-// #define STR_VERSION_ID 1
-// #endif
-// #ifndef STR_VERSION_TYPE
-// #define STR_VERSION_TYPE 1
-// #endif
-
-//=========================================================================
-/*ASDBG
-const SfxConstant __FAR_DATA aConstants[] =
-{
- SFX_USHORT_CONSTANT( "AlignBottom", ALIGN_BOTTOM ),
- SFX_USHORT_CONSTANT( "AlignTop", ALIGN_TOP ),
- SFX_USHORT_CONSTANT( "CharSetANSI", CHARSET_ANSI ),
- SFX_USHORT_CONSTANT( "CharSetDontKnow", CHARSET_DONTKNOW ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC437", CHARSET_IBMPC_437 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC850", CHARSET_IBMPC_850 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC860", CHARSET_IBMPC_860 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC861", CHARSET_IBMPC_861 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC863", CHARSET_IBMPC_863 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC865", CHARSET_IBMPC_865 ),
- SFX_USHORT_CONSTANT( "CharSetIBMPC", CHARSET_IBMPC ),
- SFX_USHORT_CONSTANT( "CharSetMac", CHARSET_MAC ),
- SFX_USHORT_CONSTANT( "CharSetSymbol", CHARSET_SYMBOL ),
- SFX_USHORT_CONSTANT( "CharSetSystem", RTL_TEXTENCODING_UTF8 ),
- SFX_USHORT_CONSTANT( "FamilyDecorative", FAMILY_DECORATIVE ),
- SFX_USHORT_CONSTANT( "FamilyDontknow", FAMILY_DONTKNOW ),
- SFX_USHORT_CONSTANT( "FamilyModern", FAMILY_MODERN ),
- SFX_USHORT_CONSTANT( "FamilyRoman", FAMILY_ROMAN ),
- SFX_USHORT_CONSTANT( "FamilyScript", FAMILY_SCRIPT ),
- SFX_USHORT_CONSTANT( "FamilySwiss", FAMILY_SWISS ),
- SFX_USHORT_CONSTANT( "FamilySystem", FAMILY_SYSTEM ),
- SFX_USHORT_CONSTANT( "GradientAxial", GRADIENT_AXIAL ),
- SFX_USHORT_CONSTANT( "GradientElliptical", GRADIENT_ELLIPTICAL ),
- SFX_USHORT_CONSTANT( "GradientLinear", GRADIENT_LINEAR ),
- SFX_USHORT_CONSTANT( "GradientRadial", GRADIENT_RADIAL ),
- SFX_USHORT_CONSTANT( "GradientRect", GRADIENT_RECT ),
- SFX_USHORT_CONSTANT( "GradientSquare", GRADIENT_SQUARE ),
- SFX_USHORT_CONSTANT( "ItalicNone", ITALIC_NONE ),
- SFX_USHORT_CONSTANT( "ItalicOblique", ITALIC_OBLIQUE ),
- SFX_USHORT_CONSTANT( "StrikeThroughDouble", STRIKEOUT_DOUBLE ),
- SFX_USHORT_CONSTANT( "StrikeThroughNone", STRIKEOUT_NONE ),
- SFX_USHORT_CONSTANT( "StrikeThroughSingle", STRIKEOUT_SINGLE ),
- SFX_USHORT_CONSTANT( "UnderlineDotted", UNDERLINE_DOTTED ),
- SFX_USHORT_CONSTANT( "UnderlineDouble", UNDERLINE_DOUBLE ),
- SFX_USHORT_CONSTANT( "UnderlineNone", UNDERLINE_NONE ),
- SFX_USHORT_CONSTANT( "UnderlineSingle", UNDERLINE_SINGLE ),
- SFX_USHORT_CONSTANT( "UnitFoot", FUNIT_FOOT ),
- SFX_USHORT_CONSTANT( "UnitInch", FUNIT_INCH ),
- SFX_USHORT_CONSTANT( "UnitMile", FUNIT_MILE ),
- SFX_USHORT_CONSTANT( "UnitPercent", FUNIT_PERCENT ),
- SFX_USHORT_CONSTANT( "UnitPoint", FUNIT_POINT ),
- SFX_USHORT_CONSTANT( "UnitTwip", FUNIT_TWIP ),
- SFX_USHORT_CONSTANT( "Unit_cm", FUNIT_CM ),
- SFX_USHORT_CONSTANT( "Unit_m", FUNIT_M ),
- SFX_USHORT_CONSTANT( "Unit_mm", FUNIT_MM ),
- SFX_USHORT_CONSTANT( "WeightBlack", WEIGHT_BLACK ),
- SFX_USHORT_CONSTANT( "WeightBold", WEIGHT_BOLD ),
- SFX_USHORT_CONSTANT( "WeightDontKnow", WEIGHT_DONTKNOW ),
- SFX_USHORT_CONSTANT( "WeightLight", WEIGHT_LIGHT ),
- SFX_USHORT_CONSTANT( "WeightMedium", WEIGHT_MEDIUM ),
- SFX_USHORT_CONSTANT( "WeightNormal", WEIGHT_NORMAL ),
- SFX_USHORT_CONSTANT( "WeightSemibold", WEIGHT_SEMIBOLD ),
- SFX_USHORT_CONSTANT( "WeightSemilight", WEIGHT_SEMILIGHT ),
- SFX_USHORT_CONSTANT( "WeightThin", WEIGHT_THIN ),
- SFX_USHORT_CONSTANT( "WeightUltrabold", WEIGHT_ULTRABOLD ),
- SFX_USHORT_CONSTANT( "WeightUltralight", WEIGHT_ULTRALIGHT )
-};
-*/
//========================================================================
//------------------------------------------------------------------------
@@ -257,12 +187,6 @@ SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
BasicManager* SfxApplication::GetBasicManager()
{
-// DBG_ASSERT( pAppData_Impl->nBasicCallLevel != 0,
-// "unnecessary call to GetBasicManager() - inefficient!" );
- if ( pAppData_Impl->nBasicCallLevel == 0 )
- // sicherheitshalber
- EnterBasicCall();
-
return BasicManagerRepository::getApplicationBasicManager( true );
}
@@ -291,106 +215,6 @@ StarBASIC* SfxApplication::GetBasic()
return GetBasicManager()->GetLib(0);
}
-//--------------------------------------------------------------------
-
-FASTBOOL SfxApplication::IsInBasicCall() const
-{
- return 0 != pAppData_Impl->nBasicCallLevel;
-}
-
-//--------------------------------------------------------------------
-
-void SfxApplication::EnterBasicCall()
-{
- if ( 1 == ++pAppData_Impl->nBasicCallLevel )
- {
- DBG_TRACE( "SfxShellObject: BASIC-on-demand" );
-
- // das kann l"anger dauern, da Progress nicht geht, wenigstens Sanduhr
-//(mba)/task SfxWaitCursor aWait;
-
- // zuerst das BASIC laden
- GetBasic();
-/*
- // als erstes SfxShellObject das SbxObject der SfxApplication erzeugen
- SbxObject *pSbx = GetSbxObject();
- DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject for SfxApplication" );
-
- // die SbxObjects aller Module erzeugen
- SfxModuleArr_Impl& rArr = GetModules_Impl();
- for ( sal_uInt16 n = 0; n < rArr.Count(); ++n )
- {
- SfxModule *pMod = rArr.GetObject(n);
- if ( pMod->IsLoaded() )
- {
- pSbx = pMod->GetSbxObject();
- DBG_ASSERT( pSbx, "SfxModule: can't create SbxObject" );
- }
- }
-
- // die SbxObjects aller Tasks erzeugen
- for ( SfxTask *pTask = SfxTask::GetFirst(); pTask; pTask = SfxTask::GetNext( *pTask ) )
- pTask->GetSbxObject();
-
- // die SbxObjects aller SfxObjectShells erzeugen (ggf. Frame-los!)
- for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst( NULL, sal_False );
- pObjSh;
- pObjSh = SfxObjectShell::GetNext(*pObjSh, NULL, sal_False) )
- {
- // kein IP-Object oder wenn doch dann initialisiert?
- SvStorageRef aStorage;
- if ( !pObjSh->IsHandsOff() )
- aStorage = pObjSh->GetStorage();
- if ( !pObjSh->GetInPlaceObject() || aStorage.Is() )
- {
- DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for %s",
- pObjSh->SfxShell::GetName().GetBuffer() ) );
- pSbx = pObjSh->GetSbxObject();
- DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
- }
- }
-
- // die SbxObjects der SfxShells auf den Stacks der Frames erzeugen
- for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,sal_False);
- pFrame;
- pFrame = SfxViewFrame::GetNext(*pFrame,0,0,sal_False) )
- {
- // den Dispatcher des Frames rausholen
- SfxDispatcher *pDispat = pFrame->GetDispatcher();
- pDispat->Flush();
-
- // "uber alle SfxShells auf dem Stack des Dispatchers iterieren
- // Frame selbst wird ausgespart, da er indirekt angezogen wird,
- // sofern er ein Dokument enth"alt.
- for ( sal_uInt16 nStackIdx = pDispat->GetShellLevel(*pFrame);
- 0 != nStackIdx;
- --nStackIdx )
- {
- DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for level %u", nStackIdx-1 ); )
- pSbx = pDispat->GetShell(nStackIdx - 1)->GetSbxObject();
- DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
- }
-
- if ( !pFrame->GetObjectShell() )
- {
- DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for empty frame" ); )
- pSbx = pFrame->GetSbxObject();
- DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
- }
- }
-*/
- // Factories anmelden
-// SbxBase::AddFactory( new SfxSbxObjectFactory_Impl );
- }
-}
-
-//--------------------------------------------------------------------
-
-void SfxApplication::LeaveBasicCall()
-{
- --pAppData_Impl->nBasicCallLevel;
-}
-
//-------------------------------------------------------------------------
void SfxApplication::PropExec_Impl( SfxRequest &rReq )
{
@@ -445,10 +269,6 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_PLAYMACRO:
- PlayMacro_Impl( rReq, GetBasic() );
- break;
-
case SID_OFFICE_PRIVATE_USE:
case SID_OFFICE_COMMERCIAL_USE:
{
@@ -493,27 +313,13 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
break;
case SID_ATTR_UNDO_COUNT:
- rSet.Put( SfxUInt16Item( SID_ATTR_UNDO_COUNT, sal::static_int_cast< UINT16 >( SvtUndoOptions().GetUndoCount() ) ) );
+ rSet.Put( SfxUInt16Item( SID_ATTR_UNDO_COUNT, sal::static_int_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) ) );
break;
case SID_UPDATE_VERSION:
rSet.Put( SfxUInt32Item( SID_UPDATE_VERSION, SUPD ) );
break;
- case SID_BUILD_VERSION:
- {
- String aVersion = lcl_GetVersionString(pAppData_Impl->pLabelResMgr);
- rSet.Put( SfxUInt32Item( SID_BUILD_VERSION, (sal_uInt32) aVersion.ToInt32() ) );
- break;
- }
-
- case SID_OFFICE_PRIVATE_USE:
- case SID_OFFICE_COMMERCIAL_USE:
- {
- DBG_ASSERT( sal_False, "SfxApplication::PropState_Impl()\nSID_OFFICE_PRIVATE_USE & SID_OFFICE_COMMERCIAL_USE are obsolete!\n" );
- break;
- }
-
case SID_OFFICE_CUSTOMERNUMBER:
{
rSet.Put( SfxStringItem( nSID, SvtUserOptions().GetCustomerNumber() ) );
@@ -523,68 +329,3 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
}
}
-//--------------------------------------------------------------------
-void SfxApplication::MacroExec_Impl( SfxRequest& rReq )
-{
- DBG_MEMTEST();
- if ( SfxMacroConfig::IsMacroSlot( rReq.GetSlot() ) )
- {
- // SlotId referenzieren, damit nicht im Execute der Slot abgeschossen
- // werden kann
- GetMacroConfig()->RegisterSlotId(rReq.GetSlot());
- SFX_REQUEST_ARG(rReq, pArgs, SfxStringItem,
- rReq.GetSlot(), sal_False);
- String aArgs;
- if( pArgs ) aArgs = pArgs->GetValue();
- if ( GetMacroConfig()->ExecuteMacro(rReq.GetSlot(), aArgs ) )
- rReq.Done();
- GetMacroConfig()->ReleaseSlotId(rReq.GetSlot());
- }
-}
-
-//--------------------------------------------------------------------
-void SfxApplication::MacroState_Impl( SfxItemSet& )
-{
- DBG_MEMTEST();
-}
-
-//-------------------------------------------------------------------------
-
-void SfxApplication::PlayMacro_Impl( SfxRequest &rReq, StarBASIC *pBasic )
-{
- EnterBasicCall();
- sal_Bool bOK = sal_False;
-
- // Makro und asynch-Flag
- SFX_REQUEST_ARG(rReq,pMacro,SfxStringItem,SID_STATEMENT,sal_False);
- SFX_REQUEST_ARG(rReq,pAsynch,SfxBoolItem,SID_ASYNCHRON,sal_False);
-
- if ( pAsynch && pAsynch->GetValue() )
- {
- // asynchron ausf"uhren
- GetDispatcher_Impl()->Execute( SID_PLAYMACRO, SFX_CALLMODE_ASYNCHRON, pMacro, 0L );
- rReq.Done();
- }
- else if ( pMacro )
- {
- // Statement aufbereiten
- DBG_ASSERT( pBasic, "no BASIC found" ) ;
- String aStatement( '[' );
- aStatement += pMacro->GetValue();
- aStatement += ']';
-
- // P"aventiv den Request abschlie\sen, da er ggf. zerst"ort wird
- rReq.Done();
- rReq.ReleaseArgs();
-
- // Statement ausf"uhren
- pBasic->Execute( aStatement );
- bOK = 0 == SbxBase::GetError();
- SbxBase::ResetError();
- }
-
- LeaveBasicCall();
- rReq.SetReturnValue(SfxBoolItem(0,bOK));
-}
-
-
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index c876db373d35..d98147078bc6 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -88,7 +88,6 @@
#include <sfx2/evntconf.hxx>
#include "appdata.hxx"
#include "workwin.hxx"
-#include <sfx2/macrconf.hxx>
#include "helper.hxx" // SfxContentHelper::...
#include "app.hrc"
#include "sfx2/sfxresid.hxx"
@@ -171,13 +170,13 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
//--------------------------------------------------------------------
-BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
+sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxItemPool &rPool = GetPool();
String aTRUEStr('1');
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
SvtSaveOptions aSaveOptions;
SvtUndoOptions aUndoOptions;
SvtHelpOptions aHelpOptions;
@@ -187,132 +186,132 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
case SID_ATTR_BUTTON_OUTSTYLE3D :
if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_OUTSTYLE3D ),
aMiscOptions.GetToolboxStyle() != TOOLBOX_STYLE_FLAT)))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_BUTTON_BIGSIZE :
{
if( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_BIGSIZE ), aMiscOptions.AreCurrentSymbolsLarge() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
}
case SID_ATTR_BACKUP :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_BACKUP))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BACKUP ),aSaveOptions.IsBackup())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_PRETTYPRINTING:
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), aSaveOptions.IsPrettyPrinting())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_WARNALIENFORMAT:
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), aSaveOptions.IsWarnAlienFormat())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVE :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ), aSaveOptions.IsAutoSave())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVEPROMPT :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVEPROMPT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVEPROMPT ), aSaveOptions.IsAutoSavePrompt())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_AUTOSAVEMINUTE :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVETIME))
- if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), (UINT16)aSaveOptions.GetAutoSaveTime())))
- bRet = FALSE;
+ if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), (sal_uInt16)aSaveOptions.GetAutoSaveTime())))
+ bRet = sal_False;
}
break;
case SID_ATTR_DOCINFO :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_DOCINFO ), aSaveOptions.IsDocInfoSave())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_WORKINGSET :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEWORKINGSET))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WORKINGSET ), aSaveOptions.IsSaveWorkingSet())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_SAVEDOCVIEW :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEDOCVIEW))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCVIEW ), aSaveOptions.IsSaveDocView())))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_ATTR_METRIC :
// if(rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_METRIC ),
// pOptions->GetMetric() ) ) )
-// bRet = TRUE;
+// bRet = sal_True;
break;
case SID_HELPBALLOONS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPBALLOONS ),
aHelpOptions.IsExtendedHelp() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELPTIPS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPTIPS ),
aHelpOptions.IsHelpTips() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_AUTOHELPAGENT :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_AUTOHELPAGENT ),
aHelpOptions.IsHelpAgentAutoStartMode() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELPAGENT_TIMEOUT :
if ( rSet.Put( SfxInt32Item( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ),
aHelpOptions.GetHelpAgentTimeoutPeriod() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_WELCOMESCREEN :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_WELCOMESCREEN ),
aHelpOptions.IsWelcomeScreen() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_HELP_STYLESHEET :
if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_HELP_STYLESHEET ),
aHelpOptions.GetHelpStyleSheet() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_UNDO_COUNT :
if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_ATTR_UNDO_COUNT ),
- (UINT16)aUndoOptions.GetUndoCount() ) ) )
- bRet = TRUE;
+ (sal_uInt16)aUndoOptions.GetUndoCount() ) ) )
+ bRet = sal_True;
break;
case SID_ATTR_QUICKLAUNCHER :
{
@@ -320,74 +319,74 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
{
if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ),
ShutdownIcon::GetAutostart() ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
rSet.DisableItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ) );
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
case SID_SAVEREL_INET :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELINET))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_INET ), aSaveOptions.IsSaveRelINet() )))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_SAVEREL_FSYS :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELFSYS))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_FSYS ), aSaveOptions.IsSaveRelFSys() )))
- bRet = FALSE;
+ bRet = sal_False;
}
break;
case SID_BASIC_ENABLED :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_BASICMODE))
{
- if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< UINT16 >(aSecurityOptions.GetBasicMode()))))
- bRet = FALSE;
+ if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< sal_uInt16 >(aSecurityOptions.GetBasicMode()))))
+ bRet = sal_False;
}
}
break;
case SID_INET_EXE_PLUGIN :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_EXECUTEPLUGINS))
{
if ( !rSet.Put( SfxBoolItem( SID_INET_EXE_PLUGIN, aSecurityOptions.IsExecutePlugins() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_MACRO_WARNING :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_WARNING))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_WARNING, aSecurityOptions.IsWarningEnabled() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_MACRO_CONFIRMATION :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_CONFIRMATION))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_CONFIRMATION, aSecurityOptions.IsConfirmationEnabled() ) ) )
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
case SID_SECURE_URL :
{
- bRet = TRUE;
+ bRet = sal_True;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_SECUREURLS))
{
::com::sun::star::uno::Sequence< ::rtl::OUString > seqURLs = aSecurityOptions.GetSecureURLs();
@@ -401,7 +400,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
if( !rSet.Put( SfxStringListItem( rPool.GetWhich(SID_SECURE_URL),
&aList ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
}
for( nURL=0; nURL<nCount; ++nURL )
{
@@ -419,31 +418,31 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_INET_PROXY_TYPE :
{
if( rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_PROXY_TYPE ),
- (UINT16)aInetOptions.GetProxyType() )))
- bRet = TRUE;
+ (sal_uInt16)aInetOptions.GetProxyType() )))
+ bRet = sal_True;
break;
}
case SID_INET_HTTP_PROXY_NAME :
{
if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_HTTP_PROXY_NAME ),
aInetOptions.GetProxyHttpName() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
}
case SID_INET_HTTP_PROXY_PORT :
if ( rSet.Put( SfxInt32Item( rPool.GetWhich(SID_INET_HTTP_PROXY_PORT ),
aInetOptions.GetProxyHttpPort() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_FTP_PROXY_NAME :
if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_FTP_PROXY_NAME ),
aInetOptions.GetProxyFtpName() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_FTP_PROXY_PORT :
if ( rSet.Put( SfxInt32Item ( rPool.GetWhich(SID_INET_FTP_PROXY_PORT ),
aInetOptions.GetProxyFtpPort() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_INET_SECURITY_PROXY_NAME :
case SID_INET_SECURITY_PROXY_PORT :
@@ -454,7 +453,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_INET_NOPROXY :
if( rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_NOPROXY),
aInetOptions.GetProxyNoProxy() )))
- bRet = TRUE;
+ bRet = sal_True;
break;
case SID_ATTR_PATHNAME :
case SID_ATTR_PATHGROUP :
@@ -462,7 +461,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
SfxAllEnumItem aNames(rPool.GetWhich(SID_ATTR_PATHGROUP));
SfxAllEnumItem aValues(rPool.GetWhich(SID_ATTR_PATHNAME));
SvtPathOptions aPathCfg;
- for ( USHORT nProp = SvtPathOptions::PATH_ADDIN;
+ for ( sal_uInt16 nProp = SvtPathOptions::PATH_ADDIN;
nProp <= SvtPathOptions::PATH_WORK; nProp++ )
{
const String aName( SfxResId( CONFIG_PATH_START + nProp ) );
@@ -497,7 +496,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
}
if ( rSet.Put(aNames) || rSet.Put(aValues) )
- bRet = TRUE;
+ bRet = sal_True;
}
default:
@@ -516,7 +515,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
}
//--------------------------------------------------------------------
-BOOL SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* pReferer ) const
+sal_Bool SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* pReferer ) const
{
return SvtSecurityOptions().IsSecureURL( rURL.GetMainURL( INetURLObject::NO_DECODE ), *pReferer );
}
@@ -526,8 +525,8 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
{
const SfxPoolItem *pItem = 0;
SfxItemPool &rPool = GetPool();
- BOOL bResetSession = FALSE;
- BOOL bProxiesModified = FALSE;
+ sal_Bool bResetSession = sal_False;
+ sal_Bool bProxiesModified = sal_False;
SvtSaveOptions aSaveOptions;
SvtUndoOptions aUndoOptions;
@@ -536,18 +535,18 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
SvtPathOptions aPathOptions;
SvtInetOptions aInetOptions;
SvtMiscOptions aMiscOptions;
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- USHORT nOutStyle =
+ sal_uInt16 nOutStyle =
( (const SfxBoolItem *)pItem)->GetValue() ? 0 : TOOLBOX_STYLE_FLAT;
aMiscOptions.SetToolboxStyle( nOutStyle );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- BOOL bBigSize = ( (const SfxBoolItem*)pItem )->GetValue();
+ sal_Bool bBigSize = ( (const SfxBoolItem*)pItem )->GetValue();
aMiscOptions.SetSymbolsSize(
sal::static_int_cast< sal_Int16 >(
bBigSize ? SFX_SYMBOLS_SIZE_LARGE : SFX_SYMBOLS_SIZE_SMALL ) );
@@ -562,145 +561,145 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
}
// Backup
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), TRUE, &pItem) )
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), sal_True, &pItem) )
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() );
}
// PrettyPrinting
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" );
aSaveOptions.SetPrettyPrinting( static_cast< const SfxBoolItem*> ( pItem )->GetValue() );
}
// WarnAlienFormat
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA( SfxBoolItem ), "BoolItem expected" );
aSaveOptions.SetWarnAlienFormat( static_cast< const SfxBoolItem*> ( pItem )->GetValue() );
}
// AutoSave
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() );
}
// AutoSave-Propt
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetAutoSavePrompt(((const SfxBoolItem *)pItem)->GetValue());
}
// AutoSave-Time
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
aSaveOptions.SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue());
}
// DocInfo
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue());
}
// offende Dokumente merken
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
}
// Fenster-Einstellung speichern
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveDocView(((const SfxBoolItem *)pItem)->GetValue());
}
// Metric
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
// pOptions->SetMetric((FieldUnit)((const SfxUInt16Item*)pItem)->GetValue());
}
// HelpBalloons
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetExtendedHelp(((const SfxBoolItem *)pItem)->GetValue());
}
// HelpTips
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetHelpTips(((const SfxBoolItem *)pItem)->GetValue());
}
// AutoHelpAgent
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetHelpAgentAutoStartMode( ((const SfxBoolItem *)pItem)->GetValue() );
}
// help agent timeout
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), sal_True, &pItem ) )
{
DBG_ASSERT(pItem->ISA(SfxInt32Item), "Int32Item expected");
aHelpOptions.SetHelpAgentTimeoutPeriod( ( (const SfxInt32Item*)pItem )->GetValue() );
}
// WelcomeScreen
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aHelpOptions.SetWelcomeScreen( ((const SfxBoolItem *)pItem)->GetValue() );
}
// WelcomeScreen
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- BOOL bReset = ((const SfxBoolItem *)pItem)->GetValue();
+ sal_Bool bReset = ((const SfxBoolItem *)pItem)->GetValue();
if ( bReset )
{
DBG_ERROR( "Not implemented, may be EOL!" );
} }
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
aHelpOptions.SetHelpStyleSheet( ((const SfxStringItem *)pItem)->GetValue() );
}
// SaveRelINet
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveRelINet(((const SfxBoolItem *)pItem)->GetValue());
}
// SaveRelFSys
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveRelFSys(((const SfxBoolItem *)pItem)->GetValue());
}
// Undo-Count
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
- USHORT nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
aUndoOptions.SetUndoCount( nUndoCount );
// um alle Undo-Manager zu erwischen: "uber alle Frames iterieren
@@ -713,12 +712,12 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
pDispat->Flush();
// "uber alle SfxShells auf dem Stack des Dispatchers iterieren
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for ( SfxShell *pSh = pDispat->GetShell(nIdx);
pSh;
++nIdx, pSh = pDispat->GetShell(nIdx) )
{
- SfxUndoManager *pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( pShUndoMgr )
pShUndoMgr->SetMaxUndoActionCount( nUndoCount );
}
@@ -726,73 +725,73 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
}
// Office autostart
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_QUICKLAUNCHER), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
- ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() != FALSE );
+ ShutdownIcon::SetAutostart( ( (const SfxBoolItem*)pItem )->GetValue() != sal_False );
}
// StarBasic Enable
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxInt16Item expected");
aSecurityOptions.SetBasicMode( (EBasicSecurityMode)( (const SfxUInt16Item*)pItem )->GetValue() );
}
// Execute PlugIns
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetExecutePlugins( ( (const SfxBoolItem *)pItem )->GetValue() );
- bResetSession = TRUE;
+ bResetSession = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), sal_True, &pItem))
{
DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
aInetOptions.SetProxyType((SvtInetOptions::ProxyType)( (const SfxUInt16Item*)pItem )->GetValue());
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
aInetOptions.SetProxyHttpName( ((const SfxStringItem *)pItem)->GetValue() );
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
aInetOptions.SetProxyHttpPort( ( (const SfxInt32Item*)pItem )->GetValue() );
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
aInetOptions.SetProxyFtpName( ((const SfxStringItem *)pItem)->GetValue() );
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), sal_True, &pItem ) )
{
DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
aInetOptions.SetProxyFtpPort( ( (const SfxInt32Item*)pItem )->GetValue() );
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
aInetOptions.SetProxyNoProxy(((const SfxStringItem *)pItem)->GetValue());
- bResetSession = TRUE;
- bProxiesModified = TRUE;
+ bResetSession = sal_True;
+ bProxiesModified = sal_True;
}
// Secure-Referers
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, sal_True, &pItem))
{
DELETEZ(pAppData_Impl->pSecureURLs);
@@ -807,19 +806,19 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSecurityOptions.SetSecureURLs( seqURLs );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_WARNING, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetWarningEnabled( ( (const SfxBoolItem *)pItem )->GetValue() );
}
- if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_MACRO_CONFIRMATION, sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
aSecurityOptions.SetConfirmationEnabled( ( (const SfxBoolItem *)pItem )->GetValue() );
}
// EnableMetafilePrint
- if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ), TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ), sal_True, &pItem ) )
{
#ifdef ENABLE_MISSINGKEYASSERTIONS//MUSTINI
DBG_ASSERT(sal_False, "SfxApplication::SetOptions_Impl()\nsoffice.ini key \"MetafilPrint\" not supported any longer!\n");
@@ -842,7 +841,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
SfxAllItemSet aSendSet( rSet );
// PathName
- if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxAllEnumItem), "AllEnumItem expected");
const SfxAllEnumItem* pEnumItem = (const SfxAllEnumItem *)pItem;
@@ -850,7 +849,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
String aNoChangeStr( ' ' );
for( sal_uInt32 nPath=0; nPath<nCount; ++nPath )
{
- String sValue = pEnumItem->GetValueTextByPos((USHORT)nPath);
+ String sValue = pEnumItem->GetValueTextByPos((sal_uInt16)nPath);
if ( sValue != aNoChangeStr )
{
switch( nPath )
@@ -936,11 +935,11 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
// alle Dokumente speichern
-BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
+sal_Bool SfxApplication::SaveAll_Impl(sal_Bool bPrompt, sal_Bool bAutoSave)
{
- bAutoSave = FALSE; // functionality moved to new AutoRecovery Service!
+ bAutoSave = sal_False; // functionality moved to new AutoRecovery Service!
- BOOL bFunc = TRUE;
+ sal_Bool bFunc = sal_True;
short nRet;
for ( SfxObjectShell *pDoc = SfxObjectShell::GetFirst();
@@ -968,11 +967,11 @@ BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
const SfxPoolItem *pPoolItem = pDoc->ExecuteSlot( aReq );
if ( !pPoolItem || !pPoolItem->ISA(SfxBoolItem) ||
!( (const SfxBoolItem*) pPoolItem )->GetValue() )
- bFunc = FALSE;
+ bFunc = sal_False;
}
else if ( nRet == RET_CANCEL )
{
- bFunc = FALSE;
+ bFunc = sal_False;
break;
}
else if ( nRet == RET_NO )
@@ -987,26 +986,9 @@ BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
//--------------------------------------------------------------------
-SfxMacroConfig* SfxApplication::GetMacroConfig() const
-{
- return SfxMacroConfig::GetOrCreate();
-}
-
-//--------------------------------------------------------------------
-SfxEventConfiguration* SfxApplication::GetEventConfig() const
-{
- if (!pAppData_Impl->pEventConfig)
- pAppData_Impl->pEventConfig = new SfxEventConfiguration;
- return pAppData_Impl->pEventConfig;
-}
-
//--------------------------------------------------------------------
-
-//--------------------------------------------------------------------
-void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSynchron )
+void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron )
{
- //DBG_ASSERT(pAppData_Impl->pEventConfig,"Keine Events angemeldet!");
-
SfxObjectShell *pDoc = rEventHint.GetObjShell();
if ( pDoc && ( pDoc->IsPreview() || !pDoc->Get_Impl()->bInitialized ) )
return;
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index b18fc905abdc..ea7b331b839b 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -61,7 +61,7 @@ void SfxApplication::RegisterChildWindow_Impl( SfxModule *pMod, SfxChildWinFacto
pAppData_Impl->pFactArr = new SfxChildWinFactArr_Impl;
//#ifdef DBG_UTIL
- for (USHORT nFactory=0; nFactory<pAppData_Impl->pFactArr->Count(); ++nFactory)
+ for (sal_uInt16 nFactory=0; nFactory<pAppData_Impl->pFactArr->Count(); ++nFactory)
{
if (pFact->nId == (*pAppData_Impl->pFactArr)[nFactory]->nId)
{
@@ -76,7 +76,7 @@ void SfxApplication::RegisterChildWindow_Impl( SfxModule *pMod, SfxChildWinFacto
SfxChildWinFactory, pFact, pAppData_Impl->pFactArr->Count() );
}
-void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nId,
+void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt16 nId,
SfxChildWinContextFactory *pFact)
{
SfxChildWinFactArr_Impl *pFactories;
@@ -87,8 +87,8 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nI
pFactories = pMod->GetChildWinFactories_Impl();
if ( pFactories )
{
- USHORT nCount = pFactories->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pFactories->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pFac = (*pFactories)[nFactory];
if ( nId == pFac->nId )
@@ -108,8 +108,8 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, USHORT nI
DBG_ASSERT( pAppData_Impl->pFactArr, "Keine Factories!" );
pFactories = pAppData_Impl->pFactArr;
- USHORT nCount = pFactories->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pFactories->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pFac = (*pFactories)[nFactory];
if ( nId == pFac->nId )
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 32b56717293c..71a6fc269c11 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -98,11 +98,9 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pTopFrames( new SfxFrameArr_Impl ),
pInitLinkList(0),
pMatcher( 0 ),
- pLabelResMgr( 0 ),
pAppDispatch(NULL),
pTemplates( 0 ),
pPool(0),
- pEventConfig(0),
pDisabledSlotList( 0 ),
pSecureURLs(0),
pSaveOptions( 0 ),
@@ -112,7 +110,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pTemplateCommon( 0 ),
nDocModalMode(0),
nAutoTabPageId(0),
- nBasicCallLevel(0),
nRescheduleLocks(0),
nInReschedule(0),
nAsynchronCalls(0),
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 808731f8bba8..26e4fecf3864 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -38,6 +38,7 @@
#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/pathoptions.hxx>
#ifndef GCC
#endif
@@ -74,14 +75,14 @@ public:
ImplDdeService( const String& rNm )
: DdeService( rNm )
{}
- virtual BOOL MakeTopic( const String& );
+ virtual sal_Bool MakeTopic( const String& );
virtual String Topics();
// virtual String Formats();
// virtual String SysItems();
// virtual String Status();
- virtual BOOL SysTopicExecute( const String* pStr );
+ virtual sal_Bool SysTopicExecute( const String* pStr );
};
class SfxDdeTriggerTopic_Impl : public DdeTopic
@@ -91,7 +92,7 @@ public:
: DdeTopic( DEFINE_CONST_UNICODE("TRIGGER") )
{}
- virtual BOOL Execute( const String* );
+ virtual sal_Bool Execute( const String* );
};
class SfxDdeDocTopic_Impl : public DdeTopic
@@ -105,11 +106,11 @@ public:
: DdeTopic( pShell->GetTitle(SFX_TITLE_FULLNAME) ), pSh( pShell )
{}
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual BOOL Execute( const String* );
- virtual BOOL StartAdviseLoop();
- virtual BOOL MakeItem( const String& rItem );
+ virtual DdeData* Get( sal_uIntPtr );
+ virtual sal_Bool Put( const DdeData* );
+ virtual sal_Bool Execute( const String* );
+ virtual sal_Bool StartAdviseLoop();
+ virtual sal_Bool MakeItem( const String& rItem );
// wird benoetigt?
// virtual void Connect( long n );
@@ -124,7 +125,7 @@ SV_IMPL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl *)
//========================================================================
-BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
+sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
const String &rCmd, const String &rEvent )
/* [Beschreibung]
@@ -152,7 +153,7 @@ BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
{
// in das ApplicationEvent-Format wandeln
aData.Erase( aData.Len()-1, 1 );
- for ( USHORT n = 0; n < aData.Len(); ++n )
+ for ( sal_uInt16 n = 0; n < aData.Len(); ++n )
{
if ( aData.GetChar(n) == 0x0022 ) // " = 22h
for ( ; aData.GetChar(++n) != 0x0022 ; )
@@ -163,11 +164,11 @@ BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
aData.EraseAllChars( 0x0022 );
ApplicationAddress aAddr;
rAppEvent = ApplicationEvent( String(), aAddr, U2S(rEvent), aData );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -197,11 +198,9 @@ long SfxApplication::DdeExecute
else
{
// alle anderen per BASIC
- EnterBasicCall();
StarBASIC* pBasic = GetBasic();
- DBG_ASSERT( pBasic, "Wo ist mein Basic???" );
+ ENSURE_OR_RETURN( pBasic, "where's my basic?", 0 );
SbxVariable* pRet = pBasic->Execute( rCmd );
- LeaveBasicCall();
if( !pRet )
{
SbxBase::ResetError();
@@ -456,7 +455,7 @@ long SfxViewFrame::DdeSetData
//========================================================================
-BOOL SfxApplication::InitializeDde()
+sal_Bool SfxApplication::InitializeDde()
{
DBG_ASSERT( !pAppData_Impl->pDdeService,
"Dde kann nicht mehrfach initialisiert werden" );
@@ -502,8 +501,8 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
// doppeltes Eintragen verhindern
String sShellNm;
- BOOL bFnd = FALSE;
- for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = pAppData_Impl->pDocTopics->Count(); n; )
if( (*pAppData_Impl->pDocTopics)[ --n ]->pSh == pSh )
{
// JP 18.03.96 - Bug 26470
@@ -511,7 +510,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
// neues Topics anzulegen!
if( !bFnd )
{
- bFnd = TRUE;
+ bFnd = sal_True;
(sShellNm = pSh->GetTitle(SFX_TITLE_FULLNAME)).ToLowerAscii();
}
String sNm( (*pAppData_Impl->pDocTopics)[ n ]->GetName() );
@@ -533,7 +532,7 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
return;
SfxDdeDocTopic_Impl* pTopic;
- for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ for( sal_uInt16 n = pAppData_Impl->pDocTopics->Count(); n; )
if( ( pTopic = (*pAppData_Impl->pDocTopics)[ --n ])->pSh == pSh )
{
pAppData_Impl->pDdeService->RemoveTopic( *pTopic );
@@ -553,17 +552,17 @@ DdeService* SfxApplication::GetDdeService()
//--------------------------------------------------------------------
-BOOL ImplDdeService::MakeTopic( const String& rNm )
+sal_Bool ImplDdeService::MakeTopic( const String& rNm )
{
// Workaround gegen Event nach unserem Main() unter OS/2
// passierte wenn man beim Beenden aus dem OffMgr die App neu startet
if ( !Application::IsInExecute() )
- return FALSE;
+ return sal_False;
// das Topic rNm wird gesucht, haben wir es ?
// erstmal nur ueber die ObjectShells laufen und die mit dem
// Namen heraussuchen:
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sNm( rNm );
sNm.ToLowerAscii();
TypeId aType( TYPE(SfxObjectShell) );
@@ -575,7 +574,7 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
if( sTmp == sNm ) // die wollen wir haben
{
SFX_APP()->AddDdeTopic( pShell );
- bRet = TRUE;
+ bRet = sal_True;
break;
}
pShell = SfxObjectShell::GetNext( *pShell, &aType );
@@ -592,9 +591,9 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
// dann versuche die Datei zu laden:
SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
- SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, TRUE);
+ SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, sal_True);
- SfxBoolItem aSilent(SID_SILENT, TRUE);
+ SfxBoolItem aSilent(SID_SILENT, sal_True);
SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
SFX_CALLMODE_SYNCHRON,
@@ -607,7 +606,7 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
->GetFrame()->GetObjectShell() ) )
{
SFX_APP()->AddDdeTopic( pShell );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -637,20 +636,20 @@ String ImplDdeService::Topics()
return sRet;
}
-BOOL ImplDdeService::SysTopicExecute( const String* pStr )
+sal_Bool ImplDdeService::SysTopicExecute( const String* pStr )
{
- return (BOOL)SFX_APP()->DdeExecute( *pStr );
+ return (sal_Bool)SFX_APP()->DdeExecute( *pStr );
}
//--------------------------------------------------------------------
-BOOL SfxDdeTriggerTopic_Impl::Execute( const String* )
+sal_Bool SfxDdeTriggerTopic_Impl::Execute( const String* )
{
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
+DdeData* SfxDdeDocTopic_Impl::Get( sal_uIntPtr nFormat )
{
String sMimeType( SotExchange::GetFormatMimeType( nFormat ));
::com::sun::star::uno::Any aValue;
@@ -664,11 +663,11 @@ DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
return 0;
}
-BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
+sal_Bool SfxDdeDocTopic_Impl::Put( const DdeData* pData )
{
aSeq = ::com::sun::star::uno::Sequence< sal_Int8 >(
(sal_Int8*)(const void*)*pData, (long)*pData );
- BOOL bRet;
+ sal_Bool bRet;
if( aSeq.getLength() )
{
::com::sun::star::uno::Any aValue;
@@ -677,25 +676,25 @@ BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
bRet = 0 != pSh->DdeSetData( GetCurItem(), sMimeType, aValue );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SfxDdeDocTopic_Impl::Execute( const String* pStr )
+sal_Bool SfxDdeDocTopic_Impl::Execute( const String* pStr )
{
long nRet = pStr ? pSh->DdeExecute( *pStr ) : 0;
return 0 != nRet;
}
-BOOL SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
+sal_Bool SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
{
AddItem( DdeItem( rItem ) );
- return TRUE;
+ return sal_True;
}
-BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
+sal_Bool SfxDdeDocTopic_Impl::StartAdviseLoop()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
::sfx2::SvLinkSource* pNewObj = pSh->DdeCreateLinkSource( GetCurItem() );
if( pNewObj )
{
@@ -703,7 +702,7 @@ BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
String sNm, sTmp( Application::GetAppName() );
::sfx2::MakeLnkName( sNm, &sTmp, pSh->GetTitle(SFX_TITLE_FULLNAME), GetCurItem() );
new ::sfx2::SvBaseLink( sNm, OBJECT_DDE_EXTERN, pNewObj );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2aa19901d87c..d9ff26beccba 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -74,7 +74,6 @@
#include <sfx2/docfac.hxx>
#include <sfx2/evntconf.hxx>
#include "intro.hxx"
-#include <sfx2/macrconf.hxx>
#include <sfx2/mnumgr.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/progress.hxx>
@@ -86,7 +85,7 @@
#include <sfx2/fcontnr.hxx>
#include "helper.hxx" // SfxContentHelper::Kill()
#include "sfxpicklist.hxx"
-#include <tools/svlibrary.hxx>
+#include <tools/svlibrary.hxx>
#ifdef UNX
#define stricmp(a,b) strcmp(a,b)
@@ -213,7 +212,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
{
bDetermineFunction = true;
- static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "cui" ) ) );
oslModule handleMod = osl_loadModuleRelative(
&thisModule, aLibName.pData, 0 );
@@ -231,7 +230,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
//====================================================================
-FASTBOOL SfxApplication::Initialize_Impl()
+bool SfxApplication::Initialize_Impl()
{
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::Initialize_Impl" );
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index 1bde50fec224..64c6673bbafb 100644
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -145,35 +145,6 @@ void SfxApplication::PreInit( )
{
}
-//---------------------------------------------------------------------------
-bool SfxApplication::InitLabelResMgr( const char* _pLabelPrefix, bool _bException )
-{
- bool bRet = false;
- // Label-DLL mit diversen Resourcen fuer OEM-Ver. etc. (Intro, Titel, About)
- DBG_ASSERT( _pLabelPrefix, "Wrong initialisation!" );
- if ( _pLabelPrefix )
- {
- // versuchen, die Label-DLL zu erzeugen
- pAppData_Impl->pLabelResMgr = CreateResManager( _pLabelPrefix );
-
- // keine separate Label-DLL vorhanden?
- if ( !pAppData_Impl->pLabelResMgr )
- {
- if ( _bException )
- {
- // maybe corrupted installation
- throw (::com::sun::star::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("iso resource could not be loaded by SfxApplication"),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >()));
- }
- }
- else
- bRet = true;
- }
-
- return bRet;
-}
-
void SfxApplication::Main( )
{
}
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 94b921f8122e..eafe9d262189 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -29,9 +29,7 @@
#include "precompiled_sfx2.hxx"
#include <vcl/status.hxx>
#include <vcl/msgbox.hxx>
-#ifndef _VOS_PROCESS_HXX //autogen
#include <vos/process.hxx>
-#endif
#include <vos/xception.hxx>
#include <svl/whiter.hxx>
#include <svl/stritem.hxx>
@@ -41,9 +39,7 @@
#include <unotools/internaloptions.hxx>
#include <unotools/pathoptions.hxx>
#include <com/sun/star/registry/InvalidRegistryException.hpp>
-#ifndef _COM_SUN_STAR_BEANS_PropertyValue_HPP_
#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
@@ -51,11 +47,8 @@
#include <tools/config.hxx>
#include <tools/rcid.h>
#include <vos/mutex.hxx>
-#ifndef GCC
-#endif
#include <unotools/configmgr.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
-
#include <unotools/ucbstreamhelper.hxx>
#include <framework/menuconfiguration.hxx>
#include <comphelper/processfactory.hxx>
@@ -63,6 +56,7 @@
#include <unotools/bootstrap.hxx>
#include <unotools/moduleoptions.hxx>
#include <osl/file.hxx>
+#include <rtl/bootstrap.hxx>
#include "sfx2/sfxresid.hxx"
#include <sfx2/app.hxx>
@@ -160,45 +154,6 @@ SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP))
}
//--------------------------------------------------------------------
-
-void SfxApplication::InitializeDisplayName_Impl()
-{
- SfxAppData_Impl* pAppData = Get_Impl();
- if ( !pAppData->pLabelResMgr )
- return;
-
- String aTitle = Application::GetDisplayName();
- if ( !aTitle.Len() )
- {
- OClearableGuard aGuard( OMutex::getGlobalMutex() );
-
- // create version string
-/*!!! (pb) don't show a version number at the moment
- USHORT nProductVersion = ProductVersion::GetVersion().ToInt32();
- String aVersion( String::CreateFromInt32( nProductVersion / 10 ) );
- aVersion += 0x002E ; // 2Eh ^= '.'
- aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) );
-*/
- // load application title
- aTitle = String( ResId( RID_APPTITLE, *pAppData->pLabelResMgr ) );
- // merge version into title
- aTitle.SearchAndReplaceAscii( "$(VER)", String() /*aVersion*/ );
-
- aGuard.clear();
-
-#ifdef DBG_UTIL
- ::rtl::OUString aDefault;
- aTitle += DEFINE_CONST_UNICODE(" [");
-
- String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
- aTitle += aVerId;
- aTitle += ']';
-#endif
- Application::SetDisplayName( aTitle );
- }
-}
-
-//--------------------------------------------------------------------
SfxProgress* SfxApplication::GetProgress() const
/* [Beschreibung]
@@ -237,8 +192,8 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ );
}
- BOOL bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled();
- BOOL bSlots = ( pStream && !pStream->GetError() );
+ sal_Bool bSlotsEnabled = SvtInternalOptions().SlotCFGEnabled();
+ sal_Bool bSlots = ( pStream && !pStream->GetError() );
if( bSlots && bSlotsEnabled )
{
// SlotDatei einlesen
@@ -305,7 +260,7 @@ SfxModule* SfxApplication::GetModule_Impl()
{
SfxModule* pModule = SfxModule::GetActiveModule();
if ( !pModule )
- pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( FALSE ) );
+ pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( sal_False ) );
if( pModule )
return pModule;
else
@@ -327,9 +282,77 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind
}
SfxResourceManager& SfxApplication::GetResourceManager() const { return *pAppData_Impl->pResMgr; }
-BOOL SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
+sal_Bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; }
SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl->pSlotPool; }
//SfxOptions& SfxApplication::GetOptions() { return *pAppData_Impl->pOptions; }
//const SfxOptions& SfxApplication::GetOptions() const { return *pAppData_Impl->pOptions; }
+static bool impl_loadBitmap(
+ const rtl::OUString &rPath, const rtl::OUString &rBmpFileName,
+ Image &rLogo )
+{
+ rtl::OUString uri( rPath );
+ rtl::Bootstrap::expandMacros( uri );
+ INetURLObject aObj( uri );
+ aObj.insertName( rBmpFileName );
+ SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
+ if ( !aStrm.GetError() )
+ {
+ // Use graphic class to also support more graphic formats (bmp,png,...)
+ Graphic aGraphic;
+
+ GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
+ pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
+
+ // Default case, we load the intro bitmap from a seperate file
+ // (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
+ BitmapEx aBmp = aGraphic.GetBitmapEx();
+ rLogo = Image( aBmp );
+ return true;
+ }
+ return false;
+}
+
+/** loads the application logo as used in the about dialog and impress slideshow pause screen */
+Image SfxApplication::GetApplicationLogo()
+{
+ Image aAppLogo;
+
+ rtl::OUString aAbouts;
+ bool bLoaded = false;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ aAbouts.getToken( 0, ',', nIndex ), aAppLogo );
+ }
+ while ( !bLoaded && ( nIndex >= 0 ) );
+
+ // fallback to "about.bmp"
+ if ( !bLoaded )
+ {
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
+ if ( !bLoaded )
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
+ rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ }
+
+ if ( !bLoaded )
+ {
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
+ if ( !bLoaded )
+ bLoaded = impl_loadBitmap(
+ rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
+ rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ }
+
+ return aAppLogo;
+}
+
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 0f4c1f651082..281a87c962f7 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -130,20 +130,20 @@ namespace css = ::com::sun::star;
class SfxOpenDocStatusListener_Impl : public WeakImplHelper1< XDispatchResultListener >
{
public:
- BOOL bFinished;
- BOOL bSuccess;
+ sal_Bool bFinished;
+ sal_Bool bSuccess;
virtual void SAL_CALL dispatchFinished( const DispatchResultEvent& Event ) throw(RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException);
SfxOpenDocStatusListener_Impl()
- : bFinished( FALSE )
- , bSuccess( FALSE )
+ : bFinished( sal_False )
+ , bSuccess( sal_False )
{}
};
void SAL_CALL SfxOpenDocStatusListener_Impl::dispatchFinished( const DispatchResultEvent& aEvent ) throw(RuntimeException)
{
bSuccess = ( aEvent.State == DispatchResultState::SUCCESS );
- bFinished = TRUE;
+ bFinished = sal_True;
}
void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) throw(RuntimeException)
@@ -153,9 +153,9 @@ void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) thr
SfxObjectShellRef SfxApplication::DocAlreadyLoaded
(
const String& rName, // Name des Dokuments mit Pfad
- BOOL bSilent, // TRUE: nicht nach neuer Sicht fragen
- BOOL bActivate, // soll bestehende Sicht aktiviert werden
- BOOL bForbidVisible,
+ sal_Bool bSilent, // sal_True: nicht nach neuer Sicht fragen
+ sal_Bool bActivate, // soll bestehende Sicht aktiviert werden
+ sal_Bool bForbidVisible,
const String* pPostStr
)
@@ -183,7 +183,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// dann bei den normal geoeffneten Docs
if ( !xDoc.Is() )
{
- xDoc = SfxObjectShell::GetFirst( 0, FALSE ); // auch hidden Docs
+ xDoc = SfxObjectShell::GetFirst( 0, sal_False ); // auch hidden Docs
while( xDoc.Is() )
{
if ( xDoc->GetMedium() &&
@@ -193,13 +193,13 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
// Vergleiche anhand der URLs
INetURLObject aUrl( xDoc->GetMedium()->GetName() );
if ( !aUrl.HasError() && aUrl == aUrlToFind &&
- (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, TRUE )) &&
+ (!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, sal_True )) &&
!xDoc->IsLoading())
{
break;
}
}
- xDoc = SfxObjectShell::GetNext( *xDoc, 0, FALSE );
+ xDoc = SfxObjectShell::GetNext( *xDoc, 0, sal_False );
}
}
}
@@ -221,7 +221,7 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
InfoBox( 0, SfxResId(RID_DOCALREADYLOADED_DLG)).Execute();
if ( bActivate )
{
- pFrame->MakeActive_Impl( TRUE );
+ pFrame->MakeActive_Impl( sal_True );
}
}
}
@@ -315,7 +315,7 @@ sal_uInt32 CheckPasswd_Impl
des Mediums gesetzt; das Set wird, wenn nicht vorhanden, erzeugt.
*/
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uIntPtr nRet = ERRCODE_NONE;
if( ( !pFile->GetFilter() || pFile->IsStorage() ) )
{
@@ -409,10 +409,10 @@ sal_uInt32 CheckPasswd_Impl
//--------------------------------------------------------------------
-ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFileName, BOOL bCopy, SfxItemSet* pSet )
+sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFileName, sal_Bool bCopy, SfxItemSet* pSet )
{
const SfxFilter* pFilter = NULL;
- SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), FALSE );
+ SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), sal_False );
if ( !aMedium.GetStorage( sal_True ).is() )
aMedium.GetInStream();
@@ -423,8 +423,8 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
return aMedium.GetErrorCode();
}
- aMedium.UseInteractionHandler( TRUE );
- ULONG nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 );
+ aMedium.UseInteractionHandler( sal_True );
+ sal_uIntPtr nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 );
if ( 0 != nErr)
{
delete pSet;
@@ -444,7 +444,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
SfxStringItem aName( SID_FILE_NAME, rFileName );
SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") );
SfxStringItem aFlags( SID_OPTIONS, String::CreateFromAscii("T") );
- SfxBoolItem aHidden( SID_HIDDEN, TRUE );
+ SfxBoolItem aHidden( SID_HIDDEN, sal_True );
const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet );
if ( pObj )
@@ -468,7 +468,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
if ( !xDoc.Is() )
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
- SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, pFilter, pSet );
+ SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, sal_False, pFilter, pSet );
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();
@@ -511,7 +511,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
xDoc->SetNoName();
xDoc->InvalidateName();
- xDoc->SetModified(FALSE);
+ xDoc->SetModified(sal_False);
xDoc->ResetError();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY );
@@ -540,7 +540,7 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
+ SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, sal_False);
String aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -556,10 +556,10 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_default" ) ) );
// TODO/LATER: Should the other arguments be transfered as well?
- SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, FALSE);
+ SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, sal_False);
if ( pDefaultPathItem )
aReq.AppendItem( *pDefaultPathItem );
- SFX_REQUEST_ARG( rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, FALSE);
+ SFX_REQUEST_ARG( rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME, sal_False);
if ( pDefaultNameItem )
aReq.AppendItem( *pDefaultNameItem );
@@ -576,14 +576,14 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
DBG_MEMTEST();
// keine Parameter vom BASIC nur Factory angegeben?
- SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, sal_False);
SfxObjectShellLock xDoc;
String aTemplateRegion, aTemplateName, aTemplateFileName;
- BOOL bDirect = FALSE; // "uber FileName anstelle Region/Template
+ sal_Bool bDirect = sal_False; // "uber FileName anstelle Region/Template
SfxErrorContext aEc(ERRCTX_SFX_NEWDOC);
if ( !pTemplNameItem && !pTemplFileNameItem )
{
@@ -624,13 +624,13 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
if ( pTemplFileNameItem )
{
aTemplateFileName = pTemplFileNameItem->GetValue();
- bDirect = TRUE;
+ bDirect = sal_True;
}
}
- ULONG lErr = 0;
+ sal_uIntPtr lErr = 0;
SfxItemSet* pSet = new SfxAllItemSet( GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
if ( !bDirect )
{
SfxDocumentTemplates aTmpFac;
@@ -646,7 +646,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
if ( lErr != ERRCODE_NONE )
{
- ULONG lFatalErr = ERRCODE_TOERROR(lErr);
+ sal_uIntPtr lFatalErr = ERRCODE_TOERROR(lErr);
if ( lFatalErr )
ErrorHandler::HandleError(lErr);
}
@@ -683,8 +683,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- USHORT nSID = rReq.GetSlot();
- SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ sal_uInt16 nSID = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if ( pFileNameItem )
{
String aCommand( pFileNameItem->GetValue() );
@@ -698,7 +698,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
sal_Int32 nIndex = aCommand.SearchAscii("slot:");
if ( !nIndex )
{
- USHORT nSlotId = (USHORT) String( aCommand, 5, aCommand.Len()-5 ).ToInt32();
+ sal_uInt16 nSlotId = (sal_uInt16) String( aCommand, 5, aCommand.Len()-5 ).ToInt32();
if ( nSlotId == SID_OPENDOC )
pFileNameItem = NULL;
}
@@ -712,7 +712,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
String aFilter;
SfxItemSet* pSet = NULL;
String aPath;
- SFX_REQUEST_ARG( rReq, pFolderNameItem, SfxStringItem, SID_PATH, FALSE );
+ SFX_REQUEST_ARG( rReq, pFolderNameItem, SfxStringItem, SID_PATH, sal_False );
if ( pFolderNameItem )
aPath = pFolderNameItem->GetValue();
else if ( nSID == SID_OPENTEMPLATE )
@@ -726,24 +726,24 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG;
- SFX_REQUEST_ARG( rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG, FALSE );
+ SFX_REQUEST_ARG( rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG, sal_False );
if ( pSystemDialogItem )
nDialog = pSystemDialogItem->GetValue() ? SFX2_IMPL_DIALOG_SYSTEM : SFX2_IMPL_DIALOG_OOO;
String sStandardDir;
- SFX_REQUEST_ARG( rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR, FALSE );
+ SFX_REQUEST_ARG( rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR, sal_False );
if ( pStandardDirItem )
sStandardDir = pStandardDirItem->GetValue();
::com::sun::star::uno::Sequence< ::rtl::OUString > aBlackList;
- SFX_REQUEST_ARG( rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST, FALSE );
+ SFX_REQUEST_ARG( rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST, sal_False );
if ( pBlackListItem )
pBlackListItem->GetStringList( aBlackList );
- ULONG nErr = sfx2::FileOpenDialog_Impl(
+ sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl(
WB_OPEN | SFXWB_MULTISELECTION | SFXWB_SHOWVERSIONS, String(), pURLList, aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList );
if ( nErr == ERRCODE_ABORT )
@@ -762,7 +762,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( pURLList->Count() )
{
if ( nSID == SID_OPENTEMPLATE )
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_False ) );
// This helper wraps an existing (or may new created InteractionHandler)
// intercept all incoming interactions and provide usefull informations
@@ -773,7 +773,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
css::uno::Reference< css::task::XInteractionHandler > xWrappedHandler;
// wrap existing handler or create new UUI handler
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
+ SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
if (pInteractionItem)
{
pInteractionItem->GetValue() >>= xWrappedHandler;
@@ -790,7 +790,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
::framework::PreventDuplicateInteraction::InteractionInfo aRule (aInteraction, 1);
pHandler->addInteractionRule(aRule);
- for ( USHORT i = 0; i < pURLList->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pURLList->Count(); ++i )
{
String aURL = *(pURLList->GetObject(i));
rReq.RemoveItem( SID_FILE_NAME );
@@ -836,7 +836,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// return;
}
- BOOL bHyperlinkUsed = FALSE;
+ sal_Bool bHyperlinkUsed = sal_False;
if ( SID_OPENURL == nSID )
{
@@ -846,7 +846,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
else if ( nSID == SID_OPENTEMPLATE )
{
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, FALSE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_False ) );
}
// pass URL to OS by using ShellExecuter or open it internal
// if it seams to be an own format.
@@ -859,28 +859,28 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
rReq.SetSlot( SID_OPENDOC );
nSID = SID_OPENDOC;
- bHyperlinkUsed = TRUE;
+ bHyperlinkUsed = sal_True;
}
// no else here! It's optional ...
if (!bHyperlinkUsed)
{
- SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, FALSE);
+ SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE, sal_False);
if ( pHyperLinkUsedItem )
bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
// no "official" item, so remove it from ItemSet before using UNO-API
rReq.RemoveItem( SID_BROWSE );
}
- SFX_REQUEST_ARG( rReq, pFileName, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pFileName, SfxStringItem, SID_FILE_NAME, sal_False );
String aFileName = pFileName->GetValue();
String aReferer;
- SFX_REQUEST_ARG( rReq, pRefererItem, SfxStringItem, SID_REFERER, FALSE );
+ SFX_REQUEST_ARG( rReq, pRefererItem, SfxStringItem, SID_REFERER, sal_False );
if ( pRefererItem )
aReferer = pRefererItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, FALSE);
+ SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, sal_False);
if ( pFileFlagsItem )
{
String aFileFlags = pFileFlagsItem->GetValue();
@@ -888,32 +888,32 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0054 ) ) // T = 54h
{
rReq.RemoveItem( SID_TEMPLATE );
- rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0048 ) ) // H = 48h
{
rReq.RemoveItem( SID_HIDDEN );
- rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0052 ) ) // R = 52h
{
rReq.RemoveItem( SID_DOC_READONLY );
- rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0042 ) ) // B = 42h
{
rReq.RemoveItem( SID_PREVIEW );
- rReq.AppendItem( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( SID_PREVIEW, sal_True ) );
}
if ( STRING_NOTFOUND != aFileFlags.Search( 0x0053 ) ) // S = 53h
{
// not supported anymore
//rReq.RemoveItem( SID_SILENT );
- //rReq.AppendItem( SfxBoolItem( SID_SILENT, TRUE ) );
+ //rReq.AppendItem( SfxBoolItem( SID_SILENT, sal_True ) );
}
rReq.RemoveItem( SID_OPTIONS );
@@ -1082,7 +1082,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( !bFound )
{
- BOOL bLoadInternal = FALSE;
+ sal_Bool bLoadInternal = sal_False;
// security reservation: => we have to check the referer before executing
if (SFX_APP()->IsSecureURL(rtl::OUString(), &aReferer))
@@ -1112,7 +1112,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
rReq.RemoveItem( SID_TARGETNAME );
rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) );
- bLoadInternal = TRUE;
+ bLoadInternal = sal_True;
}
}
}
@@ -1147,13 +1147,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxFrame* pTargetFrame = NULL;
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, sal_False);
if ( pFrameItem )
pTargetFrame = pFrameItem->GetFrame();
if ( !pTargetFrame )
{
- SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False);
if ( pUnoFrameItem )
xTargetFrame = pUnoFrameItem->GetFrame();
}
@@ -1162,7 +1162,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
+ SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, sal_False );
// remove from Itemset, because it confuses the parameter transformation
if ( pLinkItem )
@@ -1171,20 +1171,20 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.RemoveItem( SID_DONELINK );
// check if the view must be hidden
- BOOL bHidden = FALSE;
- SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, FALSE);
+ sal_Bool bHidden = sal_False;
+ SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
if ( pHidItem )
bHidden = pHidItem->GetValue();
// This request is a UI call. We have to set the right values inside the MediaDescriptor
// for: InteractionHandler, StatusIndicator, MacroExecutionMode and DocTemplate.
// But we have to look for already existing values or for real hidden requests.
- SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW, FALSE);
+ SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW, sal_False);
if (!bHidden && ( !pPreviewItem || !pPreviewItem->GetValue() ) )
{
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
- SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , FALSE);
- SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , FALSE);
+ SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
+ SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , sal_False);
+ SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , sal_False);
if (!pInteractionItem)
{
@@ -1200,12 +1200,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// extract target name
::rtl::OUString aTarget;
- SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
if ( pTargetItem )
aTarget = pTargetItem->GetValue();
else
{
- SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, FALSE );
+ SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, sal_False );
if ( pNewViewItem && pNewViewItem->GetValue() )
aTarget = String::CreateFromAscii("_blank" );
}
@@ -1234,7 +1234,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
// make URL ready
- SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pURLItem, SfxStringItem, SID_FILE_NAME, sal_False );
aFileName = pURLItem->GetValue();
if( aFileName.Len() && aFileName.GetChar(0) == '#' ) // Mark without URL
{
@@ -1298,7 +1298,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
else
{
// synchron loading without a given frame or as blank frame
- SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
// Desktop service must exists! dont catch() or check for problems here ...
// But loading of documents can fail by other reasons. Handle it more gracefully.
@@ -1329,7 +1329,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
// try to find the SfxFrame for the controller
SfxFrame* pCntrFrame = NULL;
- for ( SfxViewShell* pShell = SfxViewShell::GetFirst( 0, FALSE ); pShell; pShell = SfxViewShell::GetNext( *pShell, 0, FALSE ) )
+ for ( SfxViewShell* pShell = SfxViewShell::GetFirst( 0, sal_False ); pShell; pShell = SfxViewShell::GetNext( *pShell, 0, sal_False ) )
{
if ( pShell->GetController() == xController )
{
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index e7d0fd70bf58..351376091929 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -44,6 +44,7 @@
#include "app.hrc"
#include <sfx2/app.hxx>
+#include <sfx2/evntconf.hxx>
#include <sfx2/unoctitm.hxx>
#include "appdata.hxx"
#include <sfx2/viewsh.hxx>
@@ -52,7 +53,6 @@
#include "arrdecl.hxx"
#include "sfx2/sfxresid.hxx"
#include <sfx2/event.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/mnumgr.hxx>
#include <sfx2/templdlg.hxx>
#include <sfx2/msgpool.hxx>
@@ -72,9 +72,9 @@
using ::basic::BasicManagerRepository;
//===================================================================
-BOOL SfxApplication::QueryExit_Impl()
+sal_Bool SfxApplication::QueryExit_Impl()
{
- BOOL bQuit = TRUE;
+ sal_Bool bQuit = sal_True;
// will trotzdem noch jemand, den man nicht abschiessen kann, die App haben?
if ( !bQuit )
@@ -83,10 +83,10 @@ BOOL SfxApplication::QueryExit_Impl()
InfoBox aInfoBox( NULL, SfxResId(MSG_CANT_QUIT) );
aInfoBox.Execute();
DBG_TRACE( "QueryExit => FALSE (in use)" );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -105,7 +105,7 @@ void SfxApplication::Deinitialize()
SaveBasicAndDialogContainer();
- pAppData_Impl->bDowning = TRUE; // wegen Timer aus DecAliveCount und QueryExit
+ pAppData_Impl->bDowning = sal_True; // wegen Timer aus DecAliveCount und QueryExit
DELETEZ( pAppData_Impl->pTemplates );
@@ -115,15 +115,15 @@ void SfxApplication::Deinitialize()
// For more information see:
// #123501#
//SetViewFrame(0);
- pAppData_Impl->bDowning = FALSE;
+ pAppData_Impl->bDowning = sal_False;
DBG_ASSERT( !SfxViewFrame::GetFirst(),
"existing SfxViewFrame after Execute" );
DBG_ASSERT( !SfxObjectShell::GetFirst(),
"existing SfxObjectShell after Execute" );
pAppData_Impl->pAppDispat->Pop( *this, SFX_SHELL_POP_UNTIL );
pAppData_Impl->pAppDispat->Flush();
- pAppData_Impl->bDowning = TRUE;
- pAppData_Impl->pAppDispat->DoDeactivate_Impl( TRUE, NULL );
+ pAppData_Impl->bDowning = sal_True;
+ pAppData_Impl->pAppDispat->DoDeactivate_Impl( sal_True, NULL );
// call derived application-exit
Exit();
@@ -146,11 +146,7 @@ void SfxApplication::Deinitialize()
// ab hier d"urfen keine SvObjects mehr existieren
DELETEZ(pAppData_Impl->pMatcher);
- delete pAppData_Impl->pLabelResMgr;
-
DELETEX(pAppData_Impl->pSlotPool);
- DELETEX(pAppData_Impl->pEventConfig);
- SfxMacroConfig::Release_Impl();
DELETEX(pAppData_Impl->pFactArr);
DELETEX(pAppData_Impl->pInitLinkList);
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index 9fd2dfc696d3..dfecc21f9d4b 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -65,9 +65,9 @@ void SfxApplication::Registrations_Impl()
// ChildWindows
SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
- SfxNavigatorWrapper::RegisterChildWindow( FALSE, NULL, SFX_CHILDWIN_NEVERHIDE );
+ SfxNavigatorWrapper::RegisterChildWindow( sal_False, NULL, SFX_CHILDWIN_NEVERHIDE );
SfxPartChildWnd_Impl::RegisterChildWindow();
- SfxTemplateDialogWrapper::RegisterChildWindow(TRUE);
+ SfxTemplateDialogWrapper::RegisterChildWindow(sal_True);
SfxDockingWrapper::RegisterChildWindow();
// Controller
@@ -88,7 +88,7 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFac
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pTbxCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pTbxCtrlFac->Count(); n++ )
{
SfxTbxCtrlFactory *pF = (*pAppData_Impl->pTbxCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -113,7 +113,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ )
{
SfxStbCtrlFactory *pF = (*pAppData_Impl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -138,7 +138,7 @@ void SfxApplication::RegisterMenuControl_Impl( SfxModule *pMod, SfxMenuCtrlFacto
}
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pAppData_Impl->pMenuCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pAppData_Impl->pMenuCtrlFac->Count(); n++ )
{
SfxMenuCtrlFactory *pF = (*pAppData_Impl->pMenuCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index c1858c5b33fb..3e9629149d2a 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -87,7 +87,6 @@
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "about.hxx"
#include "frmload.hxx"
#include "referers.hxx"
#include <sfx2/app.hxx>
@@ -107,7 +106,6 @@
#include <sfx2/new.hxx>
#include <sfx2/templdlg.hxx>
#include "sfxtypes.hxx"
-#include "sfxbasic.hxx"
#include <sfx2/tabdlg.hxx>
#include "arrdecl.hxx"
#include "fltfnc.hxx"
@@ -118,7 +116,6 @@
#include "arrdecl.hxx"
#include <sfx2/childwin.hxx>
#include "appdata.hxx"
-#include <sfx2/macrconf.hxx>
#include "sfx2/minfitem.hxx"
#include <sfx2/event.hxx>
#include <sfx2/module.hxx>
@@ -129,7 +126,7 @@
#include <sfx2/dialogs.hrc>
#include "sorgitm.hxx"
#include "sfx2/sfxhelp.hxx"
-#include <tools/svlibrary.hxx>
+#include <tools/svlibrary.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -157,7 +154,7 @@ long QuitAgain_Impl( void* pObj, void* pArg )
void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- FASTBOOL bDone = FALSE;
+ bool bDone = sal_False;
switch ( rReq.GetSlot() )
{
case SID_SETOPTIONS:
@@ -188,7 +185,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
continue;
if ( pObjSh->PrepareClose(2) )
- pObjSh->SetModified( FALSE );
+ pObjSh->SetModified( sal_False );
else
return;
}
@@ -214,16 +211,16 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
// block reentrant calls
- pAppData_Impl->bInQuit = TRUE;
+ pAppData_Impl->bInQuit = sal_True;
Reference < XDesktop > xDesktop ( ::comphelper::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
rReq.ForgetAllArgs();
- // if terminate() failed, pAppData_Impl->bInQuit will now be FALSE, allowing further calls of SID_QUITAPP
- BOOL bTerminated = xDesktop->terminate();
+ // if terminate() failed, pAppData_Impl->bInQuit will now be sal_False, allowing further calls of SID_QUITAPP
+ sal_Bool bTerminated = xDesktop->terminate();
if (!bTerminated)
// if terminate() was successful, SfxApplication is now dead!
- pAppData_Impl->bInQuit = FALSE;
+ pAppData_Impl->bInQuit = sal_False;
// Returnwert setzten, ggf. terminieren
rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bTerminated ) );
@@ -256,7 +253,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pFrameItem )
xFrame = pFrameItem->GetFrame();
@@ -269,7 +266,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
const short nRet = pDlg->Execute();
if ( nRet )
- bDone = TRUE;
+ bDone = sal_True;
delete pDlg;
}
@@ -306,16 +303,16 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
while( sal_True );
- BOOL bOk = ( n == 0);
+ sal_Bool bOk = ( n == 0);
rReq.SetReturnValue( SfxBoolItem( 0, bOk ) );
- bDone = TRUE;
+ bDone = sal_True;
break;
}
case SID_SAVEDOCS:
{
- BOOL bOK = TRUE;
- BOOL bTmpDone = TRUE;
+ sal_Bool bOK = sal_True;
+ sal_Bool bTmpDone = sal_True;
for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
@@ -327,7 +324,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, aReq.GetReturnValue() );
bTmpDone = aReq.IsDone();
if ( !pItem || !pItem->GetValue() )
- bOK = FALSE;
+ bOK = sal_False;
}
}
@@ -355,7 +352,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
else
pHelp->Start( String::CreateFromAscii(".uno:HelpIndex"), NULL ); // show start page
- bDone = TRUE;
+ bDone = sal_True;
}
break;
}
@@ -364,7 +361,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPTIPS:
{
// Parameter aus werten
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsQuickHelpEnabled();
@@ -376,7 +373,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Help::DisableQuickHelp();
SvtHelpOptions().SetHelpTips( bOn );
Invalidate(SID_HELPTIPS);
- bDone = TRUE;
+ bDone = sal_True;
// ggf. recorden
if ( !rReq.IsAPI() )
@@ -392,7 +389,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPBALLOONS:
{
// Parameter auswerten
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsBalloonHelpEnabled();
@@ -404,7 +401,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Help::DisableBalloonHelp();
SvtHelpOptions().SetExtendedHelp( bOn );
Invalidate(SID_HELPBALLOONS);
- bDone = TRUE;
+ bDone = sal_True;
// ggf. recorden
if ( !rReq.IsAPI() )
@@ -416,99 +413,27 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELP_PI:
{
SvtHelpOptions aHelpOpt;
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELP_PI, FALSE);
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELP_PI, sal_False);
sal_Bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !aHelpOpt.IsHelpAgentAutoStartMode();
aHelpOpt.SetHelpAgentAutoStartMode( bOn );
Invalidate(SID_HELP_PI);
- bDone = TRUE;
+ bDone = sal_True;
break;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_ABOUT:
{
- const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) );
- rtl::OUString sDefault;
- String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
- OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
- if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND )
- {
- // no cws part in brand buildid -> try basis buildid
- rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING(
- "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) );
- rtl::Bootstrap::expandMacros( sBasisBuildId );
- sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema );
- if ( nIndex != -1 )
- sBuildId += String( sBasisBuildId.copy( nIndex ) );
- }
-
- String sProductSource( utl::Bootstrap::getProductSource( sDefault ) );
- OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" );
-
- // the product source is something like "DEV300", where the
- // build id is something like "300m12(Build:12345)". For better readability,
- // strip the duplicate UPD ("300").
- if ( sProductSource.Len() )
- {
- bool bMatchingUPD =
- ( sProductSource.Len() >= 3 )
- && ( sBuildId.Len() >= 3 )
- && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) );
- OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" );
- if ( bMatchingUPD )
- sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 );
-
- // prepend the product source
- sBuildId.Insert( sProductSource, 0 );
- }
-
- // --> PB 2008-10-30 #i94693#
- /* if the build ids of the basis or ure layer are different from the build id
- * of the brand layer then show them */
- rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING(
- "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aBasisProductBuildId );
- rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING(
- "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aUREProductBuildId );
- if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND
- || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND )
- {
- String sTemp( '-' );
- sTemp += String( aBasisProductBuildId );
- sTemp += '-';
- sTemp += String( aUREProductBuildId );
- sBuildId.Insert( sTemp, sBuildId.Search( ')' ) );
- }
- // <--
-
- // the build id format is "milestone(build)[cwsname]". For readability, it would
- // be nice to have some more spaces in there.
- xub_StrLen nPos = 0;
- if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
- if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
-
- // search for the resource of the about box
- ResId aDialogResId( RID_DEFAULTABOUT, *pAppData_Impl->pLabelResMgr );
- ResMgr* pResMgr = pAppData_Impl->pLabelResMgr;
- if( ! pResMgr->IsAvailable( aDialogResId.SetRT( RSC_MODALDIALOG ) ) )
- pResMgr = GetOffResManager_Impl();
-
- aDialogResId.SetResMgr( pResMgr );
- if ( !pResMgr->IsAvailable( aDialogResId ) )
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if ( pFact )
{
- DBG_ERRORFILE( "No RID_DEFAULTABOUT in label-resource-dll" );
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( 0, RID_DEFAULTABOUT );
+ pDlg->Execute();
+ delete pDlg;
+ bDone = sal_True;
}
-
- // then show the about box
- AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, sBuildId );
- pDlg->Execute();
- delete pDlg;
- bDone = TRUE;
break;
}
@@ -519,7 +444,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
new SfxTemplateOrganizeDlg(NULL);
pDlg->Execute();
delete pDlg;
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -527,7 +452,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
svt::AddressBookSourceDialog aDialog(GetTopWindow(), ::comphelper::getProcessServiceFactory());
aDialog.Execute();
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -555,7 +480,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
TYPE(SfxBoolItem)));
bool bShow = pItem == 0
? !pAppData_Impl->m_xImeStatusWindow->isShowing()
- : ( pItem->GetValue() == TRUE );
+ : ( pItem->GetValue() == sal_True );
pAppData_Impl->m_xImeStatusWindow->show(bShow);
if (pItem == 0)
rReq.AppendItem(SfxBoolItem(SID_SHOW_IME_STATUS_WINDOW,
@@ -602,7 +527,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// Parameter auswerten
rtl::OUString aToolbarName( aBuf.makeStringAndClear() );
- BOOL bShow( !xLayoutManager->isElementVisible( aToolbarName ));
+ sal_Bool bShow( !xLayoutManager->isElementVisible( aToolbarName ));
if ( bShow )
{
@@ -633,11 +558,11 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
DBG_MEMTEST();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
@@ -693,14 +618,14 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
case SID_SAVEDOCS:
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
if ( pObjSh->IsModified() )
{
- bModified = TRUE;
+ bModified = sal_True;
break;
}
}
@@ -735,18 +660,18 @@ static const ::rtl::OUString& getProductRegistrationServiceName( )
return s_sServiceName;
}
-typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, BOOL, rtl_uString*);
-typedef void (SAL_CALL *basicide_macro_organizer)( INT16 );
+typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, sal_Bool, rtl_uString*);
+typedef void (SAL_CALL *basicide_macro_organizer)( sal_Int16 );
#define DOSTRING( x ) #x
#define STRING( x ) DOSTRING( x )
extern "C" { static void SAL_CALL thisModule() {} }
-::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() )
+::rtl::OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc = ::rtl::OUString() )
{
// get basctl dllname
- static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -763,10 +688,10 @@ extern "C" { static void SAL_CALL thisModule() {} }
return aScriptURL;
}
-void MacroOrganizer( INT16 nTabId )
+void MacroOrganizer( sal_Int16 nTabId )
{
// get basctl dllname
- static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
+ static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "basctl" ) ) );
// load module
oslModule handleMod = osl_loadModuleRelative(
@@ -921,7 +846,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SfxViewFrame* pView = SfxViewFrame::GetFirst();
while ( pView )
{
- pView->GetBindings().InvalidateAll(FALSE);
+ pView->GetBindings().InvalidateAll(sal_False);
pView = SfxViewFrame::GetNext( *pView );
}
}
@@ -1004,7 +929,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() );
pBasicIDE->DoInitNew( 0 );
- pBasicIDE->SetModified( FALSE );
+ pBasicIDE->SetModified( sal_False );
try
{
// load the Basic IDE via direct access to the SFX frame loader. A generic loadComponentFromURL
@@ -1061,15 +986,15 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bChooseOnly = FALSE;
+ sal_Bool bChooseOnly = sal_False;
Reference< XModel > xLimitToModel;
if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_RECORDMACRO, sal_False, &pItem) )
{
- BOOL bRecord = ((SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bRecord = ((SfxBoolItem*)pItem)->GetValue();
if ( bRecord )
{
// !Hack
- bChooseOnly = FALSE;
+ bChooseOnly = sal_False;
SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
OSL_ENSURE( pCurrentShell, "macro recording outside an SFX document?" );
if ( pCurrentShell )
@@ -1087,7 +1012,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
OSL_TRACE("handling SID_MACROORGANIZER");
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- INT16 nTabId = 0;
+ sal_Int16 nTabId = 0;
if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_MACROORGANIZER, sal_False, &pItem) )
{
nTabId = ((SfxUInt16Item*)pItem)->GetValue();
@@ -1105,7 +1030,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Reference< XFrame > xFrame;
const SfxItemSet* pIntSet = rReq.GetInternalArgs_Impl();
- SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pIntSet, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pFrameItem )
xFrame = pFrameItem->GetFrame();
@@ -1119,7 +1044,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
do // artificial loop for flow control
{
AbstractScriptSelectorDialog* pDlg = pFact->CreateScriptSelectorDialog(
- lcl_getDialogParent( xFrame, GetTopWindow() ), FALSE, xFrame );
+ lcl_getDialogParent( xFrame, GetTopWindow() ), sal_False, xFrame );
OSL_ENSURE( pDlg, "SfxApplication::OfaExec_Impl( SID_RUNMACRO ): no dialog!" );
if ( !pDlg )
break;
@@ -1187,7 +1112,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pStringItem )
{
String aPLZ = pStringItem->GetValue();
- bRet = TRUE /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
+ bRet = sal_True /*!!!SfxIniManager::CheckPLZ( aPLZ )*/;
}
else
SbxBase::SetError( SbxERR_WRONG_ARGS );
@@ -1204,7 +1129,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
const SfxPoolItem* pItem=NULL;
const SfxItemSet* pSet = rReq.GetArgs();
SfxItemPool* pSetPool = pSet ? pSet->GetPool() : NULL;
- if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), sal_False, &pItem ) == SFX_ITEM_SET )
aSet.Put( *pItem );
SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
@@ -1293,7 +1218,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if (xDialog.is())
xDialog->execute();
else
- ShowServiceNotAvailableError(NULL, sDialogServiceName, TRUE);
+ ShowServiceNotAvailableError(NULL, sDialogServiceName, sal_True);
}
catch(::com::sun::star::uno::Exception&)
{
@@ -1314,11 +1239,11 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
void SfxApplication::OfaState_Impl(SfxItemSet &rSet)
{
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 60b684d7385f..9ffb48e1b34a 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -94,6 +94,7 @@
#include <tools/cachestr.hxx>
#include <osl/mutex.hxx>
#include <comphelper/sequence.hxx>
+#include <framework/documentundoguard.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/interaction.hxx>
@@ -116,7 +117,6 @@ using namespace ::com::sun::star::io;
#include <sfx2/fcontnr.hxx>
#include "frmload.hxx"
#include <sfx2/frame.hxx>
-#include "sfxbasic.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/objuno.hxx>
#include <sfx2/unoctitm.hxx>
@@ -224,10 +224,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
return;
}
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
pItem->SetWhich( nWhich );
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[0];
String aName = rProp.Name;
@@ -272,11 +272,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
}
#endif
// complex property; collect sub items from the parameter set and reconstruct complex item
- USHORT nFound=0;
+ sal_uInt16 nFound=0;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rPropValue = pPropsVal[n];
- USHORT nSub;
+ sal_uInt16 nSub;
for ( nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
@@ -286,7 +286,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
const char* pName = aStr.GetBuffer();
if ( rPropValue.Name.compareToAscii( pName ) == COMPARE_EQUAL )
{
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[nSub].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
if ( pItem->PutValue( rPropValue.Value, nSubId ) )
@@ -342,11 +342,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
return;
}
- USHORT nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
pItem->SetWhich( nWhich );
const SfxType* pType = rArg.pType;
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( nSubCount == 0 )
{
// "simple" (base type) argument
@@ -377,14 +377,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
else
{
// complex argument, could be passed in one struct
- BOOL bAsWholeItem = FALSE;
+ sal_Bool bAsWholeItem = sal_False;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
String aName = rProp.Name;
if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
{
- bAsWholeItem = TRUE;
+ bAsWholeItem = sal_True;
#ifdef DBG_UTIL
++nFoundArgs;
#endif
@@ -407,11 +407,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// complex argument; collect sub items from argument array and reconstruct complex item
// only put item if at least one member was found and had the correct type
// (is this a good idea?! Should we ask for *all* members?)
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
- for ( USHORT nSub=0; nSub<nSubCount; nSub++ )
+ for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
{
// search sub item by name
ByteString aStr( rArg.pName );
@@ -421,17 +421,17 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( rProp.Name.compareToAscii( pName ) == COMPARE_EQUAL )
{
// at least one member found ...
- bRet = TRUE;
+ bRet = sal_True;
#ifdef DBG_UTIL
++nFoundArgs;
#endif
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[nSub].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
if (!pItem->PutValue( rProp.Value, nSubId ) )
{
// ... but it was not convertable
- bRet = FALSE;
+ bRet = sal_False;
#ifdef DBG_UTIL
ByteString aDbgStr( "Property not convertable: ");
aDbgStr += rArg.pName;
@@ -935,10 +935,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
{
// slot is a property
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //???
{
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( nSubCount )
// it's a complex property, we want it split into simple types
// so we expect to get as many items as we have (sub) members
@@ -964,15 +964,15 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// slot is a method
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- for ( USHORT nArg=0; nArg<nFormalArgs; ++nArg )
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
{
// check every formal argument of the method
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) //???
{
- USHORT nSubCount = rArg.pType->nAttribs;
+ sal_uInt16 nSubCount = rArg.pType->nAttribs;
if ( nSubCount )
// argument has a complex type, we want it split into simple types
// so for this argument we expect to get as many items as we have (sub) members
@@ -1105,10 +1105,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( rSet.Count() != nItems )
{
// detect unknown item and present error message
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
while ( *pRanges )
{
- for(USHORT nId = *pRanges++; nId <= *pRanges; ++nId)
+ for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId)
{
if ( rSet.GetItemState(nId) < SFX_ITEM_SET ) //???
// not really set
@@ -1117,12 +1117,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
continue;
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- USHORT nArg;
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ sal_uInt16 nArg;
for ( nArg=0; nArg<nFormalArgs; ++nArg )
{
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
if ( nId == nWhich )
break;
}
@@ -1258,12 +1258,12 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
{
// slot is a property
- USHORT nWhich = rSet.GetPool()->GetWhich(nSlotId);
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
if ( pItem ) //???
{
- USHORT nSubCount = pType->nAttribs;
+ sal_uInt16 nSubCount = pType->nAttribs;
if ( !nSubCount )
{
//rPool.FillVariable( *pItem, *pVar, eUserMetric );
@@ -1278,10 +1278,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// complex type, add a property value for every member of the struct
- for ( USHORT n=1; n<=nSubCount; ++n )
+ for ( sal_uInt16 n=1; n<=nSubCount; ++n )
{
//rPool.FillVariable( *pItem, *pVar, eUserMetric );
- BYTE nSubId = (BYTE) (sal_Int8) pType->aAttrib[n-1].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[n-1].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
@@ -1305,16 +1305,16 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// slot is a method
- USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
- for ( USHORT nArg=0; nArg<nFormalArgs; ++nArg )
+ sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+ for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
{
const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
- USHORT nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
- BOOL bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+ sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+ sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
if ( pItem ) //???
{
- USHORT nSubCount = rArg.pType->nAttribs;
+ sal_uInt16 nSubCount = rArg.pType->nAttribs;
if ( !nSubCount )
{
//rPool.FillVariable( *pItem, *pVar, eUserMetric );
@@ -1329,10 +1329,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// complex type, add a property value for every member of the struct
- for ( USHORT n = 1; n <= nSubCount; ++n )
+ for ( sal_uInt16 n = 1; n <= nSubCount; ++n )
{
//rPool.FillVariable( rItem, *pVar, eUserMetric );
- BYTE nSubId = (BYTE) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
+ sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
if ( bConvertTwips )
nSubId |= CONVERT_TWIPS;
@@ -1770,12 +1770,9 @@ void SAL_CALL SfxMacroLoader::removeStatusListener(
{
}
-// -----------------------------------------------------------------------
ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh )
throw ( ::com::sun::star::uno::RuntimeException )
{
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
SfxObjectShell* pCurrent = pSh;
if ( !pCurrent )
// all not full qualified names use the BASIC of the given or current document
@@ -1821,18 +1818,21 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
if ( pBasMgr )
{
- if ( pSh && pDoc )
+ const bool bIsAppBasic = ( pBasMgr == pAppMgr );
+ const bool bIsDocBasic = ( pBasMgr != pAppMgr );
+
+ if ( pDoc )
{
- // security check for macros from document basic if an SFX context (pSh) is given
+ // security check for macros from document basic if an SFX doc is given
if ( !pDoc->AdjustMacroMode( String() ) )
// check forbids execution
return ERRCODE_IO_ACCESSDENIED;
}
- else if ( pSh && pSh->GetMedium() )
+ else if ( pDoc && pDoc->GetMedium() )
{
- pSh->AdjustMacroMode( String() );
- SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
- SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False);
+ pDoc->AdjustMacroMode( String() );
+ SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False);
if ( pUpdateDocItem && pMacroExecModeItem
&& pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE
&& pMacroExecModeItem->GetValue() == document::MacroExecMode::NEVER_EXECUTE )
@@ -1849,79 +1849,49 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 );
}
- SbxMethod *pMethod = SfxQueryMacro( pBasMgr, aQualifiedMethod );
- if ( pMethod )
+ if ( pBasMgr->HasMacro( aQualifiedMethod ) )
{
- // arguments must be quoted
- String aQuotedArgs;
- if ( aArgs.Len()<2 || aArgs.GetBuffer()[1] == '\"')
- // no args or already quoted args
- aQuotedArgs = aArgs;
- else
+ Any aOldThisComponent;
+ const bool bSetDocMacroMode = ( pDoc != NULL ) && bIsDocBasic;
+ const bool bSetGlobalThisComponent = ( pDoc != NULL ) && bIsAppBasic;
+ if ( bSetDocMacroMode )
{
- // quote parameters
- aArgs.Erase(0,1);
- aArgs.Erase( aArgs.Len()-1,1);
-
- aQuotedArgs = '(';
-
- sal_uInt16 nCount = aArgs.GetTokenCount(',');
- for ( sal_uInt16 n=0; n<nCount; n++ )
- {
- aQuotedArgs += '\"';
- aQuotedArgs += aArgs.GetToken( n, ',' );
- aQuotedArgs += '\"';
- if ( n<nCount-1 )
- aQuotedArgs += ',';
- }
-
- aQuotedArgs += ')';
+ // mark document: it executes an own macro, so it's in a modal mode
+ pDoc->SetMacroMode_Impl( sal_True );
}
- Any aOldThisComponent;
- if ( pSh )
+ if ( bSetGlobalThisComponent )
{
- if ( pBasMgr != pAppMgr )
- // mark document: it executes an own macro, so it's in a modal mode
- pSh->SetMacroMode_Impl( TRUE );
- if ( pBasMgr == pAppMgr )
- {
- // document is executed via AppBASIC, adjust ThisComponent variable
- aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pSh->GetModel() ) );
- }
+ // document is executed via AppBASIC, adjust ThisComponent variable
+ aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pDoc->GetModel() ) );
}
- // add quoted arguments and do the call
- String aCall( '[' );
- aCall += pMethod->GetName();
- aCall += aQuotedArgs;
- aCall += ']';
-
// just to let the shell be alive
- SfxObjectShellRef rSh = pSh;
+ SfxObjectShellRef xKeepDocAlive = pDoc;
- // execute function using its Sbx parent,
- //SbxVariable* pRet = pMethod->GetParent()->Execute( aCall );
- //rRetval = sbxToUnoValue( pRet );
-
- SbxVariable* pRet = pMethod->GetParent()->Execute( aCall );
- if ( pRet )
{
- USHORT nFlags = pRet->GetFlags();
- pRet->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST );
- rRetval = sbxToUnoValue( pRet );
- pRet->SetFlags( nFlags );
+ // attempt to protect the document against the script tampering with its Undo Context
+ ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
+ if ( bIsDocBasic )
+ pUndoGuard.reset( new ::framework::DocumentUndoGuard( pDoc->GetModel() ) );
+
+ // execute the method
+ SbxVariableRef retValRef = new SbxVariable;
+ nErr = pBasMgr->ExecuteMacro( aQualifiedMethod, aArgs, retValRef );
+ if ( nErr == ERRCODE_NONE )
+ rRetval = sbxToUnoValue( retValRef );
}
- nErr = SbxBase::GetError();
- if ( ( pBasMgr == pAppMgr ) && pSh )
+ if ( bSetGlobalThisComponent )
{
pAppMgr->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent );
}
- if ( pSh && pSh->GetModel().is() )
- // remove flag for modal mode
- pSh->SetMacroMode_Impl( FALSE );
+ if ( bSetDocMacroMode )
+ {
+ // remove flag for modal mode
+ pDoc->SetMacroMode_Impl( sal_False );
+ }
}
else
nErr = ERRCODE_BASIC_PROC_UNDEFINED;
@@ -1940,7 +1910,6 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
nErr = SbxBase::GetError();
}
- pApp->LeaveBasicCall();
SbxBase::ResetError();
return nErr;
}
@@ -1963,7 +1932,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
const ::rtl::OUString& /*sTargetFrameName*/,
FrameSearchFlags /*eSearchFlags*/ ) throw( RuntimeException )
{
- USHORT nId( 0 );
+ sal_uInt16 nId( 0 );
sal_Bool bMasterCommand( sal_False );
Reference < XDispatch > xDisp;
const SfxSlot* pSlot = 0;
@@ -1971,9 +1940,9 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL ||
aURL.Protocol.compareToAscii( "commandId:" ) == COMPARE_EQUAL )
{
- nId = (USHORT) aURL.Path.toInt32();
+ nId = (sal_uInt16) aURL.Path.toInt32();
SfxShell* pShell;
- pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, TRUE, TRUE );
+ pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, sal_True, sal_True );
}
else if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
{
@@ -2016,10 +1985,10 @@ throw (::com::sun::star::uno::RuntimeException)
std::list< sal_Int16 > aGroupList;
SfxSlotPool* pAppSlotPool = &SFX_APP()->GetAppSlotPool_Impl();
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
- for ( USHORT i=0; i<pAppSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ )
{
String aName = pAppSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot();
@@ -2051,11 +2020,11 @@ throw (::com::sun::star::uno::RuntimeException)
if ( pAppSlotPool )
{
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
- for ( USHORT i=0; i<pAppSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ )
{
String aName = pAppSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pAppSlotPool->FirstSlot();
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index b8e8a92da1b8..2af0e9c179e2 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -350,7 +350,7 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
aInfo.aSize = pWindow->GetSizePixel();
if ( pWindow->IsSystemWindow() )
{
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( pWindow->GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
aInfo.aWinState = ((SystemWindow*)pWindow)->GetWindowState( nMask );
@@ -381,7 +381,7 @@ sal_uInt16 SfxChildWindow::GetPosition()
#if 0
static void ImplWindowStateFromStr( Point rPos, Size rSize, const ByteString& rStr )
{
- ULONG nValidMask = 0;
+ sal_uIntPtr nValidMask = 0;
xub_StrLen nIndex = 0;
ByteString aTokenStr;
@@ -463,7 +463,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
nPos = aWinData.Search( cToken );
if (nPos != STRING_NOTFOUND)
{
- USHORT nNextPos = aWinData.Search( cToken, 2 );
+ sal_uInt16 nNextPos = aWinData.Search( cToken, 2 );
if ( nNextPos != STRING_NOTFOUND )
{
// es gibt noch Extra-Information
@@ -642,7 +642,7 @@ sal_Bool SfxChildWindow::IsHideAtToggle() const
return pImp->bHideAtToggle;
}
-void SfxChildWindow::SetWantsFocus( BOOL bSet )
+void SfxChildWindow::SetWantsFocus( sal_Bool bSet )
{
pImp->bWantsFocus = bSet;
}
@@ -749,18 +749,18 @@ void SfxChildWindow::Hide()
-void SfxChildWindow::Show( USHORT nFlags )
+void SfxChildWindow::Show( sal_uInt16 nFlags )
{
switch ( pWindow->GetType() )
{
case RSC_DOCKINGWINDOW :
- ((DockingWindow*)pWindow)->Show( TRUE, nFlags );
+ ((DockingWindow*)pWindow)->Show( sal_True, nFlags );
break;
case RSC_TOOLBOX :
- ((ToolBox*)pWindow)->Show( TRUE, nFlags );
+ ((ToolBox*)pWindow)->Show( sal_True, nFlags );
break;
default:
- pWindow->Show( TRUE, nFlags );
+ pWindow->Show( sal_True, nFlags );
break;
}
}
@@ -843,7 +843,7 @@ sal_Bool SfxChildWindow::CanGetFocus() const
return !(pImp->pFact->aInfo.nFlags & SFX_CHILDWIN_CANTGETFOCUS);
}
-void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, USHORT nId, SfxChildWinContextFactory* pFact)
+void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, sal_uInt16 nId, SfxChildWinContextFactory* pFact)
{
SFX_APP()->RegisterChildWindowContext_Impl( pMod, nId, pFact );
}
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index cb53305e4b01..a2b29344f52c 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -81,9 +81,9 @@ struct Impl_DownLoadData
SvFileObject::SvFileObject() :
pDownLoadData( NULL ), pOldParent( NULL ), nType( FILETYPE_TEXT )
{
- bLoadAgain = TRUE;
+ bLoadAgain = sal_True;
bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
- bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE;
+ bClearMedium = bStateChangeCalled = bInCallDownLoad = sal_False;
}
@@ -99,11 +99,11 @@ SvFileObject::~SvFileObject()
}
-BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
+sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
const String & rMimeType,
- BOOL bGetSynchron )
+ sal_Bool bGetSynchron )
{
- ULONG nFmt = SotExchange::GetFormatStringId( rMimeType );
+ sal_uIntPtr nFmt = SotExchange::GetFormatStringId( rMimeType );
switch( nType )
{
case FILETYPE_TEXT:
@@ -131,7 +131,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
// Ende das Flag zurueckgesetzt werden.
// wird einzig und allein im sw/ndgrf.cxx benutzt, wenn der Link vom
// GraphicNode entfernt wird.
- BOOL bOldNativFormat = bNativFormat;
+ sal_Bool bOldNativFormat = bNativFormat;
//!!?? bNativFormat = 0 != (ASPECT_ICON & pSvData->GetAspect());
// falls gedruckt werden soll, warten wir bis die
@@ -150,7 +150,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
Application::Reschedule();
xMed = xTmpMed;
- bClearMedium = TRUE;
+ bClearMedium = sal_True;
}
}
@@ -211,7 +211,7 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
if( xMed.Is() && !bSynchron && bClearMedium )
{
xMed.Clear();
- bClearMedium = FALSE;
+ bClearMedium = sal_False;
}
}
}
@@ -227,10 +227,10 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
-BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
+sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
{
if( !pLink || !pLink->GetLinkManager() )
- return FALSE;
+ return sal_False;
// teste doch mal, ob nicht ein anderer Link mit der gleichen
// Verbindung schon existiert
@@ -242,7 +242,7 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
if( pShell.Is() )
{
if( pShell->IsAbortingImport() )
- return FALSE;
+ return sal_False;
if( pShell->GetMedium() )
sReferer = pShell->GetMedium()->GetName();
@@ -266,25 +266,25 @@ BOOL SvFileObject::Connect( sfx2::SvBaseLink* pLink )
break;
default:
- return FALSE;
+ return sal_False;
}
SetUpdateTimeout( 0 );
// und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
- return TRUE;
+ return sal_True;
}
-BOOL SvFileObject::LoadFile_Impl()
+sal_Bool SvFileObject::LoadFile_Impl()
{
// wir sind noch im Laden!!
if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
- return FALSE;
+ return sal_False;
// z.Z. nur auf die aktuelle DocShell
- xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE );
+ xMed = new SfxMedium( sFileNm, STREAM_STD_READ, sal_True );
SvLinkSource::StreamToLoadFrom aStreamToLoadFrom =
getStreamToLoadFrom();
xMed->setStreamToLoadFrom(
@@ -296,14 +296,14 @@ BOOL SvFileObject::LoadFile_Impl()
if( !bSynchron )
{
- bLoadAgain = bDataReady = bInNewData = FALSE;
- bWaitForData = TRUE;
+ bLoadAgain = bDataReady = bInNewData = sal_False;
+ bWaitForData = sal_True;
SfxMediumRef xTmpMed = xMed;
xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
- bInCallDownLoad = TRUE;
+ bInCallDownLoad = sal_True;
xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
- bInCallDownLoad = FALSE;
+ bInCallDownLoad = sal_False;
bClearMedium = !xMed.Is();
if( bClearMedium )
@@ -311,24 +311,24 @@ BOOL SvFileObject::LoadFile_Impl()
return bDataReady;
}
- bWaitForData = TRUE;
- bDataReady = bInNewData = FALSE;
+ bWaitForData = sal_True;
+ bDataReady = bInNewData = sal_False;
xMed->DownLoad();
bLoadAgain = !xMed->IsRemote();
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
// Grafik ist fertig, also DataChanged von der Statusaederung schicken:
SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
- return TRUE;
+ return sal_True;
}
-BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
+sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
{
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
- const USHORT nFilter = sFilter.Len() && pGF->GetImportFormatCount()
+ const sal_uInt16 nFilter = sFilter.Len() && pGF->GetImportFormatCount()
? pGF->GetImportFormatNumber( sFilter )
: GRFILTER_FORMAT_DONTKNOW;
@@ -366,10 +366,10 @@ BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
xMed->SetDataAvailableLink( Link() );
// xMed->SetDoneLink( Link() );
delete pDownLoadData, pDownLoadData = 0;
- bDataReady = TRUE;
- bWaitForData = FALSE;
+ bDataReady = sal_True;
+ bWaitForData = sal_False;
}
- else if( FALSE )
+ else if( sal_False )
{
// Timer aufsetzen, um zurueck zukehren
pDownLoadData->aTimer.Start();
@@ -519,15 +519,15 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r
IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
{
// wenn wir von hier kommen, kann es kein Fehler mehr sein
- pThis->bLoadError = FALSE;
- pThis->bWaitForData = FALSE;
- pThis->bInCallDownLoad = FALSE;
+ pThis->bLoadError = sal_False;
+ pThis->bWaitForData = sal_False;
+ pThis->bInCallDownLoad = sal_False;
if( !pThis->bInNewData && !pThis->bDataReady )
{
// Grafik ist fertig, also DataChanged von der Status-
// aederung schicken:
- pThis->bDataReady = TRUE;
+ pThis->bDataReady = sal_True;
pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
// und dann nochmal die Daten senden
@@ -536,7 +536,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
if( pThis->bDataReady )
{
- pThis->bLoadAgain = TRUE;
+ pThis->bLoadAgain = sal_True;
if( pThis->xMed.Is() )
{
pThis->xMed->SetDataAvailableLink( Link() );
@@ -567,8 +567,8 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
if( pThis->bInNewData )
return 0;
- pThis->bInNewData = TRUE;
- pThis->bLoadError = FALSE;
+ pThis->bInNewData = sal_True;
+ pThis->bLoadError = sal_False;
if( !pThis->pDownLoadData )
{
@@ -599,7 +599,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
// im DataChanged ein DataReady?
else if( pThis->bWaitForData && pThis->pDownLoadData )
{
- pThis->bLoadError = TRUE;
+ pThis->bLoadError = sal_True;
}
}
@@ -610,7 +610,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
}
- pThis->bInNewData = FALSE;
+ pThis->bInNewData = sal_False;
return 0;
}
@@ -649,28 +649,28 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
ERRCODE_SO_FALSE sonst
*/
-BOOL SvFileObject::IsPending() const
+sal_Bool SvFileObject::IsPending() const
{
return FILETYPE_GRF == nType && !bLoadError &&
( pDownLoadData || bWaitForData );
}
-BOOL SvFileObject::IsDataComplete() const
+sal_Bool SvFileObject::IsDataComplete() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( FILETYPE_GRF != nType )
- bRet = TRUE;
+ bRet = sal_True;
else if( !bLoadError && ( !bWaitForData && !pDownLoadData ))
{
SvFileObject* pThis = (SvFileObject*)this;
if( bDataReady ||
( bSynchron && pThis->LoadFile_Impl() && xMed.Is() ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
INetURLObject aUrl( sFileNm );
if( aUrl.HasError() ||
INET_PROT_NOT_VALID == aUrl.GetProtocol() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -684,8 +684,8 @@ void SvFileObject::CancelTransfers()
if( !bDataReady )
{
// nicht noch mal aufsetzen
- bLoadAgain = FALSE;
- bDataReady = bLoadError = bWaitForData = TRUE;
+ bLoadAgain = sal_False;
+ bDataReady = bLoadError = bWaitForData = sal_True;
SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT );
}
}
@@ -699,7 +699,7 @@ void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
aAny <<= rtl::OUString::valueOf( (sal_Int32)nState );
DataChanged( SotExchange::GetFormatName(
sfx2::LinkManager::RegisterStatusInfoId()), aAny );
- bStateChangeCalled = TRUE;
+ bStateChangeCalled = sal_True;
}
}
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 50f934a75436..0510f38092bd 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -46,22 +46,22 @@ class SvFileObject : public sfx2::SvLinkSource
Impl_DownLoadData* pDownLoadData;
Window* pOldParent;
- BYTE nType;
-
- BOOL bLoadAgain : 1;
- BOOL bSynchron : 1;
- BOOL bLoadError : 1;
- BOOL bWaitForData : 1;
- BOOL bInNewData : 1;
- BOOL bDataReady : 1;
- BOOL bMedUseCache : 1;
- BOOL bNativFormat : 1;
- BOOL bClearMedium : 1;
- BOOL bStateChangeCalled : 1;
- BOOL bInCallDownLoad : 1;
-
- BOOL GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
- BOOL LoadFile_Impl();
+ sal_uInt8 nType;
+
+ sal_Bool bLoadAgain : 1;
+ sal_Bool bSynchron : 1;
+ sal_Bool bLoadError : 1;
+ sal_Bool bWaitForData : 1;
+ sal_Bool bInNewData : 1;
+ sal_Bool bDataReady : 1;
+ sal_Bool bMedUseCache : 1;
+ sal_Bool bNativFormat : 1;
+ sal_Bool bClearMedium : 1;
+ sal_Bool bStateChangeCalled : 1;
+ sal_Bool bInCallDownLoad : 1;
+
+ sal_Bool GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
+ sal_Bool LoadFile_Impl();
void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
@@ -75,17 +75,17 @@ protected:
public:
SvFileObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- virtual BOOL Connect( sfx2::SvBaseLink* );
+ virtual sal_Bool Connect( sfx2::SvBaseLink* );
virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
// erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
// erst angestossen werden muss
- virtual BOOL IsPending() const;
- virtual BOOL IsDataComplete() const;
+ virtual sal_Bool IsPending() const;
+ virtual sal_Bool IsDataComplete() const;
void CancelTransfers();
};
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 2d997dcc26ff..4f24ecb21355 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -62,7 +62,7 @@ HelpInterceptor_Impl::HelpInterceptor_Impl() :
HelpInterceptor_Impl::~HelpInterceptor_Impl()
{
- for ( USHORT i = 0; m_pHistory && i < m_pHistory->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pHistory && i < m_pHistory->Count(); ++i )
delete m_pHistory->GetObject(i);
delete m_pHistory;
}
@@ -73,10 +73,10 @@ void HelpInterceptor_Impl::addURL( const String& rURL )
{
if ( !m_pHistory )
m_pHistory = new HelpHistoryList_Impl;
- ULONG nCount = m_pHistory->Count();
+ sal_uIntPtr nCount = m_pHistory->Count();
if ( nCount && m_nCurPos < ( nCount - 1 ) )
{
- for ( ULONG i = nCount - 1; i > m_nCurPos; i-- )
+ for ( sal_uIntPtr i = nCount - 1; i > m_nCurPos; i-- )
delete m_pHistory->Remove(i);
}
Reference<XFrame> xFrame(m_xIntercepted, UNO_QUERY);
@@ -126,7 +126,7 @@ void HelpInterceptor_Impl::SetStartURL( const String& rURL )
{
m_pHistory = new HelpHistoryList_Impl;
Any aEmptyViewData;
- m_pHistory->Insert( new HelpHistoryEntry_Impl( rURL, aEmptyViewData ), ((ULONG)0x0) );
+ m_pHistory->Insert( new HelpHistoryEntry_Impl( rURL, aEmptyViewData ), ((sal_uIntPtr)0x0) );
m_nCurPos = m_pHistory->Count() - 1;
m_pWindow->UpdateToolbox();
@@ -161,7 +161,7 @@ Reference< XDispatch > SAL_CALL HelpInterceptor_Impl::queryDispatch(
// INetURLObject aObj( aURL.Complete );
// sal_Bool bHelpURL = ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP );
- BOOL bHelpURL = aURL.Complete.toAsciiLowerCase().match(rtl::OUString::createFromAscii("vnd.sun.star.help"),0);
+ sal_Bool bHelpURL = aURL.Complete.toAsciiLowerCase().match(rtl::OUString::createFromAscii("vnd.sun.star.help"),0);
if ( bHelpURL )
{
@@ -269,7 +269,7 @@ void SAL_CALL HelpInterceptor_Impl::dispatch(
}
}
- ULONG nPos = ( bBack && m_nCurPos > 0 ) ? --m_nCurPos
+ sal_uIntPtr nPos = ( bBack && m_nCurPos > 0 ) ? --m_nCurPos
: ( !bBack && m_nCurPos < m_pHistory->Count() - 1 )
? ++m_nCurPos
: ULONG_MAX;
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 3476f0d305b5..5a6f0d024c20 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -75,7 +75,7 @@ friend class SfxHelpWindow_Impl;
HelpHistoryList_Impl* m_pHistory;
SfxHelpWindow_Impl* m_pWindow;
- ULONG m_nCurPos;
+ sal_uIntPtr m_nCurPos;
String m_aCurrentURL;
com::sun::star::uno::Any m_aViewData;
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index b9f4404d5555..af8086f4e046 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -71,7 +71,7 @@ static WeakReference< XModuleUIConfigurationManagerSupplier > m_xModuleCfgMgrSup
static WeakReference< XURLTransformer > m_xURLTransformer;
static ModuleIdToImagegMgr m_aModuleIdToImageMgrMap;
-Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
+Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast )
{
// TODO/LATeR: shouldn't this become a method at SfxViewFrame?! That would save the UnoTunnel
if ( !rFrame.is() )
@@ -105,8 +105,8 @@ Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::sta
URL aTargetURL;
aTargetURL.Complete = aURL;
xURLTransformer->parseStrict( aTargetURL );
- USHORT nId = ( USHORT ) aTargetURL.Path.toInt32();*/
- USHORT nId = ( USHORT ) String(aURL).Copy(5).ToInt32();
+ sal_uInt16 nId = ( sal_uInt16 ) aTargetURL.Path.toInt32();*/
+ sal_uInt16 nId = ( sal_uInt16 ) String(aURL).Copy(5).ToInt32();
const SfxSlot* pSlot = 0;
if ( xModel.is() )
{
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 479e8ddea745..df8ae4b8b425 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -134,7 +134,7 @@ SvDDEObject::SvDDEObject()
: pConnection( 0 ), pLink( 0 ), pRequest( 0 ), pGetData( 0 ), nError( 0 )
{
SetUpdateTimeout( 100 );
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
SvDDEObject::~SvDDEObject()
@@ -144,12 +144,12 @@ SvDDEObject::~SvDDEObject()
delete pConnection;
}
-BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & rMimeType,
- BOOL bSynchron )
+ sal_Bool bSynchron )
{
if( !pConnection )
- return FALSE;
+ return sal_False;
if( pConnection->GetError() ) // dann versuchen wir es nochmal
{
@@ -163,10 +163,10 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
if( bWaitForData ) // wir sind rekursiv drin, wieder raus
- return FALSE;
+ return sal_False;
// Verriegeln gegen Reentrance
- bWaitForData = TRUE;
+ bWaitForData = sal_True;
// falls gedruckt werden soll, warten wir bis die Daten vorhanden sind
if( bSynchron )
@@ -184,7 +184,7 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
if( pConnection->GetError() )
nError = DDELINK_ERROR_DATA;
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
else
{
@@ -209,12 +209,12 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
-BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
+sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
{
#if defined(WNT)
- static BOOL bInWinExec = FALSE;
+ static sal_Bool bInWinExec = sal_False;
#endif
- USHORT nLinkType = pSvLink->GetUpdateMode();
+ sal_uInt16 nLinkType = pSvLink->GetUpdateMode();
if( pConnection ) // Verbindung steht ja schon
{
// tja, dann nur noch als Abhaengig eintragen
@@ -225,17 +225,17 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
- return TRUE;
+ return sal_True;
}
if( !pSvLink->GetLinkManager() )
- return FALSE;
+ return sal_False;
String sServer, sTopic;
pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem );
if( !sServer.Len() || !sTopic.Len() || !sItem.Len() )
- return FALSE;
+ return sal_False;
pConnection = new DdeConnection( sServer, sTopic );
if( pConnection->GetError() )
@@ -244,7 +244,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
// dann ist der Server oben, kennt nur nicht das Topic!
if( sTopic.EqualsIgnoreCaseAscii( "SYSTEM" ) )
{
- BOOL bSysTopic;
+ sal_Bool bSysTopic;
{
DdeConnection aTmp( sServer, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "SYSTEM" ) ) );
bSysTopic = !aTmp.GetError();
@@ -253,7 +253,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
if( bSysTopic )
{
nError = DDELINK_ERROR_DATA;
- return FALSE;
+ return sal_False;
}
// ansonsten unter Win/WinNT die Applikation direkt starten
}
@@ -271,12 +271,12 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
nError = DDELINK_ERROR_APP;
else
{
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<5; i++ )
{
- bInWinExec = TRUE;
+ bInWinExec = sal_True;
Application::Reschedule();
- bInWinExec = FALSE;
+ bInWinExec = sal_False;
delete pConnection;
pConnection = new DdeConnection( sServer, sTopic );
@@ -308,7 +308,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
}
if( pConnection->GetError() )
- return FALSE;
+ return sal_False;
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
@@ -317,7 +317,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
: 0 );
AddConnectAdvise( pSvLink );
SetUpdateTimeout( 0 );
- return TRUE;
+ return sal_True;
}
void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl )
@@ -330,9 +330,9 @@ void SvDDEObject::Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link
}
}
-BOOL SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
+sal_Bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
{
- USHORT nFmt = 0;
+ sal_uInt16 nFmt = 0;
switch( rReq.GetFormat() )
{
case FORMAT_RTF:
@@ -359,7 +359,7 @@ BOOL SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
return 0 != nFmt;
}
-BOOL SvDDEObject::IsPending() const
+sal_Bool SvDDEObject::IsPending() const
/* [Beschreibung]
Die Methode stellt fest, ob aus einem DDE-Object die Daten gelesen
@@ -373,14 +373,14 @@ BOOL SvDDEObject::IsPending() const
return bWaitForData;
}
-BOOL SvDDEObject::IsDataComplete() const
+sal_Bool SvDDEObject::IsDataComplete() const
{
return bWaitForData;
}
IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
{
- ULONG nFmt = pData->GetFormat();
+ sal_uIntPtr nFmt = pData->GetFormat();
switch( nFmt )
{
case FORMAT_GDIMETAFILE:
@@ -406,7 +406,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
aVal <<= aSeq;
DataChanged( SotExchange::GetFormatMimeType(
pData->GetFormat() ), aVal );
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
}
}
@@ -416,7 +416,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
{
- BOOL bValid = (BOOL)(ULONG)pData;
+ sal_Bool bValid = (sal_Bool)(sal_uIntPtr)pData;
if( !bValid && ( pRequest || pLink ))
{
DdeTransaction* pReq = 0;
@@ -434,13 +434,13 @@ IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
else if( pReq == pRequest )
{
// das wars dann
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
}
}
}
else
// das warten ist beendet
- bWaitForData = FALSE;
+ bWaitForData = sal_False;
return 0;
}
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index b361df4468d3..4494cb9c20fa 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -48,11 +48,11 @@ class SvDDEObject : public SvLinkSource
DdeRequest* pRequest;
::com::sun::star::uno::Any * pGetData;
- BYTE bWaitForData : 1; // wird auf Daten gewartet?
- BYTE nError : 7; // Error Code fuer den Dialog
+ sal_uInt8 bWaitForData : 1; // wird auf Daten gewartet?
+ sal_uInt8 nError : 7; // Error Code fuer den Dialog
- BOOL ImplHasOtherFormat( DdeTransaction& );
+ sal_Bool ImplHasOtherFormat( DdeTransaction& );
DECL_LINK( ImplGetDDEData, DdeData* );
DECL_LINK( ImplDoneDDEData, void* );
@@ -62,15 +62,15 @@ protected:
public:
SvDDEObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & aMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- virtual BOOL Connect( SvBaseLink * );
+ virtual sal_Bool Connect( SvBaseLink * );
virtual void Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
- virtual BOOL IsPending() const;
- virtual BOOL IsDataComplete() const;
+ virtual sal_Bool IsPending() const;
+ virtual sal_Bool IsDataComplete() const;
};
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 934b4051a638..e689b3f22282 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -63,7 +63,7 @@ class SvxInternalLink : public sfx2::SvLinkSource
public:
SvxInternalLink() {}
- virtual BOOL Connect( sfx2::SvBaseLink* );
+ virtual sal_Bool Connect( sfx2::SvBaseLink* );
};
@@ -78,7 +78,7 @@ LinkManager::LinkManager(SfxObjectShell* p)
LinkManager::~LinkManager()
{
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
- for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
+ for( sal_uInt16 n = aLinkTbl.Count(); n; --n, ++ppRef )
{
if( (*ppRef)->Is() )
{
@@ -99,16 +99,16 @@ LinkManager::~LinkManager()
void LinkManager::Remove( SvBaseLink *pLink )
{
// keine Links doppelt einfuegen
- int bFound = FALSE;
+ int bFound = sal_False;
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
- for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
+ for( sal_uInt16 n = aLinkTbl.Count(); n; --n, ++ppRef )
{
if( pLink == *(*ppRef) )
{
(*(*ppRef))->Disconnect();
(*(*ppRef))->SetLinkManager( NULL );
(*(*ppRef)).Clear();
- bFound = TRUE;
+ bFound = sal_True;
}
// falls noch leere rum stehen sollten, weg damit
@@ -124,7 +124,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
}
-void LinkManager::Remove( USHORT nPos, USHORT nCnt )
+void LinkManager::Remove( sal_uInt16 nPos, sal_uInt16 nCnt )
{
if( nCnt && nPos < aLinkTbl.Count() )
{
@@ -132,7 +132,7 @@ void LinkManager::Remove( USHORT nPos, USHORT nCnt )
nCnt = aLinkTbl.Count() - nPos;
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData() + nPos;
- for( USHORT n = nCnt; n; --n, ++ppRef )
+ for( sal_uInt16 n = nCnt; n; --n, ++ppRef )
{
if( (*ppRef)->Is() )
{
@@ -146,29 +146,29 @@ void LinkManager::Remove( USHORT nPos, USHORT nCnt )
}
-BOOL LinkManager::Insert( SvBaseLink* pLink )
+sal_Bool LinkManager::Insert( SvBaseLink* pLink )
{
// keine Links doppelt einfuegen
- for( USHORT n = 0; n < aLinkTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLinkTbl.Count(); ++n )
{
SvBaseLinkRef* pTmp = aLinkTbl[ n ];
if( !pTmp->Is() )
aLinkTbl.DeleteAndDestroy( n-- );
if( pLink == *pTmp )
- return FALSE;
+ return sal_False;
}
SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
pLink->SetLinkManager( this );
aLinkTbl.Insert( pTmp, aLinkTbl.Count() );
- return TRUE;
+ return sal_True;
}
-BOOL LinkManager::InsertLink( SvBaseLink * pLink,
- USHORT nObjType,
- USHORT nUpdateMode,
+sal_Bool LinkManager::InsertLink( SvBaseLink * pLink,
+ sal_uInt16 nObjType,
+ sal_uInt16 nUpdateMode,
const String* pName )
{
// unbedingt zuerst
@@ -180,13 +180,13 @@ BOOL LinkManager::InsertLink( SvBaseLink * pLink,
}
-BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
+sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink,
const String& rServer,
const String& rTopic,
const String& rItem )
{
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return FALSE;
+ return sal_False;
String sCmd;
::sfx2::MakeLnkName( sCmd, &rServer, rTopic, rItem );
@@ -197,11 +197,11 @@ BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
}
-BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
+sal_Bool LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return FALSE;
+ return sal_False;
if( pLink->GetObjType() == OBJECT_CLIENT_SO )
pLink->SetObjType( OBJECT_CLIENT_DDE );
@@ -211,13 +211,13 @@ BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
// erfrage die Strings fuer den Dialog
-BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
+sal_Bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
String* pLinkStr,
String* pFilter ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const String sLNm( pLink->GetLinkSourceName() );
if( sLNm.Len() )
{
@@ -227,7 +227,7 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
case OBJECT_CLIENT_GRF:
case OBJECT_CLIENT_OLE:
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
@@ -246,12 +246,12 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
? RID_SVXSTR_FILELINK
: RID_SVXSTR_GRAFIKLINK ));
}
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case OBJECT_CLIENT_DDE:
{
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
String sCmd( sLNm );
String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
@@ -262,7 +262,7 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
*pFile = sTopic;
if( pLinkStr )
*pLinkStr = sCmd.Copy( nTmp );
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -275,9 +275,9 @@ BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
void LinkManager::UpdateAllLinks(
- BOOL bAskUpdate,
- BOOL /*bCallErrHdl*/,
- BOOL bUpdateGrfLinks,
+ sal_Bool bAskUpdate,
+ sal_Bool /*bCallErrHdl*/,
+ sal_Bool bUpdateGrfLinks,
Window* pParentWin )
{
SvStringsDtor aApps, aTopics, aItems;
@@ -286,7 +286,7 @@ void LinkManager::UpdateAllLinks(
// erstmal eine Kopie vom Array machen, damit sich updatende Links in
// Links in ... nicht dazwischen funken!!
SvPtrarr aTmpArr( 255, 50 );
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aLinkTbl.Count(); ++n )
{
SvBaseLink* pLink = *aLinkTbl[ n ];
@@ -303,8 +303,8 @@ void LinkManager::UpdateAllLinks(
SvBaseLink* pLink = (SvBaseLink*)aTmpArr[ n ];
// suche erstmal im Array nach dem Eintrag
- USHORT nFndPos = USHRT_MAX;
- for( USHORT i = 0; i < aLinkTbl.Count(); ++i )
+ sal_uInt16 nFndPos = USHRT_MAX;
+ for( sal_uInt16 i = 0; i < aLinkTbl.Count(); ++i )
if( pLink == *aLinkTbl[ i ] )
{
nFndPos = i;
@@ -324,7 +324,7 @@ void LinkManager::UpdateAllLinks(
int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
if( RET_YES != nRet )
return ; // es soll nichts geupdatet werden
- bAskUpdate = FALSE; // einmal reicht
+ bAskUpdate = sal_False; // einmal reicht
}
pLink->Update();
@@ -354,20 +354,20 @@ SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
}
}
-BOOL LinkManager::InsertServer( SvLinkSource* pObj )
+sal_Bool LinkManager::InsertServer( SvLinkSource* pObj )
{
// keine doppelt einfuegen
if( !pObj || USHRT_MAX != aServerTbl.GetPos( pObj ) )
- return FALSE;
+ return sal_False;
aServerTbl.Insert( pObj, aServerTbl.Count() );
- return TRUE;
+ return sal_True;
}
void LinkManager::RemoveServer( SvLinkSource* pObj )
{
- USHORT nPos = aServerTbl.GetPos( pObj );
+ sal_uInt16 nPos = aServerTbl.GetPos( pObj );
if( USHRT_MAX != nPos )
aServerTbl.Remove( nPos, 1 );
}
@@ -387,14 +387,14 @@ void MakeLnkName( String& rName, const String* pType, const String& rFile,
((rName += cTokenSeperator ) += *pFilter).EraseLeadingChars().EraseTrailingChars();
}
-BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
- USHORT nFileType,
+sal_Bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
+ sal_uInt16 nFileType,
const String& rFileNm,
const String* pFilterNm,
const String* pRange )
{
if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
- return FALSE;
+ return sal_False;
String sCmd( rFileNm );
sCmd += ::sfx2::cTokenSeperator;
@@ -406,11 +406,11 @@ BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
return InsertLink( &rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &sCmd );
}
-BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
+sal_Bool LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
{
if( OBJECT_CLIENT_FILE == ( OBJECT_CLIENT_FILE & rLink.GetObjType() ))
return InsertLink( &rLink, rLink.GetObjType(), sfx2::LINKUPDATE_ONCALL );
- return FALSE;
+ return sal_False;
}
// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
@@ -421,7 +421,7 @@ void LinkManager::CancelTransfers()
sfx2::SvBaseLink* pLnk;
const sfx2::SvBaseLinks& rLnks = GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
@@ -435,9 +435,9 @@ void LinkManager::CancelTransfers()
// dann die entsprechenden Informationen als String.
// Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
// - das braucht Informationen ueber Load/Abort/Error
-ULONG LinkManager::RegisterStatusInfoId()
+sal_uIntPtr LinkManager::RegisterStatusInfoId()
{
- static ULONG nFormat = 0;
+ static sal_uIntPtr nFormat = 0;
if( !nFormat )
{
@@ -452,11 +452,11 @@ ULONG LinkManager::RegisterStatusInfoId()
// ----------------------------------------------------------------------
-BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
+sal_Bool LinkManager::GetGraphicFromAny( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue,
Graphic& rGrf )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
if( rValue.hasValue() && ( rValue >>= aSeq ) )
{
@@ -469,7 +469,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
case SOT_FORMATSTR_ID_SVXB:
{
aMemStm >> rGrf;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case FORMAT_GDIMETAFILE:
@@ -477,7 +477,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
GDIMetaFile aMtf;
aMtf.Read( aMemStm );
rGrf = aMtf;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
case FORMAT_BITMAP:
@@ -485,7 +485,7 @@ BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
Bitmap aBmp;
aMemStm >> aBmp;
rGrf = aBmp;
- bRet = TRUE;
+ bRet = sal_True;
}
break;
}
@@ -506,10 +506,10 @@ String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
return sRet;
}
-BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
+sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
{
SfxObjectShell* pFndShell = 0;
- USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
+ sal_uInt16 nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
String sTopic, sItem, sReferer;
if( pLink->GetLinkManager() &&
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem )
@@ -527,7 +527,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
TypeId aType( TYPE(SfxObjectShell) );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
if( pShell && pShell->GetMedium() )
{
@@ -542,7 +542,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
if ( !pShell )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType, sal_False );
}
@@ -564,7 +564,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType, sal_False );
}
else
@@ -576,7 +576,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
// empty topics are not allowed - which document is it
if( !sTopic.Len() )
- return FALSE;
+ return sal_False;
if( !pFndShell )
{
@@ -588,12 +588,12 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
INET_PROT_HTTP != aURL.GetProtocol() )
{
SfxStringItem aName( SID_FILE_NAME, sTopic );
- SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
- SfxBoolItem aHidden(SID_HIDDEN, TRUE);
+ SfxBoolItem aMinimized(SID_MINIMIZED, sal_True);
+ SfxBoolItem aHidden(SID_HIDDEN, sal_True);
SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer( SID_REFERER, sReferer );
SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
- SfxBoolItem aReadOnly(SID_DOC_READONLY, TRUE);
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_True);
// #i14200# (DDE-link crashes wordprocessor)
SfxAllItemSet aArgs( SFX_APP()->GetPool() );
@@ -608,13 +608,13 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
}
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFndShell )
{
sfx2::SvLinkSource* pNewSrc = pFndShell->DdeCreateLinkSource( sItem );
if( pNewSrc )
{
- bRet = TRUE;
+ bRet = sal_True;
::com::sun::star::datatransfer::DataFlavor aFl;
SotExchange::GetFormatDataFlavor( pLink->GetContentType(), aFl );
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index e9fbde42328f..ee6e4fba588b 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -68,7 +68,7 @@ void SvLinkSourceTimer::Timeout()
}
static void StartTimer( SvLinkSourceTimer ** ppTimer, SvLinkSource * pOwner,
- ULONG nTimeout )
+ sal_uIntPtr nTimeout )
{
if( !*ppTimer )
{
@@ -83,17 +83,17 @@ struct SvLinkSource_Entry_Impl
{
SvBaseLinkRef xSink;
String aDataMimeType;
- USHORT nAdviseModes;
- BOOL bIsDataSink;
+ sal_uInt16 nAdviseModes;
+ sal_Bool bIsDataSink;
SvLinkSource_Entry_Impl( SvBaseLink* pLink, const String& rMimeType,
- USHORT nAdvMode )
+ sal_uInt16 nAdvMode )
: xSink( pLink ), aDataMimeType( rMimeType ),
- nAdviseModes( nAdvMode ), bIsDataSink( TRUE )
+ nAdviseModes( nAdvMode ), bIsDataSink( sal_True )
{}
SvLinkSource_Entry_Impl( SvBaseLink* pLink )
- : xSink( pLink ), nAdviseModes( 0 ), bIsDataSink( FALSE )
+ : xSink( pLink ), nAdviseModes( 0 ), bIsDataSink( sal_False )
{}
~SvLinkSource_Entry_Impl();
@@ -111,7 +111,7 @@ class SvLinkSource_EntryIter_Impl
{
SvLinkSource_Array_Impl aArr;
const SvLinkSource_Array_Impl& rOrigArr;
- USHORT nPos;
+ sal_uInt16 nPos;
public:
SvLinkSource_EntryIter_Impl( const SvLinkSource_Array_Impl& rArr );
~SvLinkSource_EntryIter_Impl();
@@ -169,7 +169,7 @@ struct SvLinkSource_Impl
SvLinkSource_Array_Impl aArr;
String aDataMimeType;
SvLinkSourceTimer * pTimer;
- ULONG nTimeout;
+ sal_uIntPtr nTimeout;
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
m_xInputStreamToLoadFrom;
sal_Bool m_bIsReadOnly;
@@ -224,12 +224,12 @@ void SvLinkSource::Closed()
p->xSink->Closed();
}
-ULONG SvLinkSource::GetUpdateTimeout() const
+sal_uIntPtr SvLinkSource::GetUpdateTimeout() const
{
return pImpl->nTimeout;
}
-void SvLinkSource::SetUpdateTimeout( ULONG nTimeout )
+void SvLinkSource::SetUpdateTimeout( sal_uIntPtr nTimeout )
{
pImpl->nTimeout = nTimeout;
if( pImpl->pTimer )
@@ -249,7 +249,7 @@ void SvLinkSource::SendDataChanged()
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, sDataMimeType, TRUE ) )
+ GetData( aVal, sDataMimeType, sal_True ) )
{
p->xSink->DataChanged( sDataMimeType, aVal );
@@ -258,7 +258,7 @@ void SvLinkSource::SendDataChanged()
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -286,7 +286,7 @@ void SvLinkSource::NotifyDataChanged()
{
Any aVal;
if( ( p->nAdviseModes & ADVISEMODE_NODATA ) ||
- GetData( aVal, p->aDataMimeType, TRUE ) )
+ GetData( aVal, p->aDataMimeType, sal_True ) )
{
p->xSink->DataChanged( p->aDataMimeType, aVal );
@@ -295,7 +295,7 @@ void SvLinkSource::NotifyDataChanged()
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -335,7 +335,7 @@ void SvLinkSource::DataChanged( const String & rMimeType,
if( p->nAdviseModes & ADVISEMODE_ONLYONCE )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -353,7 +353,7 @@ void SvLinkSource::DataChanged( const String & rMimeType,
// only one link is correct
void SvLinkSource::AddDataAdvise( SvBaseLink * pLink, const String& rMimeType,
- USHORT nAdviseModes )
+ sal_uInt16 nAdviseModes )
{
SvLinkSource_Entry_ImplPtr pNew = new SvLinkSource_Entry_Impl(
pLink, rMimeType, nAdviseModes );
@@ -366,7 +366,7 @@ void SvLinkSource::RemoveAllDataAdvise( SvBaseLink * pLink )
for( SvLinkSource_Entry_ImplPtr p = aIter.Curr(); p; p = aIter.Next() )
if( p->bIsDataSink && &p->xSink == pLink )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
@@ -385,46 +385,46 @@ void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink )
for( SvLinkSource_Entry_ImplPtr p = aIter.Curr(); p; p = aIter.Next() )
if( !p->bIsDataSink && &p->xSink == pLink )
{
- USHORT nFndPos = pImpl->aArr.GetPos( p );
+ sal_uInt16 nFndPos = pImpl->aArr.GetPos( p );
if( USHRT_MAX != nFndPos )
pImpl->aArr.DeleteAndDestroy( nFndPos );
}
}
-BOOL SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
+sal_Bool SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SvLinkSource_Entry_Impl* p;
- for( USHORT n = 0, nEnd = pImpl->aArr.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pImpl->aArr.Count(); n < nEnd; ++n )
if( ( p = pImpl->aArr[ n ] )->bIsDataSink &&
( !pLink || &p->xSink == pLink ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-// TRUE => waitinmg for data
-BOOL SvLinkSource::IsPending() const
+// sal_True => waitinmg for data
+sal_Bool SvLinkSource::IsPending() const
{
- return FALSE;
+ return sal_False;
}
-// TRUE => data complete loaded
-BOOL SvLinkSource::IsDataComplete() const
+// sal_True => data complete loaded
+sal_Bool SvLinkSource::IsDataComplete() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SvLinkSource::Connect( SvBaseLink* )
+sal_Bool SvLinkSource::Connect( SvBaseLink* )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvLinkSource::GetData( ::com::sun::star::uno::Any &, const String &, BOOL )
+sal_Bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const String &, sal_Bool )
{
- return FALSE;
+ return sal_False;
}
void SvLinkSource::Edit( Window *, SvBaseLink *, const Link& )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 6a51783a8a04..95c24e4a77ab 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -49,7 +49,7 @@ namespace sfx2
TYPEINIT0( SvBaseLink )
-static DdeTopic* FindTopic( const String &, USHORT* = 0 );
+static DdeTopic* FindTopic( const String &, sal_uInt16* = 0 );
class ImplDdeItem;
@@ -78,10 +78,10 @@ struct ImplBaseLinkData
struct tClientType
{
// gilt fuer alle Links
- ULONG nCntntType; // Update Format
+ sal_uIntPtr nCntntType; // Update Format
// nicht Ole-Links
- BOOL bIntrnlLnk; // ist es ein interner Link
- USHORT nUpdateMode;// UpdateMode
+ sal_Bool bIntrnlLnk; // ist es ein interner Link
+ sal_uInt16 nUpdateMode;// UpdateMode
};
struct tDDEType
@@ -96,7 +96,7 @@ struct ImplBaseLinkData
ImplBaseLinkData()
{
ClientType.nCntntType = 0;
- ClientType.bIntrnlLnk = FALSE;
+ ClientType.bIntrnlLnk = sal_False;
ClientType.nUpdateMode = 0;
DDEType.pItem = NULL;
}
@@ -108,26 +108,26 @@ class ImplDdeItem : public DdeGetPutItem
SvBaseLink* pLink;
DdeData aData;
Sequence< sal_Int8 > aSeq; // Datacontainer for DdeData !!!
- BOOL bIsValidData : 1;
- BOOL bIsInDTOR : 1;
+ sal_Bool bIsValidData : 1;
+ sal_Bool bIsInDTOR : 1;
public:
ImplDdeItem( SvBaseLink& rLink, const String& rStr )
- : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( FALSE ),
- bIsInDTOR( FALSE )
+ : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( sal_False ),
+ bIsInDTOR( sal_False )
{}
virtual ~ImplDdeItem();
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual void AdviseLoop( BOOL );
+ virtual DdeData* Get( sal_uIntPtr );
+ virtual sal_Bool Put( const DdeData* );
+ virtual void AdviseLoop( sal_Bool );
void Notify()
{
- bIsValidData = FALSE;
+ bIsValidData = sal_False;
DdeGetPutItem::NotifyClient();
}
- BOOL IsInDTOR() const { return bIsInDTOR; }
+ sal_Bool IsInDTOR() const { return bIsInDTOR; }
};
@@ -142,8 +142,8 @@ SvBaseLink::SvBaseLink()
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
}
/************************************************************************
@@ -152,18 +152,18 @@ SvBaseLink::SvBaseLink()
|* Beschreibung
*************************************************************************/
-SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType )
+SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
{
pImpl = new BaseLink_Impl();
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
// falls es ein Ole-Link wird,
pImplData->ClientType.nUpdateMode = nUpdateMode;
pImplData->ClientType.nCntntType = nContentType;
- pImplData->ClientType.bIntrnlLnk = FALSE;
+ pImplData->ClientType.bIntrnlLnk = sal_False;
}
/************************************************************************
@@ -172,10 +172,10 @@ SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType )
|* Beschreibung
*************************************************************************/
-SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSource* pObj )
+SvBaseLink::SvBaseLink( const String& rLinkName, sal_uInt16 nObjectType, SvLinkSource* pObj )
{
- bVisible = bSynchron = bUseCache = TRUE;
- bWasLastEditOK = FALSE;
+ bVisible = bSynchron = bUseCache = sal_True;
+ bWasLastEditOK = sal_False;
aLinkName = rLinkName;
pImplData = new ImplBaseLinkData;
nObjType = nObjectType;
@@ -188,7 +188,7 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSourc
if( OBJECT_DDE_EXTERN == nObjType )
{
- USHORT nItemStt = 0;
+ sal_uInt16 nItemStt = 0;
DdeTopic* pTopic = FindTopic( aLinkName, &nItemStt );
if( pTopic )
{
@@ -248,7 +248,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, String*, _pNewName )
|* Beschreibung
*************************************************************************/
-void SvBaseLink::SetObjType( USHORT nObjTypeP )
+void SvBaseLink::SetObjType( sal_uInt16 nObjTypeP )
{
DBG_ASSERT( nObjType != OBJECT_CLIENT_DDE, "type already set" );
DBG_ASSERT( !xObj.Is(), "object exist" );
@@ -333,7 +333,7 @@ String SvBaseLink::GetLinkSourceName() const
|* Beschreibung
*************************************************************************/
-void SvBaseLink::SetUpdateMode( USHORT nMode )
+void SvBaseLink::SetUpdateMode( sal_uInt16 nMode )
{
if( ( OBJECT_CLIENT_SO & nObjType ) &&
pImplData->ClientType.nUpdateMode != nMode )
@@ -358,7 +358,7 @@ void SvBaseLink::clearStreamToLoadFrom()
}
// <--
-BOOL SvBaseLink::Update()
+sal_Bool SvBaseLink::Update()
{
if( OBJECT_CLIENT_SO & nObjType )
{
@@ -383,13 +383,13 @@ BOOL SvBaseLink::Update()
if( OBJECT_CLIENT_DDE == nObjType &&
LINKUPDATE_ONCALL == GetUpdateMode() && xObj.Is() )
xObj->RemoveAllDataAdvise( this );
- return TRUE;
+ return sal_True;
}
if( xObj.Is() )
{
// sollten wir asynschron sein?
if( xObj->IsPending() )
- return TRUE;
+ return sal_True;
// dann brauchen wir das Object auch nicht mehr
AddNextRef();
@@ -398,19 +398,19 @@ BOOL SvBaseLink::Update()
}
}
}
- return FALSE;
+ return sal_False;
}
-USHORT SvBaseLink::GetUpdateMode() const
+sal_uInt16 SvBaseLink::GetUpdateMode() const
{
return ( OBJECT_CLIENT_SO & nObjType )
? pImplData->ClientType.nUpdateMode
- : sal::static_int_cast< USHORT >( LINKUPDATE_ONCALL );
+ : sal::static_int_cast< sal_uInt16 >( LINKUPDATE_ONCALL );
}
-void SvBaseLink::_GetRealObject( BOOL bConnect)
+void SvBaseLink::_GetRealObject( sal_Bool bConnect)
{
if( !pImpl->m_pLinkMgr )
return;
@@ -427,12 +427,12 @@ void SvBaseLink::_GetRealObject( BOOL bConnect)
nObjType = OBJECT_INTERN;
xObj = pImpl->m_pLinkMgr->CreateObj( this );
- pImplData->ClientType.bIntrnlLnk = TRUE;
+ pImplData->ClientType.bIntrnlLnk = sal_True;
nObjType = OBJECT_CLIENT_DDE; // damit wir wissen was es mal war !!
}
else
{
- pImplData->ClientType.bIntrnlLnk = FALSE;
+ pImplData->ClientType.bIntrnlLnk = sal_False;
xObj = pImpl->m_pLinkMgr->CreateObj( this );
}
}
@@ -443,7 +443,7 @@ void SvBaseLink::_GetRealObject( BOOL bConnect)
Disconnect();
}
-ULONG SvBaseLink::GetContentType() const
+sal_uIntPtr SvBaseLink::GetContentType() const
{
if( OBJECT_CLIENT_SO & nObjType )
return pImplData->ClientType.nCntntType;
@@ -452,14 +452,14 @@ ULONG SvBaseLink::GetContentType() const
}
-BOOL SvBaseLink::SetContentType( ULONG nType )
+sal_Bool SvBaseLink::SetContentType( sal_uIntPtr nType )
{
if( OBJECT_CLIENT_SO & nObjType )
{
pImplData->ClientType.nCntntType = nType;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
LinkManager* SvBaseLink::GetLinkManager()
@@ -530,7 +530,7 @@ void SvBaseLink::Edit( Window* pParent, const Link& rEndEditHdl )
if ( !bAsync )
{
ExecuteEdit( String() );
- bWasLastEditOK = FALSE;
+ bWasLastEditOK = sal_False;
if ( pImpl->m_aEndEditLink.IsSet() )
pImpl->m_aEndEditLink.Call( this );
}
@@ -549,7 +549,7 @@ bool SvBaseLink::ExecuteEdit( const String& _rNewName )
{
sError = SfxResId( STR_DDE_ERROR );
- USHORT nFndPos = sError.Search( '%' );
+ sal_uInt16 nFndPos = sError.Search( '%' );
if( STRING_NOTFOUND != nFndPos )
{
sError.Erase( nFndPos, 1 ).Insert( sApp, nFndPos );
@@ -592,14 +592,14 @@ FileDialogHelper* SvBaseLink::GetFileDialog( sal_uInt32 nFlags, const String& rF
ImplDdeItem::~ImplDdeItem()
{
- bIsInDTOR = TRUE;
+ bIsInDTOR = sal_True;
// damit im Disconnect nicht jemand auf die Idee kommt, den Pointer zu
// loeschen!!
SvBaseLinkRef aRef( pLink );
aRef->Disconnect();
}
-DdeData* ImplDdeItem::Get( ULONG nFormat )
+DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat )
{
if( pLink->GetObj() )
{
@@ -615,25 +615,25 @@ DdeData* ImplDdeItem::Get( ULONG nFormat )
{
aData = DdeData( (const char *)aSeq.getConstArray(), aSeq.getLength(), nFormat );
- bIsValidData = TRUE;
+ bIsValidData = sal_True;
return &aData;
}
}
}
aSeq.realloc( 0 );
- bIsValidData = FALSE;
+ bIsValidData = sal_False;
return 0;
}
-BOOL ImplDdeItem::Put( const DdeData* )
+sal_Bool ImplDdeItem::Put( const DdeData* )
{
DBG_ERROR( "ImplDdeItem::Put not implemented" );
- return FALSE;
+ return sal_False;
}
-void ImplDdeItem::AdviseLoop( BOOL bOpen )
+void ImplDdeItem::AdviseLoop( sal_Bool bOpen )
{
// Verbindung wird geschlossen, also Link abmelden
if( pLink->GetObj() )
@@ -658,13 +658,13 @@ void ImplDdeItem::AdviseLoop( BOOL bOpen )
}
-static DdeTopic* FindTopic( const String & rLinkName, USHORT* pItemStt )
+static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt )
{
if( 0 == rLinkName.Len() )
return 0;
String sNm( rLinkName );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
String sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) );
DdeServices& rSvc = DdeService::GetServices();
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index ba91d9c1117b..90b93cc3748e 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -73,7 +73,7 @@ public:
SfxModule_Impl();
~SfxModule_Impl();
- ImageList* GetImageList( ResMgr*, BOOL, BOOL bHiContrast = FALSE );
+ ImageList* GetImageList( ResMgr*, sal_Bool, sal_Bool bHiContrast = sal_False );
};
SfxModule_Impl::SfxModule_Impl()
@@ -94,7 +94,7 @@ SfxModule_Impl::~SfxModule_Impl()
delete pImgListHiBig;
}
-ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig, BOOL bHiContrast )
+ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, sal_Bool bBig, sal_Bool bHiContrast )
{
ImageList*& rpList = bBig ? ( bHiContrast ? pImgListHiBig: pImgListBig ) :
( bHiContrast ? pImgListHiSmall : pImgListSmall );
@@ -131,7 +131,7 @@ ResMgr* SfxModule::GetResMgr()
//====================================================================
/*
-SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
+SfxModule::SfxModule( ResMgr* pMgrP, sal_Bool bDummyP,
SfxObjectFactory* pFactoryP )
: pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
{
@@ -140,7 +140,7 @@ SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
pFactoryP->SetModule_Impl( this );
}
*/
-SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
+SfxModule::SfxModule( ResMgr* pMgrP, sal_Bool bDummyP,
SfxObjectFactory* pFactoryP, ... )
: pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
{
@@ -187,7 +187,7 @@ SfxModule::~SfxModule()
{
// Das Modul wird noch vor dem DeInitialize zerst"ort, also auis dem Array entfernen
SfxModuleArr_Impl& rArr = GetModules_Impl();
- for( USHORT nPos = rArr.Count(); nPos--; )
+ for( sal_uInt16 nPos = rArr.Count(); nPos--; )
{
if( rArr[ nPos ] == this )
{
@@ -220,7 +220,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
pImpl->pFactArr = new SfxChildWinFactArr_Impl;
//#ifdef DBG_UTIL
- for (USHORT nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
+ for (sal_uInt16 nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
{
if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId)
{
@@ -237,13 +237,13 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
//-------------------------------------------------------------------------
-void SfxModule::RegisterChildWindowContext( USHORT nId,
+void SfxModule::RegisterChildWindowContext( sal_uInt16 nId,
SfxChildWinContextFactory *pFact)
{
DBG_ASSERT( pImpl, "Kein echtes Modul!" );
- USHORT nCount = pImpl->pFactArr->Count();
- for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ sal_uInt16 nCount = pImpl->pFactArr->Count();
+ for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
{
SfxChildWinFactory *pF = (*pImpl->pFactArr)[nFactory];
if ( nId == pF->nId )
@@ -266,7 +266,7 @@ void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pTbxCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pTbxCtrlFac->Count(); n++ )
{
SfxTbxCtrlFactory *pF = (*pImpl->pTbxCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -288,7 +288,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
{
SfxStbCtrlFactory *pF = (*pImpl->pStbCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -310,7 +310,7 @@ void SfxModule::RegisterMenuControl( SfxMenuCtrlFactory *pFact )
pImpl->pMenuCtrlFac = new SfxMenuCtrlFactArr_Impl;
#ifdef DBG_UTIL
- for ( USHORT n=0; n<pImpl->pMenuCtrlFac->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImpl->pMenuCtrlFac->Count(); n++ )
{
SfxMenuCtrlFactory *pF = (*pImpl->pMenuCtrlFac)[n];
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
@@ -352,17 +352,17 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const
return pImpl->pFactArr;
}
-ImageList* SfxModule::GetImageList_Impl( BOOL bBig )
+ImageList* SfxModule::GetImageList_Impl( sal_Bool bBig )
{
- return pImpl->GetImageList( pResMgr, bBig, FALSE );
+ return pImpl->GetImageList( pResMgr, bBig, sal_False );
}
-ImageList* SfxModule::GetImageList_Impl( BOOL bBig, BOOL bHiContrast )
+ImageList* SfxModule::GetImageList_Impl( sal_Bool bBig, sal_Bool bHiContrast )
{
return pImpl->GetImageList( pResMgr, bBig, bHiContrast );
}
-SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
+SfxTabPage* SfxModule::CreateTabPage( sal_uInt16, Window*, const SfxItemSet& )
{
return NULL;
}
@@ -379,7 +379,7 @@ void SfxModule::DestroyModules_Impl()
if ( pModules )
{
SfxModuleArr_Impl& rModules = *pModules;
- for( USHORT nPos = rModules.Count(); nPos--; )
+ for( sal_uInt16 nPos = rModules.Count(); nPos--; )
{
SfxModule* pMod = rModules.GetObject(nPos);
delete pMod;
@@ -387,22 +387,22 @@ void SfxModule::DestroyModules_Impl()
}
}
-void SfxModule::Invalidate( USHORT nId )
+void SfxModule::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
if ( pFrame->GetObjectShell()->GetModule() == this )
Invalidate_Impl( pFrame->GetBindings(), nId );
}
-BOOL SfxModule::IsActive() const
+sal_Bool SfxModule::IsActive() const
{
SfxViewFrame* pFrame = SfxViewFrame::Current();
if ( pFrame && pFrame->GetObjectShell()->GetFactory().GetModule() == this )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-bool SfxModule::IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const
+bool SfxModule::IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const
{
if ( i_nId != SID_TASKPANE )
// by default, assume it is
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 96f4c6b91f5b..dbeb25d8c6b9 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -185,7 +185,7 @@ namespace sfx2
{
//.........................................................................
- void HandleTaskPaneList( Window* pWindow, BOOL bAddToList )
+ void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList )
{
Window* pParent = pWindow->GetParent();
DBG_ASSERT( pParent, "HandleTaskPaneList(): every window here should have a parent" );
@@ -227,7 +227,7 @@ namespace sfx2
{
nStartPos = aBoundary.endPos;
String sSearchToken( rSearchString.Copy(
- (USHORT)aBoundary.startPos, (USHORT)aBoundary.endPos - (USHORT)aBoundary.startPos ) );
+ (sal_uInt16)aBoundary.startPos, (sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos ) );
if ( sSearchToken.Len() > 0 && ( sSearchToken.Len() > 1 || sSearchToken.GetChar(0) != '.' ) )
{
if ( bForSearch && sSearchToken.GetChar( sSearchToken.Len() - 1 ) != '*' )
@@ -269,7 +269,7 @@ struct IndexEntry_Impl
};
#define NEW_ENTRY( url, bool ) \
- (void*)(ULONG)( new IndexEntry_Impl( url, bool ) )
+ (void*)(sal_uIntPtr)( new IndexEntry_Impl( url, bool ) )
// struct ContentEntry_Impl ----------------------------------------------
@@ -317,7 +317,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
ContentListBox_Impl::~ContentListBox_Impl()
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SvLBoxEntry* pEntry = GetEntry( nPos++ );
while ( pEntry )
{
@@ -337,7 +337,7 @@ void ContentListBox_Impl::InitRoot()
SfxContentHelper::GetHelpTreeViewContents( aHelpTreeviewURL );
const ::rtl::OUString* pEntries = aList.getConstArray();
- UINT32 i, nCount = aList.getLength();
+ sal_uInt32 i, nCount = aList.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pEntries[i] );
@@ -347,7 +347,7 @@ void ContentListBox_Impl::InitRoot()
aURL = aRow.GetToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
sal_Bool bIsFolder = ( '1' == cFolder );
- SvLBoxEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, TRUE );
+ SvLBoxEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, sal_True );
if ( bIsFolder )
pEntry->SetUserData( new ContentEntry_Impl( aURL, sal_True ) );
}
@@ -382,7 +382,7 @@ void ContentListBox_Impl::RequestingChilds( SvLBoxEntry* pParent )
SfxContentHelper::GetHelpTreeViewContents( aTmpURL );
const ::rtl::OUString* pEntries = aList.getConstArray();
- UINT32 i, nCount = aList.getLength();
+ sal_uInt32 i, nCount = aList.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pEntries[i] );
@@ -395,7 +395,7 @@ void ContentListBox_Impl::RequestingChilds( SvLBoxEntry* pParent )
SvLBoxEntry* pEntry = NULL;
if ( bIsFolder )
{
- pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, TRUE );
+ pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, sal_True );
pEntry->SetUserData( new ContentEntry_Impl( aURL, sal_True ) );
}
else
@@ -500,15 +500,15 @@ IndexBox_Impl::IndexBox_Impl( Window* pParent, const ResId& rResId ) :
ComboBox( pParent, rResId )
{
- EnableAutocomplete( TRUE );
- EnableUserDraw( TRUE );
+ EnableAutocomplete( sal_True );
+ EnableUserDraw( sal_True );
}
// -----------------------------------------------------------------------
void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
{
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( rUDEvt.GetItemId() );
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( rUDEvt.GetItemId() );
if ( pEntry && pEntry->m_bSubEntry )
{
// indent sub entries
@@ -516,11 +516,11 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
aPos.X() += 8;
aPos.Y() += ( rUDEvt.GetRect().GetHeight() - rUDEvt.GetDevice()->GetTextHeight() ) / 2;
String aEntry( GetEntry( rUDEvt.GetItemId() ) );
- USHORT nPos = aEntry.Search( ';' );
+ sal_uInt16 nPos = aEntry.Search( ';' );
rUDEvt.GetDevice()->DrawText( aPos, ( nPos != STRING_NOTFOUND ) ? aEntry.Copy( nPos + 1 ) : aEntry );
}
else
- DrawEntry( rUDEvt, FALSE, TRUE, TRUE );
+ DrawEntry( rUDEvt, sal_False, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -542,16 +542,16 @@ long IndexBox_Impl::Notify( NotifyEvent& rNEvt )
void IndexBox_Impl::SelectExecutableEntry()
{
- USHORT nPos = GetEntryPos( GetText() );
+ sal_uInt16 nPos = GetEntryPos( GetText() );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
- USHORT nOldPos = nPos;
+ sal_uInt16 nOldPos = nPos;
String aEntryText;
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( nPos );
- USHORT nCount = GetEntryCount();
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( nPos );
+ sal_uInt16 nCount = GetEntryCount();
while ( nPos < nCount && ( !pEntry || pEntry->m_aURL.Len() == 0 ) )
{
- pEntry = (IndexEntry_Impl*)(ULONG)GetEntryData( ++nPos );
+ pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( ++nPos );
aEntryText = GetEntry( nPos );
}
@@ -645,7 +645,7 @@ void IndexTabPage_Impl::InitializeIndex()
append[k] = sal_Unicode( ' ' );
sfx2::KeywordInfo aInfo;
- aIndexCB.SetUpdateMode( FALSE );
+ aIndexCB.SetUpdateMode( sal_False );
try
{
@@ -679,7 +679,7 @@ void IndexTabPage_Impl::InitializeIndex()
( aAnySeq[2] >>= aAnchorRefList ) && ( aAnySeq[3] >>= aTitleRefList ) )
{
sal_Bool insert;
- USHORT nPos;
+ sal_uInt16 nPos;
int ndx,tmp;
::rtl::OUString aIndex, aTempString;
::rtl::OUStringBuffer aData( 128 ); // Capacity of up to 128 characters
@@ -745,7 +745,7 @@ void IndexTabPage_Impl::InitializeIndex()
DBG_ERROR( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" );
}
- aIndexCB.SetUpdateMode( TRUE );
+ aIndexCB.SetUpdateMode( sal_True );
if ( sKeyword.Len() > 0 )
aKeywordLink.Call( this );
@@ -758,9 +758,9 @@ void IndexTabPage_Impl::InitializeIndex()
void IndexTabPage_Impl::ClearIndex()
{
- USHORT nCount = aIndexCB.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
- delete (IndexEntry_Impl*)(ULONG)aIndexCB.GetEntryData(i);
+ sal_uInt16 nCount = aIndexCB.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ delete (IndexEntry_Impl*)(sal_uIntPtr)aIndexCB.GetEntryData(i);
aIndexCB.Clear();
}
@@ -869,7 +869,7 @@ void IndexTabPage_Impl::SetFactory( const String& rFactory )
String IndexTabPage_Impl::GetSelectEntry() const
{
String aRet;
- IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(ULONG)aIndexCB.GetEntryData( aIndexCB.GetEntryPos( aIndexCB.GetText() ) );
+ IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)aIndexCB.GetEntryData( aIndexCB.GetEntryPos( aIndexCB.GetText() ) );
if ( pEntry )
aRet = pEntry->m_aURL;
return aRet;
@@ -894,7 +894,7 @@ sal_Bool IndexTabPage_Impl::HasKeyword() const
sal_Bool bRet = sal_False;
if ( sKeyword.Len() > 0 )
{
- USHORT nPos = aIndexCB.GetEntryPos( sKeyword );
+ sal_uInt16 nPos = aIndexCB.GetEntryPos( sKeyword );
bRet = ( nPos != LISTBOX_ENTRY_NOTFOUND );
}
@@ -908,10 +908,10 @@ sal_Bool IndexTabPage_Impl::HasKeywordIgnoreCase()
sal_Bool bRet = sal_False;
if ( sKeyword.Len() > 0 )
{
- USHORT nEntries = aIndexCB.GetEntryCount();
+ sal_uInt16 nEntries = aIndexCB.GetEntryCount();
String sIndexItem;
const vcl::I18nHelper& rI18nHelper = GetSettings().GetLocaleI18nHelper();
- for ( USHORT n = 0; n < nEntries; n++)
+ for ( sal_uInt16 n = 0; n < nEntries; n++)
{
sIndexItem = aIndexCB.GetEntry( n );
if (rI18nHelper.MatchString( sIndexItem, sKeyword ))
@@ -1011,12 +1011,12 @@ SearchTabPage_Impl::SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl
if ( aUserItem >>= aTemp )
{
aUserData = String( aTemp );
- BOOL bChecked = ( 1 == aUserData.GetToken(0).ToInt32() ) ? TRUE : FALSE;
+ sal_Bool bChecked = ( 1 == aUserData.GetToken(0).ToInt32() ) ? sal_True : sal_False;
aFullWordsCB.Check( bChecked );
- bChecked = ( 1 == aUserData.GetToken(1).ToInt32() ) ? TRUE : FALSE;
+ bChecked = ( 1 == aUserData.GetToken(1).ToInt32() ) ? sal_True : sal_False;
aScopeCB.Check( bChecked );
- for ( USHORT i = 2; i < aUserData.GetTokenCount(); ++i )
+ for ( sal_uInt16 i = 2; i < aUserData.GetTokenCount(); ++i )
{
String aToken = aUserData.GetToken(i);
aSearchED.InsertEntry( INetURLObject::decode(
@@ -1039,9 +1039,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
nChecked = aScopeCB.IsChecked() ? 1 : 0;
aUserData += String::CreateFromInt32( nChecked );
aUserData += ';';
- USHORT nCount = Min( aSearchED.GetEntryCount(), (USHORT)10 ); // save only 10 entries
+ sal_uInt16 nCount = Min( aSearchED.GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
rtl::OUString aText = aSearchED.GetEntry(i);
aUserData += String(INetURLObject::encode(
@@ -1059,9 +1059,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
void SearchTabPage_Impl::ClearSearchResults()
{
- USHORT nCount = aResultsLB.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
- delete (String*)(ULONG)aResultsLB.GetEntryData(i);
+ sal_uInt16 nCount = aResultsLB.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ delete (String*)(sal_uIntPtr)aResultsLB.GetEntryData(i);
aResultsLB.Clear();
aResultsLB.Update();
}
@@ -1070,7 +1070,7 @@ void SearchTabPage_Impl::ClearSearchResults()
void SearchTabPage_Impl::RememberSearchText( const String& rSearchText )
{
- for ( USHORT i = 0; i < aSearchED.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aSearchED.GetEntryCount(); ++i )
{
if ( rSearchText == aSearchED.GetEntry(i) )
{
@@ -1103,7 +1103,7 @@ IMPL_LINK( SearchTabPage_Impl, SearchHdl, PushButton*, EMPTYARG )
aSearchURL += DEFINE_CONST_UNICODE("&Scope=Heading");
Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aSearchURL );
const ::rtl::OUString* pFacs = aFactories.getConstArray();
- UINT32 i, nCount = aFactories.getLength();
+ sal_uInt32 i, nCount = aFactories.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFacs[i] );
@@ -1112,8 +1112,8 @@ IMPL_LINK( SearchTabPage_Impl, SearchHdl, PushButton*, EMPTYARG )
aTitle = aRow.GetToken( 0, '\t', nIdx );
aType = aRow.GetToken( 0, '\t', nIdx );
String* pURL = new String( aRow.GetToken( 0, '\t', nIdx ) );
- USHORT nPos = aResultsLB.InsertEntry( aTitle );
- aResultsLB.SetEntryData( nPos, (void*)(ULONG)pURL );
+ sal_uInt16 nPos = aResultsLB.InsertEntry( aTitle );
+ aResultsLB.SetEntryData( nPos, (void*)(sal_uIntPtr)pURL );
}
LeaveWait();
@@ -1214,7 +1214,7 @@ void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
String SearchTabPage_Impl::GetSelectEntry() const
{
String aRet;
- String* pData = (String*)(ULONG)aResultsLB.GetEntryData( aResultsLB.GetSelectEntryPos() );
+ String* pData = (String*)(sal_uIntPtr)aResultsLB.GetEntryData( aResultsLB.GetSelectEntryPos() );
if ( pData )
aRet = String( *pData );
return aRet;
@@ -1282,11 +1282,11 @@ BookmarksBox_Impl::~BookmarksBox_Impl()
SvtHistoryOptions aHistOpt;
aHistOpt.Clear( eHELPBOOKMARKS );
rtl::OUString sEmpty;
- USHORT nCount = GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
String aTitle = GetEntry(i);
- String* pURL = (String*)(ULONG)GetEntryData(i);
+ String* pURL = (String*)(sal_uIntPtr)GetEntryData(i);
aHistOpt.AppendItem( eHELPBOOKMARKS, rtl::OUString( *pURL ), sEmpty, rtl::OUString( aTitle ), sEmpty );
delete pURL;
}
@@ -1294,7 +1294,7 @@ BookmarksBox_Impl::~BookmarksBox_Impl()
// -----------------------------------------------------------------------
-void BookmarksBox_Impl::DoAction( USHORT nAction )
+void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
{
switch ( nAction )
{
@@ -1304,19 +1304,19 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
case MID_RENAME :
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SfxAddHelpBookmarkDialog_Impl aDlg( this, sal_True );
aDlg.SetTitle( GetEntry( nPos ) );
if ( aDlg.Execute() == RET_OK )
{
- String* pURL = (String*)(ULONG)GetEntryData( nPos );
+ String* pURL = (String*)(sal_uIntPtr)GetEntryData( nPos );
RemoveEntry( nPos );
rtl::OUString aImageURL = IMAGE_URL;
aImageURL += INetURLObject( *pURL ).GetHost();
nPos = InsertEntry( aDlg.GetTitle(), SvFileInformationManager::GetImage( aImageURL ) );
- SetEntryData( nPos, (void*)(ULONG)( new String( *pURL ) ) );
+ SetEntryData( nPos, (void*)(sal_uIntPtr)( new String( *pURL ) ) );
SelectEntryPos( nPos );
delete pURL;
}
@@ -1326,11 +1326,11 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
case MID_DELETE :
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
RemoveEntry( nPos );
- USHORT nCount = GetEntryCount();
+ sal_uInt16 nCount = GetEntryCount();
if ( nCount )
{
if ( nPos >= nCount )
@@ -1348,10 +1348,10 @@ void BookmarksBox_Impl::DoAction( USHORT nAction )
long BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
{
long nRet = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_KEYINPUT == nType )
{
- USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
if ( KEY_DELETE == nCode && GetEntryCount() > 0 )
{
DoAction( MID_DELETE );
@@ -1403,7 +1403,7 @@ BookmarksTabPage_Impl::BookmarksTabPage_Impl( Window* pParent, SfxHelpIndexWindo
::rtl::OUString aTitle;
::rtl::OUString aURL;
- UINT32 i, nCount = aBookmarkSeq.getLength();
+ sal_uInt32 i, nCount = aBookmarkSeq.getLength();
for ( i = 0; i < nCount; ++i )
{
GetBookmarkEntry_Impl( aBookmarkSeq[i], aTitle, aURL );
@@ -1476,7 +1476,7 @@ void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
String BookmarksTabPage_Impl::GetSelectEntry() const
{
String aRet;
- String* pData = (String*)(ULONG)aBookmarksBox.GetEntryData( aBookmarksBox.GetSelectEntryPos() );
+ String* pData = (String*)(sal_uIntPtr)aBookmarksBox.GetEntryData( aBookmarksBox.GetSelectEntryPos() );
if ( pData )
aRet = String( *pData );
return aRet;
@@ -1488,8 +1488,8 @@ void BookmarksTabPage_Impl::AddBookmarks( const String& rTitle, const String& rU
{
rtl::OUString aImageURL = IMAGE_URL;
aImageURL += INetURLObject( rURL ).GetHost();
- USHORT nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL ) );
- aBookmarksBox.SetEntryData( nPos, (void*)(ULONG)( new String( rURL ) ) );
+ sal_uInt16 nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL ) );
+ aBookmarksBox.SetEntryData( nPos, (void*)(sal_uIntPtr)( new String( rURL ) ) );
}
// class SfxHelpIndexWindow_Impl -----------------------------------------
@@ -1611,7 +1611,7 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* _pParent )
SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
if ( aViewOpt.Exists() )
nPageId = aViewOpt.GetPageID();
- aTabCtrl.SetCurPageId( (USHORT)nPageId );
+ aTabCtrl.SetCurPageId( (sal_uInt16)nPageId );
ActivatePageHdl( &aTabCtrl );
aActiveLB.SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl ) );
nMinWidth = ( aActiveLB.GetSizePixel().Width() / 2 );
@@ -1632,8 +1632,8 @@ SfxHelpIndexWindow_Impl::~SfxHelpIndexWindow_Impl()
DELETEZ( pSPage );
DELETEZ( pBPage );
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
- delete (String*)(ULONG)aActiveLB.GetEntryData(i);
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ delete (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN );
aViewOpt.SetPageID( (sal_Int32)aTabCtrl.GetCurPageId() );
@@ -1647,7 +1647,7 @@ void SfxHelpIndexWindow_Impl::Initialize()
AppendConfigToken_Impl( aHelpURL, sal_True );
Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpURL );
const ::rtl::OUString* pFacs = aFactories.getConstArray();
- UINT32 i, nCount = aFactories.getLength();
+ sal_uInt32 i, nCount = aFactories.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFacs[i] );
@@ -1657,11 +1657,11 @@ void SfxHelpIndexWindow_Impl::Initialize()
aType = aRow.GetToken( 0, '\t', nIdx );
aURL = aRow.GetToken( 0, '\t', nIdx );
String* pFactory = new String( INetURLObject( aURL ).GetHost() );
- USHORT nPos = aActiveLB.InsertEntry( aTitle );
- aActiveLB.SetEntryData( nPos, (void*)(ULONG)pFactory );
+ sal_uInt16 nPos = aActiveLB.InsertEntry( aTitle );
+ aActiveLB.SetEntryData( nPos, (void*)(sal_uIntPtr)pFactory );
}
- aActiveLB.SetDropDownLineCount( (USHORT)nCount );
+ aActiveLB.SetDropDownLineCount( (sal_uInt16)nCount );
if ( aActiveLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
SetActiveFactory();
}
@@ -1677,9 +1677,9 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
InitHdl( NULL );
}
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData(i);
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
pFactory->ToLowerAscii();
if ( *pFactory == pIPage->GetFactory() )
{
@@ -1695,7 +1695,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
// -----------------------------------------------------------------------
-HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( USHORT& rCurId )
+HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( sal_uInt16& rCurId )
{
rCurId = aTabCtrl.GetCurPageId();
HelpTabPage_Impl* pPage = NULL;
@@ -1735,7 +1735,7 @@ HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( USHORT& rCurId )
IMPL_LINK( SfxHelpIndexWindow_Impl, ActivatePageHdl, TabControl *, pTabCtrl )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
TabPage* pPage = GetCurrentPage( nId );
pTabCtrl->SetTabPage( nId, pPage );
return 0;
@@ -1768,7 +1768,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, InitHdl, Timer *, EMPTYARG )
IMPL_LINK( SfxHelpIndexWindow_Impl, SelectFactoryHdl, Timer *, EMPTYARG )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
if ( pFactory )
{
String aFactory( *pFactory );
@@ -1790,7 +1790,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, KeywordHdl, IndexTabPage_Impl *, EMPTYARG )
if( !bIndex)
bIndex = pIPage->HasKeywordIgnoreCase();
// then set index or search page as current.
- USHORT nPageId = ( bIndex ) ? HELP_INDEX_PAGE_INDEX : HELP_INDEX_PAGE_SEARCH;
+ sal_uInt16 nPageId = ( bIndex ) ? HELP_INDEX_PAGE_INDEX : HELP_INDEX_PAGE_SEARCH;
if ( nPageId != aTabCtrl.GetCurPageId() )
{
aTabCtrl.SetCurPageId( nPageId );
@@ -1834,20 +1834,20 @@ void SfxHelpIndexWindow_Impl::Resize()
long SfxHelpIndexWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
long nDone = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_TAB == nCode )
{
// don't exit index pane with <TAB>
- USHORT nPageId = 0;
+ sal_uInt16 nPageId = 0;
HelpTabPage_Impl* pCurPage = GetCurrentPage( nPageId );
Control* pControl = pCurPage->GetLastFocusControl();
- BOOL bShift = rKeyCode.IsShift();
- BOOL bCtrl = rKeyCode.IsMod1();
+ sal_Bool bShift = rKeyCode.IsShift();
+ sal_Bool bCtrl = rKeyCode.IsMod1();
if ( !bCtrl && bShift && aActiveLB.HasChildPathFocus() )
{
pControl->GrabFocus();
@@ -1865,7 +1865,7 @@ long SfxHelpIndexWindow_Impl::PreNotify( NotifyEvent& rNEvt )
nPageId++;
else
nPageId = HELP_INDEX_PAGE_FIRST;
- aTabCtrl.SetCurPageId( (USHORT)nPageId );
+ aTabCtrl.SetCurPageId( (sal_uInt16)nPageId );
ActivatePageHdl( &aTabCtrl );
nDone = 1;
}
@@ -1963,9 +1963,9 @@ void SfxHelpIndexWindow_Impl::AddBookmarks( const String& rTitle, const String&
bool SfxHelpIndexWindow_Impl::IsValidFactory( const String& _rFactory )
{
bool bValid = false;
- for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aActiveLB.GetEntryCount(); ++i )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData(i);
+ String* pFactory = (String*)(sal_uIntPtr)aActiveLB.GetEntryData(i);
if ( *pFactory == _rFactory )
{
bValid = true;
@@ -2227,7 +2227,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
// Attention: This check boy knows two states:
// 1) Reading of the config key fails with an exception or by getting an empty Any (!) => check box must be hidden
- // 2) We read TRUE/FALSE => check box must be shown and enabled/disabled
+ // 2) We read sal_True/sal_False => check box must be shown and enabled/disabled
bool bHideBox = true;
sal_Bool bHelpAtStartup = sal_False;
@@ -2364,7 +2364,7 @@ Reference< XTextRange > SfxHelpTextWindow_Impl::getCursor() const
bool SfxHelpTextWindow_Impl::isHandledKey( const KeyCode& _rKeyCode )
{
bool bRet = false;
- USHORT nCode = _rKeyCode.GetCode();
+ sal_uInt16 nCode = _rKeyCode.GetCode();
// the keys <STRG><A> (select all), <STRG><C> (copy),
// <STRG><F> (find), <STRG><P> (print) and <STRG><W> (close window)
@@ -2573,7 +2573,7 @@ void SfxHelpTextWindow_Impl::Resize()
long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
long nDone = 0;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( EVENT_COMMAND == nType && rNEvt.GetCommandEvent() )
{
const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent();
@@ -2652,7 +2652,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if( SvtMenuOptions().IsEntryHidingEnabled() == sal_False )
aMenu.SetMenuFlags( aMenu.GetMenuFlags() | MENU_FLAG_HIDEDISABLEDENTRIES );
- USHORT nId = aMenu.Execute( this, aPos );
+ sal_uInt16 nId = aMenu.Execute( this, aPos );
pHelpWin->DoAction( nId );
nDone = 1;
}
@@ -2661,8 +2661,8 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyGroup = rKeyCode.GetGroup();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKeyGroup = rKeyCode.GetGroup();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( KEYGROUP_ALPHA == nKeyGroup && !isHandledKey( rKeyCode ) )
{
// do nothing disables the writer accelerators
@@ -2868,23 +2868,23 @@ void SfxHelpWindow_Impl::Split()
nIndexSize = GetItemSize( INDEXWIN_ID );
nTextSize = GetItemSize( TEXTWIN_ID );
- BOOL bMod = FALSE;
+ sal_Bool bMod = sal_False;
if( nIndexSize < nMinSplitSize )
{
nIndexSize = nMinSplitSize;
nTextSize = nMaxSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
else if( nTextSize < nMinSplitSize )
{
nTextSize = nMinSplitSize;
nIndexSize = nMaxSplitSize;
- bMod = TRUE;
+ bMod = sal_True;
}
else
- bMod = FALSE;
+ bMod = sal_False;
if( bMod )
{
@@ -2993,7 +2993,7 @@ void SfxHelpWindow_Impl::LoadConfig()
{
aUserData = String( aTemp );
DBG_ASSERT( aUserData.GetTokenCount() == 6, "invalid user data" );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
nIndexSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
nTextSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
sal_Int32 nWidth = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
@@ -3086,9 +3086,9 @@ IMPL_LINK( SfxHelpWindow_Impl, OpenHdl, SfxHelpIndexWindow_Impl* , EMPTYARG )
::rtl::OUString sHelpURL;
// INetURLObject aObj(aEntry);
-// BOOL bComplete = ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP );
+// sal_Bool bComplete = ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP );
- BOOL bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString::createFromAscii("vnd.sun.star.help"),0);
+ sal_Bool bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString::createFromAscii("vnd.sun.star.help"),0);
if (bComplete)
sHelpURL = ::rtl::OUString(aEntry);
@@ -3266,7 +3266,7 @@ long SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
// Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT>
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( ( rKeyCode.IsMod2() && ( KEY_LEFT == nKey || KEY_RIGHT == nKey ) ) ||
( !rKeyCode.GetModifier() && KEY_BACKSPACE == nKey && !pIndexWin->HasFocusOnEdit() ) )
{
@@ -3309,7 +3309,7 @@ void SfxHelpWindow_Impl::SetHelpURL( const String& rURL )
// -----------------------------------------------------------------------
-void SfxHelpWindow_Impl::DoAction( USHORT nActionId )
+void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId )
{
switch ( nActionId )
{
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 95a5bfe52230..fb34640f93ef 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -64,7 +64,7 @@ private:
String m_sURL;
public:
- OpenStatusListener_Impl() : m_bFinished( FALSE ), m_bSuccess( FALSE ) {}
+ OpenStatusListener_Impl() : m_bFinished( sal_False ), m_bSuccess( sal_False ) {}
virtual void SAL_CALL dispatchFinished( const ::com::sun::star::frame::DispatchResultEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
@@ -267,7 +267,7 @@ public:
class BookmarksBox_Impl : public ListBox
{
private:
- void DoAction( USHORT nAction );
+ void DoAction( sal_uInt16 nAction );
public:
BookmarksBox_Impl( Window* pParent, const ResId& rResId );
@@ -331,7 +331,7 @@ private:
void Initialize();
void SetActiveFactory();
- HelpTabPage_Impl* GetCurrentPage( USHORT& rCurId );
+ HelpTabPage_Impl* GetCurrentPage( sal_uInt16& rCurId );
inline ContentTabPage_Impl* GetContentPage();
inline IndexTabPage_Impl* GetIndexPage();
@@ -566,7 +566,7 @@ public:
void SetFactory( const String& rFactory );
void SetHelpURL( const String& rURL );
- void DoAction( USHORT nActionId );
+ void DoAction( sal_uInt16 nActionId );
void CloseWindow();
void UpdateToolbox();
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 328bca2522b5..6bd233949ddf 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -68,7 +68,7 @@ using namespace ::cppu;
//-----------------------------------------------------------------------------
-USHORT SvxOpenGrfErr2ResId( short err )
+sal_uInt16 SvxOpenGrfErr2ResId( short err )
{
switch( err )
{
@@ -118,10 +118,10 @@ SvxOpenGraphicDialog::~SvxOpenGraphicDialog()
short SvxOpenGraphicDialog::Execute()
{
- USHORT nImpRet;
- BOOL bQuitLoop(FALSE);
+ sal_uInt16 nImpRet;
+ sal_Bool bQuitLoop(sal_False);
- while( bQuitLoop == FALSE &&
+ while( bQuitLoop == sal_False &&
mpImpl->aFileDlg.Execute() == ERRCODE_NONE )
{
if( GetPath().Len() )
@@ -131,14 +131,14 @@ short SvxOpenGraphicDialog::Execute()
// check whether we can load the graphic
String aCurFilter( GetCurrentFilter() );
- USHORT nFormatNum = pFilter->GetImportFormatNumber( aCurFilter );
- USHORT nRetFormat = 0;
- USHORT nFound = USHRT_MAX;
+ sal_uInt16 nFormatNum = pFilter->GetImportFormatNumber( aCurFilter );
+ sal_uInt16 nRetFormat = 0;
+ sal_uInt16 nFound = USHRT_MAX;
// non-local?
if ( INET_PROT_FILE != aObj.GetProtocol() )
{
- SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, TRUE );
+ SfxMedium aMed( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, sal_True );
aMed.DownLoad();
SvStream* pStream = aMed.GetInStream();
@@ -169,7 +169,7 @@ short SvxOpenGraphicDialog::Execute()
if ( nFound == USHRT_MAX )
{
WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, String( SfxResId( SvxOpenGrfErr2ResId(nImpRet) ) ) );
- bQuitLoop = aWarningBox.Execute()==RET_RETRY ? FALSE : TRUE;
+ bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True;
}
else
{
@@ -284,7 +284,7 @@ void SvxOpenGraphicDialog::SetCurrentFilter(const String& rStr)
mpImpl->aFileDlg.SetCurrentFilter(rStr);
}
-void SvxOpenGraphicDialog::SetControlHelpIds( const INT16* _pControlId, const char** _pHelpId )
+void SvxOpenGraphicDialog::SetControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
{
mpImpl->aFileDlg.SetControlHelpIds( _pControlId, _pHelpId );
}
diff --git a/sfx2/source/appl/panelist.hxx b/sfx2/source/appl/panelist.hxx
index 2406709aede9..7cbf2a19e628 100644
--- a/sfx2/source/appl/panelist.hxx
+++ b/sfx2/source/appl/panelist.hxx
@@ -33,17 +33,17 @@ namespace sfx2
{
// source in newhelp.cxx
- void HandleTaskPaneList( Window* pWindow, BOOL bAddToList );
+ void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList );
// pWindow: just a system window or something which is child of a system window
inline void AddToTaskPaneList( Window* pWindowToBeHandled )
{
- HandleTaskPaneList( pWindowToBeHandled, TRUE );
+ HandleTaskPaneList( pWindowToBeHandled, sal_True );
}
inline void RemoveFromTaskPaneList( Window* pWindowToBeHandled )
{
- HandleTaskPaneList( pWindowToBeHandled, FALSE );
+ HandleTaskPaneList( pWindowToBeHandled, sal_False );
}
}
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index bab37281cb05..855369c11bc9 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -190,7 +190,7 @@ sal_Bool GetHelpAnchor_Impl( const String& _rURL, String& _rAnchor )
// --> OD 2009-07-01 #159496#
// do not release solar mutex due to crash regarding accessibility
-// ULONG nSolarCount = Application::ReleaseSolarMutex();
+// sal_uIntPtr nSolarCount = Application::ReleaseSolarMutex();
// <--
try
{
@@ -901,17 +901,17 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
return sHelpText;
}
-BOOL SfxHelp::SearchKeyword( const XubString& rKeyword )
+sal_Bool SfxHelp::SearchKeyword( const XubString& rKeyword )
{
return Start_Impl( String(), NULL, rKeyword );
}
-BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
+sal_Bool SfxHelp::Start( const String& rURL, const Window* pWindow )
{
return Start_Impl( rURL, pWindow, String() );
}
-BOOL SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const String& rKeyword )
+sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const String& rKeyword )
{
// check if help is available
String aHelpRootURL( DEFINE_CONST_OUSTRING("vnd.sun.star.help://") );
@@ -922,7 +922,7 @@ BOOL SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const Strin
// no factories -> no help -> error message and return
NoHelpErrorBox aErrBox( const_cast< Window* >( pWindow ) );
aErrBox.Execute();
- return FALSE;
+ return sal_False;
}
/* rURL may be
@@ -992,7 +992,7 @@ BOOL SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const Strin
else
pHelpWindow = (SfxHelpWindow_Impl*)VCLUnoHelper::GetWindow(xHelp->getComponentWindow());
if (!xHelp.is() || !xHelpContent.is() || !pHelpWindow)
- return FALSE;
+ return sal_False;
#ifdef DBG_UTIL
ByteString aTmp("SfxHelp: HelpId = ");
@@ -1009,7 +1009,7 @@ BOOL SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const Strin
if ( xTopWindow.is() )
xTopWindow->toFront();
- return TRUE;
+ return sal_True;
}
String SfxHelp::CreateHelpURL( const String& aCommandURL, const String& rModuleName )
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 0074faac192f..59a753fdb2c4 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -100,7 +100,7 @@ osl::Mutex* SfxPickList::GetOrCreateMutex()
return pMutex;
}
-void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const String& aURLString, sal_uInt32 nNo )
+void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURLString, sal_uInt32 nNo )
{
String aPickEntry;
@@ -292,8 +292,8 @@ void SfxPickList::CreateMenuEntries( Menu* pMenu )
{
PickListEntry* pEntry = GetPickListEntry( i );
- pMenu->InsertItem( (USHORT)(START_ITEMID_PICKLIST + i), aEmptyString );
- CreatePicklistMenuTitle( pMenu, (USHORT)(START_ITEMID_PICKLIST + i), pEntry->aName, i );
+ pMenu->InsertItem( (sal_uInt16)(START_ITEMID_PICKLIST + i), aEmptyString );
+ CreatePicklistMenuTitle( pMenu, (sal_uInt16)(START_ITEMID_PICKLIST + i), pEntry->aName, i );
}
bPickListMenuInitializing = sal_False;
@@ -314,7 +314,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
String aFilter( pPick->aFilter );
aGuard.clear();
- USHORT nPos=aFilter.Search('|');
+ sal_uInt16 nPos=aFilter.Search('|');
if( nPos != STRING_NOTFOUND )
{
String aOptions(aFilter.Copy( nPos ).GetBuffer()+1);
@@ -328,7 +328,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
}
}
-void SfxPickList::ExecuteMenuEntry( USHORT nId )
+void SfxPickList::ExecuteMenuEntry( sal_uInt16 nId )
{
ExecuteEntry( (sal_uInt32)( nId - START_ITEMID_PICKLIST ) );
}
@@ -446,7 +446,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
return;
// ignore hidden documents
- if ( !SfxViewFrame::GetFirst( pDocSh, TRUE ) )
+ if ( !SfxViewFrame::GetFirst( pDocSh, sal_True ) )
return;
::rtl::OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 3c323b05fd72..f7053321ddfa 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -749,14 +749,14 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
void ShutdownIcon::EnterModalMode()
{
- bModalMode = TRUE;
+ bModalMode = sal_True;
}
// -------------------------------
void ShutdownIcon::LeaveModalMode()
{
- bModalMode = FALSE;
+ bModalMode = sal_False;
}
#ifdef WNT
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index b9799f5818b7..c9c9e06ae248 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -76,7 +76,7 @@ static void menu_deactivate_cb( GtkWidget *pMenu )
gtk_menu_popdown( GTK_MENU( pMenu ) );
}
-static GdkPixbuf * ResIdToPixbuf( USHORT nResId )
+static GdkPixbuf * ResIdToPixbuf( sal_uInt16 nResId )
{
ResId aResId( SV_ICON_SMALL_START + nResId, *pVCLResMgr );
BitmapEx aIcon( aResId );
@@ -120,7 +120,7 @@ static GdkPixbuf * ResIdToPixbuf( USHORT nResId )
pInSalAlpha.ReleaseAccess( pSalAlpha );
return gdk_pixbuf_new_from_data( pPixbufData,
- GDK_COLORSPACE_RGB, TRUE, 8,
+ GDK_COLORSPACE_RGB, sal_True, 8,
aSize.Width(), aSize.Height(),
aSize.Width() * 4,
(GdkPixbufDestroyNotify) g_free,
@@ -138,7 +138,7 @@ static void oustring_delete (gpointer data,
static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
OUString *pOverrideLabel,
- USHORT nResId, GCallback pFnCallback )
+ sal_uInt16 nResId, GCallback pFnCallback )
{
OUString *pURL = new OUString (OStringToOUString( pAsciiURL,
RTL_TEXTENCODING_UTF8 ));
@@ -171,7 +171,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
- USHORT nResId, GCallback pFnCallback )
+ sal_uInt16 nResId, GCallback pFnCallback )
{
SvtDynamicMenuOptions aOpt;
Sequence < Sequence < PropertyValue > > aMenu = aOpt.GetMenu( E_NEWMENU );
@@ -311,7 +311,7 @@ layout_menu( GtkMenu *menu,
else
(*y) += ebox->allocation.height;
- *push_in = TRUE;
+ *push_in = sal_True;
}
}
@@ -319,14 +319,14 @@ static gboolean display_menu_cb( GtkWidget *,
GdkEventButton *event, GtkWidget *pMenu )
{
if (event->button == 2)
- return FALSE;
+ return sal_False;
#ifdef TEMPLATE_DIALOG_MORE_POLISHED
if (event->button == 1 &&
event->type == GDK_2BUTTON_PRESS)
{
open_template_cb( NULL );
- return TRUE;
+ return sal_True;
}
if (event->button == 3)
{
@@ -338,7 +338,7 @@ static gboolean display_menu_cb( GtkWidget *,
gtk_menu_popup( GTK_MENU( pMenu ), NULL, NULL,
layout_menu, NULL, 0, event->time );
- return TRUE;
+ return sal_True;
}
extern "C" {
@@ -347,7 +347,7 @@ extern "C" {
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
gtk_widget_show_all( GTK_WIDGET( pTrayIcon ) );
- return FALSE;
+ return sal_False;
}
}
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 2224643bc88f..0692b85afcda 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -76,7 +76,7 @@ namespace css = ::com::sun::star;
struct ResIdToResName
{
- USHORT nId;
+ sal_uInt16 nId;
const char* pName;
};
@@ -305,23 +305,23 @@ throw (css::uno::RuntimeException)
{
if ( eLayoutEvent == css::frame::LayoutManagerEvents::VISIBLE )
{
- m_pWrkWin->MakeVisible_Impl( TRUE );
+ m_pWrkWin->MakeVisible_Impl( sal_True );
m_pWrkWin->ShowChilds_Impl();
- m_pWrkWin->ArrangeChilds_Impl( TRUE );
+ m_pWrkWin->ArrangeChilds_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::INVISIBLE )
{
- m_pWrkWin->MakeVisible_Impl( FALSE );
+ m_pWrkWin->MakeVisible_Impl( sal_False );
m_pWrkWin->HideChilds_Impl();
- m_pWrkWin->ArrangeChilds_Impl( TRUE );
+ m_pWrkWin->ArrangeChilds_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::LOCK )
{
- m_pWrkWin->Lock_Impl( TRUE );
+ m_pWrkWin->Lock_Impl( sal_True );
}
else if ( eLayoutEvent == css::frame::LayoutManagerEvents::UNLOCK )
{
- m_pWrkWin->Lock_Impl( FALSE );
+ m_pWrkWin->Lock_Impl( sal_False );
}
}
}
@@ -333,7 +333,7 @@ typedef std::hash_map< sal_Int32, rtl::OUString > ToolBarResIdToResourceURLMap;
static sal_Bool bMapInitialized = sal_False;
static ToolBarResIdToResourceURLMap aResIdToResourceURLMap;
-static rtl::OUString GetResourceURLFromResId( USHORT nResId )
+static rtl::OUString GetResourceURLFromResId( sal_uInt16 nResId )
{
if ( !bMapInitialized )
{
@@ -359,20 +359,20 @@ static rtl::OUString GetResourceURLFromResId( USHORT nResId )
return rtl::OUString();
}
-BOOL IsAppWorkWinToolbox_Impl( USHORT nPos )
+sal_Bool IsAppWorkWinToolbox_Impl( sal_uInt16 nPos )
{
switch ( nPos )
{
case SFX_OBJECTBAR_APPLICATION :
case SFX_OBJECTBAR_MACRO:
case SFX_OBJECTBAR_FULLSCREEN:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
-USHORT TbxMatch( USHORT nPos )
+sal_uInt16 TbxMatch( sal_uInt16 nPos )
{
switch ( nPos )
{
@@ -395,9 +395,9 @@ USHORT TbxMatch( USHORT nPos )
}
}
-USHORT ChildAlignValue(SfxChildAlignment eAlign)
+sal_uInt16 ChildAlignValue(SfxChildAlignment eAlign)
{
- USHORT ret = 17;
+ sal_uInt16 ret = 17;
switch (eAlign)
{
@@ -456,9 +456,9 @@ USHORT ChildAlignValue(SfxChildAlignment eAlign)
return ret;
}
-USHORT ChildTravelValue( SfxChildAlignment eAlign )
+sal_uInt16 ChildTravelValue( SfxChildAlignment eAlign )
{
- USHORT ret = 17;
+ sal_uInt16 ret = 17;
switch (eAlign)
{
@@ -520,12 +520,12 @@ USHORT ChildTravelValue( SfxChildAlignment eAlign )
void SfxWorkWindow::Sort_Impl()
{
aSortedList.Remove(0, aSortedList.Count());
- for (USHORT i=0; i<pChilds->Count(); i++)
+ for (sal_uInt16 i=0; i<pChilds->Count(); i++)
{
SfxChild_Impl *pCli = (*pChilds)[i];
if (pCli)
{
- USHORT k;
+ sal_uInt16 k;
for (k=0; k<aSortedList.Count(); k++)
// if ( (*pChilds)[aSortedList[k]]->eAlign > pCli->eAlign )
if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) >
@@ -535,7 +535,7 @@ void SfxWorkWindow::Sort_Impl()
}
}
- bSorted = TRUE;
+ bSorted = sal_True;
}
@@ -559,7 +559,7 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm, SfxFra
}
// Die ben"otigten SplitWindows (je eins f"ur jede Seite) werden erzeugt
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// Die SplitWindows sind direkte ChildWindows des WorkWindows und enthalten
// die angedockten Fenster.
@@ -589,12 +589,12 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
pActiveChild( 0 ),
nChilds( 0 ),
nOrigMode( 0 ),
- bSorted( TRUE ),
- bDockingAllowed(TRUE),
- bInternalDockingAllowed(TRUE),
- bAllChildsVisible(TRUE),
- bIsFullScreen( FALSE ),
- bShowStatusBar( TRUE ),
+ bSorted( sal_True ),
+ bDockingAllowed(sal_True),
+ bInternalDockingAllowed(sal_True),
+ bAllChildsVisible(sal_True),
+ bIsFullScreen( sal_False ),
+ bShowStatusBar( sal_True ),
m_nLock( 0 ),
m_aStatusBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" )),
m_aLayoutManagerPropName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )),
@@ -612,7 +612,7 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
// F"ur die ObjectBars wird ein fester Platz in der ChildList reserviert,
// damit sie immer in einer definierten Reihenfolge kommen.
SfxChild_Impl* pChild=0;
- for (USHORT n=0; n < SFX_OBJECTBAR_MAX; ++n)
+ for (sal_uInt16 n=0; n < SFX_OBJECTBAR_MAX; ++n)
pChilds->Insert(0,pChild);
// create and initialize layout manager listener
@@ -632,7 +632,7 @@ SfxWorkWindow::~SfxWorkWindow()
DBG_DTOR(SfxWorkWindow, 0);
// SplitWindows l"oschen
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
if (p->GetWindowCount())
@@ -657,7 +657,7 @@ SystemWindow* SfxWorkWindow::GetTopWindow() const
return (SystemWindow*) pRet;
}
-void SfxWorkWindow::Lock_Impl( BOOL bLock )
+void SfxWorkWindow::Lock_Impl( sal_Bool bLock )
{
if ( bLock )
m_nLock++;
@@ -677,7 +677,7 @@ void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
{
Window *pOld = pWorkWin;
pWorkWin = pNew;
- for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pChilds->Count(); ++nPos )
{
SfxChild_Impl *pCli = (*pChilds)[nPos];
if ( pCli && pCli->pWin && pCli->pWin->GetParent() == pOld )
@@ -689,14 +689,14 @@ void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
void SfxWorkWindow::SaveStatus_Impl()
{
- USHORT nCount = pChildWins->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pChildWins->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxChildWin_Impl* pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if (pChild)
{
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChild->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChild, pCW->aInfo);
@@ -716,7 +716,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// SplitWindows locken (d.h. Resize-Reaktion an den
// DockingWindows unterdr"ucken)
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -733,7 +733,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
if (pChild)
{
/*
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChild->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChild, pCW->aInfo);
@@ -762,7 +762,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
//(*pChildWins)[n] = 0;
}
- //pChildWins->Remove((USHORT)0, nCount);
+ //pChildWins->Remove((sal_uInt16)0, nCount);
Reference< com::sun::star::frame::XFrame > xFrame = GetFrameInterface();
Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
@@ -787,10 +787,10 @@ void SfxWorkWindow::DeleteControllers_Impl()
ResetStatusBar_Impl();
// ObjectBars l"oschen( zuletzt, damit pChilds nicht tote Pointer enh"alt )
- for ( USHORT i = 0; i < aObjBarList.size(); i++ )
+ for ( sal_uInt16 i = 0; i < aObjBarList.size(); i++ )
{
// Nicht jede Position mu\s belegt sein
- USHORT nId = aObjBarList[i].nId;
+ sal_uInt16 nId = aObjBarList[i].nId;
if ( nId )
aObjBarList[i].nId = 0;
}
@@ -799,7 +799,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// ObjectBars werden alle auf einmal released, da sie einen
// festen zusammenh"angenden Bereich im Array pChilds belegen
pChilds->Remove(0, SFX_OBJECTBAR_MAX);
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds = 0;
}
@@ -807,12 +807,12 @@ void SfxWorkWindow::DeleteControllers_Impl()
//====================================================================
// Virtuelle Methode zum Anordnen der Childfenster.
-void SfxWorkWindow::ArrangeChilds_Impl( BOOL /*bForce*/)
+void SfxWorkWindow::ArrangeChilds_Impl( sal_Bool /*bForce*/)
{
Arrange_Impl();
}
-void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( BOOL bForce )
+void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( sal_Bool bForce )
{
if ( pFrame->IsClosing_Impl() || ( m_nLock && !bForce ))
return;
@@ -881,7 +881,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
Size aSize;
Rectangle aTmp( aClientArea );
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
if ( !pCli->pWin )
@@ -900,7 +900,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize = pCli->pWin->GetSizePixel();
SvBorder aTemp = aBorder;
- BOOL bAllowHiding = TRUE;
+ sal_Bool bAllowHiding = sal_True;
switch ( pCli->eAlign )
{
case SFX_ALIGN_HIGHESTTOP:
@@ -910,7 +910,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = ((SplitWindow *)(pCli->pWin))->CalcLayoutSizePixel( aSize );
- bAllowHiding = FALSE;
+ bAllowHiding = sal_False;
aBorder.Top() += aSize.Height();
aPos = aTmp.TopLeft();
aTmp.Top() += aSize.Height();
@@ -940,7 +940,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = ((SplitWindow *)(pCli->pWin))->CalcLayoutSizePixel( aSize );
- bAllowHiding = FALSE;
+ bAllowHiding = sal_False;
aBorder.Left() += aSize.Width();
aPos = aTmp.TopLeft();
aTmp.Left() += aSize.Width();
@@ -965,12 +965,12 @@ SvBorder SfxWorkWindow::Arrange_Impl()
default:
pCli->aSize = pCli->pWin->GetSizePixel();
- pCli->bResize = FALSE;
+ pCli->bResize = sal_False;
continue;
}
pCli->pWin->SetPosSizePixel( aPos, aSize );
- pCli->bResize = FALSE;
+ pCli->bResize = sal_False;
pCli->aSize = aSize;
if( bAllowHiding && !RequestTopToolSpacePixel_Impl( aBorder ) )
{
@@ -1012,13 +1012,13 @@ SvBorder SfxWorkWindow::Arrange_Impl()
void SfxWorkWindow::Close_Impl()
{
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if (pChild)
{
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChild->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChild, pCW->aInfo);
@@ -1026,23 +1026,23 @@ void SfxWorkWindow::Close_Impl()
}
}
-BOOL SfxWorkWindow::PrepareClose_Impl()
+sal_Bool SfxWorkWindow::PrepareClose_Impl()
{
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
if ( pChild && !pChild->QueryClose() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
- SfxChildAlignment eAlign, BOOL bCanGetFocus )
+ SfxChildAlignment eAlign, sal_Bool bCanGetFocus )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
DBG_ASSERT( pChilds->Count() < 255, "too many childs" );
@@ -1058,7 +1058,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
pChild->bCanGetFocus = bCanGetFocus;
pChilds->Insert(pChilds->Count(), pChild);
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds++;
return (*pChilds)[pChilds->Count()-1];
}
@@ -1077,11 +1077,11 @@ void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
if ( pChild )
{
if (pChild->eAlign != eAlign)
- bSorted = FALSE;
+ bSorted = sal_False;
pChild->eAlign = eAlign;
pChild->aSize = rNewSize;
- pChild->bResize = TRUE;
+ pChild->bResize = sal_True;
}
else {
DBG_ERROR( "aligning unregistered child" );
@@ -1096,7 +1096,7 @@ void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
// DBG_ASSERT( pChilds, "releasing unregistered child" );
SfxChild_Impl *pChild = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pChilds->Count(); ++nPos )
{
pChild = (*pChilds)[nPos];
@@ -1107,7 +1107,7 @@ void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
if ( nPos < pChilds->Count() )
{
- bSorted = FALSE;
+ bSorted = sal_False;
nChilds--;
pChilds->Remove(nPos);
delete pChild;
@@ -1124,8 +1124,8 @@ SfxChild_Impl* SfxWorkWindow::FindChild_Impl( const Window& rWindow ) const
DBG_CHKTHIS(SfxWorkWindow, 0);
SfxChild_Impl *pChild = 0;
- USHORT nCount = pChilds->Count();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ sal_uInt16 nCount = pChilds->Count();
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
pChild = (*pChilds)[nPos];
if ( pChild )
@@ -1145,7 +1145,7 @@ void SfxWorkWindow::ShowChilds_Impl()
bool bInvisible = ( !IsVisible_Impl() || ( !pWorkWin->IsReallyVisible() && !pWorkWin->IsReallyShown() ));
SfxChild_Impl *pCli = 0;
- for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pChilds->Count(); ++nPos )
{
SfxChildWin_Impl* pCW = 0;
pCli = (*pChilds)[nPos];
@@ -1154,7 +1154,7 @@ void SfxWorkWindow::ShowChilds_Impl()
{
// We have to find the SfxChildWin_Impl to retrieve the
// SFX_CHILDWIN flags that can influence visibility.
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
SfxChildWin_Impl* pCWin = (*pChildWins)[n];
SfxChild_Impl* pChild = pCWin->pCli;
@@ -1177,21 +1177,21 @@ void SfxWorkWindow::ShowChilds_Impl()
if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) && bVisible )
{
- USHORT nFlags = pCli->bSetFocus ? 0 : SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE;
+ sal_uInt16 nFlags = pCli->bSetFocus ? 0 : SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE;
switch ( pCli->pWin->GetType() )
{
case RSC_DOCKINGWINDOW :
- ((DockingWindow*)pCli->pWin)->Show( TRUE, nFlags );
+ ((DockingWindow*)pCli->pWin)->Show( sal_True, nFlags );
break;
case RSC_SPLITWINDOW :
- ((SplitWindow*)pCli->pWin)->Show( TRUE, nFlags );
+ ((SplitWindow*)pCli->pWin)->Show( sal_True, nFlags );
break;
default:
- pCli->pWin->Show( TRUE, nFlags );
+ pCli->pWin->Show( sal_True, nFlags );
break;
}
- pCli->bSetFocus = FALSE;
+ pCli->bSetFocus = sal_False;
}
else
{
@@ -1214,7 +1214,7 @@ void SfxWorkWindow::ShowChilds_Impl()
void SfxWorkWindow::HideChilds_Impl()
{
SfxChild_Impl *pChild = 0;
- for ( USHORT nPos = pChilds->Count(); nPos > 0; --nPos )
+ for ( sal_uInt16 nPos = pChilds->Count(); nPos > 0; --nPos )
{
pChild = (*pChilds)[nPos-1];
if (pChild && pChild->pWin)
@@ -1236,7 +1236,7 @@ void SfxWorkWindow::HideChilds_Impl()
void SfxWorkWindow::ResetObjectBars_Impl()
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < aObjBarList.size(); n++ )
aObjBarList[n].bDestroy = sal_True;
@@ -1244,24 +1244,24 @@ void SfxWorkWindow::ResetObjectBars_Impl()
(*pChildWins)[n]->nId = 0;
}
-void SfxWorkWindow::NextObjectBar_Impl( USHORT )
+void SfxWorkWindow::NextObjectBar_Impl( sal_uInt16 )
{
}
-USHORT SfxWorkWindow::HasNextObjectBar_Impl( USHORT, String* )
+sal_uInt16 SfxWorkWindow::HasNextObjectBar_Impl( sal_uInt16, String* )
{
return 0;
}
//------------------------------------------------------------------------
-void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
+void SfxWorkWindow::SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
SfxInterface* pIFace, const String *pName)
{
DBG_ASSERT( (nPos & SFX_POSITION_MASK) < SFX_OBJECTBAR_MAX,
"object bar position overflow" );
- USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
{
pParent->SetObjectBar_Impl( nPos, nResId, pIFace, pName );
@@ -1270,7 +1270,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
SfxObjectBar_Impl aObjBar;
aObjBar.pIFace = pIFace;
- aObjBar.nId = sal::static_int_cast<USHORT>(nResId);
+ aObjBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
aObjBar.nPos = nRealPos;
aObjBar.nMode = (nPos & SFX_VISIBILITY_MASK);
if (pName)
@@ -1278,7 +1278,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
else
aObjBar.aName.Erase();
- for ( USHORT n=0; n<aObjBarList.size(); n++ )
+ for ( sal_uInt16 n=0; n<aObjBarList.size(); n++ )
{
if ( aObjBarList[n].nId == aObjBar.nId )
{
@@ -1292,7 +1292,7 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
//------------------------------------------------------------------------
-FASTBOOL SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
+bool SfxWorkWindow::KnowsObjectBar_Impl( sal_uInt16 nPos ) const
/* [Beschreibung]
@@ -1302,29 +1302,29 @@ FASTBOOL SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
*/
{
- USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
return pParent->KnowsObjectBar_Impl( nPos );
- for ( USHORT n=0; n<aObjBarList.size(); n++ )
+ for ( sal_uInt16 n=0; n<aObjBarList.size(); n++ )
{
if ( aObjBarList[n].nPos == nRealPos )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//------------------------------------------------------------------------
-BOOL SfxWorkWindow::IsVisible_Impl( USHORT nMode ) const
+sal_Bool SfxWorkWindow::IsVisible_Impl( sal_uInt16 nMode ) const
{
switch( nUpdateMode )
{
case SFX_VISIBILITY_STANDARD:
- return TRUE;
+ return sal_True;
case SFX_VISIBILITY_UNVISIBLE:
- return FALSE;
+ return sal_False;
case SFX_VISIBILITY_PLUGSERVER:
case SFX_VISIBILITY_PLUGCLIENT:
case SFX_VISIBILITY_CLIENT:
@@ -1336,7 +1336,7 @@ BOOL SfxWorkWindow::IsVisible_Impl( USHORT nMode ) const
}
}
-Window* SfxWorkWindow::GetObjectBar_Impl( USHORT, sal_uInt32 )
+Window* SfxWorkWindow::GetObjectBar_Impl( sal_uInt16, sal_uInt32 )
{
return NULL;
}
@@ -1365,7 +1365,7 @@ void SfxFrameWorkWin_Impl::UpdateObjectBars_Impl()
pWork = pWork->GetParent_Impl();
}
- ArrangeChilds_Impl( FALSE );
+ ArrangeChilds_Impl( sal_False );
pWork = pParent;
while ( pWork )
@@ -1445,7 +1445,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
{
// SplitWindows locken (d.h. Resize-Reaktion an den
// DockingWindows unterdr"ucken)
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -1482,18 +1482,18 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
xLayoutManager->lock();
for ( n = 0; n < aObjBarList.size(); ++n )
{
- USHORT nId = aObjBarList[n].nId;
+ sal_uInt16 nId = aObjBarList[n].nId;
sal_Bool bDestroy = aObjBarList[n].bDestroy;
// die Modi bestimmen, f"ur die die ToolBox gilt
- USHORT nTbxMode = aObjBarList[n].nMode;
- FASTBOOL bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
+ sal_uInt16 nTbxMode = aObjBarList[n].nMode;
+ bool bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
( nTbxMode & SFX_VISIBILITY_FULLSCREEN );
nTbxMode &= ~SFX_VISIBILITY_FULLSCREEN;
nTbxMode &= ~SFX_VISIBILITY_VIEWER;
// wird in diesem Kontext eine ToolBox gefordert?
- FASTBOOL bModesMatching = ( nUpdateMode && ( nTbxMode & nUpdateMode) == nUpdateMode );
+ bool bModesMatching = ( nUpdateMode && ( nTbxMode & nUpdateMode) == nUpdateMode );
if ( bDestroy )
{
rtl::OUString aTbxId( m_aTbxTypeName );
@@ -1535,7 +1535,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
{
SfxSplitWindow *p = pSplit[n];
if (p->GetWindowCount())
- p->Lock(FALSE);
+ p->Lock(sal_False);
}
}
@@ -1552,11 +1552,11 @@ bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW
void SfxWorkWindow::UpdateChildWindows_Impl()
{
// alle vorhandenen oder in den Kontext gekommenen ChildWindows
- for ( USHORT n=0; n<pChildWins->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pChildWins->Count(); n++ )
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChildWin = pCW->pWin;
- BOOL bCreate = FALSE;
+ sal_Bool bCreate = sal_False;
if ( pCW->nId && !pCW->bDisabled && (pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) )
{
// Im Kontext ist ein geeignetes ChildWindow erlaubt;
@@ -1580,7 +1580,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
bCreate = ( eAlign == SFX_ALIGN_NOALIGNMENT );
}
else
- bCreate = TRUE;
+ bCreate = sal_True;
if ( bCreate )
bCreate = AllowChildWindowCreation_Impl( *pCW );
@@ -1588,7 +1588,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
// Momentan kein Fenster da, aber es ist eingeschaltet; Fenster
// und ggf. Context erzeugen
if ( bCreate )
- CreateChildWin_Impl( pCW, FALSE );
+ CreateChildWin_Impl( pCW, sal_False );
if ( !bAllChildsVisible )
{
@@ -1643,10 +1643,10 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
}
}
-void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
+void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, sal_Bool bSetFocus )
{
if ( pCW->aInfo.bVisible != 42 )
- pCW->aInfo.bVisible = TRUE;
+ pCW->aInfo.bVisible = sal_True;
SfxChildWindow *pChildWin = SfxChildWindow::CreateChildWindow( pCW->nId, pWorkWin, &GetBindings(), pCW->aInfo);
if (pChildWin)
@@ -1666,12 +1666,12 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
pCW->aInfo.nFlags |= aInfo.nFlags;
// Nein !! Sonst kann man keine Fenster defaultmaessig ausschalten ( Partwindow! )
-// pCW->aInfo.bVisible = TRUE;
+// pCW->aInfo.bVisible = sal_True;
// Erzeugung war erfolgreich
GetBindings().Invalidate(pCW->nId);
- USHORT nPos = pChildWin->GetPosition();
+ sal_uInt16 nPos = pChildWin->GetPosition();
if (nPos != CHILDWIN_NOPOS)
{
DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
@@ -1718,11 +1718,11 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL bSetFocus )
void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
{
- USHORT nId = pCW->nSaveId;
+ sal_uInt16 nId = pCW->nSaveId;
SfxChildWindow *pChildWin = pCW->pWin;
// vorhandenes Fenster geht aus dem Kontext und wird daher entfernt
- USHORT nPos = pChildWin->GetPosition();
+ sal_uInt16 nPos = pChildWin->GetPosition();
if (nPos != CHILDWIN_NOPOS)
{
/*
@@ -1739,7 +1739,7 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
}
// Information in der INI-Datei sichern
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChildWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
SaveStatus_Impl(pChildWin, pCW->aInfo);
@@ -1775,25 +1775,25 @@ void SfxWorkWindow::ResetStatusBar_Impl()
void SfxWorkWindow::SetStatusBar_Impl( sal_uInt32 nResId, SfxShell*, SfxBindings& )
{
if ( nResId && bShowStatusBar && IsVisible_Impl() )
- aStatBar.nId = sal::static_int_cast<USHORT>(nResId);
+ aStatBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
}
#define SFX_ITEMTYPE_STATBAR 4
-void SfxWorkWindow::SetTempStatusBar_Impl( BOOL bSet )
+void SfxWorkWindow::SetTempStatusBar_Impl( sal_Bool bSet )
{
if ( aStatBar.bTemp != bSet && bShowStatusBar && IsVisible_Impl() )
{
- BOOL bOn = FALSE;
- BOOL bReset = FALSE;
+ sal_Bool bOn = sal_False;
+ sal_Bool bReset = sal_False;
if ( bSet && !aStatBar.nId )
{
- bReset = TRUE;
+ bReset = sal_True;
SetStatusBar_Impl( SFX_ITEMTYPE_STATBAR, SFX_APP(), GetBindings() );
}
if ( aStatBar.nId && aStatBar.bOn && !bIsFullScreen )
- bOn = TRUE;
+ bOn = sal_True;
aStatBar.bTemp = bSet;
if ( !bOn || bReset || (!bSet && aStatBar.nId ) )
@@ -1839,7 +1839,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
//------------------------------------------------------------------------
/*
-void SfxWorkWindow::SetObjectBarVisibility_Impl( USHORT nMask )
+void SfxWorkWindow::SetObjectBarVisibility_Impl( sal_uInt16 nMask )
{
switch( nMask )
{
@@ -1853,7 +1853,7 @@ void SfxWorkWindow::SetObjectBarVisibility_Impl( USHORT nMask )
nUpdateMode = nMask;
}*/
-void SfxWorkWindow::MakeVisible_Impl( BOOL bVis )
+void SfxWorkWindow::MakeVisible_Impl( sal_Bool bVis )
{
if ( bVis )
nOrigMode = SFX_VISIBILITY_STANDARD;
@@ -1864,15 +1864,15 @@ void SfxWorkWindow::MakeVisible_Impl( BOOL bVis )
nUpdateMode = nOrigMode;
}
-BOOL SfxWorkWindow::IsVisible_Impl()
+sal_Bool SfxWorkWindow::IsVisible_Impl()
{
return nOrigMode != SFX_VISIBILITY_UNVISIBLE;
}
//------------------------------------------------------------------------
-void SfxWorkWindow::HidePopups_Impl(BOOL bHide, BOOL bParent, USHORT nId )
+void SfxWorkWindow::HidePopups_Impl(sal_Bool bHide, sal_Bool bParent, sal_uInt16 nId )
{
- for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pChildWins->Count(); ++n )
{
SfxChildWindow *pCW = (*pChildWins)[n]->pWin;
if (pCW && pCW->GetAlignment() == SFX_ALIGN_NOALIGNMENT && pCW->GetType() != nId)
@@ -1900,10 +1900,10 @@ void SfxWorkWindow::HidePopups_Impl(BOOL bHide, BOOL bParent, USHORT nId )
//------------------------------------------------------------------------
void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
- SfxDockingConfig eConfig, USHORT nId)
+ SfxDockingConfig eConfig, sal_uInt16 nId)
{
SfxDockingWindow* pDockWin=0;
- USHORT nPos = USHRT_MAX;
+ sal_uInt16 nPos = USHRT_MAX;
Window *pWin=0;
SfxChildWin_Impl *pCW = 0;
@@ -1914,7 +1914,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
else
{
// configure direct childwindow
- for (USHORT n=0; n<pChildWins->Count(); n++)
+ for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
{
pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
@@ -1960,7 +1960,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
pWin = pSplitWin->GetSplitWindow();
if ( pSplitWin->GetWindowCount() == 1 )
- ((SplitWindow*)pWin)->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ ((SplitWindow*)pWin)->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
}
@@ -1977,7 +1977,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
Sort_Impl();
SfxChild_Impl *pChild = 0;
- USHORT n;
+ sal_uInt16 n;
for ( n=0; n<aSortedList.Count(); ++n )
{
pChild = (*pChilds)[aSortedList[n]];
@@ -2001,13 +2001,13 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
Rectangle aOuterRect( GetTopRect_Impl() );
aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() ));
Rectangle aInnerRect( aOuterRect );
- BOOL bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
+ sal_Bool bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
// Das gerade betroffene Fenster wird bei der Berechnung des
// inneren Rechtecks mit eingeschlossen!
- for ( USHORT m=0; m<aSortedList.Count(); ++m )
+ for ( sal_uInt16 m=0; m<aSortedList.Count(); ++m )
{
- USHORT i=aSortedList[m];
+ sal_uInt16 i=aSortedList[m];
SfxChild_Impl* pCli = (*pChilds)[i];
if ( pCli && pCli->nVisible == CHILD_VISIBLE && pCli->pWin )
@@ -2130,7 +2130,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || eAlign == SFX_ALIGN_NOALIGNMENT)
{
// configuration inside the SplitWindow, no change for the SplitWindows' configuration
- pCli->bResize = TRUE;
+ pCli->bResize = sal_True;
pCli->aSize = pDockWin->GetSizePixel();
}
}
@@ -2139,7 +2139,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{
if( pCli->eAlign != eAlign )
{
- bSorted = FALSE;
+ bSorted = sal_False;
pCli->eAlign = eAlign;
}
@@ -2150,7 +2150,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pCW && pCW->pWin )
{
// store changed configuration
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pCW->pWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
if ( eConfig != SFX_MOVEDOCKINGWINDOW )
@@ -2165,10 +2165,10 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
//--------------------------------------------------------------------
-void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, USHORT nMode )
+void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, sal_Bool bEnabled, sal_uInt16 nMode )
{
- USHORT nInter = (USHORT) ( lId >> 16 );
- USHORT nId = (USHORT) ( lId & 0xFFFF );
+ sal_uInt16 nInter = (sal_uInt16) ( lId >> 16 );
+ sal_uInt16 nId = (sal_uInt16) ( lId & 0xFFFF );
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2181,8 +2181,8 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
if ( pWork )
{
// Dem Parent schon bekannt ?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2193,8 +2193,8 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
if ( !pCW )
{
// Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2231,10 +2231,10 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL bEnabled, U
//--------------------------------------------------------------------
// Der An/Aus-Status eines ChildWindows wird umgeschaltet.
-void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
+void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16 nId, sal_Bool bSetFocus)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nId == nId)
break;
@@ -2261,15 +2261,15 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
{
if ( pChild->QueryClose() )
{
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
if ( pChild->IsHideAtToggle() )
{
- ShowChildWindow_Impl( nId, FALSE, bSetFocus );
+ ShowChildWindow_Impl( nId, sal_False, bSetFocus );
}
else
{
// Fenster soll ausgeschaltet werdem
- pChild->SetVisible_Impl( FALSE );
+ pChild->SetVisible_Impl( sal_False );
RemoveChildWin_Impl( pCW );
}
}
@@ -2277,7 +2277,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
else
{
// no actual Window exists, yet => just remember the "switched off" state
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
}
}
else
@@ -2287,7 +2287,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
{
if ( pChild )
{
- ShowChildWindow_Impl( nId, TRUE, bSetFocus );
+ ShowChildWindow_Impl( nId, sal_True, bSetFocus );
}
else
{
@@ -2295,7 +2295,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
CreateChildWin_Impl( pCW, bSetFocus );
if ( !pCW->pWin )
// no success
- pCW->bCreate = FALSE;
+ pCW->bCreate = sal_False;
}
}
}
@@ -2342,10 +2342,10 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
//--------------------------------------------------------------------
-BOOL SfxWorkWindow::HasChildWindow_Impl(USHORT nId)
+sal_Bool SfxWorkWindow::HasChildWindow_Impl(sal_uInt16 nId)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -2360,10 +2360,10 @@ BOOL SfxWorkWindow::HasChildWindow_Impl(USHORT nId)
if ( pParent )
return pParent->HasChildWindow_Impl( nId );
- return FALSE;
+ return sal_False;
}
-BOOL SfxWorkWindow::IsFloating( USHORT nId )
+sal_Bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
{
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2376,8 +2376,8 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( pWork )
{
// Dem Parent schon bekannt ?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2388,8 +2388,8 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( !pCW )
{
// Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2402,7 +2402,7 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
// Ist neu, also initialisieren; je nach Flag beim Parent oder bei
// mir eintragen
pCW = new SfxChildWin_Impl( nId );
- pCW->bEnable = FALSE;
+ pCW->bEnable = sal_False;
pCW->nId = 0;
pCW->nVisibility = 0;
InitializeChild_Impl( pCW );
@@ -2416,16 +2416,16 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
return( eAlign == SFX_ALIGN_NOALIGNMENT );
else
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-BOOL SfxWorkWindow::KnowsChildWindow_Impl(USHORT nId)
+sal_Bool SfxWorkWindow::KnowsChildWindow_Impl(sal_uInt16 nId)
{
SfxChildWin_Impl *pCW=0;
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
{
pCW = (*pChildWins)[n];
@@ -2436,18 +2436,18 @@ BOOL SfxWorkWindow::KnowsChildWindow_Impl(USHORT nId)
if (n<nCount)
{
if ( !(pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE) && !IsVisible_Impl( pCW->nVisibility ) )
- return FALSE;
+ return sal_False;
return pCW->bEnable;
}
else if ( pParent )
return pParent->KnowsChildWindow_Impl( nId );
else
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
+void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, sal_Bool bOn, sal_Bool bSetFocus)
{
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
@@ -2460,8 +2460,8 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( pWork )
{
// Dem Parent schon bekannt ?
- USHORT nCount = pWork->pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pWork->pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
{
pCW = (*pWork->pChildWins)[n];
@@ -2472,8 +2472,8 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( !pCW )
{
// Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
- USHORT nCount = pChildWins->Count();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = pChildWins->Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
{
pCW = (*pChildWins)[n];
@@ -2499,11 +2499,11 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
//--------------------------------------------------------------------
-void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFocus)
+void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, sal_Bool bVisible, sal_Bool bSetFocus)
{
- USHORT nCount = pChildWins->Count();
+ sal_uInt16 nCount = pChildWins->Count();
SfxChildWin_Impl* pCW=0;
- USHORT n;
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
{
pCW = (*pChildWins)[n];
@@ -2545,14 +2545,14 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc
}
else if ( bVisible )
{
- SetChildWindow_Impl( nId, TRUE, bSetFocus );
+ SetChildWindow_Impl( nId, sal_True, bSetFocus );
pChildWin = pCW->pWin;
}
if ( pChildWin )
{
pChildWin->SetVisible_Impl( bVisible );
- USHORT nFlags = pCW->aInfo.nFlags;
+ sal_uInt16 nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChildWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
if ( !pCW->bCreate )
@@ -2587,10 +2587,10 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc
//--------------------------------------------------------------------
-SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(USHORT nId)
+SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(sal_uInt16 nId)
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -2609,10 +2609,10 @@ void SfxWorkWindow::ResetChildWindows_Impl()
// if ( pParent )
// pParent->ResetChildWindows_Impl();
- for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pChildWins->Count(); ++n )
{
(*pChildWins)[n]->nId = 0;
- (*pChildWins)[n]->bEnable = FALSE;
+ (*pChildWins)[n]->bEnable = sal_False;
}
}
@@ -2640,14 +2640,14 @@ Rectangle SfxFrameWorkWin_Impl::GetTopRect_Impl()
// Virtuelle Methode, um herauszufinden, ob ein Child-Fenster noch Platz
// in der ClientArea des parent findet.
-BOOL SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
+sal_Bool SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
{
if ( !IsDockingAllowed() ||
aClientArea.GetWidth() < aBorder.Left() + aBorder.Right() ||
aClientArea.GetHeight() < aBorder.Top() + aBorder.Bottom() )
- return FALSE;
+ return sal_False;
else
- return TRUE;;
+ return sal_True;;
}
void SfxWorkWindow::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInfo &rInfo)
@@ -2663,7 +2663,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxApplication *pApp = SFX_APP();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
{
pFact = rFactories[nFactory];
if ( pFact->nId == pCW->nSaveId )
@@ -2672,7 +2672,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxChildWindow::InitializeChildWinFactory_Impl(
pCW->nSaveId, pCW->aInfo);
pCW->bCreate = pCW->aInfo.bVisible;
- USHORT nFlags = pFact->aInfo.nFlags;
+ sal_uInt16 nFlags = pFact->aInfo.nFlags;
if ( nFlags & SFX_CHILDWIN_TASK )
pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
@@ -2693,7 +2693,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
if ( pFactories )
{
SfxChildWinFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
{
pFact = rFactories[nFactory];
if ( pFact->nId == pCW->nSaveId )
@@ -2702,7 +2702,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
SfxChildWindow::InitializeChildWinFactory_Impl(
pCW->nSaveId, pCW->aInfo);
pCW->bCreate = pCW->aInfo.bVisible;
- USHORT nFlags = pFact->aInfo.nFlags;
+ sal_uInt16 nFlags = pFact->aInfo.nFlags;
if ( nFlags & SFX_CHILDWIN_TASK )
pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
@@ -2745,7 +2745,7 @@ SfxSplitWindow* SfxWorkWindow::GetSplitWindow_Impl( SfxChildAlignment eAlign )
}
}
-void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
+void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis )
{
if ( pParent )
pParent->MakeChildsVisible_Impl( bVis );
@@ -2755,7 +2755,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
{
if ( !bSorted )
Sort_Impl();
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) )
@@ -2766,7 +2766,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
{
if ( !bSorted )
Sort_Impl();
- for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n )
{
SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
pCli->nVisible &= ~CHILD_ACTIVE;
@@ -2774,14 +2774,14 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
}
}
-BOOL SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
+sal_Bool SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
{
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( TRUE ) )
- return TRUE;
+ if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( sal_True ) )
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2790,7 +2790,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos )
if ( pParent )
pParent->EndAutoShow_Impl( aPos );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
if ( p && p->IsAutoHide() )
@@ -2813,7 +2813,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
pParent->ArrangeAutoHideWindows( pActSplitWin );
Rectangle aArea( aUpperClientArea );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// Es werden entweder Dummyfenster oder Fenster im AutoShow-Modus
// ( nicht gepinned, FadeIn ) behandelt.
@@ -2821,7 +2821,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
// soll daf"ur gerade die Gr"o\se berechnet werden, bevor es angezeigt
// wird.
SfxSplitWindow* pSplitWin = pSplit[n];
- BOOL bDummyWindow = !pSplitWin->IsFadeIn();
+ sal_Bool bDummyWindow = !pSplitWin->IsFadeIn();
Window *pDummy = pSplitWin->GetSplitWindow();
Window *pWin = bDummyWindow ? pDummy : pSplitWin;
if ( (pSplitWin->IsPinned() && !bDummyWindow) || (!pWin->IsVisible() && pActSplitWin != pSplitWin) )
@@ -2932,12 +2932,12 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
}
-Rectangle SfxWorkWindow::GetFreeArea( BOOL bAutoHide ) const
+Rectangle SfxWorkWindow::GetFreeArea( sal_Bool bAutoHide ) const
{
if ( bAutoHide )
{
Rectangle aArea( aClientArea );
- for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
if ( pSplit[n]->IsPinned() || !pSplit[n]->IsVisible() )
continue;
@@ -2966,7 +2966,7 @@ Rectangle SfxWorkWindow::GetFreeArea( BOOL bAutoHide ) const
return aClientArea;
}
-SfxChildWinController_Impl::SfxChildWinController_Impl( USHORT nID, SfxWorkWindow *pWork )
+SfxChildWinController_Impl::SfxChildWinController_Impl( sal_uInt16 nID, SfxWorkWindow *pWork )
: SfxControllerItem( nID, pWork->GetBindings() )
, pWorkwin( pWork )
{}
@@ -2977,15 +2977,15 @@ SfxChildWinController_Impl::SfxChildWinController_Impl( USHORT nID, SfxWorkWindo
}
void SfxChildWinController_Impl::StateChanged(
- USHORT nSID, SfxItemState eState, const SfxPoolItem* )
+ sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* )
{
pWorkwin->DisableChildWindow_Impl( nSID, eState == SFX_ITEM_DISABLED );
}
-void SfxWorkWindow::DisableChildWindow_Impl( USHORT nId, BOOL bDisable )
+void SfxWorkWindow::DisableChildWindow_Impl( sal_uInt16 nId, sal_Bool bDisable )
{
- USHORT nCount = pChildWins->Count();
- USHORT n;
+ sal_uInt16 nCount = pChildWins->Count();
+ sal_uInt16 n;
for (n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
break;
@@ -3008,16 +3008,16 @@ Window* SfxWorkWindow::GetActiveChild_Impl()
return pActiveChild;
}
-BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
+sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
// Alle Kinder gem"a\s Liste sortieren
SvUShorts aList;
- for ( USHORT i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
+ for ( sal_uInt16 i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
{
SfxChild_Impl *pCli = (*pChilds)[i];
if ( pCli && pCli->bCanGetFocus && pCli->pWin )
{
- USHORT k;
+ sal_uInt16 k;
for (k=0; k<aList.Count(); k++)
if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) )
break;
@@ -3026,17 +3026,17 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
}
if ( aList.Count() == 0 )
- return FALSE;
+ return sal_False;
- USHORT nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
- for ( USHORT i=0; i<aList.Count(); i++ )
+ sal_uInt16 nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
+ for ( sal_uInt16 i=0; i<aList.Count(); i++ )
{
SfxChild_Impl* pCli = (*pChilds)[aList[i]];
if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue )
break;
}
- USHORT n = bForward ? 0 : aList.Count()-1;
+ sal_uInt16 n = bForward ? 0 : aList.Count()-1;
SfxChild_Impl *pAct=NULL;
if ( pActiveChild )
{
@@ -3058,14 +3058,14 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
n = n + 1;
if ( pAct )
{
- for ( USHORT i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
+ for ( sal_uInt16 i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
{
// Eventuell ist pAct ein Splitwindow
SfxSplitWindow *p = pSplit[i];
if ( pAct->pWin == p )
{
if( p->ActivateNextChild_Impl( bForward ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -3078,7 +3078,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
n = n-1;
if ( n == 0 || n == aList.Count()-1 )
- return FALSE;
+ return sal_False;
}
for( ;; )
@@ -3087,7 +3087,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
if ( pCli->pWin )
{
SfxChild_Impl* pNext = pCli;
- for ( USHORT i=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ for ( sal_uInt16 i=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
// Eventuell ist pNext ein Splitwindow
SfxSplitWindow *p = pSplit[i];
@@ -3097,7 +3097,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
p->SetActiveWindow_Impl( NULL );
pNext = NULL;
if( p->ActivateNextChild_Impl( bForward ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -3106,7 +3106,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
{
pNext->pWin->GrabFocus();
pActiveChild = pNext->pWin;
- return TRUE;
+ return sal_True;
}
}
@@ -3119,17 +3119,17 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
break;
}
- return FALSE;
+ return sal_False;
}
-void SfxWorkWindow::SetObjectBarCustomizeMode_Impl( BOOL )
+void SfxWorkWindow::SetObjectBarCustomizeMode_Impl( sal_Bool )
{
}
void SfxWorkWindow::DataChanged_Impl( const DataChangedEvent& )
{
- USHORT n;
- USHORT nCount = pChildWins->Count();
+ sal_uInt16 n;
+ sal_uInt16 nCount = pChildWins->Count();
for (n=0; n<nCount; n++)
{
SfxChildWin_Impl*pCW = (*pChildWins)[n];