summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/app.cxx40
-rw-r--r--sfx2/source/appl/appbas.cxx85
-rw-r--r--sfx2/source/appl/appcfg.cxx250
-rw-r--r--sfx2/source/appl/appchild.cxx12
-rw-r--r--sfx2/source/appl/appdata.cxx1
-rw-r--r--sfx2/source/appl/appdde.cxx76
-rw-r--r--sfx2/source/appl/appinit.cxx2
-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.cxx18
-rw-r--r--sfx2/source/appl/appreg.cxx10
-rw-r--r--sfx2/source/appl/appserv.cxx175
-rw-r--r--sfx2/source/appl/appuno.cxx96
-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/sfx.src5
-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
-rw-r--r--sfx2/source/bastyp/bitset.cxx86
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx38
-rw-r--r--sfx2/source/bastyp/fltlst.cxx2
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx24
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx28
-rw-r--r--sfx2/source/bastyp/helper.cxx26
-rw-r--r--sfx2/source/bastyp/mieclip.cxx12
-rw-r--r--sfx2/source/bastyp/minarray.cxx156
-rw-r--r--sfx2/source/bastyp/misc.cxx2
-rw-r--r--sfx2/source/bastyp/progress.cxx94
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx52
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx4
-rw-r--r--sfx2/source/config/evntconf.cxx20
-rw-r--r--sfx2/source/control/bindings.cxx52
-rw-r--r--sfx2/source/control/ctrlitem.cxx24
-rwxr-xr-xsfx2/source/control/dispatch.cxx58
-rw-r--r--sfx2/source/control/macro.cxx46
-rw-r--r--sfx2/source/control/minfitem.cxx2
-rw-r--r--sfx2/source/control/msg.cxx2
-rw-r--r--sfx2/source/control/msgpool.cxx48
-rw-r--r--sfx2/source/control/objface.cxx110
-rw-r--r--sfx2/source/control/querystatus.cxx8
-rw-r--r--sfx2/source/control/request.cxx134
-rw-r--r--sfx2/source/control/sfxstatuslistener.cxx6
-rw-r--r--sfx2/source/control/shell.cxx132
-rw-r--r--sfx2/source/control/sorgitm.cxx8
-rw-r--r--sfx2/source/control/statcach.cxx14
-rw-r--r--sfx2/source/control/unoctitm.cxx16
-rw-r--r--sfx2/source/dialog/about.cxx423
-rw-r--r--sfx2/source/dialog/basedlgs.cxx20
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx217
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc4
-rw-r--r--sfx2/source/dialog/dinfdlg.src4
-rw-r--r--sfx2/source/dialog/dockwin.cxx210
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx16
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/itemconnect.cxx26
-rw-r--r--sfx2/source/dialog/mailmodel.cxx10
-rw-r--r--sfx2/source/dialog/mgetempl.cxx50
-rw-r--r--sfx2/source/dialog/navigat.cxx8
-rw-r--r--sfx2/source/dialog/newstyle.cxx1
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx5
-rw-r--r--sfx2/source/dialog/passwd.hrc3
-rw-r--r--sfx2/source/dialog/passwd.src37
-rw-r--r--sfx2/source/dialog/printopt.cxx50
-rw-r--r--sfx2/source/dialog/recfloat.cxx14
-rw-r--r--sfx2/source/dialog/securitypage.cxx20
-rw-r--r--sfx2/source/dialog/splitwin.cxx312
-rw-r--r--sfx2/source/dialog/srchdlg.cxx14
-rw-r--r--sfx2/source/dialog/styfitem.cxx16
-rw-r--r--sfx2/source/dialog/styledlg.cxx10
-rw-r--r--sfx2/source/dialog/tabdlg.cxx261
-rw-r--r--sfx2/source/dialog/taskpane.cxx18
-rw-r--r--sfx2/source/dialog/templdlg.cxx482
-rw-r--r--sfx2/source/dialog/templdlg.hrc3
-rw-r--r--sfx2/source/dialog/templdlg.src4
-rw-r--r--sfx2/source/dialog/titledockwin.cxx12
-rw-r--r--sfx2/source/dialog/tplcitem.cxx12
-rw-r--r--sfx2/source/dialog/tplpitem.cxx14
-rw-r--r--sfx2/source/dialog/versdlg.cxx36
-rw-r--r--sfx2/source/doc/docfac.cxx6
-rw-r--r--sfx2/source/doc/docfile.cxx74
-rw-r--r--sfx2/source/doc/docfilt.cxx2
-rw-r--r--sfx2/source/doc/docinf.cxx2
-rw-r--r--sfx2/source/doc/docinsert.cxx16
-rw-r--r--sfx2/source/doc/doctdlg.cxx18
-rw-r--r--sfx2/source/doc/doctempl.cxx186
-rw-r--r--sfx2/source/doc/doctemplates.cxx24
-rw-r--r--sfx2/source/doc/docvor.cxx368
-rw-r--r--sfx2/source/doc/frmdescr.cxx50
-rw-r--r--sfx2/source/doc/iframe.cxx6
-rw-r--r--sfx2/source/doc/new.cxx88
-rw-r--r--sfx2/source/doc/objcont.cxx162
-rw-r--r--sfx2/source/doc/objembed.cxx12
-rw-r--r--sfx2/source/doc/objitem.cxx14
-rw-r--r--sfx2/source/doc/objmisc.cxx26
-rw-r--r--sfx2/source/doc/objserv.cxx84
-rw-r--r--sfx2/source/doc/objstor.cxx42
-rw-r--r--sfx2/source/doc/objuno.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx10
-rwxr-xr-xsfx2/source/doc/oleprops.cxx14
-rw-r--r--sfx2/source/doc/plugin.cxx12
-rwxr-xr-xsfx2/source/doc/printhelper.cxx4
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx48
-rw-r--r--sfx2/source/explorer/nochaos.cxx6
-rw-r--r--sfx2/source/inc/appbas.hxx2
-rw-r--r--sfx2/source/inc/appdata.hxx26
-rw-r--r--sfx2/source/inc/eventsupplier.hxx2
-rw-r--r--sfx2/source/inc/fltfnc.hxx2
-rw-r--r--sfx2/source/inc/helper.hxx2
-rw-r--r--sfx2/source/inc/mailmodel.hxx2
-rw-r--r--sfx2/source/inc/mnucfga.hxx2
-rw-r--r--sfx2/source/inc/nfltdlg.hxx2
-rw-r--r--sfx2/source/inc/nochaos.hxx2
-rw-r--r--sfx2/source/inc/objmnctl.hxx4
-rw-r--r--sfx2/source/inc/recfloat.hxx4
-rw-r--r--sfx2/source/inc/sfxlocal.hrc10
-rw-r--r--sfx2/source/inc/sfxpicklist.hxx4
-rw-r--r--sfx2/source/inc/sfxtypes.hxx18
-rw-r--r--sfx2/source/inc/slotserv.hxx12
-rw-r--r--sfx2/source/inc/splitwin.hxx66
-rw-r--r--sfx2/source/inc/statcach.hxx8
-rw-r--r--sfx2/source/inc/templdgi.hxx96
-rw-r--r--sfx2/source/inc/tplcitem.hxx6
-rw-r--r--sfx2/source/inc/versdlg.hxx2
-rw-r--r--sfx2/source/inc/virtmenu.hxx66
-rw-r--r--sfx2/source/inc/workwin.hxx164
-rw-r--r--sfx2/source/inet/inettbc.cxx8
-rw-r--r--sfx2/source/menu/mnuitem.cxx82
-rwxr-xr-xsfx2/source/menu/mnumgr.cxx70
-rw-r--r--sfx2/source/menu/objmnctl.cxx12
-rwxr-xr-xsfx2/source/menu/thessubmenu.cxx8
-rw-r--r--sfx2/source/menu/thessubmenu.hxx4
-rw-r--r--sfx2/source/menu/virtmenu.cxx230
-rw-r--r--sfx2/source/notify/eventsupplier.cxx4
-rw-r--r--sfx2/source/statbar/stbitem.cxx50
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx50
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx156
-rw-r--r--sfx2/source/view/frame.cxx34
-rw-r--r--sfx2/source/view/frame2.cxx26
-rw-r--r--sfx2/source/view/frmload.cxx12
-rw-r--r--sfx2/source/view/impviewframe.hxx4
-rw-r--r--sfx2/source/view/ipclient.cxx28
-rw-r--r--sfx2/source/view/orgmgr.cxx216
-rw-r--r--sfx2/source/view/printer.cxx16
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx36
-rw-r--r--sfx2/source/view/userinputinterception.cxx2
-rw-r--r--sfx2/source/view/viewfac.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx154
-rw-r--r--sfx2/source/view/viewfrm2.cxx22
-rw-r--r--sfx2/source/view/viewimp.hxx6
-rw-r--r--sfx2/source/view/viewprn.cxx72
-rw-r--r--sfx2/source/view/viewsh.cxx196
170 files changed, 4266 insertions, 4866 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 303586762ac2..d8442bb215f6 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -226,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
@@ -304,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();
@@ -363,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" );
}
@@ -480,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 )
{
@@ -589,13 +582,6 @@ ResMgr* SfxApplication::GetSfxResManager()
//--------------------------------------------------------------------
-ResMgr* SfxApplication::GetLabelResManager() const
-{
- return pAppData_Impl->pLabelResMgr;
-}
-
-//--------------------------------------------------------------------
-
SimpleResMgr* SfxApplication::GetSimpleResManager()
{
if ( !pAppData_Impl->pSimpleResManager )
@@ -655,7 +641,7 @@ void SfxApplication::LeaveAsynchronCall_Impl()
//--------------------------------------------------------------------
-FASTBOOL SfxApplication::IsInAsynchronCall_Impl() const
+bool SfxApplication::IsInAsynchronCall_Impl() const
{
return pAppData_Impl->nAsynchronCalls > 0;
}
@@ -712,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 );
@@ -722,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() {} }
@@ -748,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 =
@@ -772,7 +758,7 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
if ( xUrl.is() )
{
- result = TRUE;
+ result = sal_True;
}
}
catch ( ::com::sun::star::uno::RuntimeException& )
@@ -798,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");
@@ -816,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" ) ) );
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 3dfe8c6a855b..6d6c8ace5a09 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -99,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 )
-};
-*/
//========================================================================
//------------------------------------------------------------------------
@@ -382,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() ) );
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index e94635063727..d98147078bc6 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -170,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;
@@ -186,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 :
{
@@ -319,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();
@@ -400,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 )
{
@@ -418,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 :
@@ -453,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 :
@@ -461,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 ) );
@@ -496,7 +496,7 @@ BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
}
if ( rSet.Put(aNames) || rSet.Put(aValues) )
- bRet = TRUE;
+ bRet = sal_True;
}
default:
@@ -515,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 );
}
@@ -525,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;
@@ -535,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 ) );
@@ -561,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
@@ -712,7 +712,7 @@ 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) )
@@ -725,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);
@@ -806,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");
@@ -841,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;
@@ -849,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 )
@@ -935,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();
@@ -967,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,7 +987,7 @@ BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
//--------------------------------------------------------------------
//--------------------------------------------------------------------
-void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSynchron )
+void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron )
{
SfxObjectShell *pDoc = rEventHint.GetObjShell();
if ( pDoc && ( pDoc->IsPreview() || !pDoc->Get_Impl()->bInitialized ) )
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 ce0dda051886..71a6fc269c11 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -98,7 +98,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
pTopFrames( new SfxFrameArr_Impl ),
pInitLinkList(0),
pMatcher( 0 ),
- pLabelResMgr( 0 ),
pAppDispatch(NULL),
pTemplates( 0 ),
pPool(0),
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 55a8764ac0c5..26e4fecf3864 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -75,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
@@ -92,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
@@ -106,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 );
@@ -125,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]
@@ -153,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 ; )
@@ -164,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;
}
//-------------------------------------------------------------------------
@@ -455,7 +455,7 @@ long SfxViewFrame::DdeSetData
//========================================================================
-BOOL SfxApplication::InitializeDde()
+sal_Bool SfxApplication::InitializeDde()
{
DBG_ASSERT( !pAppData_Impl->pDdeService,
"Dde kann nicht mehrfach initialisiert werden" );
@@ -501,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
@@ -510,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() );
@@ -532,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 );
@@ -552,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) );
@@ -574,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 );
@@ -591,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,
@@ -606,7 +606,7 @@ BOOL ImplDdeService::MakeTopic( const String& rNm )
->GetFrame()->GetObjectShell() ) )
{
SFX_APP()->AddDdeTopic( pShell );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -636,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;
@@ -663,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;
@@ -676,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 )
{
@@ -702,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 a3d25de8ee61..d9ff26beccba 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -230,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 2a5456989aa7..351376091929 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -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,8 +146,6 @@ 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->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 d90e68d6c764..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>
@@ -155,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:
@@ -186,7 +185,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
continue;
if ( pObjSh->PrepareClose(2) )
- pObjSh->SetModified( FALSE );
+ pObjSh->SetModified( sal_False );
else
return;
}
@@ -212,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 ) );
@@ -254,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();
@@ -267,7 +266,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
const short nRet = pDlg->Execute();
if ( nRet )
- bDone = TRUE;
+ bDone = sal_True;
delete pDlg;
}
@@ -304,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 ) )
@@ -325,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;
}
}
@@ -353,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;
}
@@ -362,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();
@@ -374,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() )
@@ -390,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();
@@ -402,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() )
@@ -414,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;
}
@@ -517,7 +444,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
new SfxTemplateOrganizeDlg(NULL);
pDlg->Execute();
delete pDlg;
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -525,7 +452,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
svt::AddressBookSourceDialog aDialog(GetTopWindow(), ::comphelper::getProcessServiceFactory());
aDialog.Execute();
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -553,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,
@@ -600,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 )
{
@@ -631,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)
{
@@ -691,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;
}
}
@@ -733,15 +660,15 @@ 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" ) ) );
@@ -761,7 +688,7 @@ 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" ) ) );
@@ -919,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 );
}
}
@@ -1002,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
@@ -1059,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 )
@@ -1085,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();
@@ -1103,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();
@@ -1117,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;
@@ -1185,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 );
@@ -1202,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 );
@@ -1291,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&)
{
@@ -1312,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 9d2025d1e23e..9ffb48e1b34a 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -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;
@@ -1857,7 +1857,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
if ( bSetDocMacroMode )
{
// mark document: it executes an own macro, so it's in a modal mode
- pDoc->SetMacroMode_Impl( TRUE );
+ pDoc->SetMacroMode_Impl( sal_True );
}
if ( bSetGlobalThisComponent )
@@ -1890,7 +1890,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
if ( bSetDocMacroMode )
{
// remove flag for modal mode
- pDoc->SetMacroMode_Impl( FALSE );
+ pDoc->SetMacroMode_Impl( sal_False );
}
}
else
@@ -1932,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;
@@ -1940,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 )
{
@@ -1985,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();
@@ -2020,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/sfx.src b/sfx2/source/appl/sfx.src
index c3b734e327de..3bca517c5fd5 100644
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.src
@@ -40,3 +40,8 @@ String STR_STYLE_FILTER_ALL
Text [ en-US ] = "All Styles" ;
};
+String STR_ACCTITLE_PRODUCTIVITYTOOLS
+{
+ Text [ en-US ] = "%PRODUCTNAME";
+};
+
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];
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index df35593a9a18..dde66315720f 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -39,7 +39,7 @@
//====================================================================
// add nOffset to each bit-value in the set
-BitSet BitSet::operator<<( USHORT nOffset ) const
+BitSet BitSet::operator<<( sal_uInt16 nOffset ) const
{
DBG_MEMTEST();
// create a work-copy, return it if nothing to shift
@@ -48,17 +48,17 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
return aSet;
// compute the shiftment in long-words and bits
- USHORT nBlockDiff = nOffset / 32;
- ULONG nBitValDiff = nOffset % 32;
+ sal_uInt16 nBlockDiff = nOffset / 32;
+ sal_uIntPtr nBitValDiff = nOffset % 32;
// compute the new number of bits
- for ( USHORT nBlock = 0; nBlock < nBlockDiff; ++nBlock )
+ for ( sal_uInt16 nBlock = 0; nBlock < nBlockDiff; ++nBlock )
aSet.nCount = aSet.nCount - CountBits( *(aSet.pBitmap+nBlock) );
aSet.nCount = aSet.nCount -
CountBits( *(aSet.pBitmap+nBlockDiff) >> (32-nBitValDiff) );
// shift complete long-words
- USHORT nTarget, nSource;
+ sal_uInt16 nTarget, nSource;
for ( nTarget = 0, nSource = nBlockDiff;
(nSource+1) < aSet.nBlocks;
++nTarget, ++nSource )
@@ -76,7 +76,7 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
// shorten the block-array
if ( nTarget < aSet.nBlocks )
{
- ULONG* pNewMap = new ULONG[nTarget];
+ sal_uIntPtr* pNewMap = new sal_uIntPtr[nTarget];
memcpy( pNewMap, aSet.pBitmap, 4 * nTarget );
delete [] aSet.pBitmap;
aSet.pBitmap = pNewMap;
@@ -90,7 +90,7 @@ BitSet BitSet::operator<<( USHORT nOffset ) const
// substracts nOffset from each bit-value in the set
-BitSet BitSet::operator>>( USHORT ) const
+BitSet BitSet::operator>>( sal_uInt16 ) const
{
DBG_MEMTEST();
return BitSet();
@@ -108,7 +108,7 @@ void BitSet::CopyFrom( const BitSet& rSet )
if ( rSet.nBlocks )
{
DBG_MEMTEST();
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memcpy( pBitmap, rSet.pBitmap, 4 * nBlocks );
}
else
@@ -141,13 +141,13 @@ BitSet::BitSet( const BitSet& rOrig )
// creates a bitset from an array
-BitSet::BitSet( USHORT* pArray, USHORT nSize ):
+BitSet::BitSet( sal_uInt16* pArray, sal_uInt16 nSize ):
nCount(nSize)
{
DBG_MEMTEST();
// find the highest bit to set
- USHORT nMax = 0;
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nMax = 0;
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
if ( pArray[n] > nMax )
nMax = pArray[n];
@@ -156,15 +156,15 @@ BitSet::BitSet( USHORT* pArray, USHORT nSize ):
{
// allocate memory for all blocks needed
nBlocks = nMax / 32 + 1;
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memset( pBitmap, 0, 4 * nBlocks );
// set all the bits
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
// compute the block no. and bitvalue
- USHORT nBlock = n / 32;
- ULONG nBitVal = 1L << (n % 32);
+ sal_uInt16 nBlock = n / 32;
+ sal_uIntPtr nBitVal = 1L << (n % 32);
// set a single bit
if ( ( *(pBitmap+nBlock) & nBitVal ) == 0 )
@@ -220,16 +220,16 @@ BitSet& BitSet::operator=( const BitSet& rOrig )
// assignment from a single bit
-BitSet& BitSet::operator=( USHORT nBit )
+BitSet& BitSet::operator=( sal_uInt16 nBit )
{
DBG_MEMTEST();
delete [] pBitmap;
nBlocks = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
nCount = 1;
- pBitmap = new ULONG[nBlocks];
+ pBitmap = new sal_uIntPtr[nBlocks];
memset( pBitmap + nBlocks, 0, 4 * nBlocks );
*(pBitmap+nBlocks) = nBitVal;
@@ -241,11 +241,11 @@ BitSet& BitSet::operator=( USHORT nBit )
// creates the asymetric difference with another bitset
-BitSet& BitSet::operator-=(USHORT nBit)
+BitSet& BitSet::operator-=(sal_uInt16 nBit)
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
return *this;
@@ -266,12 +266,12 @@ BitSet& BitSet::operator-=(USHORT nBit)
BitSet& BitSet::operator|=( const BitSet& rSet )
{
DBG_MEMTEST();
- USHORT nMax = Min(nBlocks, rSet.nBlocks);
+ sal_uInt16 nMax = Min(nBlocks, rSet.nBlocks);
// expand the bitmap
if ( nBlocks < rSet.nBlocks )
{
- ULONG *pNewMap = new ULONG[rSet.nBlocks];
+ sal_uIntPtr *pNewMap = new sal_uIntPtr[rSet.nBlocks];
memset( pNewMap + nBlocks, 0, 4 * (rSet.nBlocks - nBlocks) );
if ( pBitmap )
@@ -284,10 +284,10 @@ BitSet& BitSet::operator|=( const BitSet& rSet )
}
// add the bits blocks by block
- for ( USHORT nBlock = 0; nBlock < nMax; ++nBlock )
+ for ( sal_uInt16 nBlock = 0; nBlock < nMax; ++nBlock )
{
// compute numberof additional bits
- ULONG nDiff = ~*(pBitmap+nBlock) & *(rSet.pBitmap+nBlock);
+ sal_uIntPtr nDiff = ~*(pBitmap+nBlock) & *(rSet.pBitmap+nBlock);
nCount = nCount + CountBits(nDiff);
*(pBitmap+nBlock) |= *(rSet.pBitmap+nBlock);
@@ -300,15 +300,15 @@ BitSet& BitSet::operator|=( const BitSet& rSet )
// unites with a single bit
-BitSet& BitSet::operator|=( USHORT nBit )
+BitSet& BitSet::operator|=( sal_uInt16 nBit )
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
{
- ULONG *pNewMap = new ULONG[nBlock+1];
+ sal_uIntPtr *pNewMap = new sal_uIntPtr[nBlock+1];
memset( pNewMap + nBlocks, 0, 4 * (nBlock - nBlocks + 1) );
if ( pBitmap )
@@ -333,14 +333,14 @@ BitSet& BitSet::operator|=( USHORT nBit )
// determines if the bit is set (may be the only one)
-BOOL BitSet::Contains( USHORT nBit ) const
+sal_Bool BitSet::Contains( sal_uInt16 nBit ) const
{
DBG_MEMTEST();
- USHORT nBlock = nBit / 32;
- ULONG nBitVal = 1L << (nBit % 32);
+ sal_uInt16 nBlock = nBit / 32;
+ sal_uIntPtr nBitVal = 1L << (nBit % 32);
if ( nBlock >= nBlocks )
- return FALSE;
+ return sal_False;
return ( nBitVal & *(pBitmap+nBlock) ) == nBitVal;
}
@@ -348,27 +348,27 @@ BOOL BitSet::Contains( USHORT nBit ) const
// determines if the bitsets are equal
-BOOL BitSet::operator==( const BitSet& rSet ) const
+sal_Bool BitSet::operator==( const BitSet& rSet ) const
{
DBG_MEMTEST();
if ( nBlocks != rSet.nBlocks )
- return FALSE;
+ return sal_False;
- USHORT nBlock = nBlocks;
+ sal_uInt16 nBlock = nBlocks;
while ( nBlock-- > 0 )
if ( *(pBitmap+nBlock) != *(rSet.pBitmap+nBlock) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// counts the number of 1-bits in the parameter
-USHORT BitSet::CountBits( ULONG nBits )
+sal_uInt16 BitSet::CountBits( sal_uIntPtr nBits )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
int nBit = 32;
while ( nBit-- && nBits )
{ if ( ( (long)nBits ) < 0 )
@@ -380,15 +380,15 @@ USHORT BitSet::CountBits( ULONG nBits )
//--------------------------------------------------------------------
-USHORT IndexBitSet::GetFreeIndex()
+sal_uInt16 IndexBitSet::GetFreeIndex()
{
- for(USHORT i=0;i<USHRT_MAX;i++)
+ for(sal_uInt16 i=0;i<USHRT_MAX;i++)
if(!Contains(i))
{
*this|=i;
return i;
}
- DBG_ASSERT(FALSE, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
+ DBG_ASSERT(sal_False, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
return 0;
}
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 06e17e232041..f73e6e5498ad 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -132,7 +132,7 @@ using namespace ::vos;
#include <sfx2/viewfrm.hxx>
static SfxFilterList_Impl* pFilterArr = 0;
-static BOOL bFirstRead = TRUE;
+static sal_Bool bFirstRead = sal_True;
static void CreateFilterArr()
{
@@ -286,7 +286,7 @@ SfxFilterMatcher::SfxFilterMatcher( const String& rName )
String aName = SfxObjectShell::GetServiceNameFromFactory( rName );
DBG_ASSERT(aName.Len(), "Found boes type :-)");
- for ( USHORT n=0; n<pImplArr->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImplArr->Count(); n++ )
{
// find the impl-Data of any comparable FilterMatcher that was created before
SfxFilterMatcher_Impl* pImp = pImplArr->GetObject(n);
@@ -322,7 +322,7 @@ void SfxFilterMatcher_Impl::Update()
{
// this List was already used
pList->Clear();
- for ( USHORT n=0; n<pFilterArr->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pFilterArr->Count(); n++ )
{
SfxFilter* pFilter = pFilterArr->GetObject(n);
if ( pFilter->GetServiceName() == String(aName) )
@@ -545,7 +545,7 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
const SfxFilter* pFilter = pOldFilter;
sal_Bool bPreview = rMedium.IsPreview_Impl();
- SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, FALSE);
+ SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, sal_False);
if ( bPreview && rMedium.IsRemote() && ( !pReferer || pReferer->GetValue().CompareToAscii("private:searchfolder:",21 ) != COMPARE_EQUAL ) )
return ERRCODE_ABORT;
@@ -775,7 +775,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const String& rName, SfxFil
const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
String aName( rName );
- USHORT nIndex = aName.SearchAscii(": ");
+ sal_uInt16 nIndex = aName.SearchAscii(": ");
if ( nIndex != STRING_NOTFOUND )
{
DBG_ERROR("Old filter name used!");
@@ -808,7 +808,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
}
}
- SfxFilterContainer::ReadSingleFilter_Impl( rName, xTypeCFG, xFilterCFG, FALSE );
+ SfxFilterContainer::ReadSingleFilter_Impl( rName, xTypeCFG, xFilterCFG, sal_False );
}
}
@@ -911,7 +911,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
const ::rtl::OUString& rName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
- BOOL bUpdate
+ sal_Bool bUpdate
)
{
::rtl::OUString sFilterName( rName );
@@ -1052,16 +1052,16 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
}
SfxFilter* pFilter = bUpdate ? (SfxFilter*) SfxFilter::GetFilterByName( sFilterName ) : 0;
- BOOL bNew = FALSE;
+ sal_Bool bNew = sal_False;
if (!pFilter)
{
- bNew = TRUE;
+ bNew = sal_True;
pFilter = new SfxFilter( sFilterName ,
sExtension ,
nFlags ,
nClipboardId ,
sType ,
- (USHORT)nDocumentIconId ,
+ (sal_uInt16)nDocumentIconId ,
sMimeType ,
sUserData ,
sServiceName );
@@ -1073,7 +1073,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
pFilter->nFormatType = nFlags;
pFilter->lFormat = nClipboardId;
pFilter->aTypeName = sType;
- pFilter->nDocIcon = (USHORT)nDocumentIconId;
+ pFilter->nDocIcon = (sal_uInt16)nDocumentIconId;
pFilter->aMimeType = sMimeType;
pFilter->aUserData = sUserData;
pFilter->aServiceName = sServiceName;
@@ -1094,13 +1094,13 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
}
}
-void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
+void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
{
RTL_LOGFILE_CONTEXT( aMeasure, "sfx2 (as96863) ::SfxFilterContainer::ReadFilters" );
if ( !pFilterArr )
CreateFilterArr();
- bFirstRead = FALSE;
+ bFirstRead = sal_False;
SfxFilterList_Impl& rList = *pFilterArr;
try
@@ -1130,10 +1130,10 @@ void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
// and change it back for all valid filters afterwards.
if( rList.Count() > 0 )
{
- bUpdate = TRUE;
- USHORT nCount = (USHORT)rList.Count();
+ bUpdate = sal_True;
+ sal_uInt16 nCount = (sal_uInt16)rList.Count();
SfxFilter* pFilter;
- for (USHORT f=0; f<nCount; ++f)
+ for (sal_uInt16 f=0; f<nCount; ++f)
{
pFilter = NULL;
pFilter = rList.GetObject(f);
@@ -1155,9 +1155,9 @@ void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
// Otherwise you have to check more then 300 filter names manually .-)
// And conditional breakpoints on unicode values seams not to be supported .-(
#ifdef DEBUG
- bool bDBGStop = FALSE;
+ bool bDBGStop = sal_False;
if (sFilterName.indexOf(::rtl::OUString::createFromAscii("DBG_"))>-1)
- bDBGStop = TRUE;
+ bDBGStop = sal_True;
#endif
ReadSingleFilter_Impl( sFilterName, xTypeCFG, xFilterCFG, bUpdate );
@@ -1173,7 +1173,7 @@ void SfxFilterContainer::ReadFilters_Impl( BOOL bUpdate )
if ( pImplArr && bUpdate )
{
// global filter arry was modified, factory specific ones might need an update too
- for ( USHORT n=0; n<pImplArr->Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImplArr->Count(); n++ )
pImplArr->GetObject(n)->Update();
}
}
diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx
index aab358b50220..297dedc50807 100644
--- a/sfx2/source/bastyp/fltlst.cxx
+++ b/sfx2/source/bastyp/fltlst.cxx
@@ -102,7 +102,7 @@ void SAL_CALL SfxFilterListener::refreshed( const lang::EventObject& aSource ) t
(xContainer==m_xFilterCache)
)
{
- SfxFilterContainer::ReadFilters_Impl( TRUE );
+ SfxFilterContainer::ReadFilters_Impl( sal_True );
}
}
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 8ecfa6b3081a..fb850b624695 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -75,10 +75,10 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
// bug #41665# auch so.
// Netscape l"a\st aber ein direktes Setzen auf 0 nicht zu, IE4.0 schon.
// Den Bug machen wir nicht mit!
- BOOL bMarginWidth = FALSE, bMarginHeight = FALSE;
+ sal_Bool bMarginWidth = sal_False, bMarginHeight = sal_False;
- USHORT nArrLen = pOptions->Count();
- for ( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pOptions->Count();
+ for ( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pOptions)[i];
switch( pOption->GetToken() )
@@ -106,7 +106,7 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
// aMargin.Width() = 1;
if( !bMarginHeight )
aMargin.Height() = 0;
- bMarginWidth = TRUE;
+ bMarginWidth = sal_True;
break;
case HTML_O_MARGINHEIGHT:
aMargin.Height() = pOption->GetNumber();
@@ -115,7 +115,7 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
// aMargin.Height() = 1;
if( !bMarginWidth )
aMargin.Width() = 0;
- bMarginHeight = TRUE;
+ bMarginHeight = sal_True;
break;
case HTML_O_SCROLLING:
pFrame->SetScrollingMode(
@@ -125,33 +125,33 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
case HTML_O_FRAMEBORDER:
{
String aStr = pOption->GetString();
- BOOL bBorder = TRUE;
+ sal_Bool bBorder = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("NO") ||
aStr.EqualsIgnoreCaseAscii("0") )
- bBorder = FALSE;
+ bBorder = sal_False;
pFrame->SetFrameBorder( bBorder );
break;
}
case HTML_O_NORESIZE:
- pFrame->SetResizable( FALSE );
+ pFrame->SetResizable( sal_False );
break;
default:
if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
HTML_O_READONLY ) )
{
String aStr = pOption->GetString();
- BOOL bReadonly = TRUE;
+ sal_Bool bReadonly = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
- bReadonly = FALSE;
+ bReadonly = sal_False;
pFrame->SetReadOnly( bReadonly );
}
else if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
HTML_O_EDIT ) )
{
String aStr = pOption->GetString();
- BOOL bEdit = TRUE;
+ sal_Bool bEdit = sal_True;
if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
- bEdit = FALSE;
+ bEdit = sal_False;
pFrame->SetEditable( bEdit );
}
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index e17151c6e322..9330608d9f8b 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -87,7 +87,7 @@ const sal_Char __FAR_DATA SfxFrameHTMLWriter::sNewLine[] = "\015\012";
void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
const sal_Char *pIndent,
const String& rName,
- const String& rContent, BOOL bHTTPEquiv,
+ const String& rContent, sal_Bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
@@ -121,7 +121,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
{
String aContentType = String::CreateFromAscii( sHTML_MIME_text_html );
aContentType.AppendAscii( pCharSet );
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, TRUE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, sal_True,
eDestEnc, pNonConvertableChars );
}
@@ -136,7 +136,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
if( rTitle.Len() )
HTMLOutFuncs::Out_String( rStrm, rTitle, eDestEnc, pNonConvertableChars );
}
- HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, sal_False );
// Target-Frame
if( i_xDocProps.is() )
@@ -159,7 +159,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
// Who we are
String sGenerator( SfxResId( STR_HTML_GENERATOR ) );
sGenerator.SearchAndReplaceAscii( "%1", String( DEFINE_CONST_UNICODE( TOOLS_INETDEF_OS ) ) );
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_generator, sGenerator, FALSE, eDestEnc, pNonConvertableChars );
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_generator, sGenerator, sal_False, eDestEnc, pNonConvertableChars );
if( i_xDocProps.is() )
{
@@ -179,14 +179,14 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
rBaseURL, rReloadURL));
}
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, sContent, TRUE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, sContent, sal_True,
eDestEnc, pNonConvertableChars );
}
// Author
const String& rAuthor = i_xDocProps->getAuthor();
if( rAuthor.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, sal_False,
eDestEnc, pNonConvertableChars );
// created
@@ -196,13 +196,13 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
String sOut = String::CreateFromInt32(aD.GetDate());
sOut += ';';
sOut += String::CreateFromInt32(aT.GetTime());
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// changedby
const String& rChangedBy = i_xDocProps->getModifiedBy();
if( rChangedBy.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, rChangedBy, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, rChangedBy, sal_False,
eDestEnc, pNonConvertableChars );
// changed
@@ -212,26 +212,26 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
sOut = String::CreateFromInt32(aD2.GetDate());
sOut += ';';
sOut += String::CreateFromInt32(aT2.GetTime());
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, sal_False,
eDestEnc, pNonConvertableChars );
// Subject
const String& rTheme = i_xDocProps->getSubject();
if( rTheme.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, rTheme, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, rTheme, sal_False,
eDestEnc, pNonConvertableChars );
// Description
const String& rComment = i_xDocProps->getDescription();
if( rComment.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, rComment, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, rComment, sal_False,
eDestEnc, pNonConvertableChars);
// Keywords
String Keywords = ::comphelper::string::convertCommaSeparated(
i_xDocProps->getKeywords());
if( Keywords.Len() )
- OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_keywords, Keywords, FALSE,
+ OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_keywords, Keywords, sal_False,
eDestEnc, pNonConvertableChars);
uno::Reference < script::XTypeConverter > xConverter(
@@ -255,7 +255,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
aStr >>= str;
String valstr(str);
valstr.EraseTrailingChars();
- OutMeta( rStrm, pIndent, name, valstr, FALSE,
+ OutMeta( rStrm, pIndent, name, valstr, sal_False,
eDestEnc, pNonConvertableChars );
} catch (uno::Exception &) {
// may happen with concurrent modification...
@@ -276,7 +276,7 @@ void SfxFrameHTMLWriter::OutHeader( rtl_TextEncoding eDestEnc )
Out_DocInfo( Strm(), &pDoc->GetDocInfo(), "\t", eDestEnc );
Strm() << sNewLine;
- HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_head, FALSE ) << sNewLine;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_head, sal_False ) << sNewLine;
//! OutScript(); // Hier fehlen noch die Scripten im Header
}
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 091651fedbc2..3493981e5a25 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -335,10 +335,10 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rF
if ( pFiles )
{
- ULONG nCount = pFiles->Count();
+ sal_uIntPtr nCount = pFiles->Count();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pFile = pFiles->GetObject(i);
pRet[i] = *( pFile );
@@ -418,7 +418,7 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
pProperties = new StringList_Impl;
uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
- ULONG nFolderPos = LIST_APPEND;
+ sal_uIntPtr nFolderPos = LIST_APPEND;
try
{
@@ -442,7 +442,7 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
aRow += '\t';
aRow += bFolder ? '1' : '0';
OUString* pRow = new OUString( aRow );
- ULONG nPos = LIST_APPEND;
+ sal_uIntPtr nPos = LIST_APPEND;
if ( bFolder )
{
if ( LIST_APPEND == nFolderPos )
@@ -471,10 +471,10 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
if ( pProperties )
{
- ULONG nCount = pProperties->Count();
+ sal_uIntPtr nCount = pProperties->Count();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pProperty = pProperties->GetObject(i);
pRet[i] = *( pProperty );
@@ -564,10 +564,10 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
if ( pList )
{
- ULONG nCount = pList->Count();
+ sal_uIntPtr nCount = pList->Count();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pEntry = pList->GetObject(i);
pRet[i] = *( pEntry );
@@ -647,10 +647,10 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
if ( pProperties )
{
- ULONG nCount = pProperties->Count();
+ sal_uIntPtr nCount = pProperties->Count();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( ULONG i = 0; i < nCount; ++i )
+ for ( sal_uIntPtr i = 0; i < nCount; ++i )
{
OUString* pProperty = pProperties->GetObject(i);
pRet[i] = *( pProperty );
@@ -801,9 +801,9 @@ ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeB
// -----------------------------------------------------------------------
-ULONG SfxContentHelper::GetSize( const String& rContent )
+sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
{
- ULONG nSize = 0;
+ sal_uIntPtr nSize = 0;
sal_Int64 nTemp = 0;
INetURLObject aObj( rContent );
DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
@@ -820,7 +820,7 @@ ULONG SfxContentHelper::GetSize( const String& rContent )
{
DBG_ERRORFILE( "Any other exception" );
}
- nSize = (UINT32)nTemp;
+ nSize = (sal_uInt32)nTemp;
return nSize;
}
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 4154ddc6301b..0b5315eab809 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -43,13 +43,13 @@ MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pStrm )
delete pStrm, pStrm = 0;
ByteString sLine, sVersion;
- ULONG nStt = 0, nEnd = 0;
- USHORT nIndex = 0;
+ sal_uIntPtr nStt = 0, nEnd = 0;
+ sal_uInt16 nIndex = 0;
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream.ResetError();
@@ -63,16 +63,16 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
nIndex = 0;
ByteString sTmp( sLine.GetToken( 0, ':', nIndex ) );
if( sTmp == "StartHTML" )
- nStt = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ nStt = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
else if( sTmp == "EndHTML" )
- nEnd = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ nEnd = (sal_uIntPtr)(sLine.Erase( 0, nIndex ).ToInt32());
else if( sTmp == "SourceURL" )
sBaseURL = String(S2U(sLine.Erase( 0, nIndex )));
if( nEnd && nStt &&
( sBaseURL.Len() || rStream.Tell() >= nStt ))
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
diff --git a/sfx2/source/bastyp/minarray.cxx b/sfx2/source/bastyp/minarray.cxx
index 978239239cea..9559de4069b0 100644
--- a/sfx2/source/bastyp/minarray.cxx
+++ b/sfx2/source/bastyp/minarray.cxx
@@ -35,13 +35,13 @@
// -----------------------------------------------------------------------
-SfxPtrArr::SfxPtrArr( BYTE nInitSize, BYTE nGrowSize ):
+SfxPtrArr::SfxPtrArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nMSCBug > 0 )
pData = new void*[nMSCBug];
@@ -106,7 +106,7 @@ void SfxPtrArr::Append( void* aElem )
// musz das Array umkopiert werden?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
void** pNewData = new void*[nNewSize];
if ( pData )
{
@@ -114,7 +114,7 @@ void SfxPtrArr::Append( void* aElem )
memmove( pNewData, pData, sizeof(void*)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -126,11 +126,11 @@ void SfxPtrArr::Append( void* aElem )
// -----------------------------------------------------------------------
-USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 SfxPtrArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// einfache Aufgaben erfordern einfache Loesungen!
if ( nLen == 0 )
@@ -150,8 +150,8 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// auf die naechste Grow-Grenze aufgerundet verkleinern
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
void** pNewData = new void*[nNewSize];
@@ -166,7 +166,7 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -174,71 +174,71 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(void*) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Remove( void* aElem )
+sal_Bool SfxPtrArr::Remove( void* aElem )
{
DBG_MEMTEST();
// einfache Aufgaben ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// rueckwaerts, da meist der letzte zuerst wieder entfernt wird
void* *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
+sal_Bool SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
{
DBG_MEMTEST();
// einfache Aufgaben ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// rueckwaerts, da meist der letzte zuerst wieder entfernt wird
void* *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aOldElem )
{
pData[nUsed-n-1] = aNewElem;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPtrArr::Contains( const void* rItem ) const
+sal_Bool SfxPtrArr::Contains( const void* rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
void* p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void SfxPtrArr::Insert( USHORT nPos, void* rElem )
+void SfxPtrArr::Insert( sal_uInt16 nPos, void* rElem )
{
DBG_MEMTEST();
DBG_ASSERT( sal::static_int_cast< unsigned >(nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array too large" );
@@ -246,7 +246,7 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
if ( nUnused == 0 )
{
// auf die naechste Grow-Grenze aufgerundet vergroeszern
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
void** pNewData = new void*[nNewSize];
if ( pData )
@@ -255,7 +255,7 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
memmove( pNewData, pData, sizeof(void*)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -271,13 +271,13 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
// class ByteArr ---------------------------------------------------------
-ByteArr::ByteArr( BYTE nInitSize, BYTE nGrowSize ):
+ByteArr::ByteArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nInitSize > 0 )
pData = new char[nMSCBug];
@@ -341,7 +341,7 @@ void ByteArr::Append( char aElem )
// musz das Array umkopiert werden?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
char* pNewData = new char[nNewSize];
if ( pData )
{
@@ -349,7 +349,7 @@ void ByteArr::Append( char aElem )
memmove( pNewData, pData, sizeof(char)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -361,11 +361,11 @@ void ByteArr::Append( char aElem )
// -----------------------------------------------------------------------
-USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 ByteArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// einfache Aufgaben erfordern einfache Loesungen!
if ( nLen == 0 )
@@ -385,8 +385,8 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// auf die naechste Grow-Grenze aufgerundet verkleinern
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
char* pNewData = new char[nNewSize];
@@ -401,7 +401,7 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -409,58 +409,58 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(char) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL ByteArr::Remove( char aElem )
+sal_Bool ByteArr::Remove( char aElem )
{
DBG_MEMTEST();
// einfache Aufgaben ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// rueckwaerts, da meist der letzte zuerst wieder entfernt wird
char *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ByteArr::Contains( const char rItem ) const
+sal_Bool ByteArr::Contains( const char rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
char p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ByteArr::Insert( USHORT nPos, char rElem )
+void ByteArr::Insert( sal_uInt16 nPos, char rElem )
{
DBG_MEMTEST();
// musz das Array umkopiert werden?
if ( nUnused == 0 )
{
// auf die naechste Grow-Grenze aufgerundet vergroeszern
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
char* pNewData = new char[nNewSize];
if ( pData )
@@ -469,7 +469,7 @@ void ByteArr::Insert( USHORT nPos, char rElem )
memmove( pNewData, pData, sizeof(char)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -485,7 +485,7 @@ void ByteArr::Insert( USHORT nPos, char rElem )
// -----------------------------------------------------------------------
-char ByteArr::operator[]( USHORT nPos ) const
+char ByteArr::operator[]( sal_uInt16 nPos ) const
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -494,7 +494,7 @@ char ByteArr::operator[]( USHORT nPos ) const
// -----------------------------------------------------------------------
-char& ByteArr::operator [] (USHORT nPos)
+char& ByteArr::operator [] (sal_uInt16 nPos)
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -503,13 +503,13 @@ char& ByteArr::operator [] (USHORT nPos)
// class WordArr ---------------------------------------------------------
-WordArr::WordArr( BYTE nInitSize, BYTE nGrowSize ):
+WordArr::WordArr( sal_uInt8 nInitSize, sal_uInt8 nGrowSize ):
nUsed( 0 ),
nGrow( nGrowSize ? nGrowSize : 1 ),
nUnused( nInitSize )
{
DBG_MEMTEST();
- USHORT nMSCBug = nInitSize;
+ sal_uInt16 nMSCBug = nInitSize;
if ( nInitSize > 0 )
pData = new short[nMSCBug];
@@ -573,7 +573,7 @@ void WordArr::Append( short aElem )
// musz das Array umkopiert werden?
if ( nUnused == 0 )
{
- USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ sal_uInt16 nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
short* pNewData = new short[nNewSize];
if ( pData )
{
@@ -581,7 +581,7 @@ void WordArr::Append( short aElem )
memmove( pNewData, pData, sizeof(short)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -593,11 +593,11 @@ void WordArr::Append( short aElem )
// -----------------------------------------------------------------------
-USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
+sal_uInt16 WordArr::Remove( sal_uInt16 nPos, sal_uInt16 nLen )
{
DBG_MEMTEST();
// nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
- nLen = Min( (USHORT)(nUsed-nPos), nLen );
+ nLen = Min( (sal_uInt16)(nUsed-nPos), nLen );
// einfache Aufgaben erfordern einfache Loesungen!
if ( nLen == 0 )
@@ -617,8 +617,8 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
if ( (nUnused+nLen) >= nGrow )
{
// auf die naechste Grow-Grenze aufgerundet verkleinern
- USHORT nNewUsed = nUsed-nLen;
- USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
+ sal_uInt16 nNewUsed = nUsed-nLen;
+ sal_uInt16 nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
"shrink size computation failed" );
short* pNewData = new short[nNewSize];
@@ -633,7 +633,7 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
delete [] pData;
pData = pNewData;
nUsed = nNewUsed;
- nUnused = sal::static_int_cast< BYTE >(nNewSize - nNewUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize - nNewUsed);
return nLen;
}
@@ -641,58 +641,58 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(short) );
nUsed = nUsed - nLen;
- nUnused = sal::static_int_cast< BYTE >(nUnused + nLen);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nUnused + nLen);
return nLen;
}
// -----------------------------------------------------------------------
-BOOL WordArr::Remove( short aElem )
+sal_Bool WordArr::Remove( short aElem )
{
DBG_MEMTEST();
// einfache Aufgaben ...
if ( nUsed == 0 )
- return FALSE;
+ return sal_False;
// rueckwaerts, da meist der letzte zuerst wieder entfernt wird
short *pIter = pData + nUsed - 1;
- for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
{
Remove(nUsed-n-1, 1);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL WordArr::Contains( const short rItem ) const
+sal_Bool WordArr::Contains( const short rItem ) const
{
DBG_MEMTEST();
if ( !nUsed )
- return FALSE;
+ return sal_False;
- for ( USHORT n = 0; n < nUsed; ++n )
+ for ( sal_uInt16 n = 0; n < nUsed; ++n )
{
short p = GetObject(n);
if ( p == rItem )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void WordArr::Insert( USHORT nPos, short rElem )
+void WordArr::Insert( sal_uInt16 nPos, short rElem )
{
DBG_MEMTEST();
// musz das Array umkopiert werden?
if ( nUnused == 0 )
{
// auf die naechste Grow-Grenze aufgerundet vergroeszern
- USHORT nNewSize = nUsed+nGrow;
+ sal_uInt16 nNewSize = nUsed+nGrow;
short* pNewData = new short[nNewSize];
if ( pData )
@@ -701,7 +701,7 @@ void WordArr::Insert( USHORT nPos, short rElem )
memmove( pNewData, pData, sizeof(short)*nUsed );
delete [] pData;
}
- nUnused = sal::static_int_cast< BYTE >(nNewSize-nUsed);
+ nUnused = sal::static_int_cast< sal_uInt8 >(nNewSize-nUsed);
pData = pNewData;
}
@@ -717,7 +717,7 @@ void WordArr::Insert( USHORT nPos, short rElem )
// -----------------------------------------------------------------------
-short WordArr::operator[]( USHORT nPos ) const
+short WordArr::operator[]( sal_uInt16 nPos ) const
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
@@ -726,7 +726,7 @@ short WordArr::operator[]( USHORT nPos ) const
// -----------------------------------------------------------------------
-short& WordArr::operator [] (USHORT nPos)
+short& WordArr::operator [] (sal_uInt16 nPos)
{
DBG_MEMTEST();
DBG_ASSERT( nPos < nUsed, "" );
diff --git a/sfx2/source/bastyp/misc.cxx b/sfx2/source/bastyp/misc.cxx
index 49938c729b36..ae3b0807bbe4 100644
--- a/sfx2/source/bastyp/misc.cxx
+++ b/sfx2/source/bastyp/misc.cxx
@@ -46,7 +46,7 @@ String SearchAndReplace( const String &rSource,
const String &rReplacement )
{
String aTarget( rSource );
- USHORT nPos = rSource.Search( rToReplace );
+ sal_uInt16 nPos = rSource.Search( rToReplace );
if ( nPos != STRING_NOTFOUND )
{
aTarget.Erase( nPos, rToReplace.Len() );
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 9650c8155d84..3c4c78e9d630 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -81,14 +81,14 @@ struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
String aText, aStateText;
- ULONG nMax;
+ sal_uIntPtr nMax;
clock_t nCreate;
clock_t nNextReschedule;
- BOOL bLocked, bAllDocs;
- BOOL bWaitMode;
- BOOL bAllowRescheduling;
- BOOL bRunning;
- BOOL bIsStatusText;
+ sal_Bool bLocked, bAllDocs;
+ sal_Bool bWaitMode;
+ sal_Bool bAllowRescheduling;
+ sal_Bool bRunning;
+ sal_Bool bIsStatusText;
SfxProgress* pActiveProgress;
SfxObjectShellRef xObjSh;
@@ -96,7 +96,7 @@ struct SfxProgress_Impl
SfxViewFrame* pView;
SfxProgress_Impl( const String& );
- void Enable_Impl( BOOL );
+ void Enable_Impl( sal_Bool );
};
@@ -114,11 +114,11 @@ struct SfxProgress_Impl
#define aTypeLibInfo aProgressTypeLibImpl
//========================================================================
-extern ULONG Get10ThSec();
+extern sal_uIntPtr Get10ThSec();
// -----------------------------------------------------------------------
-void SfxProgress_Impl::Enable_Impl( BOOL bEnable )
+void SfxProgress_Impl::Enable_Impl( sal_Bool bEnable )
{
SfxObjectShell* pDoc = bAllDocs ? NULL : (SfxObjectShell*) xObjSh;
SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
@@ -157,11 +157,11 @@ SfxProgress::SfxProgress
const String& rText, /* Text, der in der Statuszeile vor den Statusmonitor
erscheint */
- ULONG nRange, /* Maximalwert des Bereiches */
+ sal_uIntPtr nRange, /* Maximalwert des Bereiches */
- BOOL bAll /* alle Dokumente oder nur das Dokument des ViewFrames
- disablen (FALSE) */
- ,BOOL bWait /* initial den Wait-Pointer aktivieren (TRUE) */
+ sal_Bool bAll /* alle Dokumente oder nur das Dokument des ViewFrames
+ disablen (sal_False) */
+ ,sal_Bool bWait /* initial den Wait-Pointer aktivieren (sal_True) */
)
/* [Beschreibung]
@@ -176,17 +176,17 @@ SfxProgress::SfxProgress
: pImp( new SfxProgress_Impl( rText ) ),
nVal(0),
- bSuspended(TRUE)
+ bSuspended(sal_True)
{
- pImp->bRunning = TRUE;
+ pImp->bRunning = sal_True;
pImp->bAllowRescheduling = Application::IsInExecute();;
pImp->xObjSh = pObjSh;
pImp->aText = rText;
pImp->nMax = nRange;
- pImp->bLocked = FALSE;
+ pImp->bLocked = sal_False;
pImp->bWaitMode = bWait;
- pImp->bIsStatusText = FALSE;
+ pImp->bIsStatusText = sal_False;
pImp->nCreate = Get10ThSec();
pImp->nNextReschedule = pImp->nCreate;
DBG( DbgOutf( "SfxProgress: created for '%s' at %luds",
@@ -219,7 +219,7 @@ SfxProgress::~SfxProgress()
if ( pImp->xStatusInd.is() )
pImp->xStatusInd->end();
- if( pImp->bIsStatusText == TRUE )
+ if( pImp->bIsStatusText == sal_True )
GetpApp()->HideStatusText( );
delete pImp;
}
@@ -243,7 +243,7 @@ void SfxProgress::Stop()
if ( !pImp->bRunning )
return;
- pImp->bRunning = FALSE;
+ pImp->bRunning = sal_False;
DBG( DbgOutf( "SfxProgress: destroyed at %luds", Get10ThSec() ) );
Suspend();
@@ -252,7 +252,7 @@ void SfxProgress::Stop()
else
SFX_APP()->SetProgress_Impl(0);
if ( pImp->bLocked )
- pImp->Enable_Impl(TRUE);
+ pImp->Enable_Impl(sal_True);
}
// -----------------------------------------------------------------------
@@ -299,7 +299,7 @@ IMPL_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus*, pStatus )
{
GetpApp()->ShowStatusText( aString );
if( pThis )
- pThis->pImp->bIsStatusText = TRUE;
+ pThis->pImp->bIsStatusText = sal_True;
}
return 0;
}
@@ -308,7 +308,7 @@ IMPL_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus*, pStatus )
// -----------------------------------------------------------------------
// muss in AppDaten
-static ULONG nLastTime = 0;
+static sal_uIntPtr nLastTime = 0;
long TimeOut_Impl( void*, void* pArgV )
{
@@ -325,11 +325,11 @@ long TimeOut_Impl( void*, void* pArgV )
// -----------------------------------------------------------------------
-BOOL SfxProgress::SetStateText
+sal_Bool SfxProgress::SetStateText
(
- ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
+ sal_uLong nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
const String& rNewVal, /* Status als Text */
- ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
+ sal_uLong nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
)
{
@@ -339,11 +339,11 @@ BOOL SfxProgress::SetStateText
// -----------------------------------------------------------------------
-BOOL SfxProgress::SetState
+sal_Bool SfxProgress::SetState
(
- ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
+ sal_uLong nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
- ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
+ sal_uLong nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
)
/* [Beschreibung]
@@ -353,7 +353,7 @@ BOOL SfxProgress::SetState
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool TRUE
Fortfahren mit der Aktion
FALSE
@@ -363,12 +363,12 @@ BOOL SfxProgress::SetState
{
// wurde via Stop-Button angehalten?
// if ( pImp->IsCancelled() )
-// return FALSE;
+// return sal_False;
- if( pImp->pActiveProgress ) return TRUE;
+ if( pImp->pActiveProgress ) return sal_True;
// neuen Wert "ubernehmen
- BOOL bOver=FALSE;
+ sal_Bool bOver=sal_False;
nVal = nNewVal;
// neuer Range?
@@ -377,7 +377,7 @@ BOOL SfxProgress::SetState
DBG( DbgOutf( "SfxProgress: range changed from %lu to %lu",
pImp->nMax, nNewRange ) );
pImp->nMax = nNewRange;
- bOver = TRUE;
+ bOver = sal_True;
}
if ( !pImp->xStatusInd.is() )
@@ -397,7 +397,7 @@ BOOL SfxProgress::SetState
{
// don't show status indicator for hidden documents (only valid while loading)
SfxMedium* pMedium = pObjSh->GetMedium();
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
if ( !pHiddenItem || !pHiddenItem->GetValue() )
{
// not in a view, perhaps it's just loading
@@ -409,7 +409,7 @@ BOOL SfxProgress::SetState
//}
//else
{
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False );
Reference< XStatusIndicator > xInd;
if ( pIndicatorItem && (pIndicatorItem->GetValue()>>=xInd) )
pImp->xStatusInd = xInd;
@@ -436,7 +436,7 @@ BOOL SfxProgress::SetState
pImp->xStatusInd->setValue( nNewVal );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -480,7 +480,7 @@ void SfxProgress::Resume()
pFrame->GetBindings().ENTERREGISTRATIONS();
}
- bSuspended = FALSE;
+ bSuspended = sal_False;
}
}
@@ -501,7 +501,7 @@ void SfxProgress::Suspend()
if ( !bSuspended )
{
DBG( DbgOutf( "SfxProgress: suspended" ) );
- bSuspended = TRUE;
+ bSuspended = sal_True;
if ( pImp->xStatusInd.is() )
{
@@ -543,7 +543,7 @@ void SfxProgress::Lock()
( eMode == SFX_CREATE_MODE_PREVIEW ) )
{
DBG( DbgOutf( "SfxProgress: not locked because EMBEDDED/PREVIEW found" ) );
- pImp->bAllowRescheduling = FALSE;
+ pImp->bAllowRescheduling = sal_False;
}
}
}
@@ -554,14 +554,14 @@ void SfxProgress::Lock()
( eMode == SFX_CREATE_MODE_PREVIEW ) )
{
DBG( DbgOutf( "SfxProgress: not locked because ObjectShell is EMBEDDED/PREVIEW" ) );
- pImp->bAllowRescheduling = FALSE;
+ pImp->bAllowRescheduling = sal_False;
}
}
- pImp->Enable_Impl( FALSE );
+ pImp->Enable_Impl( sal_False );
DBG( DbgOutf( "SfxProgress: locked" ) );
- pImp->bLocked = TRUE;
+ pImp->bLocked = sal_True;
}
// -----------------------------------------------------------------------
@@ -573,8 +573,8 @@ void SfxProgress::UnLock()
return;
DBG( DbgOutf( "SfxProgress: unlocked" ) );
- pImp->bLocked = FALSE;
- pImp->Enable_Impl(TRUE);
+ pImp->bLocked = sal_False;
+ pImp->Enable_Impl(sal_True);
}
// -----------------------------------------------------------------------
@@ -608,7 +608,7 @@ void SfxProgress::Reschedule()
void SfxProgress::SetWaitMode
(
- BOOL bWait /* TRUE
+ sal_Bool bWait /* TRUE
Wartecursor wird verwendet
FALSE
@@ -654,7 +654,7 @@ void SfxProgress::SetWaitMode
// -----------------------------------------------------------------------
-BOOL SfxProgress::GetWaitMode() const
+sal_Bool SfxProgress::GetWaitMode() const
/* [Beschreibung]
@@ -748,6 +748,6 @@ FASTBOOL SfxProgress::StatusBarManagerGone_Impl
*/
{
- return TRUE;
+ return sal_True;
}
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 8a4b434f460b..7d86043308ce 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -73,7 +73,7 @@ static HTMLOptionEnum __READONLY_DATA aAreaShapeOptEnums[] =
{ 0, 0 }
};
-SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
+SfxHTMLParser::SfxHTMLParser( SvStream& rStream, sal_Bool bIsNewDoc,
SfxMedium *pMed ) :
HTMLParser( rStream, bIsNewDoc ),
pMedium( pMed ), pDLMedium( 0 ),
@@ -89,7 +89,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
- SetSwitchToUCS2( TRUE );
+ SetSwitchToUCS2( sal_True );
}
__EXPORT SfxHTMLParser::~SfxHTMLParser()
@@ -98,7 +98,7 @@ __EXPORT SfxHTMLParser::~SfxHTMLParser()
delete pDLMedium;
}
-BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
+sal_Bool SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
const HTMLOptions * pOptions)
{
DBG_ASSERT( pImageMap, "ParseMapOptions: keine Image-Map" );
@@ -106,7 +106,7 @@ BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
String aName;
- for( USHORT i=pOptions->Count(); i; )
+ for( sal_uInt16 i=pOptions->Count(); i; )
{
const HTMLOption *pOption = (*pOptions)[--i];
switch( pOption->GetToken() )
@@ -123,23 +123,23 @@ BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
return aName.Len() > 0;
}
-BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
+sal_Bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseURL,
const HTMLOptions * pOptions,
- USHORT nEventMouseOver,
- USHORT nEventMouseOut )
+ sal_uInt16 nEventMouseOver,
+ sal_uInt16 nEventMouseOut )
{
DBG_ASSERT( pImageMap, "ParseAreaOptions: keine Image-Map" );
DBG_ASSERT( pOptions, "ParseAreaOptions: keine Optionen" );
- USHORT nShape = IMAP_OBJ_RECTANGLE;
+ sal_uInt16 nShape = IMAP_OBJ_RECTANGLE;
SvULongs aCoords;
String aName, aHRef, aAlt, aTarget, sEmpty;
- BOOL bNoHRef = FALSE;
+ sal_Bool bNoHRef = sal_False;
SvxMacroTableDtor aMacroTbl;
- for( USHORT i=pOptions->Count(); i; )
+ for( sal_uInt16 i=pOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScrpType = STARBASIC;
const HTMLOption *pOption = (*pOptions)[--i];
switch( pOption->GetToken() )
@@ -151,13 +151,13 @@ BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseUR
pOption->GetEnum( nShape, aAreaShapeOptEnums );
break;
case HTML_O_COORDS:
- pOption->GetNumbers( aCoords, TRUE );
+ pOption->GetNumbers( aCoords, sal_True );
break;
case HTML_O_HREF:
aHRef = INetURLObject::GetAbsURL( rBaseURL, pOption->GetString() );
break;
case HTML_O_NOHREF:
- bNoHRef = TRUE;
+ bNoHRef = sal_True;
break;
case HTML_O_ALT:
aAlt = pOption->GetString();
@@ -195,7 +195,7 @@ IMAPOBJ_SETEVENT:
if( bNoHRef )
aHRef.Erase();
- BOOL bNewArea = TRUE;
+ sal_Bool bNewArea = sal_True;
switch( nShape )
{
case IMAP_OBJ_RECTANGLE:
@@ -224,9 +224,9 @@ IMAPOBJ_SETEVENT:
case IMAP_OBJ_POLYGON:
if( aCoords.Count() >=6 )
{
- USHORT nCount = aCoords.Count() / 2;
+ sal_uInt16 nCount = aCoords.Count() / 2;
Polygon aPoly( nCount );
- for( USHORT i=0; i<nCount; i++ )
+ for( sal_uInt16 i=0; i<nCount; i++ )
aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, String(), aTarget, aName,
!bNoHRef );
@@ -236,7 +236,7 @@ IMAPOBJ_SETEVENT:
}
break;
default:
- bNewArea = FALSE;
+ bNewArea = sal_False;
}
return bNewArea;
@@ -250,7 +250,7 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
if( pDLMedium )
return;
- pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, FALSE );
+ pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, sal_False );
if( pSh )
{
// Medium registrieren, damit abgebrochen werden kann
@@ -264,13 +264,13 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
}
// Download anstossen (Achtung: Kann auch synchron sein).
- if ( TRUE /*pMedium->GetDoneLink() == Link()*/ )
+ if ( sal_True /*pMedium->GetDoneLink() == Link()*/ )
pDLMedium->DownLoad();
else
{
- // Downloading-Flag auf TRUE setzen. Es werden dann auch
+ // Downloading-Flag auf sal_True setzen. Es werden dann auch
// Data-Available-Links, wenn wir in den Pending-Staus gelangen.
- SetDownloadingFile( TRUE );
+ SetDownloadingFile( sal_True );
pDLMedium->DownLoad( STATIC_LINK( this, SfxHTMLParser, FileDownloadDone ) );
// Wenn das Dowsnloading-Flag noch gesetzt ist erfolgt der Download
@@ -287,17 +287,17 @@ void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
}
}
-BOOL SfxHTMLParser::GetFileDownloadMIME( String& rMIME )
+sal_Bool SfxHTMLParser::GetFileDownloadMIME( String& rMIME )
{
return pDLMedium && pDLMedium->GetErrorCode()==0 &&
pDLMedium->GetMIMEAndRedirect(rMIME)==0;
}
-BOOL SfxHTMLParser::FinishFileDownload( String& rStr )
+sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr )
{
String aStr;
- BOOL bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
+ sal_Bool bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
if( bOK )
{
SvStream* pStream = pDLMedium->GetInStream();
@@ -342,7 +342,7 @@ IMPL_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void*, EMPTYARG )
{
// Der Download ist jetzt abgeschlossen. Ausserdem muss/darf der
// Data-Available-Link wieder durchgelassen werden.
- pThis->SetDownloadingFile( FALSE );
+ pThis->SetDownloadingFile( sal_False );
// ... und einmal aufrufen, damit weitergelesen wird.
pThis->CallAsyncCallLink();
@@ -357,7 +357,7 @@ void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
if( pHTTPHeader )
{
SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ for( sal_Bool bCont = pHTTPHeader->GetFirst( aKV ); bCont;
bCont = pHTTPHeader->GetNext( aKV ) )
{
if( aKV.GetKey().EqualsIgnoreCaseAscii(
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index cf1cd983f76e..0ed0aab649cf 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -39,7 +39,7 @@
static ResMgr* pMgr=NULL;
-SfxResId::SfxResId( USHORT nId ) :
+SfxResId::SfxResId( sal_uInt16 nId ) :
ResId( nId, *GetResMgr() )
{
@@ -51,7 +51,7 @@ SfxResId::SfxResId( USHORT nId ) :
//
//============================================================================
-SfxSimpleResId::SfxSimpleResId(USHORT nID):
+SfxSimpleResId::SfxSimpleResId(sal_uInt16 nID):
m_sText( SFX_APP()->GetSimpleResManager()->ReadString(nID) )
{}
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 2ab7b1c9602b..59d3107532a4 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -66,7 +66,7 @@ using namespace com::sun::star;
SfxEventNamesList& SfxEventNamesList::operator=( const SfxEventNamesList& rTbl )
{
DelDtor();
- for (USHORT n=0; n<rTbl.Count(); n++ )
+ for (sal_uInt16 n=0; n<rTbl.Count(); n++ )
{
SfxEventName* pTmp = ((SfxEventNamesList&)rTbl).GetObject(n);
SfxEventName *pNew = new SfxEventName( *pTmp );
@@ -94,19 +94,19 @@ int SfxEventNamesItem::operator==( const SfxPoolItem& rAttr ) const
const SfxEventNamesList& rOther = ( (SfxEventNamesItem&) rAttr ).aEventsList;
if ( rOwn.Count() != rOther.Count() )
- return FALSE;
+ return sal_False;
- for ( USHORT nNo = 0; nNo < rOwn.Count(); ++nNo )
+ for ( sal_uInt16 nNo = 0; nNo < rOwn.Count(); ++nNo )
{
const SfxEventName *pOwn = rOwn.GetObject(nNo);
const SfxEventName *pOther = rOther.GetObject(nNo);
if ( pOwn->mnId != pOther->mnId ||
pOwn->maEventName != pOther->maEventName ||
pOwn->maUIName != pOther->maUIName )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -125,25 +125,25 @@ SfxPoolItem* SfxEventNamesItem::Clone( SfxItemPool *) const
return new SfxEventNamesItem(*this);
}
-SfxPoolItem* SfxEventNamesItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxEventNamesItem::Create(SvStream &, sal_uInt16) const
{
DBG_ERROR("not streamable!");
return new SfxEventNamesItem(Which());
}
-SvStream& SfxEventNamesItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxEventNamesItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_ERROR("not streamable!");
return rStream;
}
-USHORT SfxEventNamesItem::GetVersion( USHORT ) const
+sal_uInt16 SfxEventNamesItem::GetVersion( sal_uInt16 ) const
{
DBG_ERROR("not streamable!");
return 0;
}
-void SfxEventNamesItem::AddEvent( const String& rName, const String& rUIName, USHORT nID )
+void SfxEventNamesItem::AddEvent( const String& rName, const String& rUIName, sal_uInt16 nID )
{
aEventsList.Insert( new SfxEventName( nID, rName, rUIName.Len() ? rUIName : rName ) );
}
@@ -287,7 +287,7 @@ void SfxEventConfiguration::ConfigureEvent( rtl::OUString aName, const SvxMacro&
}
// -------------------------------------------------------------------------------------------------------
-SvxMacro* SfxEventConfiguration::ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, BOOL bBlowUp )
+SvxMacro* SfxEventConfiguration::ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, sal_Bool bBlowUp )
{
return SfxEvents_Impl::ConvertToMacro( rElement, pDoc, bBlowUp );
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index cf04de2cb3a4..d8e4258e60d4 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -91,7 +91,7 @@ DBG_NAME(SfxBindingsInvalidateAll)
//====================================================================
-static USHORT nTimeOut = 300;
+static sal_uInt16 nTimeOut = 300;
#define TIMEOUT_FIRST nTimeOut
#define TIMEOUT_UPDATING 20
@@ -100,7 +100,7 @@ static USHORT nTimeOut = 300;
static sal_uInt32 nCache1 = 0;
static sal_uInt32 nCache2 = 0;
-typedef std::hash_map< USHORT, bool > InvalidateSlotMap;
+typedef std::hash_map< sal_uInt16, bool > InvalidateSlotMap;
//====================================================================
@@ -399,7 +399,7 @@ void SfxBindings::Update_Impl
{
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
- pCache->SetCachedState(TRUE);
+ pCache->SetCachedState(sal_True);
if ( !pCache->GetInternalController() )
return;
}
@@ -467,7 +467,7 @@ void SfxBindings::InvalidateSlotsInMap_Impl()
//--------------------------------------------------------------------
-void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( USHORT nId )
+void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( sal_uInt16 nId )
{
pImp->m_aInvalidateSlots[nId] = sal_True;
}
@@ -504,10 +504,10 @@ void SfxBindings::Update
if (pCache)
{
- BOOL bInternalUpdate = TRUE;
+ sal_Bool bInternalUpdate = sal_True;
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
- pCache->SetCachedState(TRUE);
+ pCache->SetCachedState(sal_True);
bInternalUpdate = ( pCache->GetInternalController() != 0 );
}
@@ -1027,16 +1027,16 @@ sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
//--------------------------------------------------------------------
void SfxBindings::RegisterInternal_Impl( SfxControllerItem& rItem )
{
- Register_Impl( rItem, TRUE );
+ Register_Impl( rItem, sal_True );
}
void SfxBindings::Register( SfxControllerItem& rItem )
{
- Register_Impl( rItem, FALSE );
+ Register_Impl( rItem, sal_False );
}
-void SfxBindings::Register_Impl( SfxControllerItem& rItem, BOOL bInternal )
+void SfxBindings::Register_Impl( SfxControllerItem& rItem, sal_Bool bInternal )
{
DBG_MEMTEST();
DBG_ASSERT( nRegLevel > 0, "registration without EnterRegistrations" );
@@ -1150,14 +1150,14 @@ sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_
return ( pRet != 0 );
}
-void SfxBindings::ExecuteGlobal_Impl( USHORT nId )
+void SfxBindings::ExecuteGlobal_Impl( sal_uInt16 nId )
{
if( nId && pDispatcher )
- Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, TRUE );
+ Execute_Impl( nId, NULL, 0, SFX_CALLMODE_ASYNCHRON, NULL, sal_True );
}
const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
- const SfxPoolItem **ppInternalArgs, BOOL bGlobalOnly )
+ const SfxPoolItem **ppInternalArgs, sal_Bool bGlobalOnly )
{
SfxStateCache *pCache = GetStateCache( nId );
if ( !pCache )
@@ -1377,10 +1377,10 @@ void SfxBindings::UpdateSlotServer_Impl()
( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
//if ( xFrame.is() )
// xFrame->contextChanged();
- pImp->bContextChanged = FALSE;
+ pImp->bContextChanged = sal_False;
}
else
- pImp->bContextChanged = TRUE;
+ pImp->bContextChanged = sal_True;
}
const sal_uInt16 nCount = pImp->pCaches->Count();
@@ -1466,7 +1466,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
pRealSlot->GetSlotId(), pRealSlot->GetWhich(rPool), pRealSlot, pCache );
rFound.Insert( pFound );
- USHORT nSlot = pRealSlot->GetSlotId();
+ sal_uInt16 nSlot = pRealSlot->GetSlotId();
if ( !(nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) )
{
pInterface = pInterface->GetRealInterfaceForSlot( pRealSlot );
@@ -1496,10 +1496,10 @@ SfxItemSet* SfxBindings::CreateSet_Impl
}
// Mu\s der Slot "uberhaupt upgedatet werden ?
- FASTBOOL bInsert = pSiblingCache && pSiblingCache->IsControllerDirty();
+ bool bInsert = pSiblingCache && pSiblingCache->IsControllerDirty();
// Bugfix #26161#: Es reicht nicht, nach der selben Shell zu fragen !!
- FASTBOOL bSameMethod = pSiblingCache && pFnc == pSiblingFnc;
+ bool bSameMethod = pSiblingCache && pFnc == pSiblingFnc;
// Wenn der Slot ein nicht-dirty MasterSlot ist, dann ist vielleicht
// einer seiner Slaves dirty ? Dann wird der Masterslot doch eingef"ugt.
@@ -1543,7 +1543,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
// aus den Ranges ein Set erzeugen
sal_uInt16 *pRanges = new sal_uInt16[rFound.Count() * 2 + 1];
int j = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < rFound.Count() )
{
pRanges[j++] = rFound[i]->nWhichId;
@@ -1729,7 +1729,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
pImp->aTimer.SetTimeout(TIMEOUT_UPDATING);
// at least 10 loops and further if more jobs are available but no input
- FASTBOOL bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule;
+ bool bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule;
sal_uInt16 nLoops = 10;
pImp->bInNextJob = sal_True;
const sal_uInt16 nCount = pImp->pCaches->Count();
@@ -1913,7 +1913,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
{
if ( pImp->bContextChanged )
{
- pImp->bContextChanged = FALSE;
+ pImp->bContextChanged = sal_False;
/*
::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame
( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
@@ -2125,12 +2125,12 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
if ( !pDisp )
{
- BOOL bDeleteCache = FALSE;
+ sal_Bool bDeleteCache = sal_False;
if ( !pCache )
{
pCache = new SfxStateCache( nSlot );
pCache->GetSlotServer( *GetDispatcher_Impl(), pImp->xProv );
- bDeleteCache = TRUE;
+ bDeleteCache = sal_True;
}
SfxItemState eState = SFX_ITEM_SET;
@@ -2346,7 +2346,7 @@ SystemWindow* SfxBindings::GetSystemWindow() const
return pTop->GetFrame().GetTopWindow_Impl();
}
-BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
+sal_Bool SfxBindings::ExecuteCommand_Impl( const String& rCommand )
{
::com::sun::star::util::URL aURL;
aURL.Complete = rCommand;
@@ -2375,10 +2375,10 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand )
::comphelper::UiEventsLogger::logDispatch(aURL, source);
}
new SfxAsyncExec_Impl( aURL, xDisp );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxBindings::GetRecorder() const
@@ -2395,7 +2395,7 @@ void SfxBindings::ContextChanged_Impl()
{
if ( !pImp->bInUpdate && ( !pImp->bContextChanged || !pImp->bAllMsgDirty ) )
{
- InvalidateAll( TRUE );
+ InvalidateAll( sal_True );
}
}
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 9376b81fa0ff..e90b680ffa13 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -45,7 +45,7 @@ DBG_NAME(SfxControllerItem);
//--------------------------------------------------------------------
#ifdef DBG_UTIL
-void SfxControllerItem::CheckConfigure_Impl( ULONG nType )
+void SfxControllerItem::CheckConfigure_Impl( sal_uIntPtr nType )
{
// echter Slot? (also kein Separator etc.)
if ( !nId )
@@ -77,9 +77,9 @@ SfxControllerItem* SfxControllerItem::GetItemLink()
//--------------------------------------------------------------------
-// returns TRUE if this binding is really bound to a function
+// returns sal_True if this binding is really bound to a function
-BOOL SfxControllerItem::IsBound() const
+sal_Bool SfxControllerItem::IsBound() const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -90,13 +90,13 @@ BOOL SfxControllerItem::IsBound() const
// returns the associated function-id or 0 if none
-// USHORT SfxControllerItem::GetId() const;
+// sal_uInt16 SfxControllerItem::GetId() const;
//====================================================================
// registeres with the id at the bindings
-void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
+void SfxControllerItem::Bind( sal_uInt16 nNewId, SfxBindings *pBindinx )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -115,7 +115,7 @@ void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
pBindings->Register(*this);
}
-void SfxControllerItem::BindInternal_Impl( USHORT nNewId, SfxBindings *pBindinx )
+void SfxControllerItem::BindInternal_Impl( sal_uInt16 nNewId, SfxBindings *pBindinx )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -261,7 +261,7 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin
// changes the id of unbound functions (e.g. for sub-menu-ids)
-void SfxControllerItem::SetId( USHORT nItemId )
+void SfxControllerItem::SetId( sal_uInt16 nItemId )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
@@ -286,7 +286,7 @@ SfxControllerItem::SfxControllerItem():
// creates a representation of the function nId and registeres it
-SfxControllerItem::SfxControllerItem( USHORT nID, SfxBindings &rBindings ):
+SfxControllerItem::SfxControllerItem( sal_uInt16 nID, SfxBindings &rBindings ):
nId(nID),
pNext(this),
pBindings(&rBindings)
@@ -312,7 +312,7 @@ SfxControllerItem::~SfxControllerItem()
void SfxControllerItem::StateChanged
(
- USHORT , // <SID> des ausl"osenden Slot
+ sal_uInt16 , // <SID> des ausl"osenden Slot
SfxItemState , // <SfxItemState> von 'pState'
const SfxPoolItem* // Slot-Status, ggf. 0 oder IsInvalidItem()
)
@@ -352,7 +352,7 @@ void SfxControllerItem::DeleteFloatingWindow()
void SfxStatusForwarder::StateChanged
(
- USHORT nSID, // <SID> des ausl"osenden Slot
+ sal_uInt16 nSID, // <SID> des ausl"osenden Slot
SfxItemState eState, // <SfxItemState> von 'pState'
const SfxPoolItem* pState // Slot-Status, ggf. 0 oder IsInvalidItem()
)
@@ -364,7 +364,7 @@ void SfxStatusForwarder::StateChanged
//--------------------------------------------------------------------
SfxStatusForwarder::SfxStatusForwarder(
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxControllerItem& rMaster ):
SfxControllerItem( nSlotId, rMaster.GetBindings() ),
pMaster( &rMaster )
@@ -448,7 +448,7 @@ SfxMapUnit SfxControllerItem::GetCoreMetric() const
{
SfxShell *pSh = pDispat->GetShell( pServer->GetShellLevel() );
SfxItemPool &rPool = pSh->GetPool();
- USHORT nWhich = rPool.GetWhich( nId );
+ sal_uInt16 nWhich = rPool.GetWhich( nId );
return rPool.GetMetric( nWhich );
}
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index ddf3422744cb..9b403e3ddab4 100755
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -796,11 +796,11 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
SfxBindings *pBind = GetBindings();
while ( pBind )
{
- pBind->HidePopupCtrls_Impl( FALSE );
+ pBind->HidePopupCtrls_Impl( sal_False );
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( FALSE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_False, sal_False, 1 );
}
if ( pImp->aToDoStack.Count() )
@@ -882,7 +882,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
for ( sal_uInt16 i = 0; i < pImp->aStack.Count(); ++i )
pImp->aStack.Top(i)->DoDeactivate_Impl(pImp->pFrame, bMDI);
- BOOL bHidePopups = bMDI && pImp->pFrame;
+ sal_Bool bHidePopups = bMDI && pImp->pFrame;
if ( pNew && pImp->pFrame )
{
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame(
@@ -892,7 +892,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
GetFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY );
if ( xOldFrame == xMyFrame )
- bHidePopups = FALSE;
+ bHidePopups = sal_False;
}
if ( bHidePopups )
@@ -901,11 +901,11 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
SfxBindings *pBind = GetBindings();
while ( pBind )
{
- pBind->HidePopupCtrls_Impl( TRUE );
+ pBind->HidePopupCtrls_Impl( sal_True );
pBind = pBind->GetSubBindings_Impl();
}
- pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( TRUE, FALSE, 1 );
+ pImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( sal_True, sal_False, 1 );
}
Flush();
@@ -1036,7 +1036,7 @@ void SfxDispatcher::_Execute
if ( &rShell == pDispat->pImp->aStack.Top(n) )
{
if ( eCallMode & SFX_CALLMODE_RECORD )
- rReq.AllowRecording( TRUE );
+ rReq.AllowRecording( sal_True );
pDispat->pImp->xPoster->Post(new SfxRequest(rReq));
// pDispat->pImp->xPoster->Post(new Executer(new SfxRequest(rReq), &rSlot, n ));
return;
@@ -1283,11 +1283,11 @@ const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem )
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute(
- USHORT nSlot,
+ sal_uInt16 nSlot,
SfxCallMode nCall,
SfxItemSet* pArgs,
SfxItemSet* pInternalArgs,
- USHORT nModi)
+ sal_uInt16 nModi)
{
if ( IsLocked(nSlot) )
return 0;
@@ -1408,9 +1408,9 @@ const SfxPoolItem* SfxDispatcher::Execute
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute
(
- USHORT nSlot,
+ sal_uInt16 nSlot,
SfxCallMode eCall,
- USHORT nModi,
+ sal_uInt16 nModi,
const SfxItemSet &rArgs
)
{
@@ -1797,10 +1797,10 @@ void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bo
// check for toolboxes that are exclusively for a viewer
if ( pImp->pFrame)
{
- BOOL bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER );
+ sal_Bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER );
SfxObjectShell* pSh = pImp->pFrame->GetObjectShell();
SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, sal_False );
- BOOL bIsViewer = pItem && pItem->GetValue();
+ sal_Bool bIsViewer = pItem && pItem->GetValue();
if ( bIsViewer != bViewerTbx )
continue;
}
@@ -1980,7 +1980,7 @@ void SfxDispatcher::FlushImpl()
{
// tats"aechlich poppen
SfxShell* pPopped = 0;
- FASTBOOL bFound = sal_False;
+ bool bFound = sal_False;
do
{
DBG_ASSERT( pImp->aStack.Count(), "popping from empty stack" );
@@ -2343,12 +2343,12 @@ sal_Bool SfxDispatcher::_FindServer
if ( pSlot )
{
// Slot geh"ort zum Container?
- FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
- FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
+ bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
+ bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
// Shell geh"ort zum Server?
// AppDispatcher oder IPFrame-Dispatcher
- FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace;
+ bool bIsServerShell = !pImp->pFrame || bIsInPlace;
// Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
// einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
@@ -2360,7 +2360,7 @@ sal_Bool SfxDispatcher::_FindServer
// Shell geh"ort zum Container?
// AppDispatcher oder kein IPFrameDispatcher
- FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace;
+ bool bIsContainerShell = !pImp->pFrame || !bIsInPlace;
// Shell und Slot passen zusammen
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
( !bIsContainerSlot && bIsServerShell ) ) )
@@ -2458,12 +2458,12 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
if ( pSlot )
{
// Slot geh"ort zum Container?
- FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
- FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
+ bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
+ bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
// Shell geh"ort zum Server?
// AppDispatcher oder IPFrame-Dispatcher
- FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace;
+ bool bIsServerShell = !pImp->pFrame || bIsInPlace;
// Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
// einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
@@ -2475,7 +2475,7 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
// Shell geh"ort zum Container?
// AppDispatcher oder kein IPFrameDispatcher
- FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace;
+ bool bIsContainerShell = !pImp->pFrame || !bIsInPlace;
// Shell und Slot passen zusammen
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
@@ -2529,7 +2529,7 @@ sal_Bool SfxDispatcher::_FillState
{
DBG_ASSERT(bFlushed, "Dispatcher not flushed after retrieving slot servers!");
if ( !bFlushed )
- return FALSE;
+ return sal_False;
// Flush();
// Objekt ermitteln und Message an diesem Objekt aufrufen
@@ -2748,8 +2748,8 @@ void SfxDispatcher::Lock( sal_Bool bLock )
pImp->bLocked = bLock;
if ( !bLock )
{
- USHORT nCount = pImp->aReqArr.Count();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pImp->aReqArr.Count();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
pImp->xPoster->Post( pImp->aReqArr[i] );
pImp->aReqArr.Remove( 0, nCount );
}
@@ -2903,7 +2903,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp
return SFX_ITEM_DISABLED;
}
-SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any& rAny )
+SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno::Any& rAny )
{
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
@@ -2919,12 +2919,12 @@ SfxItemState SfxDispatcher::QueryState( USHORT nSID, ::com::sun::star::uno::Any&
::com::sun::star::uno::Any aState;
if ( !pItem->ISA(SfxVoidItem) )
{
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
SfxItemPool& rPool = pShell->GetPool();
- USHORT nWhich = rPool.GetWhich( nSID );
+ sal_uInt16 nWhich = rPool.GetWhich( nSID );
if ( rPool.GetMetric( nWhich ) == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pItem->QueryValue( aState, (BYTE)nSubId );
+ pItem->QueryValue( aState, (sal_uInt8)nSubId );
}
rAny = aState;
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 04a820d8e0ac..87879656021e 100644
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -62,9 +62,9 @@ SfxMacroStatement::SfxMacroStatement
(
const SfxShell& /*rShell*/, // <SfxShell>, die den Request ausf"uhrte
const String& /*rTarget*/, // Name des Zielobjektes vor der Ausf"urhung
- BOOL /*bAbsolute*/, // obsolet
+ sal_Bool /*bAbsolute*/, // obsolet
const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ sal_Bool bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
@@ -91,7 +91,7 @@ SfxMacroStatement::SfxMacroStatement
die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")')
angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der
Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&,
- const SfxSlot&,BOOL,SfxArguments*)> verwendet werden.
+ const SfxSlot&,sal_Bool,SfxArguments*)> verwendet werden.
F"ur das so bezeichnete Objekt wird dann je nach Typ des Slots
eine Zuweisung an eines seiner Properties oder der Aufruf einer seiner
@@ -112,7 +112,7 @@ SfxMacroStatement::SfxMacroStatement
[Querverweise]
- <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const String&)>
*/
@@ -126,11 +126,11 @@ SfxMacroStatement::SfxMacroStatement
return;
/*
// Objekt-Typ bestimmen
- FASTBOOL bIsApp = rShell.ISA(SfxApplication);
- FASTBOOL bIsDoc = rShell.ISA(SfxObjectShell);
- FASTBOOL bIsWin = !bIsApp && !bIsDoc &&
+ bool bIsApp = rShell.ISA(SfxApplication);
+ bool bIsDoc = rShell.ISA(SfxObjectShell);
+ bool bIsWin = !bIsApp && !bIsDoc &&
( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) );
- FASTBOOL bIsSel = !bIsApp && !bIsDoc && !bIsWin;
+ bool bIsSel = !bIsApp && !bIsDoc && !bIsWin;
// Objekt nicht schon im Slot-Namen enthalten?
if ( bIsSel || rSlot.pName[0] == '.' )
@@ -229,7 +229,7 @@ SfxMacroStatement::SfxMacroStatement
(
const String& rTarget, // Objekt, was beim Playing angesprochen wird
const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ sal_Bool bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
@@ -239,7 +239,7 @@ SfxMacroStatement::SfxMacroStatement
[Querverweise]
<SfxMacroStatement::SfxMacroStatement(const String&)>
- <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)>
*/
: nSlotId( rSlot.GetSlotId() ),
@@ -270,13 +270,13 @@ SfxMacroStatement::SfxMacroStatement
[Querverweise]
- <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
- <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,sal_Bool,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,sal_Bool,const SfxSlot&,sal_Bool,SfxArguments*)>
*/
: nSlotId( 0 ),
aStatement( rStatement ),
- bDone( TRUE ),
+ bDone( sal_True ),
pDummy( 0 )
{
}
@@ -320,7 +320,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
(
SfxMacro* /*pMacro*/, // darin wird aufgezeichnet
const SfxSlot& rSlot, // der Slot, der das Statement abspielen kann
- BOOL bRequestDone, // TRUE=wurde ausgef"uhrt, FALSE=abgebrochen
+ sal_Bool bRequestDone, // sal_True=wurde ausgef"uhrt, sal_False=abgebrochen
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& /*rArgs*/
)
@@ -346,7 +346,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
// alle zusammengesuchten Parameter rausschreiben
if ( aArgs.getLength() )
- for ( USHORT nArg = 0; nArg < aArgs.getLength(); ++nArg )
+ for ( sal_uInt16 nArg = 0; nArg < aArgs.getLength(); ++nArg )
{
// den Parameter textuell darstellen
String aArg;
@@ -377,8 +377,8 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
// Anf"uhrungszeichen werden verdoppelt
XubString aRecordable( sTemp );
- USHORT nPos = 0;
- while ( TRUE )
+ sal_uInt16 nPos = 0;
+ while ( sal_True )
{
nPos = aRecordable.SearchAndReplace( DEFINE_CONST_UNICODE('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
if ( STRING_NOTFOUND == nPos )
@@ -387,8 +387,8 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
}
// nicht druckbare Zeichen werden als chr$(...) geschrieben
- FASTBOOL bPrevReplaced = FALSE;
- for ( USHORT n = 0; n < aRecordable.Len(); ++n )
+ bool bPrevReplaced = sal_False;
+ for ( sal_uInt16 n = 0; n < aRecordable.Len(); ++n )
{
sal_Unicode cChar = aRecordable.GetChar(n);
if ( !( cChar>=32 && cChar!=127 ) ) // ALS ERSATZ FUER String::IsPrintable()!
@@ -411,10 +411,10 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
aRecordable.Insert( aReplacement, n + 1 );
n = n + aReplacement.Len();
}
- bPrevReplaced = TRUE;
+ bPrevReplaced = sal_True;
}
else
- bPrevReplaced = FALSE;
+ bPrevReplaced = sal_False;
// Argument in Anf"uhrungszeichen
aArg = '"';
@@ -425,7 +425,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
case SbxBYTE:
{
// als Zahl darstellen
- aArg = (USHORT) rVar.GetByte();
+ aArg = (sal_uInt16) rVar.GetByte();
break;
}
*/
@@ -696,7 +696,7 @@ String SfxMacro::GenerateSource() const
{
DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING, "invalid call to non-recording SfxMacro" );
String aSource;
- for ( USHORT n = 0; n < pImp->aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n )
{
aSource += pImp->aList.GetObject(n)->GetStatement();
if ( (n+1) < pImp->aList.Count() )
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index b0cdd58d2645..c5e46620a908 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -39,7 +39,7 @@ TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
// -----------------------------------------------------------------------
SfxMacroInfoItem::SfxMacroInfoItem(
- USHORT nWhichId, // Slot-ID
+ sal_uInt16 nWhichId, // Slot-ID
const BasicManager* pMgr,
const String &rLibName,
const String &rModuleName,
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 6b05c03160ff..ffedd2632770 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -53,7 +53,7 @@ SfxSlotKind SfxSlot::GetKind() const
//--------------------------------------------------------------------
-USHORT SfxSlot::GetWhich( const SfxItemPool &rPool ) const
+sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
{
if ( !nMasterSlotId || nMasterSlotId == USHRT_MAX )
((SfxSlot*) this) -> nMasterSlotId = rPool.GetWhich(nSlotId);
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 9d3661ef1bc1..9cda943c8509 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -52,20 +52,20 @@ struct SfxSIDRegistration_Impl
{
String _aGroup;
String _aName;
- USHORT _nSID;
+ sal_uInt16 _nSID;
};
struct SfxSlotType_Impl
{
- USHORT nId;
+ sal_uInt16 nId;
TypeId nType;
- SfxSlotType_Impl( USHORT nTheId, TypeId nTheType ):
+ SfxSlotType_Impl( sal_uInt16 nTheId, TypeId nTheType ):
nId(nTheId), nType(nTheType)
{}
};
-DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, USHORT, 6, 4)
+DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, sal_uInt16, 6, 4)
DECL_PTRARRAY(SfxInterfaceArr_Impl, SfxInterface*, 6, 3)
DECL_PTRARRAY(SfxSlotTypeArr_Impl, SfxSlotType_Impl*, 8, 8)
@@ -98,7 +98,7 @@ SfxSlotPool::~SfxSlotPool()
delete _pGroups;
if ( _pTypes )
{
- for ( USHORT n =_pTypes->Count(); n--; )
+ for ( sal_uInt16 n =_pTypes->Count(); n--; )
delete _pTypes->GetObject(n);
delete _pTypes;
}
@@ -131,14 +131,14 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
{
// Die Groups im parent Slotpool sind auch hier bekannt
SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups;
- for ( USHORT n=0; n<rGroups.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rGroups.Count(); n++ )
_pGroups->Append( rGroups[n] );
}
}
if ( !_pTypes )
_pTypes = new SfxSlotTypeArr_Impl;
- for ( USHORT nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
+ for ( sal_uInt16 nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
{
SfxSlot *pDef = rInterface[nFunc];
if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */
@@ -153,7 +153,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
const TypeId &rTypeId = pDef->GetType()->Type();
if ( /*rTypeId != TYPE(SfxVoidItem) &&*/ rTypeId != 0 )
{
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < _pTypes->Count(); ++nPos )
{
if ( _pTypes->GetObject(nPos)->nId == pDef->GetSlotId() )
@@ -174,12 +174,12 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
//====================================================================
-TypeId SfxSlotPool::GetSlotType( USHORT nId ) const
+TypeId SfxSlotPool::GetSlotType( sal_uInt16 nId ) const
{
const SfxSlot* pSlot = (const_cast <SfxSlotPool*> (this))->GetSlot( nId );
return pSlot ? pSlot->GetType()->Type() : 0;
/*
- for ( USHORT nPos = 0; nPos < _pTypes->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < _pTypes->Count(); ++nPos )
{
if ( _pTypes->GetObject(nPos)->nId == nId )
return _pTypes->GetObject(nPos)->nType;
@@ -204,13 +204,13 @@ void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface )
// get the first SfxMessage for a special Id (e.g. for getting check-mode)
-const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
+const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Zun"achst die eigenen Interfaces absuchen
- for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
+ for ( sal_uInt16 nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
{
const SfxSlot *pDef = _pInterfaces->GetObject(nInterf)->GetSlot(nId);
if ( pDef )
@@ -225,7 +225,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
// skips to the next group
-String SfxSlotPool::SeekGroup( USHORT nNo )
+String SfxSlotPool::SeekGroup( sal_uInt16 nNo )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
@@ -237,7 +237,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
if ( _pParentPool )
{
// Meistens stimmt die Reihenfolge der Ids "uberein
- USHORT nParentCount = _pParentPool->_pGroups->Count();
+ sal_uInt16 nParentCount = _pParentPool->_pGroups->Count();
if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] )
_pParentPool->_nCurGroup = nNo;
else
@@ -245,7 +245,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
// Ansonsten mu\s gesucht werden
// Wenn die Gruppe im parent pool nicht gefunden wird, wird
// _nCurGroup au\serhalb des g"ultigen Bereiches gesetzt
- USHORT i;
+ sal_uInt16 i;
for ( i=1; i<nParentCount; i++ )
if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] )
break;
@@ -270,7 +270,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
//--------------------------------------------------------------------
-USHORT SfxSlotPool::GetGroupCount()
+sal_uInt16 SfxSlotPool::GetGroupCount()
{
return _pGroups->Count();
}
@@ -280,13 +280,13 @@ USHORT SfxSlotPool::GetGroupCount()
// internal search loop
-const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
+const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
{
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Die Numerierung der interfaces startet beim parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
// sind wir am Ende des Parent-Pools angekommen?
if ( nStartInterface < nFirstInterface &&
@@ -302,7 +302,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
}
// find the first func-def with the current group id
- USHORT nCount = _pInterfaces->Count() + nFirstInterface;
+ sal_uInt16 nCount = _pInterfaces->Count() + nFirstInterface;
for ( _nCurInterface = nStartInterface;
_nCurInterface < nCount;
++_nCurInterface )
@@ -331,7 +331,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
// Die Numerierung der interfaces startet beim parent pool
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() )
_nCurInterface = nFirstInterface;
@@ -348,7 +348,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
return SeekSlot( nFirstInterface );
}
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
// possibly we are already at the end
if ( nInterface >= _pInterfaces->Count() )
return 0;
@@ -386,17 +386,17 @@ SfxInterface* SfxSlotPool::FirstInterface()
SfxInterface* SfxSlotPool::NextInterface()
{
_nCurInterface++;
- USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface )
return (*_pParentPool->_pInterfaces)[_nCurInterface];
- USHORT nInterface = _nCurInterface - nFirstInterface;
+ sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
return nInterface < _pInterfaces->Count() ? (*_pInterfaces)[nInterface] : 0;
}
const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName )
{
const SfxSlot *pSlot = NULL;
- for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
+ for ( sal_uInt16 nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
{
pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
if ( pSlot )
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index d0ce2abae773..f73a7f4acf4b 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -69,18 +69,18 @@ SfxCompareSlots_Impl( const void* pSmaller, const void* pBigger )
struct SfxObjectUI_Impl
{
- USHORT nPos;
+ sal_uInt16 nPos;
ResId aResId;
- BOOL bVisible;
- BOOL bContext;
+ sal_Bool bVisible;
+ sal_Bool bContext;
String* pName;
sal_uInt32 nFeature;
- SfxObjectUI_Impl(USHORT n, const ResId& rResId, BOOL bVis, sal_uInt32 nFeat) :
+ SfxObjectUI_Impl(sal_uInt16 n, const ResId& rResId, sal_Bool bVis, sal_uInt32 nFeat) :
nPos(n),
aResId(rResId.GetId(), *rResId.GetResMgr()),
bVisible(bVis),
- bContext(FALSE),
+ bContext(sal_False),
pName(0),
nFeature(nFeat)
{
@@ -102,12 +102,12 @@ struct SfxInterface_Impl
ResId aPopupRes; // registered PopupMenu
ResId aStatBarRes; // registered StatusBar
SfxModule* pModule;
- BOOL bRegistered;
+ sal_Bool bRegistered;
SfxInterface_Impl() :
aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()),
aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager())
- , bRegistered(FALSE)
+ , bRegistered(sal_False)
{
pObjectBars = new SfxObjectUIArr_Impl;
pChildWindows = new SfxObjectUIArr_Impl;
@@ -115,7 +115,7 @@ struct SfxInterface_Impl
~SfxInterface_Impl()
{
- USHORT n;
+ sal_uInt16 n;
for (n=0; n<pObjectBars->Count(); n++)
delete (*pObjectBars)[n];
delete pObjectBars;
@@ -126,7 +126,7 @@ struct SfxInterface_Impl
}
};
-static SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr );
+static SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr );
//====================================================================
@@ -137,7 +137,7 @@ SfxInterface::SfxInterface( const char *pClassName,
const ResId& rNameResId,
SfxInterfaceId nId,
const SfxInterface* pParent,
- SfxSlot &rSlotMap, USHORT nSlotCount ):
+ SfxSlot &rSlotMap, sal_uInt16 nSlotCount ):
pName(pClassName),
pGenoType(pParent),
nClassId(nId),
@@ -150,7 +150,7 @@ SfxInterface::SfxInterface( const char *pClassName,
void SfxInterface::Register( SfxModule* pMod )
{
- pImpData->bRegistered = TRUE;
+ pImpData->bRegistered = sal_True;
pImpData->pModule = pMod;
if ( pMod )
pMod->GetSlotPool()->RegisterInterface(*this);
@@ -158,7 +158,7 @@ void SfxInterface::Register( SfxModule* pMod )
SFX_APP()->GetAppSlotPool_Impl().RegisterInterface(*this);
}
-void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
+void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
pSlots = &rSlotMap;
nCount = nSlotCount;
@@ -172,7 +172,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
qsort( pSlots, nCount, sizeof(SfxSlot), SfxCompareSlots_Impl );
// link masters and slaves
- USHORT nIter = 1;
+ sal_uInt16 nIter = 1;
for ( pIter = pSlots; nIter <= nCount; ++pIter, ++nIter )
{
//! hier bitte sinnvoll pruefen
@@ -196,7 +196,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
if ( 0 == pIter->GetNextSlot() )
{
SfxSlot *pLastSlot = pIter;
- for ( USHORT n = nIter; n < Count(); ++n )
+ for ( sal_uInt16 n = nIter; n < Count(); ++n )
{
SfxSlot *pCurSlot = (pSlots+n);
if ( pCurSlot->nMasterSlotId == pIter->nMasterSlotId )
@@ -212,7 +212,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
{
// Slots verweisen im Ring auf den n"achten mit derselben Statusmethode
SfxSlot *pLastSlot = pIter;
- for ( USHORT n = nIter; n < Count(); ++n )
+ for ( sal_uInt16 n = nIter; n < Count(); ++n )
{
SfxSlot *pCurSlot = (pSlots+n);
if ( pCurSlot->GetStateFnc() == pIter->GetStateFnc() )
@@ -228,7 +228,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
#ifdef DBG_UTIL
else
{
- USHORT nIter = 1;
+ sal_uInt16 nIter = 1;
for ( SfxSlot *pNext = pIter+1; nIter < nCount; ++pNext, ++nIter )
{
@@ -308,7 +308,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
SfxInterface::~SfxInterface()
{
SfxModule *pMod = pImpData->pModule;
- BOOL bRegistered = pImpData->bRegistered;
+ sal_Bool bRegistered = pImpData->bRegistered;
delete pImpData;
DBG_ASSERT( bRegistered, "Interface not registered!" );
if ( bRegistered )
@@ -325,7 +325,7 @@ SfxInterface::~SfxInterface()
// searches for the specified func
-const SfxSlot* SfxInterface::GetSlot( USHORT nFuncId ) const
+const SfxSlot* SfxInterface::GetSlot( sal_uInt16 nFuncId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxInterface, 0);
@@ -348,7 +348,7 @@ const SfxSlot* SfxInterface::GetSlot( const String& rCommand ) const
if ( aCommand.SearchAscii( UNO_COMMAND ) == 0 )
aCommand.Erase( 0, sizeof( UNO_COMMAND )-1 );
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
if ( (pSlots+n)->pUnoName &&
aCommand.CompareIgnoreCaseToAscii( (pSlots+n)->GetUnoName() ) == COMPARE_EQUAL )
@@ -381,7 +381,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
//--------------------------------------------------------------------
-const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const
+const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxInterface, 0);
@@ -410,26 +410,26 @@ void SfxInterface::RegisterPopupMenu( const ResId& rResId )
//--------------------------------------------------------------------
-void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId,
+void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId,
const String *pStr )
{
RegisterObjectBar( nPos, rResId, 0UL, pStr );
}
-void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
+void SfxInterface::RegisterObjectBar( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
{
SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl( nPos, rResId, nFeature, pStr );
if ( pUI )
pImpData->pObjectBars->Append(pUI);
}
-SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
+SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId, sal_uInt32 nFeature, const String *pStr )
{
if ((nPos & SFX_VISIBILITY_MASK) == 0)
nPos |= SFX_VISIBILITY_STANDARD;
- SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, TRUE, nFeature);
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, sal_True, nFeature);
if (pStr == 0)
{
@@ -449,13 +449,13 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResId, sal_
return pUI;
}
-const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
+const ResId& SfxInterface::GetObjectBarResId( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Gibt es Toolbars in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetObjectBarResId( nNo );
@@ -464,7 +464,7 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
#endif
return (*pImpData->pObjectBars)[nNo]->aResId;
@@ -473,13 +473,13 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
+sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Gibt es Toolbars in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetObjectBarPos( nNo );
@@ -488,7 +488,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nPos;
@@ -497,7 +497,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetObjectBarCount() const
+sal_uInt16 SfxInterface::GetObjectBarCount() const
{
if (pGenoType && ! pGenoType->HasName())
return pImpData->pObjectBars->Count() + pGenoType->GetObjectBarCount();
@@ -506,14 +506,14 @@ USHORT SfxInterface::GetObjectBarCount() const
}
//--------------------------------------------------------------------
-void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, const String* pChildWinName)
+void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, const String* pChildWinName)
{
RegisterChildWindow( nId, bContext, 0UL, pChildWinName );
}
-void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, sal_uInt32 nFeature, const String*)
+void SfxInterface::RegisterChildWindow(sal_uInt16 nId, sal_Bool bContext, sal_uInt32 nFeature, const String*)
{
- SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), TRUE, nFeature);
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, ResId(nId, *SfxApplication::GetOrCreate()->GetOffResManager_Impl()), sal_True, nFeature);
pUI->bContext = bContext;
pImpData->pChildWindows->Append(pUI);
}
@@ -524,12 +524,12 @@ void SfxInterface::RegisterStatusBar(const ResId& rResId)
}
-sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
+sal_uInt32 SfxInterface::GetChildWindowId (sal_uInt16 nNo) const
{
if ( pGenoType )
{
// Gibt es ChildWindows in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetChildWindowId( nNo );
@@ -538,7 +538,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nCWCount = pImpData->pChildWindows->Count();
+ sal_uInt16 nCWCount = pImpData->pChildWindows->Count();
DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" );
#endif
sal_uInt32 nRet = (*pImpData->pChildWindows)[nNo]->aResId.GetId();
@@ -547,12 +547,12 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
return nRet;
}
-sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
+sal_uInt32 SfxInterface::GetChildWindowFeature (sal_uInt16 nNo) const
{
if ( pGenoType )
{
// Gibt es ChildWindows in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ sal_uInt16 nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetChildWindowFeature( nNo );
@@ -561,7 +561,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nCWCount = pImpData->pChildWindows->Count();
+ sal_uInt16 nCWCount = pImpData->pChildWindows->Count();
DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" );
#endif
return (*pImpData->pChildWindows)[nNo]->nFeature;
@@ -570,7 +570,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
//--------------------------------------------------------------------
-USHORT SfxInterface::GetChildWindowCount() const
+sal_uInt16 SfxInterface::GetChildWindowCount() const
{
if (pGenoType)
return pImpData->pChildWindows->Count() + pGenoType->GetChildWindowCount();
@@ -595,13 +595,13 @@ const ResId& SfxInterface::GetStatusBarResId() const
-const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
+const String* SfxInterface::GetObjectBarName ( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Gibt es Toolbars in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetObjectBarName( nNo );
@@ -610,19 +610,19 @@ const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
#endif
return (*pImpData->pObjectBars)[nNo]->pName;
}
-sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
+sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Gibt es Toolbars in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->GetObjectBarFeature( nNo );
@@ -631,19 +631,19 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nFeature;
}
-BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
+sal_Bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const
{
- BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ sal_Bool bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
// Gibt es Toolbars in der Superklasse ?
- USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
// Die der Superklasse kommen zuerst
return pGenoType->IsObjectBarVisible( nNo );
@@ -652,7 +652,7 @@ BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
}
#ifdef DBG_UTIL
- USHORT nObjBarCount = pImpData->pObjectBars->Count();
+ sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
#endif
return (*pImpData->pObjectBars)[nNo]->bVisible;
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index bee4a5c87675..9fb17332c27d 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -59,7 +59,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
public:
SFX_DECL_XINTERFACE_XTYPEPROVIDER
- SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const rtl::OUString& aCommand );
+ SfxQueryStatus_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const rtl::OUString& aCommand );
virtual ~SfxQueryStatus_Impl();
// Query method
@@ -79,7 +79,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
sal_Bool m_bQueryInProgress;
SfxItemState m_eState;
SfxPoolItem* m_pItem;
- USHORT m_nSlotID;
+ sal_uInt16 m_nSlotID;
osl::Condition m_aCondition;
::com::sun::star::util::URL m_aCommand;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > m_xDispatch;
@@ -88,7 +88,7 @@ class SfxQueryStatus_Impl : public ::com::sun::star::frame::XStatusListener ,
SFX_IMPL_XINTERFACE_2( SfxQueryStatus_Impl, OWeakObject, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
SFX_IMPL_XTYPEPROVIDER_2( SfxQueryStatus_Impl, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
-SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) :
+SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) :
cppu::OWeakObject(),
m_bQueryInProgress( sal_False ),
m_eState( SFX_ITEM_DISABLED ),
@@ -222,7 +222,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem )
//*************************************************************************
-SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand )
+SfxQueryStatus::SfxQueryStatus( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand )
{
m_pSfxQueryStatusImpl = new SfxQueryStatus_Impl( rDispatchProvider, nSlotId, rCommand );
m_xStatusListener = Reference< XStatusListener >(
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 88a52d0ad0bf..ec6f9a7428e9 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -76,13 +76,13 @@ struct SfxRequest_Impl: public SfxListener
SfxPoolItem* pRetVal; // R"uckgabewert geh"ort sich selbst
SfxShell* pShell; // ausgef"uhrt an dieser Shell
const SfxSlot* pSlot; // ausgef"uhrter Slot
- USHORT nModifier; // welche Modifier waren gedrueckt?
- BOOL bDone; // "uberhaupt ausgef"uhrt
- BOOL bIgnored; // vom User abgebrochen
- BOOL bCancelled; // nicht mehr zustellen
- BOOL bUseTarget; // aTarget wurde von Applikation gesetzt
- USHORT nCallMode; // Synch/Asynch/API/Record
- BOOL bAllowRecording;
+ sal_uInt16 nModifier; // welche Modifier waren gedrueckt?
+ sal_Bool bDone; // "uberhaupt ausgef"uhrt
+ sal_Bool bIgnored; // vom User abgebrochen
+ sal_Bool bCancelled; // nicht mehr zustellen
+ sal_Bool bUseTarget; // aTarget wurde von Applikation gesetzt
+ sal_uInt16 nCallMode; // Synch/Asynch/API/Record
+ sal_Bool bAllowRecording;
SfxAllItemSet* pInternalArgs;
SfxViewFrame* pViewFrame;
@@ -92,9 +92,9 @@ struct SfxRequest_Impl: public SfxListener
: pAnti( pOwner)
, pPool(0)
, nModifier(0)
- , bCancelled(FALSE)
+ , bCancelled(sal_False)
, nCallMode( SFX_CALLMODE_SYNCHRON )
- , bAllowRecording( FALSE )
+ , bAllowRecording( sal_False )
, pInternalArgs( 0 )
, pViewFrame(0)
{}
@@ -162,8 +162,8 @@ SfxRequest::SfxRequest
DBG_MEMTEST();
pImp->bAllowRecording = rOrig.pImp->bAllowRecording;
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
@@ -186,7 +186,7 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
SfxViewFrame* pViewFrame,
- USHORT nSlotId
+ sal_uInt16 nSlotId
)
@@ -205,16 +205,16 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &pViewFrame->GetPool() );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = SFX_CALLMODE_SYNCHRON;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
pImp->pViewFrame = pViewFrame;
- if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, TRUE, TRUE ) )
+ if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, sal_True, sal_True ) )
{
pImp->SetPool( &pImp->pShell->GetPool() );
pImp->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame );
@@ -235,7 +235,7 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- USHORT nSlotId, // auszuf"uhrende <Slot-Id>
+ sal_uInt16 nSlotId, // auszuf"uhrende <Slot-Id>
SfxCallMode nMode, // Synch/API/...
SfxItemPool& rPool // ggf. f"ur das SfxItemSet f"ur Parameter
)
@@ -248,14 +248,14 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &rPool );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
}
SfxRequest::SfxRequest
@@ -271,14 +271,14 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( &rPool );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
TransformParameters( nSlot, rArgs, *pArgs, pSlot );
}
@@ -286,8 +286,8 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- USHORT nSlotId,
- USHORT nMode,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nMode,
const SfxAllItemSet& rSfxArgs
)
@@ -299,37 +299,37 @@ SfxRequest::SfxRequest
{
DBG_MEMTEST();
- pImp->bDone = FALSE;
- pImp->bIgnored = FALSE;
+ pImp->bDone = sal_False;
+ pImp->bIgnored = sal_False;
pImp->SetPool( rSfxArgs.GetPool() );
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
pImp->nCallMode = nMode;
- pImp->bUseTarget = FALSE;
+ pImp->bUseTarget = sal_False;
}
//--------------------------------------------------------------------
-USHORT SfxRequest::GetCallMode() const
+sal_uInt16 SfxRequest::GetCallMode() const
{
return pImp->nCallMode;
}
//--------------------------------------------------------------------
-BOOL SfxRequest::IsSynchronCall() const
+sal_Bool SfxRequest::IsSynchronCall() const
{
return SFX_CALLMODE_SYNCHRON == ( SFX_CALLMODE_SYNCHRON & pImp->nCallMode );
}
//--------------------------------------------------------------------
-void SfxRequest::SetSynchronCall( BOOL bSynchron )
+void SfxRequest::SetSynchronCall( sal_Bool bSynchron )
{
if ( bSynchron )
pImp->nCallMode |= SFX_CALLMODE_SYNCHRON;
else
- pImp->nCallMode &= ~(USHORT) SFX_CALLMODE_SYNCHRON;
+ pImp->nCallMode &= ~(sal_uInt16) SFX_CALLMODE_SYNCHRON;
}
void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs )
@@ -456,7 +456,7 @@ void SfxRequest::AppendItem(const SfxPoolItem &rItem)
//--------------------------------------------------------------------
-void SfxRequest::RemoveItem( USHORT nID )
+void SfxRequest::RemoveItem( sal_uInt16 nID )
{
if (pArgs)
{
@@ -470,8 +470,8 @@ void SfxRequest::RemoveItem( USHORT nID )
const SfxPoolItem* SfxRequest::GetArg
(
- USHORT nSlotId, // Slot-Id oder Which-Id des Parameters
- FASTBOOL bDeep, // FALSE: nicht in Parent-ItemSets suchen
+ sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters
+ bool bDeep, // false: nicht in Parent-ItemSets suchen
TypeId aType // != 0: RTTI Pruefung mit Assertion
) const
{
@@ -483,7 +483,7 @@ const SfxPoolItem* SfxRequest::GetArg
const SfxPoolItem* SfxRequest::GetItem
(
const SfxItemSet* pArgs,
- USHORT nSlotId, // Slot-Id oder Which-Id des Parameters
+ sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters
bool bDeep, // false: nicht in Parent-ItemSets suchen
TypeId aType // != 0: RTTI Pruefung mit Assertion
)
@@ -509,12 +509,12 @@ const SfxPoolItem* SfxRequest::GetItem
...
// ein Beispiel ohne Verwendung des Makros
const SfxInt32Item *pPosItem = (const SfxUInt32Item*)
- rReq.GetArg( SID_POS, FALSE, TYPE(SfxInt32Item) );
- USHORT nPos = pPosItem ? pPosItem->GetValue() : 0;
+ rReq.GetArg( SID_POS, sal_False, TYPE(SfxInt32Item) );
+ sal_uInt16 nPos = pPosItem ? pPosItem->GetValue() : 0;
// ein Beispiel mit Verwendung des Makros
- SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, FALSE);
- USHORT nSize = pSizeItem ? pPosItem->GetValue() : 0;
+ SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, sal_False);
+ sal_uInt16 nSize = pSizeItem ? pPosItem->GetValue() : 0;
...
}
@@ -528,7 +528,7 @@ const SfxPoolItem* SfxRequest::GetItem
if ( pArgs )
{
// ggf. in Which-Id umrechnen
- USHORT nWhich = pArgs->GetPool()->GetWhich(nSlotId);
+ sal_uInt16 nWhich = pArgs->GetPool()->GetWhich(nSlotId);
// ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar?
const SfxPoolItem *pItem = 0;
@@ -574,11 +574,11 @@ void SfxRequest::Done
erfragt wurden, ggf. 0 falls keine
Parameter gesetzt wurden */
- FASTBOOL bKeep /* TRUE (default)
+ bool bKeep /* true (default)
'rSet' wird gepeichert und ist "uber
GetArgs() abfragbar
- FALSE
+ false
'rSet' wird nicht kopiert (schneller) */
)
@@ -634,7 +634,7 @@ void SfxRequest::Done
//--------------------------------------------------------------------
-void SfxRequest::Done( BOOL bRelease )
+void SfxRequest::Done( sal_Bool bRelease )
// [<SfxRequest::Done(SfxItemSet&)>]
{
Done_Impl( pArgs );
@@ -652,7 +652,7 @@ void SfxRequest::ForgetAllArgs()
//--------------------------------------------------------------------
-BOOL SfxRequest::IsCancelled() const
+sal_Bool SfxRequest::IsCancelled() const
{
return pImp->bCancelled;
}
@@ -668,7 +668,7 @@ void SfxRequest::Cancel()
*/
{
- pImp->bCancelled = TRUE;
+ pImp->bCancelled = sal_True;
pImp->SetPool( 0 );
DELETEZ( pArgs );
}
@@ -694,7 +694,7 @@ void SfxRequest::Ignore()
{
// als tats"achlich ausgef"uhrt markieren
- pImp->bIgnored = TRUE;
+ pImp->bIgnored = sal_True;
}
//--------------------------------------------------------------------
@@ -715,7 +715,7 @@ void SfxRequest::Done_Impl
{
// als tats"achlich ausgef"uhrt markieren
- pImp->bDone = TRUE;
+ pImp->bDone = sal_True;
// nicht Recorden
if ( !pImp->xRecorder.is() )
@@ -751,8 +751,8 @@ void SfxRequest::Done_Impl
{
// des Property als SfxPoolItem besorgen
const SfxPoolItem *pItem;
- USHORT nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId());
- SfxItemState eState = pSet ? pSet->GetItemState( nWhich, FALSE, &pItem ) : SFX_ITEM_UNKNOWN;
+ sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId());
+ SfxItemState eState = pSet ? pSet->GetItemState( nWhich, sal_False, &pItem ) : SFX_ITEM_UNKNOWN;
#ifdef DBG_UTIL
if ( SFX_ITEM_SET != eState )
{
@@ -786,13 +786,13 @@ void SfxRequest::Done_Impl
for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() )
{
// die Slot-Id f"ur das einzelne Item ermitteln
- USHORT nSlotId = rPool.GetSlotId( pItem->Which() );
+ sal_uInt16 nSlotId = rPool.GetSlotId( pItem->Which() );
if ( nSlotId == nSlot )
{
// mit Hosentr"ager und G"urtel reparieren des falschen Flags
DBG_ERROR( "recursion RecordPerItem - use RecordPerSet!" );
SfxSlot *pSlot = (SfxSlot*) pImp->pSlot;
- pSlot->nFlags &= ~((ULONG)SFX_SLOT_RECORDPERITEM);
+ pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM);
pSlot->nFlags &= SFX_SLOT_RECORDPERSET;
}
@@ -813,7 +813,7 @@ void SfxRequest::Done_Impl
//--------------------------------------------------------------------
-BOOL SfxRequest::IsDone() const
+sal_Bool SfxRequest::IsDone() const
/* [Beschreibung]
@@ -823,7 +823,7 @@ BOOL SfxRequest::IsDone() const
der Kontext f"ur diesen Request falsch war, dieses aber nicht "uber
eine separate <SfxShell> realisiert wurde.
- SfxRequest-Instanzen, die hier FALSE liefern, werden nicht recorded.
+ SfxRequest-Instanzen, die hier sal_False liefern, werden nicht recorded.
[Querverweise]
@@ -881,7 +881,7 @@ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRe
return xRecorder;
}
-BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
+sal_Bool SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
{
return GetMacroRecorder( pView ).is();
}
@@ -889,12 +889,12 @@ BOOL SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
//--------------------------------------------------------------------
-BOOL SfxRequest::IsAPI() const
+sal_Bool SfxRequest::IsAPI() const
/* [Beschreibung]
- Liefert TRUE, wenn dieser SfxRequest von einer API (z.B. BASIC)
- erzeugt wurde, sonst FALSE.
+ Liefert sal_True, wenn dieser SfxRequest von einer API (z.B. BASIC)
+ erzeugt wurde, sonst sal_False.
*/
{
@@ -904,15 +904,15 @@ BOOL SfxRequest::IsAPI() const
//--------------------------------------------------------------------
-FASTBOOL SfxRequest::IsRecording() const
+bool SfxRequest::IsRecording() const
/* [Beschreibung]
- Liefert TRUE, wenn dieser SfxRequest recorded werden soll, d.h.
+ Liefert sal_True, wenn dieser SfxRequest recorded werden soll, d.h.
1. zu Zeit ein Makro aufgezeichnet wird
2. dieser Request "uberhaupt aufgezeichnet wird
3. der Request nicht von reiner API (z.B. BASIC) ausgeht,
- sonst FALSE.
+ sonst sal_False.
*/
{
@@ -920,13 +920,13 @@ FASTBOOL SfxRequest::IsRecording() const
}
//--------------------------------------------------------------------
-void SfxRequest::SetModifier( USHORT nModi )
+void SfxRequest::SetModifier( sal_uInt16 nModi )
{
pImp->nModifier = nModi;
}
//--------------------------------------------------------------------
-USHORT SfxRequest::GetModifier() const
+sal_uInt16 SfxRequest::GetModifier() const
{
return pImp->nModifier;
}
@@ -954,17 +954,17 @@ void SfxRequest::SetTarget( const String &rTarget )
{
pImp->aTarget = rTarget;
- pImp->bUseTarget = TRUE;
+ pImp->bUseTarget = sal_True;
}
-void SfxRequest::AllowRecording( BOOL bSet )
+void SfxRequest::AllowRecording( sal_Bool bSet )
{
pImp->bAllowRecording = bSet;
}
-BOOL SfxRequest::AllowsRecording() const
+sal_Bool SfxRequest::AllowsRecording() const
{
- BOOL bAllow = pImp->bAllowRecording;
+ sal_Bool bAllow = pImp->bAllowRecording;
if( !bAllow )
bAllow = ( SFX_CALLMODE_API != ( SFX_CALLMODE_API & pImp->nCallMode ) ) &&
( SFX_CALLMODE_RECORD == ( SFX_CALLMODE_RECORD & pImp->nCallMode ) );
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index c2cf5f164e7c..96f305f58389 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star::util;
SFX_IMPL_XINTERFACE_3( SfxStatusListener, OWeakObject, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
SFX_IMPL_XTYPEPROVIDER_3( SfxStatusListener, ::com::sun::star::lang::XComponent, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
-SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, USHORT nSlotId, const OUString& rCommand ) :
+SfxStatusListener::SfxStatusListener( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) :
cppu::OWeakObject(),
m_nSlotID( nSlotId ),
m_xDispatchProvider( rDispatchProvider )
@@ -79,7 +79,7 @@ SfxStatusListener::~SfxStatusListener()
}
// old sfx controller item C++ API
-void SfxStatusListener::StateChanged( USHORT, SfxItemState, const SfxPoolItem* )
+void SfxStatusListener::StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* )
{
// must be implemented by sub class
}
@@ -100,7 +100,7 @@ void SfxStatusListener::Bind()
}
}
-void SfxStatusListener::Bind( USHORT nSlotId, const rtl::OUString& rNewCommand )
+void SfxStatusListener::Bind( sal_uInt16 nSlotId, const rtl::OUString& rNewCommand )
{
// first remove old listener, if we have a dispatch object
Reference< XStatusListener > aStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index d1605754680a..be365349888f 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -82,10 +82,10 @@ struct SfxShell_Impl: public SfxBroadcaster
SfxViewFrame* pFrame; // Frame, falls <UI-aktiv>
SfxRepeatTarget* pRepeatTarget;
// SbxObjectRef xParent;
- BOOL bInAppBASIC;
- BOOL bActive;
- ULONG nDisableFlags;
- ULONG nHelpId;
+ sal_Bool bInAppBASIC;
+ sal_Bool bActive;
+ sal_uIntPtr nDisableFlags;
+ sal_uIntPtr nHelpId;
svtools::AsynchronLink* pExecuter;
svtools::AsynchronLink* pUpdater;
SfxVerbSlotArr_Impl aSlotArr;
@@ -149,9 +149,9 @@ SfxShell::SfxShell()
pImp->pViewSh = 0;
pImp->pFrame = 0;
pImp->pRepeatTarget = 0;
- pImp->bInAppBASIC = FALSE;
+ pImp->bInAppBASIC = sal_False;
pImp->nHelpId = 0L;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
pImp->nDisableFlags = 0;
}
@@ -175,9 +175,9 @@ SfxShell::SfxShell( SfxViewShell *pViewSh )
pImp->pViewSh = pViewSh;
pImp->pFrame = 0;
pImp->pRepeatTarget = 0;
- pImp->bInAppBASIC = FALSE;
+ pImp->bInAppBASIC = sal_False;
pImp->nHelpId = 0L;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
}
//--------------------------------------------------------------------
@@ -310,7 +310,7 @@ SfxViewFrame* SfxShell::GetFrame() const
const SfxPoolItem* SfxShell::GetItem
(
- USHORT nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s
) const
/* [Beschreibung]
@@ -327,11 +327,11 @@ const SfxPoolItem* SfxShell::GetItem
[Querverweise]
<SfxShell::PutItem(const SfxPoolItem&)>
- <SfxShell::RemoveItem(USHORT)>
+ <SfxShell::RemoveItem(sal_uInt16)>
*/
{
- for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
return pImp->aItems.GetObject(nPos);
return 0;
@@ -341,7 +341,7 @@ const SfxPoolItem* SfxShell::GetItem
void SfxShell::RemoveItem
(
- USHORT nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s
)
/* [Beschreibung]
@@ -356,11 +356,11 @@ void SfxShell::RemoveItem
[Querverweise]
<SfxShell::PutItem(const SfxPoolItem&)>
- <SfxShell::GetItem(USHORT)>
+ <SfxShell::GetItem(sal_uInt16)>
*/
{
- for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
{
// Item entfernen und l"oschen
@@ -400,8 +400,8 @@ void SfxShell::PutItem
[Querverweise]
- <SfxShell::RemoveItem(USHORT)>
- <SfxShell::GetItem(USHORT)>
+ <SfxShell::RemoveItem(sal_uInt16)>
+ <SfxShell::GetItem(sal_uInt16)>
*/
{
@@ -412,9 +412,9 @@ void SfxShell::PutItem
// MSC auf WNT/W95 machte hier Mist, Vorsicht bei Umstellungen
const SfxPoolItem *pItem = rItem.Clone();
SfxPoolItemHint aItemHint( (SfxPoolItem*) pItem );
- const USHORT nWhich = rItem.Which();
+ const sal_uInt16 nWhich = rItem.Which();
SfxPoolItem **ppLoopItem = (SfxPoolItem**) pImp->aItems.GetData();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pImp->aItems.Count(); ++nPos, ++ppLoopItem )
{
if ( (*ppLoopItem)->Which() == nWhich )
@@ -430,12 +430,12 @@ void SfxShell::PutItem
{
SfxBindings* pBindings = pDispat->GetBindings();
pBindings->Broadcast( aItemHint );
- USHORT nSlotId = nWhich; //pItem->GetSlotId();
+ sal_uInt16 nSlotId = nWhich; //pItem->GetSlotId();
SfxStateCache* pCache = pBindings->GetStateCache( nSlotId );
if ( pCache )
{
- pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), TRUE );
- pCache->SetCachedState( TRUE );
+ pCache->SetState( SFX_ITEM_AVAILABLE, pItem->Clone(), sal_True );
+ pCache->SetCachedState( sal_True );
}
}
return;
@@ -523,7 +523,7 @@ void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
pUndoMgr = pNewUndoMgr;
if ( pUndoMgr )
- pUndoMgr->SetMaxUndoActionCount( (USHORT) SvtUndoOptions().GetUndoCount() );
+ pUndoMgr->SetMaxUndoActionCount( (sal_uInt16) SvtUndoOptions().GetUndoCount() );
}
//--------------------------------------------------------------------
@@ -579,7 +579,7 @@ void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget )
void SfxShell::Invalidate
(
- USHORT nId /* Zu invalidierende Slot-Id oder Which-Id.
+ sal_uInt16 nId /* Zu invalidierende Slot-Id oder Which-Id.
Falls diese 0 ist (default), werden
alle z.Zt. von dieser Shell bedienten
Slot-Ids invalidiert. */
@@ -592,8 +592,8 @@ void SfxShell::Invalidate
die von der Subclass ererbt sind, werden ebenfalls invalidert.
[Querverweise]
- <SfxBindings::Invalidate(USHORT)>
- <SfxBindings::InvalidateAll(BOOL)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
*/
{
@@ -606,11 +606,11 @@ void SfxShell::Invalidate
Invalidate_Impl( GetViewShell()->GetViewFrame()->GetBindings(), nId );
}
-void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId )
+void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId )
{
if ( nId == 0 )
{
- rBindings.InvalidateShell( *this, FALSE );
+ rBindings.InvalidateShell( *this, sal_False );
}
else
{
@@ -646,12 +646,12 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId )
//--------------------------------------------------------------------
-void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
+void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
/* [Beschreibung]
Diese Methode steuert die Aktivierung der SfxShell-Instanz. Zun"achst
- wird durch Aufruf der virtuellen Methode <SfxShell::Activate(BOOL)>
+ wird durch Aufruf der virtuellen Methode <SfxShell::Activate(sal_Bool)>
der Subclass die M"oglichkeit gegeben, auf das Event zu reagieren.
Bei bMDI == TRUE wird das zugeh"orige SbxObject 'scharfgeschaltet',
@@ -679,7 +679,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
{
// Frame merken, in dem aktiviert wird
pImp->pFrame = pFrame;
- pImp->bActive = TRUE;
+ pImp->bActive = sal_True;
}
// Subklasse benachrichtigen
@@ -688,7 +688,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
//--------------------------------------------------------------------
-void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
+void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
/* [Beschreibung]
@@ -698,7 +698,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
k"onnen.
Dann erh"alt in jedem Fall die Subclass durch Aufruf der virtuellen
- Methode <SfxShell::Deactivate(BOOL)> die M"oglichkeit auf das Event
+ Methode <SfxShell::Deactivate(sal_Bool)> die M"oglichkeit auf das Event
zu reagieren.
*/
@@ -723,7 +723,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
{
// austragen
pImp->pFrame = 0;
- pImp->bActive = FALSE;
+ pImp->bActive = sal_False;
}
// Subklasse benachrichtigen
@@ -732,7 +732,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI )
//--------------------------------------------------------------------
-BOOL SfxShell::IsActive() const
+sal_Bool SfxShell::IsActive() const
{
return pImp->bActive;
}
@@ -741,7 +741,7 @@ BOOL SfxShell::IsActive() const
void SfxShell::Activate
(
- BOOL /*bMDI*/ /* TRUE
+ sal_Bool /*bMDI*/ /* TRUE
der <SfxDispatcher>, auf dem die SfxShell sich
befindet, ist aktiv geworden oder die SfxShell
Instanz wurde auf einen aktiven SfxDispatcher
@@ -764,7 +764,7 @@ void SfxShell::Activate
[Querverweise]
- StarView SystemWindow::Activate(BOOL)
+ StarView SystemWindow::Activate(sal_Bool)
*/
{
@@ -774,7 +774,7 @@ void SfxShell::Activate
void SfxShell::Deactivate
(
- BOOL /*bMDI*/ /* TRUE
+ sal_Bool /*bMDI*/ /* TRUE
der <SfxDispatcher>, auf dem die SfxShell sich
befindet, ist inaktiv geworden oder die SfxShell
Instanz wurde auf einen aktiven SfxDispatcher
@@ -797,7 +797,7 @@ void SfxShell::Deactivate
[Querverweise]
- StarView SystemWindow::Dectivate(BOOL)
+ StarView SystemWindow::Dectivate(sal_Bool)
*/
{
@@ -857,7 +857,7 @@ ResMgr* SfxShell::GetResMgr() const
//--------------------------------------------------------------------
-FASTBOOL SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
+bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
/* [Beschreibung]
@@ -867,7 +867,7 @@ FASTBOOL SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
{
// Slot-Status holen
SfxItemPool &rPool = GetPool();
- const USHORT nId = rSlot.GetWhich( rPool );
+ const sal_uInt16 nId = rSlot.GetWhich( rPool );
SfxItemSet aSet(rPool, nId, nId);
SfxStateFunc pFunc = rSlot.GetStateFnc();
CallState( pFunc, aSet );
@@ -887,7 +887,7 @@ long ShellCall_Impl( void* pObj, void* pArg )
*/
//--------------------------------------------------------------------
-const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, BOOL bAsync )
+const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, sal_Bool bAsync )
{
if( !bAsync )
return ExecuteSlot( rReq, (SfxInterface*)0L );
@@ -938,14 +938,14 @@ const SfxPoolItem* SfxShell::ExecuteSlot
[Querverweise]
- <SfxShell::GetSlotState(USHORT,const SfxInterface*,SfxItemSet*)>
+ <SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)>
*/
{
if ( !pIF )
pIF = GetInterface();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxSlot* pSlot = NULL;
if ( nSlot >= SID_VERB_START && nSlot <= SID_VERB_END )
pSlot = GetVerbSlot_Impl(nSlot);
@@ -964,7 +964,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot
const SfxPoolItem* SfxShell::GetSlotState
(
- USHORT nSlotId, // Slot-Id des zu befragenden Slots
+ sal_uInt16 nSlotId, // Slot-Id des zu befragenden Slots
const SfxInterface* pIF, // default = 0 bedeutet virtuell besorgen
SfxItemSet* pStateSet // SfxItemSet der Slot-State-Methode
)
@@ -1032,7 +1032,7 @@ const SfxPoolItem* SfxShell::GetSlotState
SfxStateFunc pFunc = pSlot->GetStateFnc();
if ( pFunc )
CallState( pFunc, aSet );
- eState = aSet.GetItemState( nSlotId, TRUE, &pItem );
+ eState = aSet.GetItemState( nSlotId, sal_True, &pItem );
// ggf. Default-Item besorgen
if ( eState == SFX_ITEM_DEFAULT )
@@ -1089,18 +1089,18 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
{
SfxBindings *pBindings =
pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
- USHORT nCount = pImp->aSlotArr.Count();
- for (USHORT n1=0; n1<nCount ; n1++)
+ sal_uInt16 nCount = pImp->aSlotArr.Count();
+ for (sal_uInt16 n1=0; n1<nCount ; n1++)
{
- USHORT nId = SID_VERB_START + n1;
- pBindings->Invalidate(nId, FALSE, TRUE);
+ sal_uInt16 nId = SID_VERB_START + n1;
+ pBindings->Invalidate(nId, sal_False, sal_True);
}
}
- USHORT nr=0;
+ sal_uInt16 nr=0;
for (sal_Int32 n=0; n<aVerbs.getLength(); n++)
{
- USHORT nSlotId = SID_VERB_START + nr++;
+ sal_uInt16 nSlotId = SID_VERB_START + nr++;
DBG_ASSERT(nSlotId <= SID_VERB_END, "Zuviele Verben!");
if (nSlotId > SID_VERB_END)
break;
@@ -1132,7 +1132,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
else
pNewSlot->pNextSlot = pNewSlot;
- pImp->aSlotArr.Insert(pNewSlot, (USHORT) n);
+ pImp->aSlotArr.Insert(pNewSlot, (sal_uInt16) n);
}
pImp->aVerbList = aVerbs;
@@ -1143,7 +1143,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
// abgeholt, es reicht also, ein neues StatusUpdate anzuregen
SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()->
GetBindings();
- pBindings->Invalidate( SID_OBJECT, TRUE, TRUE );
+ pBindings->Invalidate( SID_OBJECT, sal_True, sal_True );
}
}
@@ -1158,11 +1158,11 @@ const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& S
void SfxShell::VerbExec(SfxRequest& rReq)
{
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
SfxViewShell *pViewShell = GetViewShell();
if ( pViewShell )
{
- BOOL bReadOnly = pViewShell->GetObjectShell()->IsReadOnly();
+ sal_Bool bReadOnly = pViewShell->GetObjectShell()->IsReadOnly();
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aList = pViewShell->GetVerbs();
for (sal_Int32 n=0, nVerb=0; n<aList.getLength(); n++)
{
@@ -1192,12 +1192,12 @@ void SfxShell::VerbState(SfxItemSet& )
//--------------------------------------------------------------------
-const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const
+const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
{
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > rList = pImp->aVerbList;
DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Falsche VerbId!");
- USHORT nIndex = nId - SID_VERB_START;
+ sal_uInt16 nIndex = nId - SID_VERB_START;
DBG_ASSERT(nIndex < rList.getLength(),"Falsche VerbId!");
if (nIndex < rList.getLength())
@@ -1208,14 +1208,14 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const
//--------------------------------------------------------------------
-void SfxShell::SetHelpId(ULONG nId)
+void SfxShell::SetHelpId(sal_uIntPtr nId)
{
pImp->nHelpId = nId;
}
//--------------------------------------------------------------------
-ULONG SfxShell::GetHelpId() const
+sal_uIntPtr SfxShell::GetHelpId() const
{
return pImp->nHelpId;
}
@@ -1239,8 +1239,8 @@ sal_Bool SfxShell::HasUIFeature( sal_uInt32 )
long DispatcherUpdate_Impl( void*, void* pArg )
{
- ((SfxDispatcher*) pArg)->Update_Impl( TRUE );
- ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(FALSE);
+ ((SfxDispatcher*) pArg)->Update_Impl( sal_True );
+ ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(sal_False);
return 0;
}
@@ -1256,26 +1256,26 @@ void SfxShell::UIFeatureChanged()
pImp->pUpdater = new svtools::AsynchronLink( Link( this, DispatcherUpdate_Impl ) );
// Mehrfachaufrufe gestattet
- pImp->pUpdater->Call( pFrame->GetDispatcher(), TRUE );
+ pImp->pUpdater->Call( pFrame->GetDispatcher(), sal_True );
}
}
-void SfxShell::SetDisableFlags( ULONG nFlags )
+void SfxShell::SetDisableFlags( sal_uIntPtr nFlags )
{
pImp->nDisableFlags = nFlags;
}
-ULONG SfxShell::GetDisableFlags() const
+sal_uIntPtr SfxShell::GetDisableFlags() const
{
return pImp->nDisableFlags;
}
-SfxItemSet* SfxShell::CreateItemSet( USHORT )
+SfxItemSet* SfxShell::CreateItemSet( sal_uInt16 )
{
return NULL;
}
-void SfxShell::ApplyItemSet( USHORT, const SfxItemSet& )
+void SfxShell::ApplyItemSet( sal_uInt16, const SfxItemSet& )
{
}
diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index cb24fe34e9b6..df627a19e6fb 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -88,17 +88,17 @@ int SfxScriptOrganizerItem::operator==( const SfxPoolItem& rItem) const
}
-sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
String aValue;
- BOOL bIsString = FALSE;
+ sal_Bool bIsString = sal_False;
sal_Bool bValue = sal_False;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
case 0:
case MID_SCRIPT_ORGANIZER_LANGUAGE:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = aLanguage;
break;
default:
@@ -113,7 +113,7 @@ sal_Bool SfxScriptOrganizerItem::QueryValue( com::sun::star::uno::Any& rVal, BYT
return sal_True;
}
-sal_Bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
+sal_Bool SfxScriptOrganizerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
::rtl::OUString aValue;
sal_Bool bRet = sal_False;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 3fdd14369856..889cf97b1b6c 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -366,7 +366,7 @@ void SfxStateCache::SetState
(
SfxItemState eState, // <SfxItemState> von 'pState'
const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1
- BOOL bMaybeDirty
+ sal_Bool bMaybeDirty
)
/* [Beschreibung]
@@ -386,7 +386,7 @@ void SfxStateCache::SetState
//--------------------------------------------------------------------
-void SfxStateCache::SetVisibleState( BOOL bShow )
+void SfxStateCache::SetVisibleState( sal_Bool bShow )
{
SfxItemState eState( SFX_ITEM_AVAILABLE );
const SfxPoolItem* pState( NULL );
@@ -411,7 +411,7 @@ void SfxStateCache::SetVisibleState( BOOL bShow )
}
else
{
- pState = new SfxVisibilityItem( nId, FALSE );
+ pState = new SfxVisibilityItem( nId, sal_False );
bDeleteItem = sal_True;
}
@@ -438,7 +438,7 @@ void SfxStateCache::SetState_Impl
(
SfxItemState eState, // <SfxItemState> von 'pState'
const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1
- BOOL bMaybeDirty
+ sal_Bool bMaybeDirty
)
{
(void)bMaybeDirty; //unused
@@ -457,10 +457,10 @@ void SfxStateCache::SetState_Impl
DBG_PROFSTART(SfxStateCacheSetState);
// m"ussen die Controller "uberhaupt benachrichtigt werden?
- FASTBOOL bNotify = bItemDirty;
+ bool bNotify = bItemDirty;
if ( !bItemDirty )
{
- FASTBOOL bBothAvailable = pLastItem && pState &&
+ bool bBothAvailable = pLastItem && pState &&
!IsInvalidItem(pState) && !IsInvalidItem(pLastItem);
DBG_ASSERT( !bBothAvailable || pState != pLastItem, "setting state with own item" );
if ( bBothAvailable )
@@ -504,7 +504,7 @@ void SfxStateCache::SetState_Impl
// alten Status in allen Controllern nochmal setzen
-void SfxStateCache::SetCachedState( BOOL bAlways )
+void SfxStateCache::SetCachedState( sal_Bool bAlways )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxStateCache, 0);
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index f85d0d8e9e49..2a54e5b1c638 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -605,12 +605,12 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BOOL], 4 ))
{
- // BOOL support
+ // sal_Bool support
rArgs[nLen].Value <<= aValue.toBoolean();
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_BYTE], 4 ))
{
- // BYTE support
+ // sal_uInt8 support
rArgs[nLen].Value <<= sal_Int8( aValue.toInt32() );
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_LONG], 4 ))
@@ -650,7 +650,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util
SfxMapUnit SfxDispatchController_Impl::GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlotId )
{
- USHORT nWhich = rPool.GetWhich( nSlotId );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlotId );
return rPool.GetMetric( nWhich );
}
@@ -770,7 +770,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
{
const SfxSlot *pSlot = 0;
if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, sal_False,
- SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), FALSE ) )
+ SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), sal_False ) )
{
if ( bMasterSlave )
{
@@ -851,10 +851,10 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch;
if ( bSuccess && pItem && !pItem->ISA(SfxVoidItem) )
{
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
if ( eMapUnit == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pItem->QueryValue( aEvent.Result, (BYTE)nSubId );
+ pItem->QueryValue( aEvent.Result, (sal_uInt8)nSubId );
}
rListener->dispatchFinished( aEvent );
@@ -957,7 +957,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if ( ( eState >= SFX_ITEM_AVAILABLE ) && pState && !IsInvalidItem( pState ) && !pState->ISA(SfxVoidItem) )
{
// Retrieve metric from pool to have correct sub ID when calling QueryValue
- USHORT nSubId( 0 );
+ sal_uInt16 nSubId( 0 );
SfxMapUnit eMapUnit( SFX_MAPUNIT_100TH_MM );
// retrieve the core metric
@@ -975,7 +975,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if ( eMapUnit == SFX_MAPUNIT_TWIP )
nSubId |= CONVERT_TWIPS;
- pState->QueryValue( aState, (BYTE)nSubId );
+ pState->QueryValue( aState, (sal_uInt8)nSubId );
}
else if ( eState == SFX_ITEM_DONTCARE )
{
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
deleted file mode 100644
index ea7b0a2bb0bd..000000000000
--- a/sfx2/source/dialog/about.cxx
+++ /dev/null
@@ -1,423 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-// include ---------------------------------------------------------------
-
-#ifndef _SV_APP_HXX
-#include <vcl/svapp.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
-#include <vcl/msgbox.hxx>
-#endif
-#ifndef GCC
-#endif
-
-#include <tools/stream.hxx>
-#include <tools/urlobj.hxx>
-#include <rtl/bootstrap.hxx>
-#include <unotools/configmgr.hxx>
-#include <unotools/bootstrap.hxx>
-#include <com/sun/star/uno/Any.h>
-#include <unotools/configmgr.hxx>
-#include <vcl/graph.hxx>
-#include <svtools/filter.hxx>
-
-#include <sfx2/sfxuno.hxx>
-#include "about.hxx"
-#include "sfxresid.hxx"
-#include <sfx2/sfxdefs.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/sfxcommands.h>
-#include "dialog.hrc"
-
-// defines ---------------------------------------------------------------
-
-#define SCROLL_OFFSET 1
-#define SPACE_OFFSET 5
-#define SCROLL_TIMER 30
-
-#define WELCOME_URL DEFINE_CONST_UNICODE( "http://www.openoffice.org/welcome/credits.html" )
-
-// class AboutDialog -----------------------------------------------------
-static void layoutText( FixedInfo &rText, long &nY, long nTextWidth, Size a6Size )
-{
- Point aTextPos = rText.GetPosPixel();
- aTextPos.X() = a6Size.Width() * 2;
- aTextPos.Y() = nY;
- rText.SetPosPixel( aTextPos );
-
- Size aTxtSiz = rText.GetSizePixel();
- aTxtSiz.Width() = nTextWidth;
- Size aCalcSize = rText.CalcMinimumSize( nTextWidth );
- aTxtSiz.Height() = aCalcSize.Height();
- rText.SetSizePixel( aTxtSiz );
-
- nY += aTxtSiz.Height();
-}
-
-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;
-}
-
-AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr ) :
-
- SfxModalDialog ( pParent, rId ),
-
- aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ),
- aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
- aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
- aBuildData ( this ),
- aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
- aDevVersionStr ( rVerStr ),
- aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
- aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
- aTimer (),
- nOff ( 0 ),
- m_nDeltaWidth ( 0 ),
- m_nPendingScrolls( 0 ),
- bNormal ( TRUE )
-{
- rtl::OUString sProduct;
- utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
-
- // load image from module path
- aAppLogo = SfxApplication::GetApplicationLogo();
-
- // Transparenter Font
- Font aFont = GetFont();
- aFont.SetTransparent( TRUE );
- SetFont( aFont );
-
- // if necessary more info
- String sVersion = aVersionText.GetText();
- sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() );
- sVersion += '\n';
- sVersion += rVerStr;
- aVersionText.SetText( sVersion );
-
- // Initialisierung fuer Aufruf Entwickler
- if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() )
- {
- Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0;
- aAccelStr.ToUpperAscii();
-
- for ( USHORT i = 0; i < aAccelStr.Len(); ++i )
- {
- pPrevAccel = pAccel;
- pAccel = new Accelerator;
- aAccelList.Insert( pAccel, LIST_APPEND );
- USHORT nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
- pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
- if ( i > 0 )
- pPrevAccel->SetAccel( 1, pAccel );
- if ( i == 0 )
- pFirstAccel = pAccel;
- }
- pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) );
- GetpApp()->InsertAccel( pFirstAccel );
- }
-
- // set for background and text the correct system color
- const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- Color aWhiteCol( rSettings.GetWindowColor() );
- Wallpaper aWall( aWhiteCol );
- SetBackground( aWall );
- Font aNewFont( aCopyrightText.GetFont() );
- aNewFont.SetTransparent( TRUE );
-
- aVersionText.SetFont( aNewFont );
- aCopyrightText.SetFont( aNewFont );
-
- aVersionText.SetBackground();
- aCopyrightText.SetBackground();
-
- Color aTextColor( rSettings.GetWindowTextColor() );
- aVersionText.SetControlForeground( aTextColor );
- aCopyrightText.SetControlForeground( aTextColor );
- aBuildData.SetBackground( aWall );
-
- Font aSmallFont = rSettings.GetInfoFont();
- Size aSmaller = aNewFont.GetSize();
- aSmaller.Width() = (long) (aSmaller.Width() * 0.75);
- aSmaller.Height() = (long) (aSmaller.Height() * 0.75);
- aNewFont.SetSize( aSmaller );
- aBuildData.SetFont( aNewFont );
- aBuildData.SetBackground( aWall );
-#ifdef BUILD_VER_STRING
- String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
-#else
- String aBuildString;
-#endif
- aBuildData.SetText( aBuildString );
- aBuildData.Show();
-
- // determine size and position of the dialog & elements
- Size aAppLogoSiz = aAppLogo.GetSizePixel();
- Size aOutSiz = GetOutputSizePixel();
- aOutSiz.Width() = aAppLogoSiz.Width();
-
- Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
- long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
- long nDlgMargin = a6Size.Width() * 4 ;
- long nCtrlMargin = a6Size.Height() * 2;
- long nTextWidth = aOutSiz.Width() - nDlgMargin;
-
- aCopyrightText.SetText( aCopyrightTextStr );
-
- layoutText( aVersionText, nY, nTextWidth, a6Size );
- nY += nCtrlMargin;
-
- // OK-Button-Position (at the bottom and centered)
- Size aOKSiz = aOKButton.GetSizePixel();
- Point aOKPnt = aOKButton.GetPosPixel();
-
- // Multiline edit with Copyright-Text
- Point aCopyPnt = aCopyrightText.GetPosPixel();
- Size aCopySize = aCopyrightText.GetSizePixel();
- aCopySize.Width() = nTextWidth;
- aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - nCtrlMargin;
-
- aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2;
- aCopyPnt.Y() = nY;
- aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize );
-
- nY += aCopySize.Height() + nCtrlMargin;
- aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
- aOKPnt.Y() = nY;
- aOKButton.SetPosPixel( aOKPnt );
-
- // Change the width of the dialog
- SetOutputSizePixel( aOutSiz );
-
- FreeResource();
-
- SetHelpId( CMD_SID_ABOUT );
-}
-
-// -----------------------------------------------------------------------
-
-AboutDialog::~AboutDialog()
-{
- // L"oschen des Entwickleraufrufs
- if ( aAccelList.Count() )
- {
- GetpApp()->RemoveAccel( aAccelList.First() );
- Accelerator* pAccel = aAccelList.Last();
-
- while ( pAccel )
- {
- delete pAccel;
- pAccel = aAccelList.Prev();
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer )
-{
- (void)pTimer; //unused
- ++m_nPendingScrolls;
- Invalidate( INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
-{
-#ifdef YURI_DARIO
- aCopyrightText.SetHelpText( DEFINE_CONST_UNICODE("Conoscere qualcuno ovunque egli sia, con cui comprendersi nonostante le distanze\n"
- "e le differenze, puo' trasformare la terra in un giardino. baci Valeria") );
-#endif
-
- (void)pAccelerator; //unused
- // init Timer
- aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) );
-
- // init scroll mode
- nOff = GetOutputSizePixel().Height();
- MapMode aMapMode( MAP_PIXEL );
- SetMapMode( aMapMode );
- bNormal = FALSE;
-
- // start scroll Timer
- aTimer.SetTimeout( SCROLL_TIMER );
- aTimer.Start();
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-BOOL AboutDialog::Close()
-{
- // stop Timer and finish the dialog
- aTimer.Stop();
- EndDialog( RET_OK );
- return( FALSE );
-}
-
-// -----------------------------------------------------------------------
-
-void AboutDialog::Paint( const Rectangle& rRect )
-{
- SetClipRegion( rRect );
-
- if ( bNormal ) // not in scroll mode
- {
- Point aPos( m_nDeltaWidth / 2, 0 );
- DrawImage( aPos, aAppLogo );
- return;
- }
-
- // scroll the content
- const int nDeltaY = -SCROLL_OFFSET * m_nPendingScrolls;
- if( !nDeltaY )
- return;
- nOff += nDeltaY;
- Scroll( 0, nDeltaY, SCROLL_NOERASE );
- m_nPendingScrolls = 0;
-
- // draw the credits text
- const Font aOrigFont = GetFont();
- const int nFullWidth = GetOutputSizePixel().Width();
-
- int nY = nOff;
- const int nDevCnt = static_cast<int>( aDeveloperAry.Count() );
- for( int i = 0; i < nDevCnt; ++i )
- {
- if( nY >= rRect.Bottom() )
- break;
-
- int nPos2 = nY + GetTextHeight() + 3;
- if( nPos2 >= rRect.Top() + nDeltaY )
- {
- const String aStr = aDeveloperAry.GetString(i);
- const long nVal = aDeveloperAry.GetValue(i);
-
- if ( nVal )
- {
- // emphasize the headers
- Font aFont = aOrigFont;
- aFont.SetWeight( (FontWeight)nVal );
- SetFont( aFont );
- nPos2 = nY + GetTextHeight() + 3;
- }
-
- // clear text background
- Rectangle aEraseRect( Point(0,nY), Size( nFullWidth, nPos2-nY));
- Erase( aEraseRect );
-
- // draw centered text
- const long nTextWidth = GetTextWidth( aStr );
- long nX = (nFullWidth - 5 - nTextWidth) / 2;
- if( nX < 0 )
- nX = SPACE_OFFSET;
- const Point aPnt( nX, nY );
- DrawText( aPnt, aStr );
-
- // restore the font if needed
- if( nVal )
- SetFont( aOrigFont );
- }
- nY = nPos2;
- }
-
- // close dialog if the whole text has been scrolled
- if ( nY <= 0 )
- {
- bNormal = TRUE;
- Close();
- }
-}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 5a7f8a1fd900..c7f9bbeec244 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -62,7 +62,7 @@ class SfxModelessDialog_Impl : public SfxListener
public:
ByteString aWinState;
SfxChildWindow* pMgr;
- BOOL bConstructed;
+ sal_Bool bConstructed;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
Timer aMoveTimer;
@@ -86,7 +86,7 @@ class SfxFloatingWindow_Impl : public SfxListener
public:
ByteString aWinState;
SfxChildWindow* pMgr;
- BOOL bConstructed;
+ sal_Bool bConstructed;
Timer aMoveTimer;
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -274,7 +274,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
}
}
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
ModelessDialog::StateChanged( nStateChange );
@@ -334,7 +334,7 @@ IMPL_LINK( SfxModelessDialog, TimerHdl, Timer*, EMPTYARG)
{
if ( !IsRollUp() )
aSize = GetSizePixel();
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
@@ -353,7 +353,7 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
pImp( new SfxModelessDialog_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
SetUniqueId( GetHelpId() );
SetHelpId("");
if ( pBindinx )
@@ -372,7 +372,7 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
pImp( new SfxModelessDialog_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
SetUniqueId( GetHelpId() );
SetHelpId("");
if ( pBindinx )
@@ -539,7 +539,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp( new SfxFloatingWindow_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
SetUniqueId( GetHelpId() );
SetHelpId("");
if ( pBindinx )
@@ -559,7 +559,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
pImp( new SfxFloatingWindow_Impl )
{
pImp->pMgr = pCW;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
SetUniqueId( GetHelpId() );
SetHelpId("");
if ( pBindinx )
@@ -649,7 +649,7 @@ IMPL_LINK( SfxFloatingWindow, TimerHdl, Timer*, EMPTYARG)
{
if ( !IsRollUp() )
aSize = GetSizePixel();
- ULONG nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
+ sal_uIntPtr nMask = WINDOWSTATE_MASK_POS | WINDOWSTATE_MASK_STATE;
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
@@ -666,7 +666,7 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
// FloatingWindows are not centered by default
if ( pImp->aWinState.Len() )
SetWindowState( pImp->aWinState );
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
FloatingWindow::StateChanged( nStateChange );
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 3d848d4d5648..2d5c383f8b89 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -117,26 +117,26 @@ bool operator==(const util::DateTime &i_rLeft, const util::DateTime &i_rRight)
TYPEINIT1_AUTOFACTORY(SfxDocumentInfoItem, SfxStringItem);
-const USHORT HI_NAME = 1;
-const USHORT HI_TYPE = 2;
-const USHORT HI_VALUE = 3;
-const USHORT HI_ACTION = 4;
+const sal_uInt16 HI_NAME = 1;
+const sal_uInt16 HI_TYPE = 2;
+const sal_uInt16 HI_VALUE = 3;
+const sal_uInt16 HI_ACTION = 4;
static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature";
//------------------------------------------------------------------------
-String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE );
-String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
+String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes = sal_True, sal_Bool bSmartExtraBytes = sal_False );
+String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartExtraBytes )
{
String aUnitStr = ' ';
aUnitStr += String( SfxResId(STR_BYTES) );
- ULONG nSize1 = nSize;
- ULONG nSize2 = nSize1;
- ULONG nMega = 1024 * 1024;
- ULONG nGiga = nMega * 1024;
+ sal_uIntPtr nSize1 = nSize;
+ sal_uIntPtr nSize2 = nSize1;
+ sal_uIntPtr nMega = 1024 * 1024;
+ sal_uIntPtr nGiga = nMega * 1024;
double fSize = nSize;
int nDec = 0;
- BOOL bGB = FALSE;
+ sal_Bool bGB = sal_False;
if ( nSize1 >= 10000 && nSize1 < nMega )
{
@@ -159,7 +159,7 @@ String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
nSize1 /= nGiga;
aUnitStr = ' ';
aUnitStr += String( SfxResId(STR_GB) );
- bGB = TRUE;
+ bGB = sal_True;
fSize /= nGiga;
nDec = 3;
}
@@ -198,7 +198,7 @@ String ConvertDateTime_Impl( const String& rName,
const String pDelim ( DEFINE_CONST_UNICODE( ", "));
String aStr( rWrapper.getDate( aD ) );
aStr += pDelim;
- aStr += rWrapper.getTime( aT, TRUE, FALSE );
+ aStr += rWrapper.getTime( aT, sal_True, sal_False );
String aAuthor = rName;
aAuthor.EraseLeadingChars();
if ( aAuthor.Len() )
@@ -510,13 +510,13 @@ void SfxDocumentInfoItem::AddCustomProperty( const ::rtl::OUString& sName, const
m_aCustomProperties.push_back( pProp );
}
-sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
String aValue;
sal_Int32 nValue = 0;
sal_Bool bValue = sal_False;
- BOOL bIsInt = FALSE;
- BOOL bIsString = FALSE;
+ sal_Bool bIsInt = sal_False;
+ sal_Bool bIsString = sal_False;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -530,31 +530,31 @@ sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
bValue = isAutoloadEnabled();
break;
case MID_DOCINFO_AUTOLOADSECS:
- bIsInt = TRUE;
+ bIsInt = sal_True;
nValue = getAutoloadDelay();
break;
case MID_DOCINFO_AUTOLOADURL:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getAutoloadURL();
break;
case MID_DOCINFO_DEFAULTTARGET:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getDefaultTarget();
break;
case MID_DOCINFO_DESCRIPTION:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getDescription();
break;
case MID_DOCINFO_KEYWORDS:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getKeywords();
break;
case MID_DOCINFO_SUBJECT:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getSubject();
break;
case MID_DOCINFO_TITLE:
- bIsString = TRUE;
+ bIsString = sal_True;
aValue = getTitle();
break;
default:
@@ -571,7 +571,7 @@ sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
return sal_True;
}
-sal_Bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId )
+sal_Bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
::rtl::OUString aValue;
sal_Int32 nValue=0;
@@ -669,16 +669,16 @@ SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItem
//------------------------------------------------------------------------
-BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
{
// Pruefung, ob eine Aenderung vorliegt
- const BOOL bTitleMod = aTitleEd.IsModified();
- const BOOL bThemeMod = aThemaEd.IsModified();
- const BOOL bKeywordsMod = aKeywordsEd.IsModified();
- const BOOL bCommentMod = aCommentEd.IsModified();
+ const sal_Bool bTitleMod = aTitleEd.IsModified();
+ const sal_Bool bThemeMod = aThemaEd.IsModified();
+ const sal_Bool bKeywordsMod = aKeywordsEd.IsModified();
+ const sal_Bool bCommentMod = aCommentEd.IsModified();
if( !( bTitleMod || bThemeMod || bKeywordsMod || bCommentMod ) )
{
- return FALSE;
+ return sal_False;
}
// Erzeugung der Ausgabedaten
@@ -690,7 +690,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
if ( pDlg )
pExSet = pDlg->GetExampleSet();
- if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = pInfoItem;
else if ( pItem )
pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem *)pItem );
@@ -698,7 +698,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
if ( !pInfo )
{
DBG_ERRORFILE( "SfxDocumentDescPage::FillItemSet(): no item found" );
- return FALSE;
+ return sal_False;
}
if( bTitleMod )
@@ -723,7 +723,7 @@ BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
delete pInfo;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -737,13 +737,13 @@ void SfxDocumentDescPage::Reset(const SfxItemSet &rSet)
aKeywordsEd.SetText( pInfoItem->getKeywords() );
aCommentEd.SetText( pInfoItem->getDescription() );
- SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pROItem && pROItem->GetValue() )
{
- aTitleEd.SetReadOnly( TRUE );
- aThemaEd.SetReadOnly( TRUE );
- aKeywordsEd.SetReadOnly( TRUE );
- aCommentEd.SetReadOnly( TRUE );
+ aTitleEd.SetReadOnly( sal_True );
+ aThemaEd.SetReadOnly( sal_True );
+ aKeywordsEd.SetReadOnly( sal_True );
+ aCommentEd.SetReadOnly( sal_True );
}
}
@@ -824,10 +824,11 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
aUnknownSize ( SfxResId( STR_UNKNOWNSIZE ) ),
aMultiSignedStr ( SfxResId( STR_MULTSIGNED ) ),
- bEnableUseUserData ( FALSE ),
- bHandleDelete ( FALSE )
+ bEnableUseUserData ( sal_False ),
+ bHandleDelete ( sal_False )
{
+ aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME)));
FreeResource();
ImplUpdateSignatures();
@@ -891,7 +892,7 @@ IMPL_LINK( SfxDocumentPage, DeleteHdl, PushButton*, EMPTYARG )
const Time aTime( 0 );
aTimeLogValFt.SetText( aLocaleWrapper.getDuration( aTime ) );
aDocNoValFt.SetText( '1' );
- bHandleDelete = TRUE;
+ bHandleDelete = sal_True;
return 0;
}
@@ -954,16 +955,16 @@ SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet
void SfxDocumentPage::EnableUseUserData()
{
- bEnableUseUserData = TRUE;
+ bEnableUseUserData = sal_True;
aUseUserDataCB.Show();
aDeleteBtn.Show();
}
//------------------------------------------------------------------------
-BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !bHandleDelete && bEnableUseUserData &&
aUseUserDataCB.GetState() != aUseUserDataCB.GetSavedValue() &&
@@ -972,10 +973,10 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
{
SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
- BOOL bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
+ sal_Bool bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
pInfoItem->SetUseUserData( bUseData );
/*
if ( !bUseData )
@@ -992,7 +993,7 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
}
*/
rSet.Put( SfxDocumentInfoItem( *pInfoItem ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1000,10 +1001,10 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
{
const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
const SfxPoolItem* pItem;
- if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
{
SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
- BOOL bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked();
+ sal_Bool bUseAuthor = bEnableUseUserData && aUseUserDataCB.IsChecked();
SfxDocumentInfoItem newItem( *pInfoItem );
newItem.resetUserData( bUseAuthor
? SvtUserOptions().GetFullName()
@@ -1011,22 +1012,22 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
pInfoItem->SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() );
newItem.SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() );
- newItem.SetDeleteUserData( TRUE );
+ newItem.SetDeleteUserData( sal_True );
rSet.Put( newItem );
- bRet = TRUE;
+ bRet = sal_True;
}
}
if ( aNameED.IsModified() && aNameED.GetText().Len() )
{
rSet.Put( SfxStringItem( ID_FILETP_TITLE, aNameED.GetText() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
- if ( /* aReadOnlyCB.IsModified() */ TRUE )
+ if ( /* aReadOnlyCB.IsModified() */ sal_True )
{
rSet.Put( SfxBoolItem( ID_FILETP_READONLY, aReadOnlyCB.IsChecked() ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1056,7 +1057,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
String aFactory( aFile );
if ( aFile.Len() > 2 && aFile.GetChar(0) == '[' )
{
- USHORT nPos = aFile.Search( ']' );
+ sal_uInt16 nPos = aFile.Search( ']' );
aFactory = aFile.Copy( 1, nPos-1 );
aFile = aFile.Copy( nPos+1 );
}
@@ -1064,13 +1065,13 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
// determine name
String aName;
const SfxPoolItem* pItem = 0;
- if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, sal_False, &pItem ) )
{
INetURLObject aURL(aFile);
aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
if ( !aName.Len() || aURL.GetProtocol() == INET_PROT_PRIVATE )
aName = String( SfxResId( STR_NONAME ) );
- aNameED.SetReadOnly( TRUE );
+ aNameED.SetReadOnly( sal_True );
}
else
{
@@ -1081,7 +1082,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
aNameED.ClearModifyFlag();
// determine RO-Flag
- if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, FALSE, &pItem )
+ if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, sal_False, &pItem )
|| !pItem )
aReadOnlyCB.Hide();
else
@@ -1092,7 +1093,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetSmartURL( aFactory);
const String& rMainURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, TRUE ) );
+ aBmp1.SetImage( SvFileInformationManager::GetImage( aURL, sal_True ) );
// determine size and type
String aSizeText( aUnknownSize );
@@ -1147,12 +1148,12 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
TriState eState = (TriState)m_bUseUserData;
if ( STATE_DONTKNOW == eState )
- aUseUserDataCB.EnableTriState( TRUE );
+ aUseUserDataCB.EnableTriState( sal_True );
aUseUserDataCB.SetState( eState );
aUseUserDataCB.SaveValue();
aUseUserDataCB.Enable( bEnableUseUserData );
- bHandleDelete = FALSE;
+ bHandleDelete = sal_False;
aDeleteBtn.Enable( bEnableUseUserData );
}
@@ -1197,7 +1198,7 @@ SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet )
pFrame->GetTargetList( aList );
String* pObj;
- for( USHORT nPos = ( USHORT ) aList.Count() ; nPos ; )
+ for( sal_uInt16 nPos = ( sal_uInt16 ) aList.Count() ; nPos ; )
{
pObj = aList.GetObject( --nPos );
aCBFrame.InsertEntry( *pObj );
@@ -1235,30 +1236,30 @@ void SfxInternetPage::ChangeState( STATE eNewState )
switch( eState )
{
case S_Init:
- EnableNoUpdate( TRUE );
- EnableReload( FALSE );
- EnableForward( FALSE );
+ EnableNoUpdate( sal_True );
+ EnableReload( sal_False );
+ EnableForward( sal_False );
break;
case S_NoUpdate:
- EnableNoUpdate( FALSE );
+ EnableNoUpdate( sal_False );
if( eNewState == S_Reload )
- EnableReload( TRUE );
+ EnableReload( sal_True );
else
- EnableForward( TRUE );
+ EnableForward( sal_True );
break;
case S_Reload:
- EnableReload( FALSE );
+ EnableReload( sal_False );
if( eNewState == S_NoUpdate )
- EnableNoUpdate( TRUE );
+ EnableNoUpdate( sal_True );
else
- EnableForward( TRUE );
+ EnableForward( sal_True );
break;
case S_Forward:
- EnableForward( FALSE );
+ EnableForward( sal_False );
if( eNewState == S_NoUpdate )
- EnableNoUpdate( TRUE );
+ EnableNoUpdate( sal_True );
else
- EnableReload( TRUE );
+ EnableReload( sal_True );
break;
default:
DBG_ERROR( "*SfxInternetPage::SetState(): unhandled state!" );
@@ -1269,7 +1270,7 @@ void SfxInternetPage::ChangeState( STATE eNewState )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableNoUpdate( BOOL bEnable )
+void SfxInternetPage::EnableNoUpdate( sal_Bool bEnable )
{
if( bEnable )
aRBNoAutoUpdate.Check();
@@ -1277,7 +1278,7 @@ void SfxInternetPage::EnableNoUpdate( BOOL bEnable )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableReload( BOOL bEnable )
+void SfxInternetPage::EnableReload( sal_Bool bEnable )
{
aFTEvery.Enable( bEnable );
aNFReload.Enable( bEnable );
@@ -1289,7 +1290,7 @@ void SfxInternetPage::EnableReload( BOOL bEnable )
//------------------------------------------------------------------------
-void SfxInternetPage::EnableForward( BOOL bEnable )
+void SfxInternetPage::EnableForward( sal_Bool bEnable )
{
aFTAfter.Enable( bEnable );
aNFAfter.Enable( bEnable );
@@ -1357,7 +1358,7 @@ IMPL_LINK( SfxInternetPage, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG )
//------------------------------------------------------------------------
-BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxInternetPage::FillItemSet( SfxItemSet& rSet )
{
const SfxPoolItem* pItem = NULL;
SfxDocumentInfoItem* pInfo = NULL;
@@ -1367,7 +1368,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
if( pDlg )
pExSet = pDlg->GetExampleSet();
- if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ if( pExSet && SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = pInfoItem;
else if ( pItem )
pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem*)pItem );
@@ -1375,33 +1376,33 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
if ( !pInfo )
{
DBG_ERRORFILE( "SfxInternetPage::FillItemSet(): no item found" );
- return FALSE;
+ return sal_False;
}
DBG_ASSERT( eState != S_Init, "*SfxInternetPage::FillItemSet(): state init is not acceptable at this point!" );
- BOOL bEnableReload = FALSE;
+ sal_Bool bEnableReload = sal_False;
::std::auto_ptr< String > aURL( NULL );
::std::auto_ptr< String > aFrame( NULL );
- ULONG nDelay = 0;
+ sal_uIntPtr nDelay = 0;
switch( eState )
{
case S_NoUpdate:
break;
case S_Reload:
- bEnableReload = TRUE;
+ bEnableReload = sal_True;
aURL = ::std::auto_ptr< String >( new String() );
aFrame = ::std::auto_ptr< String >( new String() );
- nDelay = static_cast<ULONG>(aNFReload.GetValue());
+ nDelay = static_cast<sal_uIntPtr>(aNFReload.GetValue());
break;
case S_Forward:
DBG_ASSERT( aEDForwardURL.GetText().Len(), "+SfxInternetPage::FillItemSet(): empty URL should be not possible for forward option!" );
- bEnableReload = TRUE;
+ bEnableReload = sal_True;
aURL = ::std::auto_ptr< String >( new String( URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aEDForwardURL.GetText(), URIHelper::GetMaybeFileHdl(), true ) ) );
aFrame = ::std::auto_ptr< String >( new String( aCBFrame.GetText() ) );
- nDelay = static_cast<ULONG>(aNFAfter.GetValue());
+ nDelay = static_cast<sal_uIntPtr>(aNFAfter.GetValue());
break;
default:
break;
@@ -1419,7 +1420,7 @@ BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
rSet.Put( *pInfo );
if( pInfo != pInfoItem )
delete pInfo;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -1434,7 +1435,7 @@ SfxTabPage *SfxInternetPage::Create( Window* pParent, const SfxItemSet& rItemSet
void SfxInternetPage::Reset( const SfxItemSet& rSet )
{
pInfoItem = &( SfxDocumentInfoItem& ) rSet.Get( SID_DOCINFO );
- SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False );
DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" );
if ( pURLItem )
aBaseURL = pURLItem->GetValue();
@@ -1462,7 +1463,7 @@ void SfxInternetPage::Reset( const SfxItemSet& rSet )
ChangeState( eNewState );
// #102907# ------------------------
- SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pROItem && pROItem->GetValue() )
{
aRBNoAutoUpdate.Disable();
@@ -1513,7 +1514,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
&(const SfxDocumentInfoItem &)rItemSet.Get( SID_DOCINFO );
#ifdef DBG_UTIL
- SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, FALSE );
+ SFX_ITEMSET_ARG( &rItemSet, pURLItem, SfxStringItem, SID_BASEURL, sal_False );
DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" );
#endif
@@ -1521,7 +1522,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
const SfxPoolItem* pItem = 0;
String aTitle( GetText() );
if ( SFX_ITEM_SET !=
- rItemSet.GetItemState( SID_EXPLORER_PROPS_START, FALSE, &pItem ) )
+ rItemSet.GetItemState( SID_EXPLORER_PROPS_START, sal_False, &pItem ) )
{
// Dateiname
String aFile( pInfoItem->GetValue() );
@@ -1558,7 +1559,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
// -----------------------------------------------------------------------
-void SfxDocumentInfoDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if ( TP_DOCINFODOC == nId )
( (SfxDocumentPage&)rPage ).EnableUseUserData();
@@ -1818,6 +1819,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
m_aBoxLoseFocusTimer.SetTimeout( 300 );
m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
+
+ ResMgr* pResMgr = rResId.GetResMgr();
+ m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) );
+ m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) );
+ m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) );
}
CustomPropertiesWindow::~CustomPropertiesWindow()
@@ -1949,7 +1955,7 @@ bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const
{
sal_uInt32 nTemp = nIndex;
bIsValid = const_cast< SvNumberFormatter& >(
- m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != FALSE;
+ m_aNumberFormatter ).IsNumberFormat( sValue, nIndex, fDummy ) != sal_False;
if ( bIsValid && nTemp != nIndex )
// sValue is a number but the format doesn't match the index
bIsValid = false;
@@ -2000,7 +2006,7 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, &m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( *pCurrent )
{
Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) );
@@ -2041,9 +2047,9 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height();
}
-USHORT CustomPropertiesWindow::GetVisibleLineCount() const
+sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
std::vector< CustomPropertyLine* >::const_iterator pIter;
for ( pIter = m_aCustomPropertiesLines.begin();
pIter != m_aCustomPropertiesLines.end(); ++pIter )
@@ -2064,6 +2070,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
//add lose focus handlers of date/time fields
pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) );
+
+ pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName());
+ pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName());
+ pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName());
+
long nPos = GetVisibleLineCount() * GetLineHeight();
m_aCustomPropertiesLines.push_back( pNewLine );
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit,
@@ -2254,7 +2265,7 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
double nValue = 0;
sal_uInt32 nIndex = const_cast< SvNumberFormatter& >(
m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM );
- BOOL bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ).
+ sal_Bool bIsNum = const_cast< SvNumberFormatter& >( m_aNumberFormatter ).
IsNumberFormat( pLine->m_aValueEdit.GetText(), nIndex, nValue );
if ( bIsNum )
aPropertiesSeq[i].Value <<= makeAny( nValue );
@@ -2384,9 +2395,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny,
SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) :
SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ),
- m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ),
m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ),
- m_aAddBtn ( this, SfxResId( BTN_ADD ) )
+ m_aAddBtn ( this, SfxResId( BTN_ADD ) ),
+ m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) )
{
FreeResource();
@@ -2401,9 +2412,9 @@ IMPL_LINK( SfxCustomPropertiesPage, AddHdl, PushButton*, EMPTYARG )
return 0;
}
-BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SfxPoolItem* pItem = NULL;
SfxDocumentInfoItem* pInfo = NULL;
bool bMustDelete = false;
@@ -2411,7 +2422,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
{
if( SFX_ITEM_SET !=
- GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, sal_True, &pItem ) )
pInfo = &( SfxDocumentInfoItem& )rSet.Get( SID_DOCINFO );
else
{
@@ -2432,7 +2443,7 @@ BOOL SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet )
}
}
- bModified = TRUE; //!!!
+ bModified = sal_True; //!!!
if ( bModified )
rSet.Put( *pInfo );
if ( bMustDelete )
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index 5453e3606026..43bd848844a0 100644
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -153,6 +153,10 @@
#define STR_HEADER_VALUE 92
#define STR_HEADER_ACTION 93
+//IAccessibility2 Implementation 2009-----
+#define EDIT_FILE_NAME 94
+//-----IAccessibility2 Implementation 2009
+
#define PB_OK 100
#define PB_CANCEL 101
#define PB_HELP 102
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index c78347e3dba3..eaa24105bb17 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -303,6 +303,10 @@ TabPage TP_DOCINFODOC
{
Text [ en-US ] = "unknown" ;
};
+ String EDIT_FILE_NAME
+ {
+ Text [ en-US ] = "File Name" ;
+ };
};
// TP_DOCINFOUSER --------------------------------------------------------
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 4f55dfde21a7..76bd38377eb8 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -75,7 +75,7 @@ class SfxTitleDockingWindow;
class SfxTitleDockingWindow : public SfxDockingWindow
{
Window* m_pWrappedWindow;
- USHORT m_nID;
+ sal_uInt16 m_nID;
public:
SfxTitleDockingWindow(
@@ -83,7 +83,7 @@ public:
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID);
+ sal_uInt16 nID);
virtual ~SfxTitleDockingWindow();
Window* GetWrappedWindow() const { return m_pWrappedWindow; }
@@ -93,7 +93,7 @@ public:
virtual long Notify( NotifyEvent& rNEvt );
virtual void Resize();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
namespace
@@ -138,7 +138,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >&
}
SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd , nId )
@@ -242,7 +242,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxChildWindow* SfxDockingWrapper::CreateImpl(
@@ -262,7 +262,7 @@ void SfxDockingWrapper::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal
// pre-register a couple of docking windows
for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ )
{
- USHORT nID = USHORT(SID_DOCKWIN_START+i);
+ sal_uInt16 nID = sal_uInt16(SID_DOCKWIN_START+i);
SfxChildWinFactory *pFact = new SfxChildWinFactory( SfxDockingWrapper::CreateImpl, nID, 0xffff );
pFact->aInfo.nFlags |= nFlags;
pFact->aInfo.bVisible = bVis;
@@ -281,7 +281,7 @@ SfxTitleDockingWindow::SfxTitleDockingWindow( SfxBindings* pBind ,
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID ) :
+ sal_uInt16 nID ) :
SfxDockingWindow( pBind ,
pChildWin ,
pParent ,
@@ -341,7 +341,7 @@ void SfxTitleDockingWindow::Resizing( Size &rSize )
m_pWrappedWindow->SetSizePixel( GetOutputSizePixel() );
}
-BOOL SfxTitleDockingWindow::Close()
+sal_Bool SfxTitleDockingWindow::Close()
{
return SfxDockingWindow::Close();
}
@@ -351,9 +351,9 @@ namespace
struct ChildrenRegisteredMap : public rtl::Static< bool, ChildrenRegisteredMap > {};
}
-static bool lcl_checkDockingWindowID( USHORT nID )
+static bool lcl_checkDockingWindowID( sal_uInt16 nID )
{
- if (nID < SID_DOCKWIN_START || nID >= USHORT(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
+ if (nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
return false;
else
return true;
@@ -391,7 +391,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -418,7 +418,7 @@ bool SAL_CALL IsDockingWindowVisible( const uno::Reference< frame::XFrame >& rFr
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -441,25 +441,25 @@ friend class SfxDockingWindow;
SfxChildAlignment eLastAlignment;
SfxChildAlignment eDockAlignment;
- BOOL bConstructed;
+ sal_Bool bConstructed;
Size aMinSize;
SfxSplitWindow* pSplitWin;
- BOOL bSplitable;
-// BOOL bAutoHide;
+ sal_Bool bSplitable;
+// sal_Bool bAutoHide;
Timer aMoveTimer;
// Folgende members sind nur in der Zeit von StartDocking bis EndDocking
// g"ultig:
- BOOL bEndDocked;
+ sal_Bool bEndDocked;
Size aSplitSize;
long nHorizontalSize;
long nVerticalSize;
- USHORT nLine;
- USHORT nPos;
- USHORT nDockLine;
- USHORT nDockPos;
- BOOL bNewLine;
- BOOL bDockingPrevented;
+ sal_uInt16 nLine;
+ sal_uInt16 nPos;
+ sal_uInt16 nDockLine;
+ sal_uInt16 nDockPos;
+ sal_Bool bNewLine;
+ sal_Bool bDockingPrevented;
ByteString aWinState;
SfxChildAlignment GetLastAlignment() const
@@ -525,7 +525,7 @@ void SfxDockingWindow::Resize()
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::PrepareToggleFloatingMode()
+sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
/* [Beschreibung]
@@ -538,24 +538,24 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
{
if (!pImp->bConstructed)
- return TRUE;
+ return sal_True;
if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr )
- return FALSE;
+ return sal_False;
if ( pImp->bDockingPrevented )
- return FALSE;
+ return sal_False;
if (!IsFloatingMode())
{
// Testen, ob FloatingMode erlaubt ist
if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT )
- return FALSE;
+ return sal_False;
if ( pImp->pSplitWin )
{
// Das DockingWindow sitzt in einem SplitWindow und wird abgerissen
- pImp->pSplitWin->RemoveWindow(this/*, FALSE*/);
+ pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
pImp->pSplitWin = 0;
}
}
@@ -565,15 +565,15 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
// Testen, ob es erlaubt ist, anzudocken
if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT)
- return FALSE;
+ return sal_False;
// Testen, ob das Workwindow gerade ein Andocken erlaubt
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -697,13 +697,13 @@ void SfxDockingWindow::StartDocking()
pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos);
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
}
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
+sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
/* [Beschreibung]
@@ -714,7 +714,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
*/
{
if ( Application::IsInModalMode() )
- return TRUE;
+ return sal_True;
if ( !pImp->bConstructed || !pMgr )
{
@@ -724,16 +724,16 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( pImp->bDockingPrevented || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
- BOOL bFloatMode = FALSE;
+ sal_Bool bFloatMode = sal_False;
if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() )
{
// Maus innerhalb OuterRect : Alignment und Rectangle berechnen
SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
if (eAlign == SFX_ALIGN_NOALIGNMENT)
- bFloatMode = TRUE;
+ bFloatMode = sal_True;
pImp->SetDockAlignment(eAlign);
}
else
@@ -741,8 +741,8 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
// Maus nicht innerhalb OuterRect : muss FloatingWindow sein
// Ist das erlaubt ?
if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT)
- return FALSE;
- bFloatMode = TRUE;
+ return sal_False;
+ bFloatMode = sal_True;
if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
{
// wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
@@ -806,7 +806,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
//-------------------------------------------------------------------------
-void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
/* [Beschreibung]
@@ -820,7 +820,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
return;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- BOOL bReArrange = FALSE;
+ sal_Bool bReArrange = sal_False;
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
if ( pImp->bSplitable )
{
@@ -831,7 +831,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// Wenn neu angedockt wird, machen PrepareToggleFloatingMode()
// und ToggleFloatingMode() das Ummelden.
if ( !bFloatMode )
- bReArrange = TRUE;
+ bReArrange = sal_True;
}
if ( bReArrange )
@@ -841,7 +841,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// Vor dem Show() mu\s das Ummelden passiert sein, daher kann nicht
// die Basisklasse gerufen werden
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// Die Gr"o\se f"urs Toggeln setzen
pImp->aSplitSize = rRect.GetSize();
@@ -849,11 +849,11 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
{
SetFloatingMode( bFloatMode );
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( TRUE, SHOW_NOFOCUSCHANGE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE );
}
else
{
- pImp->pSplitWin->RemoveWindow(this,FALSE);
+ pImp->pSplitWin->RemoveWindow(this,sal_False);
pImp->nLine = pImp->nDockLine;
pImp->nPos = pImp->nDockPos;
pImp->pSplitWin->ReleaseWindow_Impl(this);
@@ -873,9 +873,9 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
}
else
{
- pImp->bEndDocked = TRUE;
+ pImp->bEndDocked = sal_True;
DockingWindow::EndDocking(rRect, bFloatMode);
- pImp->bEndDocked = FALSE;
+ pImp->bEndDocked = sal_False;
}
SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
@@ -938,18 +938,18 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
}
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
-// pImp->bAutoHide = FALSE;
+ pImp->bSplitable = sal_True;
+// pImp->bAutoHide = sal_False;
// Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -992,18 +992,18 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
}
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
-// pImp->bAutoHide = FALSE;
+ pImp->bSplitable = sal_True;
+// pImp->bAutoHide = sal_False;
// Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -1026,12 +1026,12 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// Bugfix #39771
pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT );
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
if ( pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK )
- pImp->bDockingPrevented = TRUE;
+ pImp->bDockingPrevented = sal_True;
pImp->aSplitSize = GetOutputSizePixel();
if ( !GetFloatingSize().Width() )
@@ -1049,14 +1049,14 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// get information about alignment, split size and position in SplitWindow
String aStr;
- USHORT nPos = pInfo->aExtraString.SearchAscii("AL:");
+ sal_uInt16 nPos = pInfo->aExtraString.SearchAscii("AL:");
if ( nPos != STRING_NOTFOUND )
{
// alignment information
- USHORT n1 = pInfo->aExtraString.Search('(', nPos);
+ sal_uInt16 n1 = pInfo->aExtraString.Search('(', nPos);
if ( n1 != STRING_NOTFOUND )
{
- USHORT n2 = pInfo->aExtraString.Search(')', n1);
+ sal_uInt16 n2 = pInfo->aExtraString.Search(')', n1);
if ( n2 != STRING_NOTFOUND )
{
// extract alignment information from extrastring
@@ -1073,7 +1073,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
pImp->aWinState = pInfo->aWinState;
// check for valid alignment
- SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (USHORT) aStr.ToInt32();
+ SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
if ( pImp->bDockingPrevented )
// docking prevented, ignore old configuration and take alignment from default
aStr.Erase();
@@ -1093,7 +1093,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
if ( nPos != STRING_NOTFOUND )
{
aStr.Erase(0, nPos+1);
- pImp->SetLastAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() );
+ pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.ToInt32() );
}
nPos = aStr.Search(',');
@@ -1104,8 +1104,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
aStr.Erase(0, nPos+1);
if ( GetPosSizeFromString( aStr, aPos, pImp->aSplitSize ) )
{
- pImp->nLine = pImp->nDockLine = (USHORT) aPos.X();
- pImp->nPos = pImp->nDockPos = (USHORT) aPos.Y();
+ pImp->nLine = pImp->nDockLine = (sal_uInt16) aPos.X();
+ pImp->nPos = pImp->nDockPos = (sal_uInt16) aPos.Y();
pImp->nVerticalSize = pImp->aSplitSize.Height();
pImp->nHorizontalSize = pImp->aSplitSize.Width();
if ( GetSplitSizeFromString( aStr, pImp->aSplitSize ))
@@ -1139,7 +1139,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
// detect floating mode
// toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet
- BOOL bFloatMode = IsFloatingMode();
+ sal_Bool bFloatMode = IsFloatingMode();
if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) )
{
bFloatMode = !bFloatMode;
@@ -1199,12 +1199,12 @@ void SfxDockingWindow::Initialize_Impl()
if ( !pMgr )
{
// Bugfix #39771
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
FloatingWindow* pFloatWin = GetFloatingWindow();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ( pFloatWin )
{
bSet = !pFloatWin->IsDefaultPos();
@@ -1213,7 +1213,7 @@ void SfxDockingWindow::Initialize_Impl()
{
Point aPos = GetFloatingPos();
if ( aPos != Point() )
- bSet = TRUE;
+ bSet = sal_True;
}
if ( !bSet)
@@ -1243,7 +1243,7 @@ void SfxDockingWindow::Initialize_Impl()
}
// allow calling of docking handlers
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
//-------------------------------------------------------------------------
@@ -1271,9 +1271,9 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aWinState = pImp->aWinState;
rInfo.aExtraString = DEFINE_CONST_UNICODE("AL:(");
- rInfo.aExtraString += String::CreateFromInt32((USHORT) GetAlignment());
+ rInfo.aExtraString += String::CreateFromInt32((sal_uInt16) GetAlignment());
rInfo.aExtraString += ',';
- rInfo.aExtraString += String::CreateFromInt32 ((USHORT) pImp->GetLastAlignment());
+ rInfo.aExtraString += String::CreateFromInt32 ((sal_uInt16) pImp->GetLastAlignment());
if ( pImp->bSplitable )
{
Point aPos(pImp->nLine, pImp->nPos);
@@ -1385,7 +1385,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
aInRect.Bottom() -= nTBBorder/2;
// calculate alignment resulting from docking rectangle
- BOOL bBecomesFloating = FALSE;
+ sal_Bool bBecomesFloating = sal_False;
SfxChildAlignment eDockAlign = pImp->GetDockAlignment();
Rectangle aDockingRect( rRect );
if ( !IsFloatingMode() )
@@ -1404,7 +1404,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect );
if ( aIntersect.IsEmpty() )
// docking rectangle completely outside docking area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
else
{
// create a small test rect around the mouse position and use this one
@@ -1418,7 +1418,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect );
if ( aIntersectRect == aSmallDockingRect )
// docking rectangle completely inside (shrinked) inner area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
}
if ( bBecomesFloating )
@@ -1431,7 +1431,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Point aInPosTL( aPos.X()-aInRect.Left(), aPos.Y()-aInRect.Top() );
Point aInPosBR( aPos.X()-aInRect.Left() + aDockingRect.GetWidth(), aPos.Y()-aInRect.Top() + aDockingRect.GetHeight() );
Size aInSize = aInRect.GetSize();
- BOOL bNoChange = FALSE;
+ sal_Bool bNoChange = sal_False;
// check if alignment is still unchanged
switch ( GetAlignment() )
@@ -1442,7 +1442,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if (aInPosTL.X() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_TOP:
@@ -1451,7 +1451,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosTL.Y() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_RIGHT:
@@ -1460,7 +1460,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.X() >= aInSize.Width())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_BOTTOM:
@@ -1469,7 +1469,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.Y() >= aInSize.Height())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
default:
@@ -1479,7 +1479,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( !bNoChange )
{
// alignment will change, test alignment according to distance of the docking rectangles edges
- BOOL bForbidden = TRUE;
+ sal_Bool bForbidden = sal_True;
if ( aInPosTL.X() <= 0)
{
eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT);
@@ -1528,7 +1528,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
}
else if ( pImp->bSplitable )
{
- USHORT nLine, nPos;
+ sal_uInt16 nLine, nPos;
SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eDockAlign);
aPos = pSplitWin->ScreenToOutputPixel( aPos );
if ( pSplitWin->GetWindowPos( aPos, nLine, nPos ) )
@@ -1536,7 +1536,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// mouse over splitwindow, get line and position
pImp->nDockLine = nLine;
pImp->nDockPos = nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
@@ -1556,18 +1556,18 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// if this window is the only one in the last line, it can't be docked as new line in the same splitwindow
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
// create new line
pImp->nDockLine = pSplitWin->GetLineCount();
pImp->nDockPos = 0;
- pImp->bNewLine = TRUE;
+ pImp->bNewLine = sal_True;
}
}
- BOOL bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
+ sal_Bool bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
if ( !bChanged && !IsFloatingMode() )
{
// window only sightly moved, no change of any property
@@ -1753,7 +1753,7 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Close()
+sal_Bool SfxDockingWindow::Close()
/* [Beschreibung]
@@ -1768,12 +1768,12 @@ BOOL SfxDockingWindow::Close()
// Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
// werden kann
if ( !pMgr )
- return TRUE;
+ return sal_True;
- SfxBoolItem aValue( pMgr->GetType(), FALSE);
+ SfxBoolItem aValue( pMgr->GetType(), sal_False);
pBindings->GetDispatcher_Impl()->Execute(
pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1885,7 +1885,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
// also base class rufen, sonst erf"ahrt der parent nichts
// if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer
DockingWindow::Notify( rEvt );
- return TRUE;
+ return sal_True;
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
@@ -1893,7 +1893,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() )
// dann auch global g"ultige Acceleratoren verwenden
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
- return TRUE;
+ return sal_True;
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -1905,9 +1905,9 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
-USHORT SfxDockingWindow::GetWinBits_Impl() const
+sal_uInt16 SfxDockingWindow::GetWinBits_Impl() const
{
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
// if ( pImp->bAutoHide )
// nBits |= SWIB_AUTOHIDE;
return nBits;
@@ -1940,27 +1940,27 @@ void SfxDockingWindow::Reappear_Impl()
}
}
-BOOL SfxDockingWindow::IsAutoHide_Impl() const
+sal_Bool SfxDockingWindow::IsAutoHide_Impl() const
{
if ( pImp->pSplitWin )
return !pImp->pSplitWin->IsFadeIn();
else
- return FALSE;
+ return sal_False;
}
-BOOL SfxDockingWindow::IsPinned_Impl() const
+sal_Bool SfxDockingWindow::IsPinned_Impl() const
{
if ( pImp->pSplitWin )
return pImp->pSplitWin->IsPinned();
else
- return TRUE;
+ return sal_True;
}
-void SfxDockingWindow::AutoShow( BOOL bShow )
+void SfxDockingWindow::AutoShow( sal_Bool bShow )
{
AutoShow_Impl(bShow);
}
-void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
+void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow )
{
if ( pImp->pSplitWin )
{
@@ -1972,7 +1972,7 @@ void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
}
/*
-void SfxDockingWindow::Pin_Impl( BOOL bPinned )
+void SfxDockingWindow::Pin_Impl( sal_Bool bPinned )
{
if ( pImp->pSplitWin )
pImp->pSplitWin->Pin_Impl( bPinned );
@@ -1984,7 +1984,7 @@ SfxSplitWindow* SfxDockingWindow::GetSplitWindow_Impl() const
return pImp->pSplitWin;
}
-void SfxDockingWindow::FadeIn( BOOL /*bFadeIn*/ )
+void SfxDockingWindow::FadeIn( sal_Bool /*bFadeIn*/ )
{
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index b740453cf5ff..0f3b35648061 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1433,8 +1433,8 @@ void lcl_saveLastURLs(SvStringsDtor*& rpURLLi
::comphelper::SequenceAsVector< ::rtl::OUString >& lLastURLs )
{
lLastURLs.clear();
- USHORT c = rpURLList->Count();
- USHORT i = 0;
+ sal_uInt16 c = rpURLList->Count();
+ sal_uInt16 i = 0;
for (i=0; i<c; ++i)
lLastURLs.push_back(*(rpURLList->GetObject(i)));
}
@@ -1522,15 +1522,15 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
// check password checkbox if the document had password before
if( mbHasPassword )
{
- SFX_ITEMSET_ARG( rpSet, pPassItem, SfxBoolItem, SID_PASSWORDINTERACTION, FALSE );
+ SFX_ITEMSET_ARG( rpSet, pPassItem, SfxBoolItem, SID_PASSWORDINTERACTION, sal_False );
mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() );
// in case the document has password to modify, the dialog should be shown
- SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, FALSE );
+ SFX_ITEMSET_ARG( rpSet, pPassToModifyItem, SfxUnoAnyItem, SID_MODIFYPASSWORDINFO, sal_False );
mbPwdCheckBoxState |= ( pPassToModifyItem && pPassToModifyItem->GetValue().hasValue() );
}
- SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE );
+ SFX_ITEMSET_ARG( rpSet, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False );
if ( pSelectItem )
mbSelection = pSelectItem->GetValue();
else
@@ -1957,7 +1957,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
// create the list of filters
mpGraphicFilter = new GraphicFilter;
- USHORT i, j, nCount = mpGraphicFilter->GetImportFormatCount();
+ sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount();
// compute the extension string for all known import filters
String aExtensions;
@@ -1966,7 +1966,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
{
j = 0;
String sWildcard;
- while( TRUE )
+ while( sal_True )
{
sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
@@ -2006,7 +2006,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
String aExt;
j = 0;
String sWildcard;
- while( TRUE )
+ while( sal_True )
{
sWildcard = mpGraphicFilter->GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 91190b575e1c..6c559139ddd2 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -84,7 +84,7 @@ namespace sfx2
SfxFilterFlags m_nMustFlags;
SfxFilterFlags m_nDontFlags;
- ULONG mnPostUserEventId;
+ sal_uIntPtr mnPostUserEventId;
ErrCode mnError;
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index 51ed3bc5304a..68fab9fed333 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -52,31 +52,31 @@ TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFl
// ----------------------------------------------------------------------------
-USHORT ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, USHORT nSlot )
+sal_uInt16 ItemWrapperHelper::GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
return rItemSet.GetPool()->GetWhich( nSlot );
}
-bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, USHORT nSlot )
+bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
- return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), TRUE ) != SFX_ITEM_UNKNOWN;
+ return rItemSet.GetItemState( GetWhichId( rItemSet, nSlot ), sal_True ) != SFX_ITEM_UNKNOWN;
}
-const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, USHORT nSlot )
+const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
- USHORT nWhich = GetWhichId( rItemSet, nSlot );
- return (rItemSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, TRUE ) : 0;
+ sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot );
+ return (rItemSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_DEFAULT) ? rItemSet.GetItem( nWhich, sal_True ) : 0;
}
-const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, USHORT nSlot )
+const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
return rItemSet.GetPool()->GetDefaultItem( GetWhichId( rItemSet, nSlot ) );
}
-void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, USHORT nSlot )
+void ItemWrapperHelper::RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot )
{
- USHORT nWhich = GetWhichId( rDestSet, nSlot );
- if( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ sal_uInt16 nWhich = GetWhichId( rDestSet, nSlot );
+ if( rOldSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_DEFAULT )
rDestSet.ClearItem( nWhich );
}
@@ -133,12 +133,12 @@ void CheckBoxWrapper::SetControlDontKnow( bool bSet )
GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK );
}
-BOOL CheckBoxWrapper::GetControlValue() const
+sal_Bool CheckBoxWrapper::GetControlValue() const
{
return GetControl().IsChecked();
}
-void CheckBoxWrapper::SetControlValue( BOOL bValue )
+void CheckBoxWrapper::SetControlValue( sal_Bool bValue )
{
GetControl().Check( bValue );
}
@@ -302,7 +302,7 @@ TriState ItemConnectionBase::GetShowState( bool bKnown ) const
// Standard connections
// ============================================================================
-DummyItemConnection::DummyItemConnection( USHORT nSlot, Window& rWindow, ItemConnFlags nFlags ) :
+DummyItemConnection::DummyItemConnection( sal_uInt16 nSlot, Window& rWindow, ItemConnFlags nFlags ) :
ItemConnectionBase( nFlags ),
DummyWindowWrapper( rWindow ),
mnSlot( nSlot )
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 8c05fa424263..6664e393ed5a 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -158,7 +158,7 @@ void SfxMailModel::ClearList( AddressList_Impl* pList )
{
if ( pList )
{
- ULONG i, nCount = pList->Count();
+ sal_uIntPtr i, nCount = pList->Count();
for ( i = 0; i < nCount; ++i )
delete pList->GetObject(i);
pList->Clear();
@@ -170,7 +170,7 @@ void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList )
rValueList.Erase();
if ( pList )
{
- ULONG i, nCount = pList->Count();
+ sal_uIntPtr i, nCount = pList->Count();
for ( i = 0; i < nCount; ++i )
{
if ( rValueList.Len() > 0 )
@@ -977,7 +977,7 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( const css::uno::Referenc
// functions -------------------------------------------------------------
-BOOL CreateFromAddress_Impl( String& rFrom )
+sal_Bool CreateFromAddress_Impl( String& rFrom )
/* [Beschreibung]
@@ -988,8 +988,8 @@ BOOL CreateFromAddress_Impl( String& rFrom )
[R"uckgabewert]
- TRUE: Adresse konnte erzeugt werden.
- FALSE: Adresse konnte nicht erzeugt werden.
+ sal_True: Adresse konnte erzeugt werden.
+ sal_False: Adresse konnte nicht erzeugt werden.
*/
{
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index d97847f5b6e0..5cac88236f4a 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -77,14 +77,14 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aFilterFt ( this, SfxResId( FT_REGION ) ),
aFilterLb ( this, SfxResId( LB_REGION ) ),
+ aDescGb ( this, SfxResId( GB_DESC ) ),
aDescFt ( this, SfxResId( FT_DESC ) ),
aDescED ( this, SfxResId( ED_DESC ) ),
- aDescGb ( this, SfxResId( GB_DESC ) ),
pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ),
pItem ( 0 ),
- bModified ( FALSE ),
+ bModified ( sal_False ),
aName ( pStyle->GetName() ),
aFollow ( pStyle->GetFollow() ),
aParent ( pStyle->GetParent() ),
@@ -132,7 +132,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
{
// NullString als Name -> Name generieren
String aNoName( SfxResId( STR_NONAME ) );
- USHORT nNo = 1;
+ sal_uInt16 nNo = 1;
String aNo( aNoName );
aNoName += String::CreateFromInt32( nNo );
while ( pPool->Find( aNoName ) )
@@ -156,7 +156,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() );
aNameMLE.SetText( pStyle->GetName() );
- aNameMLE.EnableCursor( FALSE );
+ aNameMLE.EnableCursor( sal_False );
aNameMLE.Show();
}
@@ -208,9 +208,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aBaseFt.Disable();
aBaseLb.Disable();
}
- USHORT nCount = pFamilies->Count();
+ sal_uInt16 nCount = pFamilies->Count();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; ++i )
{
pItem = pFamilies->GetObject(i);
@@ -219,15 +219,15 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
break;
}
- USHORT nStyleFilterIdx = 0xffff;
+ sal_uInt16 nStyleFilterIdx = 0xffff;
if ( i < nCount )
{
// Filterflags
const SfxStyleFilter& rList = pItem->GetFilterList();
- nCount = (USHORT)rList.Count();
- USHORT nIdx = 0;
- USHORT nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
+ nCount = (sal_uInt16)rList.Count();
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
if ( !nMask ) // Benutzervorlage?
nMask = pStyle->GetMask();
@@ -322,7 +322,7 @@ void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox,
if ( pBox->IsEnabled() )
{
// ist der aktuelle Eintrag, dessen Namen modifizieren wurde
- const BOOL bSelect = pBox->GetSelectEntry() == aBuf;
+ const sal_Bool bSelect = pBox->GetSelectEntry() == aBuf;
pBox->RemoveEntry( aBuf );
pBox->InsertEntry( rNew );
@@ -414,7 +414,7 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
//-------------------------------------------------------------------------
-BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
/* [Beschreibung]
@@ -429,9 +429,9 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
[R"uckgabewert]
- BOOL TRUE: es hat eine "Anderung der Daten
+ sal_Bool sal_True: es hat eine "Anderung der Daten
stattgefunden
- FALSE: es hat keine "Anderung der Daten
+ sal_False: es hat keine "Anderung der Daten
stattgefunden
[Querverweise]
@@ -441,7 +441,7 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
*/
{
- const USHORT nFilterIdx = aFilterLb.GetSelectEntryPos();
+ const sal_uInt16 nFilterIdx = aFilterLb.GetSelectEntryPos();
// Filter setzen
@@ -449,16 +449,16 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
nFilterIdx != aFilterLb.GetSavedValue() &&
aFilterLb.IsEnabled() )
{
- bModified = TRUE;
+ bModified = sal_True;
DBG_ASSERT( pItem, "kein Item" );
// geht nur bei Benutzervorlagen
#if OSL_DEBUG_LEVEL > 1
- USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx );
+ sal_uInt16 nIdx = (sal_uInt16)(long)aFilterLb.GetEntryData( nFilterIdx );
SfxFilterTupel* p;
p = pItem->GetFilterList().GetObject( nIdx );
#endif
- USHORT nMask = pItem->GetFilterList().GetObject(
- (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx ) )->nFlags |
+ sal_uInt16 nMask = pItem->GetFilterList().GetObject(
+ (sal_uInt16)(long)aFilterLb.GetEntryData( nFilterIdx ) )->nFlags |
SFXSTYLEBIT_USERDEF;
pStyle->SetMask( nMask );
}
@@ -492,7 +492,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
*/
{
- bModified = FALSE;
+ bModified = sal_False;
String sCmp( pStyle->GetName() );
if ( sCmp != aName )
@@ -534,7 +534,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
if ( aFilterLb.IsEnabled() )
{
- USHORT nCmp = pStyle->GetMask();
+ sal_uInt16 nCmp = pStyle->GetMask();
if ( nCmp != nFlags )
pStyle->SetMask( nFlags );
@@ -590,7 +590,7 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet)
const SfxPoolItem* pPoolItem;
if ( SFX_ITEM_SET ==
- rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, FALSE, &pPoolItem ) )
+ rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, sal_False, &pPoolItem ) )
aAutoCB.Check( ( (const SfxBoolItem*)pPoolItem )->GetValue() );
aAutoCB.SaveValue();
}
@@ -633,7 +633,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aNameEd.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
}
if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() )
@@ -649,7 +649,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aFollowLb.GrabFocus();
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -669,7 +669,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
aBaseLb.GrabFocus();
return SfxTabPage::KEEP_PAGE;
}
- bModified = TRUE;
+ bModified = sal_True;
nRet |= (int)SfxTabPage::REFRESH_SET;
}
}
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 290886528e24..fbfabe632009 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -42,7 +42,7 @@
SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR );
SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd , nId )
@@ -55,7 +55,7 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxNavigator::SfxNavigator( SfxBindings* pBind ,
@@ -88,13 +88,13 @@ void SfxNavigator::Resizing( Size &rSize )
pCon->Resizing( rSize );
}
-BOOL SfxNavigator::Close()
+sal_Bool SfxNavigator::Close()
{
SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
DBG_ASSERT( pCon, "Kein Context!" );
if ( !pCon || pCon->Close() )
return SfxDockingWindow::Close();
else
- return FALSE;
+ return sal_False;
}
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 8235333857d5..17bbee8c126f 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -91,6 +91,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+ aColBox.SetAccessibleName(SfxResId(FL_COL));
SfxStyleSheetBase *pStyle = rPool.First();
while ( pStyle )
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index cbbe20bfa203..cb082987a3e1 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -82,7 +82,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
pWindow->SetSizePixel( Size( 175, 175 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 455479b9d125..47af8e61d81b 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -125,6 +125,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
mbAsciiOnly ( false )
{
+ maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD)));
FreeResource();
// setup layout
@@ -190,7 +191,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
// -----------------------------------------------------------------------
-void SfxPasswordDialog::SetMinLen( USHORT nLen )
+void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
{
mnMinLen = nLen;
EditModifyHdl( NULL );
@@ -198,7 +199,7 @@ void SfxPasswordDialog::SetMinLen( USHORT nLen )
// -----------------------------------------------------------------------
-void SfxPasswordDialog::SetMaxLen( USHORT nLen )
+void SfxPasswordDialog::SetMaxLen( sal_uInt16 nLen )
{
maPasswordED.SetMaxTextLen( nLen );
maConfirmED.SetMaxTextLen( nLen );
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index 5c9b07c7a130..dd35a6449dd8 100644
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.hrc
@@ -46,6 +46,9 @@
#define FT_PASSWD_CONFIRM2 27
#define ED_PASSWD_CONFIRM2 28
+//IAccessibility2 Implementation 2009-----
+#define TEXT_PASSWD 31
+//-----IAccessibility2 Implementation 2009
#endif
// ******************************************************************* EOF
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index 426fb9986d5a..beb2f96a5e21 100644
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.src
@@ -129,37 +129,10 @@ ModalDialog DLG_PASSWD
Pos = MAP_APPFONT( 144, 43 );
Size = MAP_APPFONT( 50, 14 );
};
-};
-
-// ********************************************************************** EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ String TEXT_PASSWD
+ {
+ Text [ en-US ] = "Password" ;
+ };
+};
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 6b26cf9fb504..e6182880b963 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -46,8 +46,8 @@
// - statics -
// -----------
-static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
-static BOOL bOutputForPrinter = TRUE;
+static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
+static sal_Bool bOutputForPrinter = sal_True;
#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
@@ -88,12 +88,12 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con
if( bOutputForPrinter )
{
- aPrinterOutputRB.Check( TRUE );
+ aPrinterOutputRB.Check( sal_True );
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrinterOutputRB.GetText() ) );
}
else
{
- aPrintFileOutputRB.Check( TRUE );
+ aPrintFileOutputRB.Check( sal_True );
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( aPrintFileOutputRB.GetText() ) );
}
@@ -163,12 +163,12 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow )
// -----------------------------------------------------------------------------
-BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
+sal_Bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
SvtPrintWarningOptions aWarnOptions;
SvtPrinterOptions aPrinterOptions;
SvtPrintFileOptions aPrintFileOptions;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aPaperSizeCB.IsChecked() != aPaperSizeCB.GetSavedValue())
@@ -231,29 +231,29 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
aReduceTransparencyCB.Check( pCurrentOptions->IsReduceTransparency() );
if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO )
- aReduceTransparencyAutoRB.Check( TRUE );
+ aReduceTransparencyAutoRB.Check( sal_True );
else
- aReduceTransparencyNoneRB.Check( TRUE );
+ aReduceTransparencyNoneRB.Check( sal_True );
aReduceGradientsCB.Check( pCurrentOptions->IsReduceGradients() );
if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES )
- aReduceGradientsStripesRB.Check( TRUE );
+ aReduceGradientsStripesRB.Check( sal_True );
else
- aReduceGradientsColorRB.Check( TRUE );
+ aReduceGradientsColorRB.Check( sal_True );
aReduceGradientsStepCountNF.SetValue( pCurrentOptions->GetReducedGradientStepCount() );
aReduceBitmapsCB.Check( pCurrentOptions->IsReduceBitmaps() );
if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL )
- aReduceBitmapsOptimalRB.Check( TRUE );
+ aReduceBitmapsOptimalRB.Check( sal_True );
else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL )
- aReduceBitmapsNormalRB.Check( TRUE );
+ aReduceBitmapsNormalRB.Check( sal_True );
else
- aReduceBitmapsResolutionRB.Check( TRUE );
+ aReduceBitmapsResolutionRB.Check( sal_True );
- const USHORT nDPI = pCurrentOptions->GetReducedBitmapResolution();
+ const sal_uInt16 nDPI = pCurrentOptions->GetReducedBitmapResolution();
if( nDPI < aDPIArray[ 0 ] )
aReduceBitmapsResolutionLB.SelectEntryPos( 0 );
@@ -263,7 +263,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
{
if( nDPI >= aDPIArray[ i ] )
{
- aReduceBitmapsResolutionLB.SelectEntryPos( (USHORT) i );
+ aReduceBitmapsResolutionLB.SelectEntryPos( (sal_uInt16) i );
i = -1;
}
}
@@ -387,12 +387,12 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
pCurrentOptions->SetReducedTransparencyMode( aReduceTransparencyAutoRB.IsChecked() ? PRINTER_TRANSPARENCY_AUTO : PRINTER_TRANSPARENCY_NONE );
pCurrentOptions->SetReduceGradients( aReduceGradientsCB.IsChecked() );
pCurrentOptions->SetReducedGradientMode( aReduceGradientsStripesRB.IsChecked() ? PRINTER_GRADIENT_STRIPES : PRINTER_GRADIENT_COLOR );
- pCurrentOptions->SetReducedGradientStepCount( (USHORT) aReduceGradientsStepCountNF.GetValue() );
+ pCurrentOptions->SetReducedGradientStepCount( (sal_uInt16) aReduceGradientsStepCountNF.GetValue() );
pCurrentOptions->SetReduceBitmaps( aReduceBitmapsCB.IsChecked() );
pCurrentOptions->SetReducedBitmapMode( aReduceBitmapsOptimalRB.IsChecked() ? PRINTER_BITMAP_OPTIMAL :
( aReduceBitmapsNormalRB.IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) );
- pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
- (USHORT)( sizeof( aDPIArray ) / sizeof( aDPIArray[ 0 ] ) - 1 ) ) ] );
+ pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
+ (sal_uInt16)( sizeof( aDPIArray ) / sizeof( aDPIArray[ 0 ] ) - 1 ) ) ] );
pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() );
pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() );
}
@@ -402,7 +402,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bReduceTransparency = aReduceTransparencyCB.IsChecked();
+ const sal_Bool bReduceTransparency = aReduceTransparencyCB.IsChecked();
aReduceTransparencyAutoRB.Enable( bReduceTransparency );
aReduceTransparencyNoneRB.Enable( bReduceTransparency );
@@ -417,7 +417,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bEnable = aReduceGradientsCB.IsChecked();
+ const sal_Bool bEnable = aReduceGradientsCB.IsChecked();
aReduceGradientsStripesRB.Enable( bEnable );
aReduceGradientsColorRB.Enable( bEnable );
@@ -433,7 +433,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
- const BOOL bEnable = aReduceBitmapsCB.IsChecked();
+ const sal_Bool bEnable = aReduceBitmapsCB.IsChecked();
aReduceBitmapsOptimalRB.Enable( bEnable );
aReduceBitmapsNormalRB.Enable( bEnable );
@@ -451,7 +451,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
- const BOOL bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked();
+ const sal_Bool bEnable = aReduceGradientsCB.IsChecked() && aReduceGradientsStripesRB.IsChecked();
aReduceGradientsStepCountNF.Enable( bEnable );
@@ -463,7 +463,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, Radi
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
- const BOOL bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked();
+ const sal_Bool bEnable = aReduceBitmapsCB.IsChecked() && aReduceBitmapsResolutionRB.IsChecked();
aReduceBitmapsResolutionLB.Enable( bEnable );
@@ -478,7 +478,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*,
{
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrinterOptions );
- bOutputForPrinter = TRUE;
+ bOutputForPrinter = sal_True;
// --> OD 2008-06-25 #i63982#
ImplSetAccessibleNames();
// <--
@@ -497,7 +497,7 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
{
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrintFileOptions );
- bOutputForPrinter = FALSE;
+ bOutputForPrinter = sal_False;
// --> OD 2008-06-25 #i63982#
ImplSetAccessibleNames();
// <--
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index aaabdd3e5d74..7b24a3862811 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -148,21 +148,21 @@ static rtl::OUString GetLabelFromCommandURL( const rtl::OUString& rCommandURL, c
SFX_IMPL_FLOATINGWINDOW( SfxRecordingFloatWrapper_Impl, SID_RECORDING_FLOATWINDOW );
SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBind ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd, nId )
, pBindings( pBind )
{
pWindow = new SfxRecordingFloat_Impl( pBindings, this, pParentWnd );
- SetWantsFocus( FALSE );
+ SetWantsFocus( sal_False );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
( ( SfxFloatingWindow* ) pWindow )->Initialize( pInfo );
}
SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
{
- SfxBoolItem aItem( FN_PARAM_1, TRUE );
+ SfxBoolItem aItem( FN_PARAM_1, sal_True );
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() )
pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
@@ -171,7 +171,7 @@ SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
sal_Bool SfxRecordingFloatWrapper_Impl::QueryClose()
{
// asking for recorded macro should be replaced if index access is available!
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() && xRecorder->getRecordedMacro().getLength() )
{
@@ -221,7 +221,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(
aTbx.SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) );
// start recording
- SfxBoolItem aItem( SID_RECORDMACRO, TRUE );
+ SfxBoolItem aItem( SID_RECORDMACRO, sal_True );
GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
}
@@ -240,9 +240,9 @@ SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl()
}
}
-BOOL SfxRecordingFloat_Impl::Close()
+sal_Bool SfxRecordingFloat_Impl::Close()
{
- BOOL bRet = SfxFloatingWindow::Close();
+ sal_Bool bRet = SfxFloatingWindow::Close();
return bRet;
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 2ac8f6a43fee..abad2c341c01 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -62,7 +62,7 @@ namespace
enum RedlineFunc { RF_ON, RF_PROTECT };
/*
- bool QueryIsEnabled( USHORT _nSlot )
+ bool QueryIsEnabled( sal_uInt16 _nSlot )
{
bool bRes = false;
SfxViewShell* pViewSh = SfxViewShell::Current();
@@ -77,7 +77,7 @@ namespace
}
*/
- bool QueryState( USHORT _nSlot, bool& _rValue )
+ bool QueryState( sal_uInt16 _nSlot, bool& _rValue )
{
bool bRet = false;
SfxViewShell* pViewSh = SfxViewShell::Current();
@@ -99,7 +99,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
+ sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_PROTECT : SID_CHG_PROTECT;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -111,7 +111,7 @@ namespace
bool bRet = false;
if (_eMode != RL_NONE)
{
- USHORT nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
+ sal_uInt16 nSlot = _eMode == RL_WRITER ? FN_REDLINE_ON : FID_CHG_RECORD;
bRet = QueryState( nSlot, _rValue );
}
return bRet;
@@ -204,7 +204,7 @@ struct SfxSecurityPage_Impl
SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet );
~SfxSecurityPage_Impl();
- BOOL FillItemSet_Impl( SfxItemSet & );
+ sal_Bool FillItemSet_Impl( SfxItemSet & );
void Reset_Impl( const SfxItemSet & );
};
@@ -283,7 +283,7 @@ SfxSecurityPage_Impl::~SfxSecurityPage_Impl()
}
-BOOL SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
+sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
{
bool bModified = false;
@@ -355,7 +355,7 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
SfxDispatcher* pDisp = pViewSh->GetDispatcher();
if (SFX_ITEM_AVAILABLE <= pDisp->QueryState( SID_HTML_MODE, pItem ))
{
- USHORT nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
+ sal_uInt16 nMode = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
bIsHTMLDoc = ( ( nMode & HTMLMODE_ON ) != 0 );
}
}
@@ -402,9 +402,9 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
// A Calc document that is shared will have 'm_eRedlingMode == RL_NONE'
// In shared documents change recording and protection must be disabled,
// similar to documents that do not support change recording at all.
- m_aRecordChangesCB.Check( FALSE );
+ m_aRecordChangesCB.Check( sal_False );
m_aRecordChangesCB.Disable();
- m_aChangeProtectionPB.Check( FALSE );
+ m_aChangeProtectionPB.Check( sal_False );
m_aChangeProtectionPB.Disable();
}
}
@@ -530,7 +530,7 @@ SfxSecurityPage::~SfxSecurityPage()
}
-BOOL SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet )
+sal_Bool SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet )
{
bool bModified = false;
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index d4cc7950612f..2eb332f9d5d9 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -64,10 +64,10 @@ using namespace ::rtl;
struct SfxDock_Impl
{
- USHORT nType;
+ sal_uInt16 nType;
SfxDockingWindow* pWin; // SplitWindow hat dieses Fenster
- BOOL bNewLine;
- BOOL bHide; // SplitWindow hatte dieses Fenster
+ sal_Bool bNewLine;
+ sal_Bool bHide; // SplitWindow hatte dieses Fenster
long nSize;
};
@@ -86,31 +86,31 @@ class SfxEmptySplitWin_Impl : public SplitWindow
friend class SfxSplitWindow;
SfxSplitWindow* pOwner;
- BOOL bFadeIn;
- BOOL bAutoHide;
- BOOL bSplit;
- BOOL bEndAutoHide;
+ sal_Bool bFadeIn;
+ sal_Bool bAutoHide;
+ sal_Bool bSplit;
+ sal_Bool bEndAutoHide;
Timer aTimer;
Point aLastPos;
- USHORT nState;
+ sal_uInt16 nState;
SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
: SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) )
, pOwner( pParent )
- , bFadeIn( FALSE )
- , bAutoHide( FALSE )
- , bSplit( FALSE )
- , bEndAutoHide( FALSE )
+ , bFadeIn( sal_False )
+ , bAutoHide( sal_False )
+ , bSplit( sal_False )
+ , bEndAutoHide( sal_False )
, nState( 1 )
{
aTimer.SetTimeoutHdl(
LINK(pOwner, SfxSplitWindow, TimerHdl ) );
aTimer.SetTimeout( 200 );
-// EnableDrop( TRUE );
+// EnableDrop( sal_True );
SetAlign( pOwner->GetAlign() );
Actualize();
ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() );
- ShowFadeInHideButton( TRUE );
+ ShowFadeInHideButton( sal_True );
}
~SfxEmptySplitWin_Impl()
@@ -146,7 +146,7 @@ void SfxEmptySplitWin_Impl::AutoHide()
{
pOwner->SetPinned_Impl( !pOwner->bPinned );
pOwner->SaveConfig_Impl();
- bAutoHide = TRUE;
+ bAutoHide = sal_True;
FadeIn();
}
@@ -154,7 +154,7 @@ void SfxEmptySplitWin_Impl::FadeIn()
{
if (!bAutoHide )
bAutoHide = IsFadeNoButtonMode();
- pOwner->SetFadeIn_Impl( TRUE );
+ pOwner->SetFadeIn_Impl( sal_True );
pOwner->Show_Impl();
if ( bAutoHide )
{
@@ -184,7 +184,7 @@ void SfxEmptySplitWin_Impl::MouseMove( const MouseEvent& rMEvt )
//-------------------------------------------------------------------------
SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
- SfxWorkWindow *pW, BOOL bWithButtons, WinBits nBits )
+ SfxWorkWindow *pW, sal_Bool bWithButtons, WinBits nBits )
/* [Beschreibung]
@@ -198,15 +198,15 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
eAlign(eAl),
pWorkWin(pW),
pDockArr( new SfxDockArr_Impl ),
- bLocked(FALSE),
- bPinned(TRUE),
+ bLocked(sal_False),
+ bPinned(sal_True),
pEmptyWin(NULL),
pActive(NULL)
{
if ( bWithButtons )
{
- ShowAutoHideButton( FALSE ); // no autohide button (pin) anymore
- ShowFadeOutButton( TRUE );
+ ShowAutoHideButton( sal_False ); // no autohide button (pin) anymore
+ ShowFadeOutButton( sal_True );
}
// SV-Alignment setzen
@@ -224,7 +224,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
break;
case SFX_ALIGN_BOTTOM:
eTbxAlign = WINDOWALIGN_BOTTOM;
- bPinned = TRUE;
+ bPinned = sal_True;
break;
default:
eTbxAlign = WINDOWALIGN_TOP; // some sort of default...
@@ -235,7 +235,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
pEmptyWin = new SfxEmptySplitWin_Impl( this );
if ( bPinned )
{
- pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->bFadeIn = sal_True;
pEmptyWin->nState = 2;
}
@@ -250,27 +250,27 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
OUString aTemp;
if ( aUserItem >>= aTemp )
aWinData = String( aTemp );
- if ( aWinData.Len() && aWinData.GetChar( (USHORT) 0 ) == 'V' )
+ if ( aWinData.Len() && aWinData.GetChar( (sal_uInt16) 0 ) == 'V' )
{
- pEmptyWin->nState = (USHORT) aWinData.GetToken( 1, ',' ).ToInt32();
+ pEmptyWin->nState = (sal_uInt16) aWinData.GetToken( 1, ',' ).ToInt32();
if ( pEmptyWin->nState & 2 )
- pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->bFadeIn = sal_True;
//bPinned = !( pEmptyWin->nState & 1 );
- bPinned = TRUE; // always assume pinned - floating mode not used anymore
+ bPinned = sal_True; // always assume pinned - floating mode not used anymore
- USHORT i=2;
- USHORT nCount = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 i=2;
+ sal_uInt16 nCount = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = new SfxDock_Impl;
pDock->pWin = 0;
- pDock->bNewLine = FALSE;
- pDock->bHide = TRUE;
- pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ pDock->bNewLine = sal_False;
+ pDock->bHide = sal_True;
+ pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
// K"onnte NewLine bedeuten
- pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
// Lesefehler
@@ -278,7 +278,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
break;
}
else
- pDock->bNewLine = TRUE;
+ pDock->bNewLine = sal_True;
}
pDockArr->Insert(pDock,n);
@@ -287,8 +287,8 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
}
else
{
- bPinned = TRUE;
- pEmptyWin->bFadeIn = TRUE;
+ bPinned = sal_True;
+ pEmptyWin->bFadeIn = sal_True;
pEmptyWin->nState = 2;
}
@@ -324,8 +324,8 @@ void SfxSplitWindow::SaveConfig_Impl()
aWinData += String::CreateFromInt32( pEmptyWin->nState );
aWinData += ',';
- USHORT nCount = 0;
- USHORT n;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 n;
for ( n=0; n<pDockArr->Count(); n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
@@ -361,8 +361,8 @@ void SfxSplitWindow::StartSplit()
if ( pEmptyWin )
{
- pEmptyWin->bFadeIn = TRUE;
- pEmptyWin->bSplit = TRUE;
+ pEmptyWin->bFadeIn = sal_True;
+ pEmptyWin->bSplit = sal_True;
}
Rectangle aRect = pWorkWin->GetFreeArea( !bPinned );
@@ -399,17 +399,17 @@ void SfxSplitWindow::SplitResize()
void SfxSplitWindow::Split()
{
if ( pEmptyWin )
- pEmptyWin->bSplit = FALSE;
+ pEmptyWin->bSplit = sal_False;
SplitWindow::Split();
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pD = (*pDockArr)[n];
if ( pD->pWin )
{
- USHORT nId = pD->nType;
+ sal_uInt16 nId = pD->nType;
long nSize = GetItemSize( nId, SWIB_FIXED );
long nSetSize = GetItemSize( GetSet( nId ) );
Size aSize;
@@ -445,13 +445,13 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
*/
{
short nLine = -1; // damit erstes Fenster nLine auf 0 hochsetzen kann
- USHORT nL;
- USHORT nPos = 0;
- BOOL bNewLine = TRUE;
- BOOL bSaveConfig = FALSE;
+ sal_uInt16 nL;
+ sal_uInt16 nPos = 0;
+ sal_Bool bNewLine = sal_True;
+ sal_Bool bSaveConfig = sal_False;
SfxDock_Impl *pFoundDock=0;
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
if ( pDock->bNewLine )
@@ -463,7 +463,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Neue Zeile
nPos = 0;
- bNewLine = TRUE;
+ bNewLine = sal_True;
}
if ( pDock->pWin )
@@ -483,7 +483,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
}
// Zeile ist schon er"offnet
- bNewLine = FALSE;
+ bNewLine = sal_False;
if ( pFoundDock )
break;
}
@@ -509,18 +509,18 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
{
// Nicht gefunden, am Ende einf"ugen
pFoundDock = new SfxDock_Impl;
- pFoundDock->bHide = TRUE;
+ pFoundDock->bHide = sal_True;
pDockArr->Insert( pFoundDock, nCount );
pFoundDock->nType = pDockWin->GetType();
nLine++;
nPos = 0;
- bNewLine = TRUE;
+ bNewLine = sal_True;
pFoundDock->bNewLine = bNewLine;
- bSaveConfig = TRUE;
+ bSaveConfig = sal_True;
}
pFoundDock->pWin = pDockWin;
- pFoundDock->bHide = FALSE;
+ pFoundDock->bHide = sal_False;
InsertWindow_Impl( pFoundDock, rSize, nLine, nPos, bNewLine );
if ( bSaveConfig )
SaveConfig_Impl();
@@ -528,7 +528,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
//-------------------------------------------------------------------------
-void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
+void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSave)
/* [Beschreibung]
@@ -537,18 +537,18 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
{
SfxDock_Impl *pDock=0;
- USHORT nCount = pDockArr->Count();
- BOOL bFound = FALSE;
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
pDock = (*pDockArr)[n];
if ( pDock->nType == pDockWin->GetType() )
{
if ( pDock->bNewLine && n<nCount-1 )
- (*pDockArr)[n+1]->bNewLine = TRUE;
+ (*pDockArr)[n+1]->bNewLine = sal_True;
// Fenster hat schon eine Position, die vergessen wir
- bFound = TRUE;
+ bFound = sal_True;
pDockArr->Remove(n);
break;
}
@@ -564,7 +564,7 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, BOOL bSave)
//-------------------------------------------------------------------------
void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Beschreibung]
@@ -573,7 +573,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
*/
{
- USHORT nL, nP;
+ sal_uInt16 nL, nP;
GetWindowPos( pDockWin, nL, nP );
if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 )
@@ -595,7 +595,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
//-------------------------------------------------------------------------
void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Beschreibung]
@@ -604,9 +604,9 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
*/
{
- ReleaseWindow_Impl( pDockWin, FALSE );
+ ReleaseWindow_Impl( pDockWin, sal_False );
SfxDock_Impl *pDock = new SfxDock_Impl;
- pDock->bHide = FALSE;
+ pDock->bHide = sal_False;
pDock->nType = pDockWin->GetType();
pDock->bNewLine = bNewLine;
pDock->pWin = pDockWin;
@@ -617,11 +617,11 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die
// gleiche oder eine gr"o\sere Position hat als pDockWin.
- USHORT nCount = pDockArr->Count();
+ sal_uInt16 nCount = pDockArr->Count();
// Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt
- USHORT nInsertPos = 0;
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nInsertPos = 0;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pD = (*pDockArr)[n];
@@ -631,7 +631,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition
// gefunden wird, wird am Ende eingef"ugt
nInsertPos = nCount;
- USHORT nL=0, nP=0;
+ sal_uInt16 nL=0, nP=0;
GetWindowPos( pD->pWin, nL, nP );
if ( (nL == nLine && nP == nPos) || nL > nLine )
@@ -642,8 +642,8 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
DBG_ASSERT(pD->bNewLine, "Keine neue Zeile?");
// Das Fenster wird auf nPos==0 eingeschoben
- pD->bNewLine = FALSE;
- pDock->bNewLine = TRUE;
+ pD->bNewLine = sal_False;
+ pDock->bNewLine = sal_True;
}
nInsertPos = n;
@@ -661,7 +661,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
const Size& rSize,
- USHORT nLine, USHORT nPos, BOOL bNewLine)
+ sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
/* [Beschreibung]
@@ -672,7 +672,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
{
SfxDockingWindow* pDockWin = pDock->pWin;
- USHORT nItemBits = pDockWin->GetWinBits_Impl();
+ sal_uInt16 nItemBits = pDockWin->GetWinBits_Impl();
long nWinSize, nSetSize;
if ( IsHorizontal() )
@@ -688,24 +688,24 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
pDock->nSize = nWinSize;
- BOOL bUpdateMode = IsUpdateMode();
+ sal_Bool bUpdateMode = IsUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
if ( bNewLine || nLine == GetItemCount( 0 ) )
{
// Es soll nicht in eine vorhandene Zeile eingef"ugt werden, sondern
// eine neue erzeugt werden
- USHORT nId = 1;
- for ( USHORT n=0; n<GetItemCount(0); n++ )
+ sal_uInt16 nId = 1;
+ for ( sal_uInt16 n=0; n<GetItemCount(0); n++ )
{
if ( GetItemId(n) >= nId )
nId = GetItemId(n)+1;
}
// Eine neue nLine-te Zeile erzeugen
- USHORT nBits = nItemBits;
+ sal_uInt16 nBits = nItemBits;
if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
nBits |= SWIB_COLSET;
InsertItem( nId, nSetSize, nLine, 0, nBits );
@@ -716,8 +716,8 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// so macht, wie man erwartet; "Pixel" macht eigentlich nur Sinn, wenn
// auch Items mit prozentualen oder relativen Gr"o\sen dabei sind.
nItemBits |= SWIB_PERCENTSIZE;
- bLocked = TRUE;
- USHORT nSet = GetItemId( nLine );
+ bLocked = sal_True;
+ sal_uInt16 nSet = GetItemId( nLine );
InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
// Splitwindows werden im SFX einmal angelegt und beim Einf"ugen des ersten
@@ -728,21 +728,21 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// wird vom SfxDockingwindow veranla\st (->SfxWorkWindow::ConfigChild_Impl)
if ( !bPinned && !IsFloatingMode() )
{
- bPinned = TRUE;
- BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
- pEmptyWin->bFadeIn = FALSE;
- SetPinned_Impl( FALSE );
+ bPinned = sal_True;
+ sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = sal_False;
+ SetPinned_Impl( sal_False );
pEmptyWin->Actualize();
DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
if ( bFadeIn )
FadeIn();
}
else
{
- BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
- pEmptyWin->bFadeIn = FALSE;
+ sal_Bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = sal_False;
pEmptyWin->Actualize();
#ifdef DBG_UTIL
if ( !bPinned || !pEmptyWin->bFadeIn )
@@ -754,7 +754,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" );
}
#endif
- pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
if ( bFadeIn )
FadeIn();
@@ -764,13 +764,13 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
}
if ( bUpdateMode )
- SetUpdateMode( TRUE );
- bLocked = FALSE;
+ SetUpdateMode( sal_True );
+ bLocked = sal_False;
}
//-------------------------------------------------------------------------
-void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
+void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
/* [Beschreibung]
@@ -778,7 +778,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
gehidet.
*/
{
- USHORT nSet = GetSet( pDockWin->GetType() );
+ sal_uInt16 nSet = GetSet( pDockWin->GetType() );
// Splitwindows werden im SFX einmal angelegt und nach dem Entfernen
// des letzten DockingWindows unsichtbar gemacht.
@@ -788,7 +788,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
// veranla\st!
Hide();
pEmptyWin->aTimer.Stop();
- USHORT nRealState = pEmptyWin->nState;
+ sal_uInt16 nRealState = pEmptyWin->nState;
FadeOut_Impl();
pEmptyWin->Hide();
#ifdef DBG_UTIL
@@ -807,8 +807,8 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
}
SfxDock_Impl *pDock=0;
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
pDock = (*pDockArr)[n];
if ( pDock->nType == pDockWin->GetType() )
@@ -821,10 +821,10 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
// Fenster removen, und wenn es das letzte der Zeile war, auch die Zeile
// ( Zeile = ItemSet )
- BOOL bUpdateMode = IsUpdateMode();
+ sal_Bool bUpdateMode = IsUpdateMode();
if ( bUpdateMode )
- SetUpdateMode( FALSE );
- bLocked = TRUE;
+ SetUpdateMode( sal_False );
+ bLocked = sal_True;
RemoveItem( pDockWin->GetType() );
@@ -832,14 +832,14 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
RemoveItem( nSet );
if ( bUpdateMode )
- SetUpdateMode( TRUE );
- bLocked = FALSE;
+ SetUpdateMode( sal_True );
+ bLocked = sal_False;
};
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
- USHORT& rLine, USHORT& rPos ) const
+sal_Bool SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const
/* [Beschreibung]
Liefert die Id des Itemsets und die des Items f"ur das "ubergebene
@@ -847,19 +847,19 @@ BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
*/
{
- USHORT nSet = GetSet ( pWindow->GetType() );
+ sal_uInt16 nSet = GetSet ( pWindow->GetType() );
if ( nSet == SPLITWINDOW_ITEM_NOTFOUND )
- return FALSE;
+ return sal_False;
rPos = GetItemPos( pWindow->GetType(), nSet );
rLine = GetItemPos( nSet );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos,
- USHORT& rLine, USHORT& rPos ) const
+sal_Bool SfxSplitWindow::GetWindowPos( const Point& rTestPos,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const
/* [Beschreibung]
Liefert die Id des Itemsets und die des Items f"ur das DockingWindow
@@ -868,19 +868,19 @@ BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos,
*/
{
- USHORT nId = GetItemId( rTestPos );
+ sal_uInt16 nId = GetItemId( rTestPos );
if ( nId == 0 )
- return FALSE;
+ return sal_False;
- USHORT nSet = GetSet ( nId );
+ sal_uInt16 nSet = GetSet ( nId );
rPos = GetItemPos( nId, nSet );
rLine = GetItemPos( nSet );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetLineCount() const
+sal_uInt16 SfxSplitWindow::GetLineCount() const
/* [Beschreibung]
@@ -892,33 +892,33 @@ USHORT SfxSplitWindow::GetLineCount() const
//-------------------------------------------------------------------------
-long SfxSplitWindow::GetLineSize( USHORT nLine ) const
+long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
/* [Beschreibung]
Liefert die "Zeilenh"ohe" des nLine-ten Itemsets.
*/
{
- USHORT nId = GetItemId( nLine );
+ sal_uInt16 nId = GetItemId( nLine );
return GetItemSize( nId );
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetWindowCount( USHORT nLine ) const
+sal_uInt16 SfxSplitWindow::GetWindowCount( sal_uInt16 nLine ) const
/* [Beschreibung]
Liefert die
*/
{
- USHORT nId = GetItemId( nLine );
+ sal_uInt16 nId = GetItemId( nLine );
return GetItemCount( nId );
}
//-------------------------------------------------------------------------
-USHORT SfxSplitWindow::GetWindowCount() const
+sal_uInt16 SfxSplitWindow::GetWindowCount() const
/* [Beschreibung]
@@ -942,11 +942,11 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
if ( pTimer )
pTimer->Stop();
- if ( CursorIsOverRect( FALSE ) || !pTimer )
+ if ( CursorIsOverRect( sal_False ) || !pTimer )
{
// Wenn der Mauszeiger innerhalb des Fensters liegt, SplitWindow anzeigen
// und Timer zum Schlie\sen aufsetzen
- pEmptyWin->bAutoHide = TRUE;
+ pEmptyWin->bAutoHide = sal_True;
if ( !IsVisible() )
pEmptyWin->FadeIn();
@@ -969,16 +969,16 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
// (Benutzer ist einfach mit der Maus "uber pEmptyWin gefahren)
if ( IsVisible() )
{
- pEmptyWin->bEndAutoHide = FALSE;
+ pEmptyWin->bEndAutoHide = sal_False;
if ( !Application::IsInModalMode() &&
!PopupMenu::IsInExecute() &&
- !pEmptyWin->bSplit && !HasChildPathFocus( TRUE ) )
+ !pEmptyWin->bSplit && !HasChildPathFocus( sal_True ) )
{
// W"ahrend ein modaler Dialog oder ein Popupmenu offen sind
// oder w"ahrend des Splittens auf keinen Fall zumachen; auch
// solange eines der Children den Focus hat, bleibt das
// das Fenster offen
- pEmptyWin->bEndAutoHide = TRUE;
+ pEmptyWin->bEndAutoHide = sal_True;
}
if ( pEmptyWin->bEndAutoHide )
@@ -1010,9 +1010,9 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const
+sal_Bool SfxSplitWindow::CursorIsOverRect( sal_Bool bForceAdding ) const
{
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
// Auch das kollabierte SplitWindow ber"ucksichtigen
Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() );
@@ -1045,8 +1045,8 @@ BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const
}
if ( aRect.IsInside( OutputToScreenPixel( ((Window*)this)->GetPointerPosPixel() ) ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -1059,19 +1059,19 @@ SplitWindow* SfxSplitWindow::GetSplitWindow()
}
//-------------------------------------------------------------------------
-BOOL SfxSplitWindow::IsFadeIn() const
+sal_Bool SfxSplitWindow::IsFadeIn() const
{
return pEmptyWin->bFadeIn;
}
-BOOL SfxSplitWindow::IsAutoHide( BOOL bSelf ) const
+sal_Bool SfxSplitWindow::IsAutoHide( sal_Bool bSelf ) const
{
return bSelf ? pEmptyWin->bAutoHide && !pEmptyWin->bEndAutoHide : pEmptyWin->bAutoHide;
}
//-------------------------------------------------------------------------
-void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
+void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn )
{
if ( bPinned == bOn )
return;
@@ -1091,13 +1091,13 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
Hide();
pEmptyWin->Actualize();
DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
Point aPos( GetPosPixel() );
aPos = GetParent()->OutputToScreenPixel( aPos );
SetFloatingPos( aPos );
- SetFloatingMode( TRUE );
+ SetFloatingMode( sal_True );
GetFloatingWindow()->SetOutputSizePixel( GetOutputSizePixel() );
if ( pEmptyWin->bFadeIn )
@@ -1107,7 +1107,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
{
pEmptyWin->nState &= ~1;
SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() );
- SetFloatingMode( FALSE );
+ SetFloatingMode( sal_False );
if ( pEmptyWin->bFadeIn )
{
@@ -1116,7 +1116,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" );
- pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
}
@@ -1126,7 +1126,7 @@ void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
//-------------------------------------------------------------------------
-void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
+void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn )
{
if ( bOn == pEmptyWin->bFadeIn )
return;
@@ -1150,14 +1150,14 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" );
- pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
}
}
else
{
- pEmptyWin->bAutoHide = FALSE;
+ pEmptyWin->bAutoHide = sal_False;
pEmptyWin->nState &= ~2;
if ( !IsFloatingMode() )
{
@@ -1167,7 +1167,7 @@ void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
Hide();
pEmptyWin->Actualize();
DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" );
- pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
@@ -1187,13 +1187,13 @@ void SfxSplitWindow::AutoHide()
if ( !bPinned )
{
// Es "schwebt", also wieder andocken
- SetPinned_Impl( TRUE );
+ SetPinned_Impl( sal_True );
pWorkWin->ArrangeChilds_Impl();
}
else
{
// In den "Schwebezustand" bringen
- SetPinned_Impl( FALSE );
+ SetPinned_Impl( sal_False );
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
}
@@ -1206,11 +1206,11 @@ void SfxSplitWindow::FadeOut_Impl()
{
if ( pEmptyWin->aTimer.IsActive() )
{
- pEmptyWin->bAutoHide = FALSE;
+ pEmptyWin->bAutoHide = sal_False;
pEmptyWin->aTimer.Stop();
}
- SetFadeIn_Impl( FALSE );
+ SetFadeIn_Impl( sal_False );
Show_Impl();
}
@@ -1222,14 +1222,14 @@ void SfxSplitWindow::FadeOut()
void SfxSplitWindow::FadeIn()
{
- SetFadeIn_Impl( TRUE );
+ SetFadeIn_Impl( sal_True );
Show_Impl();
}
void SfxSplitWindow::Show_Impl()
{
- USHORT nCount = pDockArr->Count();
- for ( USHORT n=0; n<nCount; n++ )
+ sal_uInt16 nCount = pDockArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = (*pDockArr)[n];
if ( pDock->pWin )
@@ -1237,17 +1237,17 @@ void SfxSplitWindow::Show_Impl()
}
}
/*
-void SfxSplitWindow::Pin_Impl( BOOL bPin )
+void SfxSplitWindow::Pin_Impl( sal_Bool bPin )
{
if ( bPinned != bPin )
AutoHide();
}
*/
-BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward )
+sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
// Wenn kein pActive, auf erstes bzw. letztes Fenster gehen ( bei !bForward wird erst in der loop dekrementiert )
- USHORT nCount = pDockArr->Count();
- USHORT n = bForward ? 0 : nCount;
+ sal_uInt16 nCount = pDockArr->Count();
+ sal_uInt16 n = bForward ? 0 : nCount;
// Wenn Focus innerhalb, dann ein Fenster vor oder zur"uck, wenn m"oglich
if ( pActive )
@@ -1268,31 +1268,31 @@ BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward )
if ( bForward )
{
// N"achstes Fenster suchen
- for ( USHORT nNext=n; nNext<nCount; nNext++ )
+ for ( sal_uInt16 nNext=n; nNext<nCount; nNext++ )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
if ( pD->pWin )
{
pD->pWin->GrabFocus();
- return TRUE;
+ return sal_True;
}
}
}
else
{
// Vorheriges Fenster suchen
- for ( USHORT nNext=n; nNext--; )
+ for ( sal_uInt16 nNext=n; nNext--; )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
if ( pD->pWin )
{
pD->pWin->GrabFocus();
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin )
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index f4d2392c9017..ff3cd08b01c8 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno;
namespace sfx2 {
#define USERITEM_NAME DEFINE_CONST_OUSTRING("UserItem")
-#define MAX_SAVE_COUNT (USHORT)10
+#define MAX_SAVE_COUNT (sal_uInt16)10
// ============================================================================
// SearchDialog
@@ -113,7 +113,7 @@ void SearchDialog::LoadConfig()
}
}
else
- m_aWrapAroundBox.Check( TRUE );
+ m_aWrapAroundBox.Check( sal_True );
}
void SearchDialog::SaveConfig()
@@ -121,7 +121,7 @@ void SearchDialog::SaveConfig()
SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
aViewOpt.SetWindowState( rtl::OUString::createFromAscii( m_sWinState.GetBuffer() ) );
String sUserData;
- USHORT i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT );
+ sal_uInt16 i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT );
for ( ; i < nCount; ++i )
{
sUserData += m_aSearchEdit.GetEntry(i);
@@ -144,7 +144,7 @@ void SearchDialog::SaveConfig()
IMPL_LINK( SearchDialog, FindHdl, PushButton*, EMPTYARG )
{
String sSrchTxt = m_aSearchEdit.GetText();
- USHORT nPos = m_aSearchEdit.GetEntryPos( sSrchTxt );
+ sal_uInt16 nPos = m_aSearchEdit.GetEntryPos( sSrchTxt );
if ( nPos > 0 && nPos != COMBOBOX_ENTRY_NOTFOUND )
m_aSearchEdit.RemoveEntry( nPos );
if ( nPos > 0 )
@@ -168,9 +168,9 @@ void SearchDialog::SetFocusOnEdit()
m_aSearchEdit.GrabFocus();
}
-BOOL SearchDialog::Close()
+sal_Bool SearchDialog::Close()
{
- BOOL bRet = ModelessDialog::Close();
+ sal_Bool bRet = ModelessDialog::Close();
m_aCloseHdl.Call( this );
return bRet;
}
@@ -181,7 +181,7 @@ void SearchDialog::StateChanged( StateChangedType nStateChange )
{
if ( m_sWinState.Len() )
SetWindowState( m_sWinState );
- m_bIsConstructed = TRUE;
+ m_bIsConstructed = sal_True;
}
ModelessDialog::StateChanged( nStateChange );
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index a33677c6b2ae..ba6fac0fdee8 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -54,17 +54,17 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILY_ITEM ) )
{
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if(nMask & RSC_SFX_STYLE_ITEM_LIST)
{
- ULONG nCount = ReadLongRes();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uIntPtr nCount = ReadLongRes();
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
SfxFilterTupel *pTupel = new SfxFilterTupel;
pTupel->aName = ReadStringRes();
long lFlags = ReadLongRes();
- pTupel->nFlags = (USHORT)lFlags;
+ pTupel->nFlags = (sal_uInt16)lFlags;
aFilterList.Insert(pTupel, LIST_APPEND);
}
}
@@ -83,7 +83,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
}
if(nMask & RSC_SFX_STYLE_ITEM_STYLEFAMILY)
{
- nFamily = (USHORT)ReadLongRes();
+ nFamily = (sal_uInt16)ReadLongRes();
}
else
nFamily = SFX_STYLE_FAMILY_PARA;
@@ -116,11 +116,11 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem()
SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
- Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( FALSE ) ),
+ Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( sal_False ) ),
aEntryList( 4, 1 )
{
- ULONG nCount = ReadLongRes();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uIntPtr nCount = ReadLongRes();
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
const ResId aResId((RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr());
SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId);
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index e1d01de94955..1a155458995f 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -51,7 +51,7 @@ SfxStyleDialog::SfxStyleDialog
Window* pParent, // Parent
const ResId& rResId, // ResId
SfxStyleSheetBase& rStyle, // zu bearbeitendes StyleSheet
- BOOL bFreeRes, // Flag Resourcen freigeben
+ sal_Bool bFreeRes, // Flag Resourcen freigeben
const String* pUserBtnTxt
) :
@@ -64,7 +64,7 @@ SfxStyleDialog::SfxStyleDialog
rStyle.GetItemSet().Clone(),
// auch ohne ParentSupport TRUE "ubergeben, aber erweitert
// um den StandardButton zu unterdr"ucken
- rStyle.HasParentSupport() ? TRUE : 2,
+ rStyle.HasParentSupport() ? sal_True : 2,
pUserBtnTxt ),
pStyle( &rStyle )
@@ -72,7 +72,7 @@ SfxStyleDialog::SfxStyleDialog
{
AddTabPage( ID_TABPAGE_MANAGESTYLES,
String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
- SfxManageStyleSheetPage::Create, 0, FALSE, 0 );
+ SfxManageStyleSheetPage::Create, 0, sal_False, 0 );
// bei neuer Vorlage immer die Verwaltungsseite als aktuelle
// Seite setzen
@@ -154,11 +154,11 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
const SfxItemSet* pInSet = GetInputSetImpl();
SfxWhichIter aIter( *pInSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- SfxItemState eState = pInSet->GetItemState( nWhich, FALSE );
+ SfxItemState eState = pInSet->GetItemState( nWhich, sal_False );
if ( SFX_ITEM_DEFAULT == eState )
pExampleSet->ClearItem( nWhich );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index d149bea792dc..35a5fb766b97 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -68,34 +68,34 @@ TYPEINIT1(LAYOUT_NS_SFX_TABDIALOG SfxTabDialogItem,SfxSetItem);
struct TabPageImpl
{
- BOOL mbStandard;
+ sal_Bool mbStandard;
sfx::ItemConnectionArray maItemConn;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
- TabPageImpl() : mbStandard( FALSE ) {}
+ TabPageImpl() : mbStandard( sal_False ) {}
};
NAMESPACE_LAYOUT_SFX_TABDIALOG
struct Data_Impl
{
- USHORT nId; // Die ID
+ sal_uInt16 nId; // Die ID
CreateTabPage fnCreatePage; // Pointer auf die Factory
GetTabPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion
SfxTabPage* pTabPage; // die TabPage selber
- BOOL bOnDemand; // Flag: ItemSet onDemand
- BOOL bRefresh; // Flag: Seite mu\s neu initialisiert werden
+ sal_Bool bOnDemand; // Flag: ItemSet onDemand
+ sal_Bool bRefresh; // Flag: Seite mu\s neu initialisiert werden
// Konstruktor
- Data_Impl( USHORT Id, CreateTabPage fnPage,
- GetTabPageRanges fnRanges, BOOL bDemand ) :
+ Data_Impl( sal_uInt16 Id, CreateTabPage fnPage,
+ GetTabPageRanges fnRanges, sal_Bool bDemand ) :
nId ( Id ),
fnCreatePage( fnPage ),
fnGetRanges ( fnRanges ),
pTabPage ( 0 ),
bOnDemand ( bDemand ),
- bRefresh ( FALSE )
+ bRefresh ( sal_False )
{
if ( !fnCreatePage )
{
@@ -114,7 +114,7 @@ SfxTabDialogItem::SfxTabDialogItem( const SfxTabDialogItem& rAttr, SfxItemPool*
{
}
-SfxTabDialogItem::SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet )
+SfxTabDialogItem::SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet )
: SfxSetItem( nId, rItemSet )
{
}
@@ -124,7 +124,7 @@ SfxPoolItem* __EXPORT SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
return new SfxTabDialogItem( *this, pToPool );
}
-SfxPoolItem* __EXPORT SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const
+SfxPoolItem* __EXPORT SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersion*/) const
{
DBG_ERROR( "Use it only in UI!" );
return NULL;
@@ -135,7 +135,7 @@ class SfxTabDialogController : public SfxControllerItem
SfxTabDialog* pDialog;
const SfxItemSet* pSet;
public:
- SfxTabDialogController( USHORT nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
+ SfxTabDialogController( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
: SfxControllerItem( nSlotId, rBindings )
, pDialog( pDlg )
, pSet( NULL )
@@ -144,7 +144,7 @@ public:
~SfxTabDialogController();
DECL_LINK( Execute_Impl, void* );
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
};
SfxTabDialogController::~SfxTabDialogController()
@@ -167,21 +167,21 @@ IMPL_LINK( SfxTabDialogController, Execute_Impl, void*, pVoid )
return 0;
}
-void SfxTabDialogController::StateChanged( USHORT /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
+void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxSetItem* pSetItem = PTR_CAST( SfxSetItem, pState );
if ( pSetItem )
{
pSet = pDialog->pSet = pSetItem->GetItemSet().Clone();
- BOOL bDialogStarted = FALSE;
- for ( USHORT n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
+ sal_Bool bDialogStarted = sal_False;
+ for ( sal_uInt16 n=0; n<pDialog->aTabCtrl.GetPageCount(); n++ )
{
- USHORT nPageId = pDialog->aTabCtrl.GetPageId( n );
+ sal_uInt16 nPageId = pDialog->aTabCtrl.GetPageId( n );
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pDialog->aTabCtrl.GetTabPage( nPageId ));
if ( pTabPage )
{
pTabPage->Reset( pSetItem->GetItemSet() );
- bDialogStarted = TRUE;
+ bDialogStarted = sal_True;
}
}
@@ -196,7 +196,7 @@ DECL_PTRARRAY(SfxTabDlgData_Impl, Data_Impl *, 4,4)
struct TabDlg_Impl
{
- BOOL bModified : 1,
+ sal_Bool bModified : 1,
bModal : 1,
bInOK : 1,
bHideResetBtn : 1;
@@ -205,25 +205,25 @@ struct TabDlg_Impl
PushButton* pApplyButton;
SfxTabDialogController* pController;
- TabDlg_Impl( BYTE nCnt ) :
+ TabDlg_Impl( sal_uInt8 nCnt ) :
- bModified ( FALSE ),
- bModal ( TRUE ),
- bInOK ( FALSE ),
- bHideResetBtn ( FALSE ),
+ bModified ( sal_False ),
+ bModal ( sal_True ),
+ bInOK ( sal_False ),
+ bHideResetBtn ( sal_False ),
pData ( new SfxTabDlgData_Impl( nCnt ) ),
pApplyButton ( NULL ),
pController ( NULL )
{}
};
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos = 0 );
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = 0 );
-Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos )
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos )
{
- const USHORT nCount = rArr.Count();
+ const sal_uInt16 nCount = rArr.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = rArr[i];
@@ -263,7 +263,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
TabPage( pParent, rResId ),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
@@ -273,7 +273,7 @@ SfxTabPage::SfxTabPage( Window *pParent,
SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ) :
TabPage(pParent, nStyle),
pSet ( &rAttrSet ),
- bHasExchangeSupport ( FALSE ),
+ bHasExchangeSupport ( sal_False ),
pTabDlg ( NULL ),
pImpl ( new TabPageImpl )
{
@@ -295,7 +295,7 @@ SfxTabPage::~SfxTabPage()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SfxTabPage::FillItemSet( SfxItemSet& rSet )
{
return pImpl->maItemConn.DoFillItemSet( rSet, GetItemSet() );
}
@@ -367,19 +367,19 @@ void SfxTabPage::FillUserData()
// -----------------------------------------------------------------------
-BOOL SfxTabPage::IsReadOnly() const
+sal_Bool SfxTabPage::IsReadOnly() const
/* [Description]
*/
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sal_Bool bDeep )
+const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep )
/* [Beschreibung]
@@ -390,13 +390,13 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
{
const SfxItemPool* pPool = rSet.GetPool();
- USHORT nWh = pPool->GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = pPool->GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
#ifdef DEBUG
SfxItemState eState;
eState =
#endif
- rSet.GetItemState( nWh, TRUE, &pItem ); // -Wall required??
+ rSet.GetItemState( nWh, sal_True, &pItem ); // -Wall required??
if ( !pItem && nWh != nSlot )
pItem = &pPool->GetDefaultItem( nWh );
@@ -406,7 +406,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot, sa
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
- USHORT nSlot, sal_Bool bDeep )
+ sal_uInt16 nSlot, sal_Bool bDeep )
/* [Beschreibung]
@@ -416,7 +416,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
{
const SfxItemSet& rOldSet = GetItemSet();
- USHORT nWh = GetWhich( nSlot, bDeep );
+ sal_uInt16 nWh = GetWhich( nSlot, bDeep );
const SfxPoolItem* pItem = 0;
if ( pImpl->mbStandard && rOldSet.GetParent() )
@@ -432,7 +432,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
// -----------------------------------------------------------------------
const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
- USHORT nSlot )
+ sal_uInt16 nSlot )
/* [Beschreibung]
@@ -489,11 +489,11 @@ void SfxTabPage::AddItemConnection( sfx::ItemConnectionBase* pConnection )
aBaseFmtBtn ( this ),\
pSet ( ItemSetPtr ),\
pOutSet ( 0 ),\
- pImpl ( new TabDlg_Impl( (BYTE)aTabCtrl.GetPageCount() ) ), \
+ pImpl ( new TabDlg_Impl( (sal_uInt8)aTabCtrl.GetPageCount() ) ), \
pRanges ( 0 ), \
nResId ( rResId.GetId() ), \
nAppPageId ( USHRT_MAX ), \
- bItemsReset ( FALSE ),\
+ bItemsReset ( sal_False ),\
bFmt ( bEditFmt ),\
pExampleSet ( 0 )
@@ -512,7 +512,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset mit den Daten;
// kann NULL sein, wenn Pages onDemand
- BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet
+ sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
// wenn ja -> zus"atzlicher Button f"ur Standard
const String* pUserButtonText // Text fuer BenutzerButton;
// wenn != 0, wird der UserButton erzeugt
@@ -538,7 +538,7 @@ SfxTabDialog::SfxTabDialog
const ResId& rResId, // ResourceId
const SfxItemSet* pItemSet, // Itemset mit den Daten; kann NULL sein,
// wenn Pages onDemand
- BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet
+ sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
// wenn ja -> zus"atzlicher Button f"ur Standard
const String* pUserButtonText // Text f"ur BenutzerButton;
// wenn != 0, wird der UserButton erzeugt
@@ -561,9 +561,9 @@ SfxTabDialog::SfxTabDialog
(
Window* pParent, // Parent-Fenster
const ResId& rResId, // ResourceId
- USHORT nSetId,
+ sal_uInt16 nSetId,
SfxBindings& rBindings,
- BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet
+ sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
// wenn ja -> zus"atzlicher Button f"ur Standard
const String* pUserButtonText // Text f"ur BenutzerButton;
// wenn != 0, wird der UserButton erzeugt
@@ -576,7 +576,7 @@ SfxTabDialog::SfxTabDialog
pImpl->pController = new SfxTabDialogController( nSetId, rBindings, this );
rBindings.LEAVEREGISTRATIONS();
- EnableApplyButton( TRUE );
+ EnableApplyButton( sal_True );
SetApplyHandler( LINK( pImpl->pController, SfxTabDialogController, Execute_Impl ) );
rBindings.Invalidate( nSetId );
@@ -608,8 +608,8 @@ SfxTabDialog::~SfxTabDialog()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() );
- const USHORT nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pImpl->pData->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
@@ -644,7 +644,7 @@ SfxTabDialog::~SfxTabDialog()
// -----------------------------------------------------------------------
-void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
+void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
/* [Beschreibung]
@@ -683,13 +683,13 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
// bFmt = tempor"ares Flag im Ctor() "ubergeben,
- // wenn bFmt == 2, dann auch TRUE,
+ // wenn bFmt == 2, dann auch sal_True,
// zus"atzlich Ausblendung vom StandardButton,
- // nach der Initialisierung wieder auf TRUE setzen
+ // nach der Initialisierung wieder auf sal_True setzen
if ( bFmtFlag != 2 )
aBaseFmtBtn.Show();
else
- bFmtFlag = TRUE;
+ bFmtFlag = sal_True;
}
if ( pSet )
@@ -697,6 +697,11 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
pExampleSet = new SfxItemSet( *pSet );
pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
}
+
+ aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn );
+ aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn );
+ aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn );
+ aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn );
}
// -----------------------------------------------------------------------
@@ -704,7 +709,7 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText )
void SfxTabDialog::RemoveResetButton()
{
aResetBtn.Hide();
- pImpl->bHideResetBtn = TRUE;
+ pImpl->bHideResetBtn = sal_True;
}
// -----------------------------------------------------------------------
@@ -738,10 +743,10 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl )
// -----------------------------------------------------------------------
-void SfxTabDialog::Start( BOOL bShow )
+void SfxTabDialog::Start( sal_Bool bShow )
{
aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
- pImpl->bModal = FALSE;
+ pImpl->bModal = sal_False;
Start_Impl();
if ( bShow )
@@ -770,7 +775,7 @@ Link SfxTabDialog::GetApplyHandler() const
// -----------------------------------------------------------------------
-void SfxTabDialog::EnableApplyButton(BOOL bEnable)
+void SfxTabDialog::EnableApplyButton(sal_Bool bEnable)
{
if ( IsApplyButtonEnabled() == bEnable )
// nothing to do
@@ -804,7 +809,7 @@ void SfxTabDialog::EnableApplyButton(BOOL bEnable)
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsApplyButtonEnabled() const
+sal_Bool SfxTabDialog::IsApplyButtonEnabled() const
{
return ( NULL != pImpl->pApplyButton );
}
@@ -828,7 +833,7 @@ PushButton* SfxTabDialog::GetApplyButton()
void SfxTabDialog::Start_Impl()
{
DBG_ASSERT( pImpl->pData->Count() == aTabCtrl.GetPageCount(), "not all pages registered" );
- USHORT nActPage = aTabCtrl.GetPageId( 0 );
+ sal_uInt16 nActPage = aTabCtrl.GetPageId( 0 );
// load old settings, when exists
SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
@@ -839,13 +844,13 @@ void SfxTabDialog::Start_Impl()
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
// initiale TabPage aus Programm/Hilfe/Konfig
- nActPage = (USHORT)aDlgOpt.GetPageID();
+ nActPage = (sal_uInt16)aDlgOpt.GetPageID();
if ( USHRT_MAX != nAppPageId )
nActPage = nAppPageId;
else
{
- USHORT nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
+ sal_uInt16 nAutoTabPageId = SFX_APP()->Get_Impl()->nAutoTabPageId;
if ( nAutoTabPageId )
nActPage = nAutoTabPageId;
}
@@ -860,19 +865,19 @@ void SfxTabDialog::Start_Impl()
ActivatePageHdl( &aTabCtrl );
}
-void SfxTabDialog::AddTabPage( USHORT nId, BOOL bItemsOnDemand )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, sal_Bool bItemsOnDemand )
{
AddTabPage( nId, 0, 0, bItemsOnDemand );
}
-void SfxTabDialog::AddTabPage( USHORT nId, const String &rRiderText, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const String &rRiderText, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos );
}
#ifdef SV_HAS_RIDERBITMAPS
-void SfxTabDialog::AddTabPage( USHORT nId, const Bitmap &rRiderBitmap, BOOL bItemsOnDemand, USHORT nPos )
+void SfxTabDialog::AddTabPage( sal_uInt16 nId, const Bitmap &rRiderBitmap, sal_Bool bItemsOnDemand, sal_uInt16 nPos )
{
AddTabPage( nId, rRiderBitmap, 0, 0, bItemsOnDemand, nPos );
}
@@ -891,11 +896,11 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId, // ID der Seite
+ sal_uInt16 nId, // ID der Seite
CreateTabPage pCreateFunc, // Pointer auf die Factory-Methode
GetTabPageRanges pRangesFunc, // Pointer auf die Methode f"ur das
// Erfragen der Ranges onDemand
- BOOL bItemsOnDemand // gibt an, ob das Set dieser Seite beim
+ sal_Bool bItemsOnDemand // gibt an, ob das Set dieser Seite beim
// Erzeugen der Seite erfragt wird
)
{
@@ -915,12 +920,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const String& rRiderText,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -943,12 +948,12 @@ void SfxTabDialog::AddTabPage
*/
(
- USHORT nId,
+ sal_uInt16 nId,
const Bitmap &rRiderBitmap,
CreateTabPage pCreateFunc,
GetTabPageRanges pRangesFunc,
- BOOL bItemsOnDemand,
- USHORT nPos
+ sal_Bool bItemsOnDemand,
+ sal_uInt16 nPos
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
@@ -961,7 +966,7 @@ void SfxTabDialog::AddTabPage
// -----------------------------------------------------------------------
-void SfxTabDialog::RemoveTabPage( USHORT nId )
+void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
/* [Beschreibung]
@@ -969,7 +974,7 @@ void SfxTabDialog::RemoveTabPage( USHORT nId )
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aTabCtrl.RemovePage( nId );
Data_Impl* pDataObject = Find( *pImpl->pData, nId, &nPos );
@@ -1012,7 +1017,7 @@ void SfxTabDialog::PageCreated
*/
(
- USHORT, // Id der erzeugten Seite
+ sal_uInt16, // Id der erzeugten Seite
SfxTabPage& // Referenz auf die erzeugte Seite
)
{
@@ -1035,7 +1040,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
// -----------------------------------------------------------------------
-SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
+SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
/* [Beschreibung]
@@ -1043,7 +1048,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
*/
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
Data_Impl* pDataObject = Find( *pImpl->pData, nPageId, &nPos );
if ( pDataObject )
@@ -1053,7 +1058,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
-BOOL SfxTabDialog::IsInOK() const
+sal_Bool SfxTabDialog::IsInOK() const
/* [Beschreibung]
@@ -1077,25 +1082,25 @@ short SfxTabDialog::Ok()
[R"uckgabewert]
- RET_OK: wenn mindestens eine Seite TRUE als Returnwert von
+ RET_OK: wenn mindestens eine Seite sal_True als Returnwert von
FillItemSet geliefert hat, sonst RET_CANCEL.
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( !pOutSet )
{
if ( !pExampleSet && pSet )
- pOutSet = pSet->Clone( FALSE ); // ohne Items
+ pOutSet = pSet->Clone( sal_False ); // ohne Items
else if ( pExampleSet )
pOutSet = new SfxItemSet( *pExampleSet );
}
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
SfxTabPage* pTabPage = pDataObject->pTabPage;
@@ -1114,7 +1119,7 @@ short SfxTabDialog::Ok()
if ( pTabPage->FillItemSet( aTmp ) )
{
- bModified |= TRUE;
+ bModified |= sal_True;
pExampleSet->Put( aTmp );
pOutSet->Put( aTmp );
}
@@ -1123,10 +1128,10 @@ short SfxTabDialog::Ok()
}
if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
- bModified |= TRUE;
+ bModified |= sal_True;
if ( bFmt == 2 )
- bModified |= TRUE;
+ bModified |= sal_True;
return bModified ? RET_OK : RET_CANCEL;
}
@@ -1141,7 +1146,7 @@ IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
// -----------------------------------------------------------------------
-SfxItemSet* SfxTabDialog::CreateInputItemSet( USHORT )
+SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
/* [Beschreibung]
@@ -1184,7 +1189,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
*/
{
- pImpl->bInOK = TRUE;
+ pImpl->bInOK = sal_True;
if ( OK_Impl() )
{
@@ -1203,7 +1208,7 @@ IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
bool SfxTabDialog::PrepareLeaveCurrentPage()
{
- USHORT const nId = aTabCtrl.GetCurPageId();
+ sal_uInt16 const nId = aTabCtrl.GetCurPageId();
SfxTabPage* pPage = dynamic_cast<SfxTabPage*> (aTabCtrl.GetTabPage( nId ));
bool bEnd = !pPage;
@@ -1275,7 +1280,7 @@ IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id nicht bekannt" );
@@ -1303,7 +1308,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
*/
{
- const USHORT nId = aTabCtrl.GetCurPageId();
+ const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
DBG_ASSERT( pDataObject, "Id nicht bekannt" );
bFmt = 2;
@@ -1314,17 +1319,17 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
pExampleSet = new SfxItemSet( *pSet );
const SfxItemPool* pPool = pSet->GetPool();
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
SfxItemSet aTmpSet( *pExampleSet );
while ( *pTmpRanges )
{
- const USHORT* pU = pTmpRanges + 1;
+ const sal_uInt16* pU = pTmpRanges + 1;
if ( *pTmpRanges == *pU )
{
// Range mit zwei gleichen Werten -> nur ein Item setzen
- USHORT nWh = pPool->GetWhich( *pTmpRanges );
+ sal_uInt16 nWh = pPool->GetWhich( *pTmpRanges );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// am OutSet mit InvalidateItem,
@@ -1334,13 +1339,13 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
else
{
// richtiger Range mit mehreren Werten
- USHORT nTmp = *pTmpRanges, nTmpEnd = *pU;
+ sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
DBG_ASSERT( nTmp <= nTmpEnd, "Range ist falsch sortiert" );
if ( nTmp > nTmpEnd )
{
// wenn wirklich falsch sortiert, dann neu setzen
- USHORT nTmp1 = nTmp;
+ sal_uInt16 nTmp1 = nTmp;
nTmp = nTmpEnd;
nTmpEnd = nTmp1;
}
@@ -1348,7 +1353,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
while ( nTmp <= nTmpEnd )
{
// "uber den Range iterieren, und die Items setzen
- USHORT nWh = pPool->GetWhich( nTmp );
+ sal_uInt16 nWh = pPool->GetWhich( nTmp );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
// am OutSet mit InvalidateItem,
@@ -1363,7 +1368,7 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
// alle Items neu gesetzt -> dann an der aktuellen Page Reset() rufen
DBG_ASSERT( pDataObject->pTabPage, "die Page ist weg" );
pDataObject->pTabPage->Reset( aTmpSet );
- pDataObject->pTabPage->pImpl->mbStandard = TRUE;
+ pDataObject->pTabPage->pImpl->mbStandard = sal_True;
}
return 1;
}
@@ -1383,14 +1388,14 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
Handler, der vor dem Umschalten auf eine andere Seite
durch Starview gerufen wird.
Existiert die Seite noch nicht, so wird sie erzeugt und
- die virtuelle Methode <SfxTabDialog::PageCreated( USHORT, SfxTabPage &)>
+ die virtuelle Methode <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)>
gerufen. Existiert die Seite bereits, so wird ggf.
<SfxTabPage::Reset(const SfxItemSet &)> oder
<SfxTabPage::ActivatePage(const SfxItemSet &)> gerufen.
*/
{
- USHORT const nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 const nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" );
SFX_APP();
@@ -1472,7 +1477,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
}
else if ( pDataObject->bRefresh )
pTabPage->Reset( *pSet );
- pDataObject->bRefresh = FALSE;
+ pDataObject->bRefresh = sal_False;
#if ENABLE_LAYOUT_SFX_TABDIALOG
pTabCtrl->GetPagePos (nId);
@@ -1480,7 +1485,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
if ( pExampleSet )
pTabPage->ActivatePage( *pExampleSet );
- BOOL bReadOnly = pTabPage->IsReadOnly();
+ sal_Bool bReadOnly = pTabPage->IsReadOnly();
( bReadOnly || pImpl->bHideResetBtn ) ? aResetBtn.Hide() : aResetBtn.Show();
return 0;
}
@@ -1499,7 +1504,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
*/
{
- USHORT nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
SFX_APP();
SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
DBG_ASSERT( pPage, "keine aktive Page" );
@@ -1556,22 +1561,22 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
pSet = GetRefreshedSet();
DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
// alle Pages als neu zu initialsieren flaggen
- const USHORT nCount = pImpl->pData->Count();
+ const sal_uInt16 nCount = pImpl->pData->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = (*pImpl->pData)[i];
if ( pObj->pTabPage != pPage ) // eigene Page nicht mehr refreshen
- pObj->bRefresh = TRUE;
+ pObj->bRefresh = sal_True;
else
- pObj->bRefresh = FALSE;
+ pObj->bRefresh = sal_False;
}
}
if ( nRet & SfxTabPage::LEAVE_PAGE )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1584,13 +1589,13 @@ const SfxItemSet* SfxTabDialog::GetOutputItemSet
[Querverweise]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
*/
(
- USHORT nId // die Id, unter der die Seite bei AddTabPage()
+ sal_uInt16 nId // die Id, unter der die Seite bei AddTabPage()
// hinzugef"ugt wurde.
) const
{
@@ -1640,12 +1645,12 @@ extern "C" int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
*/
{
- return *(USHORT*)p1 - *(USHORT*)p2;
+ return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
}
// -----------------------------------------------------------------------
-void SfxTabDialog::ShowPage( USHORT nId )
+void SfxTabDialog::ShowPage( sal_uInt16 nId )
/* [Beschreibung]
@@ -1659,7 +1664,7 @@ void SfxTabDialog::ShowPage( USHORT nId )
// -----------------------------------------------------------------------
-const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
+const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
/* [Beschreibung]
@@ -1669,9 +1674,9 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
[Querverweise]
- <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
- <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
- <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
+ <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
[R"uckgabewert]
@@ -1690,19 +1695,19 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
if ( pRanges )
return pRanges;
SvUShorts aUS( 16, 16 );
- USHORT nCount = pImpl->pData->Count();
+ sal_uInt16 nCount = pImpl->pData->Count();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; ++i )
{
Data_Impl* pDataObject = pImpl->pData->GetObject(i);
if ( pDataObject->fnGetRanges )
{
- const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
- const USHORT* pIter = pTmpRanges;
+ const sal_uInt16* pTmpRanges = (pDataObject->fnGetRanges)();
+ const sal_uInt16* pIter = pTmpRanges;
- USHORT nLen;
+ sal_uInt16 nLen;
for( nLen = 0; *pIter; ++nLen, ++pIter )
;
aUS.Insert( pTmpRanges, nLen, aUS.Count() );
@@ -1723,12 +1728,12 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
// sortieren
if ( aUS.Count() > 1 )
qsort( (void*)aUS.GetData(),
- aUS.Count(), sizeof(USHORT), TabDlgCmpUS_Impl );
+ aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl );
// Ranges erzeugen
//!! Auskommentiert, da fehlerhaft
/*
- pRanges = new USHORT[aUS.Count() * 2 + 1];
+ pRanges = new sal_uInt16[aUS.Count() * 2 + 1];
int j = 0;
i = 0;
@@ -1744,8 +1749,8 @@ const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
pRanges[j] = 0; // terminierende NULL
*/
- pRanges = new USHORT[aUS.Count() + 1];
- memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count());
+ pRanges = new sal_uInt16[aUS.Count() + 1];
+ memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count());
pRanges[aUS.Count()] = 0;
return pRanges;
}
@@ -1761,7 +1766,7 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
*/
{
- FASTBOOL bSet = ( pSet != NULL );
+ bool bSet = ( pSet != NULL );
pSet = pInSet;
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 1c2faac4e8a3..8974363a02d1 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -184,8 +184,8 @@ namespace sfx2
aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) );
const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() );
- const BOOL bHiContrast( Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
- const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE, bHiContrast ) );
+ const sal_Bool bHiContrast( Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
+ const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, sal_False, bHiContrast ) );
return aPanelImage.GetXGraphic();
}
@@ -244,7 +244,7 @@ namespace sfx2
SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE );
//------------------------------------------------------------------------------------------------------------------
- TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo )
+ TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, sal_uInt16 i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo )
:SfxChildWindow( i_pParent, i_nId )
{
pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent,
@@ -255,7 +255,7 @@ namespace sfx2
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
pWindow->Show();
}
@@ -923,7 +923,7 @@ namespace sfx2
ModuleTaskPane& m_rTaskPane;
TitledDockingWindow& m_rDockingWindow;
- USHORT m_nViewMenuID;
+ sal_uInt16 m_nViewMenuID;
PanelSelectorLayout m_eCurrentLayout;
PanelDescriptors m_aPanelRepository;
bool m_bTogglingPanelVisibility;
@@ -1042,11 +1042,11 @@ namespace sfx2
switch ( i_pMenu->GetCurItemId() )
{
case MID_UNLOCK_TASK_PANEL:
- m_rDockingWindow.SetFloatingMode( TRUE );
+ m_rDockingWindow.SetFloatingMode( sal_True );
break;
case MID_LOCK_TASK_PANEL:
- m_rDockingWindow.SetFloatingMode( FALSE );
+ m_rDockingWindow.SetFloatingMode( sal_False );
break;
case MID_LAYOUT_DRAWERS:
@@ -1233,7 +1233,7 @@ namespace sfx2
// Add one entry for every tool panel element to individually make
// them visible or hide them.
- USHORT nIndex = MID_FIRST_PANEL;
+ sal_uInt16 nIndex = MID_FIRST_PANEL;
for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex )
{
const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] );
@@ -1263,7 +1263,7 @@ namespace sfx2
String( SfxResId( STR_SFX_UNDOCK ) )
);
- pMenu->RemoveDisabledEntries( FALSE, FALSE );
+ pMenu->RemoveDisabledEntries( sal_False, sal_False );
return pMenu;
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b10e634be231..d8ea47baf32d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -97,7 +97,7 @@ using namespace ::com::sun::star::uno;
#define SFX_TEMPLDLG_MIDVSPACE 3
#define SFX_TEMPLDLG_FILTERHEIGHT 100
-static USHORT nLastItemId = USHRT_MAX;
+static sal_uInt16 nLastItemId = USHRT_MAX;
// filter box has maximum 12 entries visible
#define MAX_FILTER_ENTRIES 12
@@ -231,7 +231,7 @@ void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt )
{
nModifier = rMEvt.GetModifier();
- BOOL bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), TRUE ) );
+ sal_Bool bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), sal_True ) );
if( bHitEmptySpace && ( rMEvt.GetClicks() == 2 ) && rMEvt.IsMod1() )
Control::MouseButtonDown( rMEvt );
else
@@ -264,7 +264,7 @@ sal_Int8 DropListBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// rEvt.maDropEvent.Context->acceptDrop( DND_ACTION_NONE );
-// rEvt.maDropEvent.Context->dropComplete( TRUE );
+// rEvt.maDropEvent.Context->dropComplete( sal_True );
sal_Int8 nRet = DND_ACTION_NONE;
SfxObjectShell* pDocShell = pDialog->GetObjectShell();
@@ -380,8 +380,8 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
//added by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
if( !( GetSelectionCount() > 0 ) )
{
- pDialog->EnableEdit( FALSE );
- pDialog->EnableDel( FALSE );
+ pDialog->EnableEdit( sal_False );
+ pDialog->EnableDel( sal_False );
}
return pDialog->CreateContextMenu();
}
@@ -389,7 +389,7 @@ PopupMenu* SfxActionListBox::CreateContextMenu( void )
//-------------------------------------------------------------------------
SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(Window *pParentWnd,
- USHORT nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
+ sal_uInt16 nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWnd, nId)
{
SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParentWnd);
@@ -430,13 +430,13 @@ private:
protected:
virtual void Command( const CommandEvent& rMEvt );
virtual long Notify( NotifyEvent& rNEvt );
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual long ExpandingHdl();
virtual void ExpandedHdl();
- virtual BOOL NotifyMoving(SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving(SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uIntPtr& rNewChildPos);
public:
StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle = 0);
@@ -456,7 +456,7 @@ public:
void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries& rEntries) const
{
SvLBoxEntry *pEntry;
- USHORT nCount=0;
+ sal_uInt16 nCount=0;
for(pEntry=(SvLBoxEntry*)FirstVisible();pEntry;pEntry=(SvLBoxEntry*)NextVisible(pEntry))
{
if(IsExpanded(pEntry))
@@ -472,7 +472,7 @@ PopupMenu* StyleTreeListBox_Impl::CreateContextMenu()
return pDialog->CreateContextMenu();
}
-BOOL StyleTreeListBox_Impl::DoubleClickHdl()
+sal_Bool StyleTreeListBox_Impl::DoubleClickHdl()
/* [Beschreibung]
@@ -483,7 +483,7 @@ BOOL StyleTreeListBox_Impl::DoubleClickHdl()
*/
{
aDoubleClickLink.Call(this);
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -526,10 +526,10 @@ long StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt )
//-------------------------------------------------------------------------
-BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
+sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& lPos)
+ sal_uIntPtr& lPos)
/* [Beschreibung]
NotifyMoving Handler; dieser leitet per Link das Event an den Dialog
@@ -539,10 +539,10 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
*/
{
if(!pTarget || !pEntry)
- return FALSE;
+ return sal_False;
aParent = GetEntryText(pTarget);
aStyle = GetEntryText(pEntry);
- const BOOL bRet = (BOOL)aDropLink.Call(this);
+ const sal_Bool bRet = (sal_Bool)aDropLink.Call(this);
rpNewParent = pTarget;
lPos=0;
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
@@ -552,7 +552,7 @@ BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
GetEntryText(pTmpEntry),GetEntryText(pEntry));
pTmpEntry=NextSibling(pTmpEntry),lPos++) ;
- return bRet? (BOOL)2: FALSE;
+ return bRet? (sal_Bool)2: sal_False;
}
//-------------------------------------------------------------------------
@@ -570,7 +570,7 @@ long StyleTreeListBox_Impl::ExpandingHdl()
*/
{
pCurEntry = GetCurEntry();
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -590,7 +590,7 @@ void StyleTreeListBox_Impl::ExpandedHdl()
{
SvLBoxEntry *pEntry = GetHdlEntry();
if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry())
- SelectAll( FALSE );
+ SelectAll( sal_False );
pCurEntry = 0;
}
@@ -628,14 +628,14 @@ struct StyleTree_Impl
String aName;
String aParent;
StyleTreeArr_Impl *pChilds;
- BOOL bIsExpanded;
- BOOL HasParent() const { return aParent.Len() != 0; }
+ sal_Bool bIsExpanded;
+ sal_Bool HasParent() const { return aParent.Len() != 0; }
StyleTree_Impl(const String &rName, const String &rParent):
aName(rName), aParent(rParent), pChilds(0), bIsExpanded(0) {}
~StyleTree_Impl();
- void Put(StyleTree_Impl* pIns, ULONG lPos=ULONG_MAX);
- ULONG Count();
+ void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX);
+ sal_uIntPtr Count();
};
typedef StyleTree_Impl* StyleTree_ImplPtr;
@@ -643,7 +643,7 @@ SV_DECL_PTRARR_DEL(StyleTreeArr_Impl, StyleTree_ImplPtr, 16, 8)
SV_IMPL_PTRARR(StyleTreeArr_Impl, StyleTree_ImplPtr)
-ULONG StyleTree_Impl::Count()
+sal_uIntPtr StyleTree_Impl::Count()
{
return pChilds ? pChilds->Count() : 0L;
}
@@ -657,35 +657,35 @@ StyleTree_Impl::~StyleTree_Impl()
//-------------------------------------------------------------------------
-void StyleTree_Impl::Put(StyleTree_Impl* pIns, ULONG lPos)
+void StyleTree_Impl::Put(StyleTree_Impl* pIns, sal_uIntPtr lPos)
{
if ( !pChilds )
pChilds = new StyleTreeArr_Impl;
if ( ULONG_MAX == lPos )
lPos = pChilds->Count();
- pChilds->Insert( pIns, (USHORT)lPos );
+ pChilds->Insert( pIns, (sal_uInt16)lPos );
}
//-------------------------------------------------------------------------
StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
{
- const USHORT nCount = rArr.Count();
+ const sal_uInt16 nCount = rArr.Count();
// Alle unter ihren Parents einordnen
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nCount; ++i)
{
StyleTree_ImplPtr pEntry = rArr[i];
if(pEntry->HasParent())
{
- for(USHORT j = 0; j < nCount; ++j)
+ for(sal_uInt16 j = 0; j < nCount; ++j)
{
StyleTree_ImplPtr pCmp = rArr[j];
if(pCmp->aName == pEntry->aParent)
{
// initial sortiert einfuegen
- USHORT ii;
+ sal_uInt16 ii;
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator();
for ( ii = 0;
@@ -713,14 +713,14 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
//-------------------------------------------------------------------------
-inline BOOL IsExpanded_Impl( const ExpandedEntries& rEntries,
+inline sal_Bool IsExpanded_Impl( const ExpandedEntries& rEntries,
const String &rStr)
{
- USHORT nCount=rEntries.Count();
- for(USHORT n=0;n<nCount;n++)
+ sal_uInt16 nCount=rEntries.Count();
+ for(sal_uInt16 n=0;n<nCount;n++)
if(*rEntries[n]==rStr)
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -731,8 +731,8 @@ SvLBoxEntry* FillBox_Impl(SvTreeListBox *pBox,
SvLBoxEntry* pParent = 0)
{
SvLBoxEntry* pNewEntry = pBox->InsertEntry(pEntry->aName, pParent);
- const USHORT nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0;
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0;
+ for(sal_uInt16 i = 0; i < nCount; ++i)
FillBox_Impl(pBox, (*pEntry->pChilds)[i], rEntries, pNewEntry);
return pNewEntry;
}
@@ -763,21 +763,22 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
nActFilter ( 0 ),
nAppFilter ( 0 ),
- bDontUpdate ( FALSE ),
- bIsWater ( FALSE ),
- bEnabled ( TRUE ),
- bUpdate ( FALSE ),
- bUpdateFamily ( FALSE ),
- bCanEdit ( FALSE ),
- bCanDel ( FALSE ),
- bCanNew ( TRUE ),
- bWaterDisabled ( FALSE ),
- bNewByExampleDisabled ( FALSE ),
- bUpdateByExampleDisabled( FALSE ),
- bTreeDrag ( TRUE ),
- bHierarchical ( FALSE ),
- bBindingUpdate ( TRUE )
-{
+ bDontUpdate ( sal_False ),
+ bIsWater ( sal_False ),
+ bEnabled ( sal_True ),
+ bUpdate ( sal_False ),
+ bUpdateFamily ( sal_False ),
+ bCanEdit ( sal_False ),
+ bCanDel ( sal_False ),
+ bCanNew ( sal_True ),
+ bWaterDisabled ( sal_False ),
+ bNewByExampleDisabled ( sal_False ),
+ bUpdateByExampleDisabled( sal_False ),
+ bTreeDrag ( sal_True ),
+ bHierarchical ( sal_False ),
+ bBindingUpdate ( sal_True )
+{
+ aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
aFmtLb.SetHelpId( HID_TEMPLATE_FMT );
aFilterLb.SetHelpId( HID_TEMPLATE_FILTER );
aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION );
@@ -807,20 +808,20 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
nActFilter ( 0 ),
nAppFilter ( 0 ),
- bDontUpdate ( FALSE ),
- bIsWater ( FALSE ),
- bEnabled ( TRUE ),
- bUpdate ( FALSE ),
- bUpdateFamily ( FALSE ),
- bCanEdit ( FALSE ),
- bCanDel ( FALSE ),
- bCanNew ( TRUE ),
- bWaterDisabled ( FALSE ),
- bNewByExampleDisabled ( FALSE ),
- bUpdateByExampleDisabled( FALSE ),
- bTreeDrag ( TRUE ),
- bHierarchical ( FALSE ),
- bBindingUpdate ( TRUE )
+ bDontUpdate ( sal_False ),
+ bIsWater ( sal_False ),
+ bEnabled ( sal_True ),
+ bUpdate ( sal_False ),
+ bUpdateFamily ( sal_False ),
+ bCanEdit ( sal_False ),
+ bCanDel ( sal_False ),
+ bCanNew ( sal_True ),
+ bWaterDisabled ( sal_False ),
+ bNewByExampleDisabled ( sal_False ),
+ bUpdateByExampleDisabled( sal_False ),
+ bTreeDrag ( sal_True ),
+ bHierarchical ( sal_False ),
+ bBindingUpdate ( sal_True )
{
aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT );
@@ -828,7 +829,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
+sal_uInt16 SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(sal_uInt16 nId)
{
const SfxStyleFamilyItem *pItem=pStyleFamilies->GetObject(nId);
return SfxFamilyIdToNId(pItem->GetFamily())-1;
@@ -836,7 +837,7 @@ USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
+void SfxTemplateDialog_Impl::EnableEdit(sal_Bool bEnable)
{
SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
if( !bEnable || !bUpdateByExampleDisabled )
@@ -846,9 +847,9 @@ void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
+sal_uInt16 SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(sal_uInt16 nId)
{
- for ( USHORT i=0;i<pStyleFamilies->Count();i++ )
+ for ( sal_uInt16 i=0;i<pStyleFamilies->Count();i++ )
if ( SfxFamilyIdToNId(pStyleFamilies->GetObject(i)->GetFamily()) == nId+1 )
return i;
DBG_ERROR("Style Nummer nicht gefunden");
@@ -861,7 +862,7 @@ USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
void SfxCommonTemplateDialog_Impl::ReadResource()
{
// globale Benutzer-Resource auslesen
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < MAX_FAMILIES; ++i)
pFamilyState[i] = 0;
@@ -877,20 +878,20 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
else
pStyleFamilies = new SfxStyleFamilies( aFamId );
- nActFilter = pCurObjShell ? static_cast< USHORT >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF;
+ nActFilter = pCurObjShell ? static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) ) : 0xFFFF;
if ( pCurObjShell && 0xFFFF == nActFilter )
nActFilter = pCurObjShell->GetAutoStyleFilterIndex();
// Einfuegen in die Toolbox
// umgekehrte Reihenfolge, da immer vorne eingefuegt wird.
- USHORT nCount = pStyleFamilies->Count();
+ sal_uInt16 nCount = pStyleFamilies->Count();
pBindings->ENTERREGISTRATIONS();
for(i = 0; i < nCount; ++i)
{
- USHORT nSlot = 0;
- switch((USHORT)pStyleFamilies->GetObject(i)->GetFamily())
+ sal_uInt16 nSlot = 0;
+ switch((sal_uInt16)pStyleFamilies->GetObject(i)->GetFamily())
{
case SFX_STYLE_FAMILY_CHAR: nSlot = SID_STYLE_FAMILY1; break;
case SFX_STYLE_FAMILY_PARA: nSlot = SID_STYLE_FAMILY2; break;
@@ -942,14 +943,14 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
for( ; nCount--; )
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject( nCount );
- USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
+ sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() );
InsertFamilyItem( nId, pItem );
}
LoadedFamilies();
- USHORT nStart = SID_STYLE_FAMILY1;
- USHORT nEnd = SID_STYLE_FAMILY4;
+ sal_uInt16 nStart = SID_STYLE_FAMILY1;
+ sal_uInt16 nEnd = SID_STYLE_FAMILY4;
for ( i = nStart; i <= nEnd; i++ )
pBindings->Update(i);
@@ -963,7 +964,7 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
{
ClearFamilyList();
DELETEX(pStyleFamilies);
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
@@ -1001,7 +1002,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
GetWindow()->Hide();
DELETEX(pStyleFamilies);
DELETEZ( m_pStyleFamiliesId );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
@@ -1020,7 +1021,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
//-------------------------------------------------------------------------
-USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
+sal_uInt16 SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
{
switch ( nFamily )
{
@@ -1035,10 +1036,10 @@ USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( SfxStyleFamily nFamily )
void SfxCommonTemplateDialog_Impl::SetAutomaticFilter()
{
- USHORT nCount = aFilterLb.GetEntryCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aFilterLb.GetEntryCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- ULONG nFlags = (ULONG)aFilterLb.GetEntryData(i);
+ sal_uIntPtr nFlags = (sal_uIntPtr)aFilterLb.GetEntryData(i);
if ( SFXSTYLEBIT_AUTO == nFlags )
{
// automatic entry found -> select it
@@ -1055,12 +1056,12 @@ void SfxCommonTemplateDialog_Impl::SetAutomaticFilter()
// Hilfsfunktion: Zugriff auf aktuelles Family-Item
const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() const
{
- const USHORT nCount = pStyleFamilies->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pStyleFamilies->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject(i);
// if(!pItem)continue;
- USHORT nId = SfxFamilyIdToNId(pItem->GetFamily());
+ sal_uInt16 nId = SfxFamilyIdToNId(pItem->GetFamily());
if(nId == nActFamily)
return pItem;
}
@@ -1079,7 +1080,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
if( pStyle )
EnableEdit( !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
else
- EnableEdit(FALSE);
+ EnableEdit(sal_False);
if ( pTreeBox )
{
@@ -1098,18 +1099,18 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
}
}
else
- pTreeBox->SelectAll( FALSE );
+ pTreeBox->SelectAll( sal_False );
}
else
{
- BOOL bSelect = ( rStr.Len() > 0 );
+ sal_Bool bSelect = ( rStr.Len() > 0 );
if ( bSelect )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)aFmtLb.FirstVisible();
while ( pEntry && aFmtLb.GetEntryText( pEntry ) != rStr )
pEntry = (SvLBoxEntry*)aFmtLb.NextVisible( pEntry );
if ( !pEntry )
- bSelect = FALSE;
+ bSelect = sal_False;
else
{
aFmtLb.MakeVisible( pEntry );
@@ -1121,8 +1122,8 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
if ( !bSelect )
{
- aFmtLb.SelectAll( FALSE );
- EnableEdit(FALSE);
+ aFmtLb.SelectAll( sal_False );
+ EnableEdit(sal_False);
}
}
}
@@ -1149,7 +1150,7 @@ String SfxCommonTemplateDialog_Impl::GetSelectedEntry() const
//-------------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::EnableTreeDrag( BOOL bEnable )
+void SfxCommonTemplateDialog_Impl::EnableTreeDrag( sal_Bool bEnable )
{
if ( pStyleSheetPool )
{
@@ -1192,14 +1193,14 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
if(pTreeBox)
((const StyleTreeListBox_Impl *)pTreeBox)->
MakeExpanded_Impl( aEntries);
- pTreeBox->SetUpdateMode( FALSE );
+ pTreeBox->SetUpdateMode( sal_False );
pTreeBox->Clear();
- const USHORT nCount = aArr.Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = aArr.Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
FillBox_Impl(pTreeBox, aArr[i], aEntries);
-// EnableEdit(FALSE);
- EnableItem(SID_STYLE_WATERCAN,FALSE);
+// EnableEdit(sal_False);
+ EnableItem(SID_STYLE_WATERCAN,sal_False);
SfxTemplateItem* pState = pFamilyState[nActFamily-1];
@@ -1212,7 +1213,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
pTreeBox->Expand( pEntry );
}
- pTreeBox->SetUpdateMode( TRUE );
+ pTreeBox->SetUpdateMode( sal_True );
String aStyle;
if(pState) //Aktuellen Eintrag selektieren
@@ -1223,7 +1224,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
}
//-------------------------------------------------------------------------
-BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
+sal_Bool SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
{
return pTreeBox? pTreeBox->FirstSelected() != 0:
aFmtLb.GetSelectionCount() != 0;
@@ -1233,7 +1234,7 @@ BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
//-------------------------------------------------------------------------
// intern: Aktualisierung der Anzeige
-void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags, was aktualisiert werden soll (s.o.)
+void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) // Flags, was aktualisiert werden soll (s.o.)
{
DBG_ASSERT(nFlags, "nichts zu tun");
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
@@ -1241,8 +1242,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
{
// Ist beim Vorlagenkatalog der Fall
SfxTemplateItem **ppItem = pFamilyState;
- const USHORT nFamilyCount = pStyleFamilies->Count();
- USHORT n;
+ const sal_uInt16 nFamilyCount = pStyleFamilies->Count();
+ sal_uInt16 n;
for(n=0;n<nFamilyCount;n++)
if(ppItem[StyleNrToInfoOffset(n)])break;
if ( n == nFamilyCount )
@@ -1257,7 +1258,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
const SfxStyleFamily eFam = pItem->GetFamily();
SfxFilterTupel *pT = pItem->GetFilterList().GetObject(nActFilter);
- USHORT nFilter = pT ? pItem->GetFilterList().GetObject(nActFilter)->nFlags : 0;
+ sal_uInt16 nFilter = pT ? pItem->GetFilterList().GetObject(nActFilter)->nFlags : 0;
if(!nFilter) // automatisch
nFilter = nAppFilter;
@@ -1268,16 +1269,16 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
pItem = GetFamilyItem_Impl();
if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY)
{
- CheckItem(nActFamily, TRUE); // Button in Toolbox checken
- aFilterLb.SetUpdateMode(FALSE);
+ CheckItem(nActFamily, sal_True); // Button in Toolbox checken
+ aFilterLb.SetUpdateMode(sal_False);
aFilterLb.Clear();
//insert hierarchical at the beginning
- USHORT nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
- aFilterLb.SetEntryData( nPos, (void*)(ULONG)SFXSTYLEBIT_ALL );
+ sal_uInt16 nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
+ aFilterLb.SetEntryData( nPos, (void*)(sal_uIntPtr)SFXSTYLEBIT_ALL );
const SfxStyleFilter& rFilter = pItem->GetFilterList();
- for(USHORT i = 0; i < rFilter.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rFilter.Count(); ++i)
{
- ULONG nFilterFlags = rFilter.GetObject(i)->nFlags;
+ sal_uIntPtr nFilterFlags = rFilter.GetObject(i)->nFlags;
nPos = aFilterLb.InsertEntry( rFilter.GetObject(i)->aName );
aFilterLb.SetEntryData( nPos, (void*)nFilterFlags );
}
@@ -1288,7 +1289,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
nActFilter = 0;
aFilterLb.SelectEntryPos(1);
SfxFilterTupel *pActT = rFilter.GetObject(nActFilter);
- USHORT nFilterFlags = pActT ? rFilter.GetObject(nActFilter)->nFlags : 0;
+ sal_uInt16 nFilterFlags = pActT ? rFilter.GetObject(nActFilter)->nFlags : 0;
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
@@ -1298,7 +1299,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
// show maximum 12 entries
aFilterLb.SetDropDownLineCount( MAX_FILTER_ENTRIES );
- aFilterLb.SetUpdateMode(TRUE);
+ aFilterLb.SetUpdateMode(sal_True);
}
else
{
@@ -1313,8 +1314,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
if(nFlags & UPDATE_FAMILY_LIST)
{
-// EnableEdit(FALSE);
- EnableItem(SID_STYLE_WATERCAN,FALSE);
+// EnableEdit(sal_False);
+ EnableItem(SID_STYLE_WATERCAN,sal_False);
SfxStyleSheetBase *pStyle = pStyleSheetPool->First();
SvLBoxEntry* pEntry = aFmtLb.First();
@@ -1323,7 +1324,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
while( pStyle )
{
//Bubblesort
- for( USHORT nPos = aStrings.Count() + 1 ; nPos-- ;)
+ for( sal_uInt16 nPos = aStrings.Count() + 1 ; nPos-- ;)
{
if( !nPos || *aStrings[nPos-1] < pStyle->GetName() )
{
@@ -1338,8 +1339,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
}
- USHORT nCount = aStrings.Count();
- USHORT nPos = 0;
+ sal_uInt16 nCount = aStrings.Count();
+ sal_uInt16 nPos = 0;
while( nPos < nCount && pEntry &&
*aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) )
{
@@ -1350,13 +1351,13 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
if( nPos < nCount || pEntry )
{
// Box mit den Vorlagen fuellen
- aFmtLb.SetUpdateMode(FALSE);
+ aFmtLb.SetUpdateMode(sal_False);
aFmtLb.Clear();
nPos = 0;
while( nPos < nCount )
aFmtLb.InsertEntry( *aStrings.GetObject( nPos++ ));
- aFmtLb.SetUpdateMode(TRUE);
+ aFmtLb.SetUpdateMode(sal_True);
}
// aktuelle Vorlage anzeigen
SfxTemplateItem *pState = pFamilyState[nActFamily-1];
@@ -1383,22 +1384,22 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
if(pItem && !bWaterDisabled)
{
CheckItem(SID_STYLE_WATERCAN, pItem->GetValue());
- EnableItem( SID_STYLE_WATERCAN, TRUE );
+ EnableItem( SID_STYLE_WATERCAN, sal_True );
}
else
if(!bWaterDisabled)
- EnableItem(SID_STYLE_WATERCAN, TRUE);
+ EnableItem(SID_STYLE_WATERCAN, sal_True);
else
- EnableItem(SID_STYLE_WATERCAN, FALSE);
+ EnableItem(SID_STYLE_WATERCAN, sal_False);
//Waehrend Giesskannenmodus Statusupdates ignorieren.
- USHORT nCount=pStyleFamilies->Count();
+ sal_uInt16 nCount=pStyleFamilies->Count();
pBindings->EnterRegistrations();
- for(USHORT n=0; n<nCount; n++)
+ for(sal_uInt16 n=0; n<nCount; n++)
{
SfxControllerItem *pCItem=pBoundItems[n];
- BOOL bChecked = pItem && pItem->GetValue();
+ sal_Bool bChecked = pItem && pItem->GetValue();
if( pCItem->IsBound() == bChecked )
{
if( !bChecked )
@@ -1416,16 +1417,16 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
// (Aktualisierung erfolgt, wenn alle Stati aktualisiert worden sind.
// Siehe auch: <SfxBindings::AddDoneHdl(const Link &)>
-void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemplateItem* pItem )
+void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* pItem )
{
- USHORT nIdx = nSlotId - SID_STYLE_FAMILY_START;
+ sal_uInt16 nIdx = nSlotId - SID_STYLE_FAMILY_START;
DELETEZ(pFamilyState[nIdx]);
if ( pItem )
pFamilyState[nIdx] = new SfxTemplateItem(*pItem);
- bUpdate = TRUE;
+ bUpdate = sal_True;
// Wenn verwendete Vorlagen ( wie zum Teufel findet man das heraus ?? )
- bUpdateFamily = TRUE;
+ bUpdateFamily = sal_True;
}
//-------------------------------------------------------------------------
@@ -1435,7 +1436,7 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemp
void SfxCommonTemplateDialog_Impl::Update_Impl()
{
- BOOL bDocChanged=FALSE;
+ sal_Bool bDocChanged=sal_False;
SfxStyleSheetBasePool* pNewPool = NULL;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell* pDocShell = pViewFrame->GetObjectShell();
@@ -1460,7 +1461,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
{
StartListening(*pNewPool);
pStyleSheetPool = pNewPool;
- bDocChanged=TRUE;
+ bDocChanged=sal_True;
}
// InvalidateBindings();
}
@@ -1468,7 +1469,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
if (bUpdateFamily)
UpdateFamily_Impl();
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < MAX_FAMILIES; ++i)
if(pFamilyState[i])
break;
@@ -1481,10 +1482,10 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
// oder Default
if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
{
- CheckItem(nActFamily, FALSE);
+ CheckItem(nActFamily, sal_False);
SfxTemplateItem **ppItem = pFamilyState;
- const USHORT nFamilyCount = pStyleFamilies->Count();
- USHORT n;
+ const sal_uInt16 nFamilyCount = pStyleFamilies->Count();
+ sal_uInt16 n;
for(n=0;n<nFamilyCount;n++)
if(ppItem[StyleNrToInfoOffset(n)])break;
ppItem+=StyleNrToInfoOffset(n);
@@ -1497,8 +1498,8 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
else if( bDocChanged )
{
// andere DocShell -> alles neu
- CheckItem( nActFamily, TRUE );
- nActFilter = static_cast< USHORT >( LoadFactoryStyleFilter( pDocShell ) );
+ CheckItem( nActFamily, sal_True );
+ nActFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pDocShell ) );
if ( 0xFFFF == nActFilter )
nActFilter = pDocShell->GetAutoStyleFilterIndex();
@@ -1513,7 +1514,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
else
{
// anderer Filter fuer automatisch
- CheckItem( nActFamily, TRUE );
+ CheckItem( nActFamily, sal_True );
const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl();
#if OSL_DEBUG_LEVEL > 1
SfxFilterTupel *pT;
@@ -1544,7 +1545,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
(void)pTim; // unused
if(!bDontUpdate)
{
- bDontUpdate=TRUE;
+ bDontUpdate=sal_True;
if(!pTreeBox)
UpdateStyles_Impl(UPDATE_FAMILY_LIST);
else
@@ -1558,7 +1559,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
EnableDelete();
}
}
- bDontUpdate=FALSE;
+ bDontUpdate=sal_False;
DELETEZ(pTimer);
}
else
@@ -1587,7 +1588,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
)
)
{
- bUpdate = FALSE;
+ bUpdate = sal_False;
Update_Impl();
}
else if ( bUpdateFamily )
@@ -1610,7 +1611,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
EnableEdit(
!(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
else
- EnableEdit(FALSE);
+ EnableEdit(sal_False);
}
}
break;
@@ -1620,7 +1621,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// Nicht sofort Update_Impl rufen, fuer den Fall da\s eines
// der Dokumente ein internes InPlaceObjekt ist!
case SFX_HINT_DOCCHANGED:
- bUpdate = TRUE;
+ bUpdate = sal_True;
break;
case SFX_HINT_DYING:
{
@@ -1635,7 +1636,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// es kann sein, da\s sich ein neuer erst anmeldet, nachdem der Timer
// abgelaufen ist - macht sich schlecht in UpdateStyles_Impl() !
- ULONG nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
+ sal_uIntPtr nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
if(!bDontUpdate && nId != SFX_HINT_DYING &&
(rHint.Type() == TYPE(SfxStyleSheetPoolHint)||
@@ -1660,8 +1661,8 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
// oder als Folge von Neu oder Bearbeiten, wenn die aktuelle
// Vorlage einem anderen Filter zugewiesen wurde.
void SfxCommonTemplateDialog_Impl::FilterSelect(
- USHORT nEntry, // Idx des neuen Filters
- BOOL bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist
+ sal_uInt16 nEntry, // Idx des neuen Filters
+ sal_Bool bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist
{
if( nEntry != nActFilter || bForce )
{
@@ -1691,9 +1692,9 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
//-------------------------------------------------------------------------
// Intern: Ausf"uhren von Funktionen "uber den Dispatcher
-BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
- USHORT nId, const String &rStr, const String& rRefStr, USHORT nFamily,
- USHORT nMask, USHORT *pIdx, const USHORT* pModifier)
+sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
+ sal_uInt16 nId, const String &rStr, const String& rRefStr, sal_uInt16 nFamily,
+ sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier)
{
SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl();
SfxStringItem aItem(nId, rStr);
@@ -1702,7 +1703,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr);
SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
const SfxPoolItem* pItems[ 6 ];
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( rStr.Len() )
pItems[ nCount++ ] = &aItem;
pItems[ nCount++ ] = &aFamily;
@@ -1722,26 +1723,26 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
Deleted aDeleted;
pbDeleted = &aDeleted;
- USHORT nModi = pModifier ? *pModifier : 0;
+ sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* pItem = rDispatcher.Execute(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
// FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag!
if ( !pItem || aDeleted() )
- return FALSE;
+ return sal_False;
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
{
SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem);
DBG_ASSERT(pFilterItem, "SfxUINT16Item erwartet");
- USHORT nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
+ sal_uInt16 nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
if(!nFilterFlags) // Benutzervorlage?
nFilterFlags = pFilterItem->GetValue();
const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
- const USHORT nFilterCount = (USHORT) pFamilyItem->GetFilterList().Count();
+ const sal_uInt16 nFilterCount = (sal_uInt16) pFamilyItem->GetFilterList().Count();
- for ( USHORT i = 0; i < nFilterCount; ++i )
+ for ( sal_uInt16 i = 0; i < nFilterCount; ++i )
{
const SfxFilterTupel *pTupel =
pFamilyItem->GetFilterList().GetObject(i);
@@ -1755,7 +1756,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
// where the local stack object is already destroyed. This would
// overwrite objects on the stack!! See #i100110
pbDeleted = NULL;
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1768,7 +1769,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
if ( !bHierarchical )
{
// TreeView einschalten
- bHierarchical=TRUE;
+ bHierarchical=sal_True;
const String aSelectEntry( GetSelectedEntry());
aFmtLb.Hide();
// aFilterLb.Disable();
@@ -1792,6 +1793,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
FillTreeBox();
SelectStyle(aSelectEntry);
+ pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
pTreeBox->Show();
}
}
@@ -1804,7 +1806,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
// Falls bHierarchical, kann sich die Familie geaendert haben
// minus one since hierarchical is inserted at the start
FilterSelect(pBox->GetSelectEntryPos() - 1, bHierarchical );
- bHierarchical=FALSE;
+ bHierarchical=sal_False;
// UpdateStyles_Impl(UPDATE_FAMILY_LIST); // Anzeige aktualisieren
}
@@ -1814,11 +1816,11 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
//-------------------------------------------------------------------------
// Select-Handler der Toolbox
-void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry)
+void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry)
{
if( nEntry != nActFamily )
{
- CheckItem( nActFamily, FALSE );
+ CheckItem( nActFamily, sal_False );
nActFamily = nEntry;
SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry );
@@ -1831,15 +1833,15 @@ void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry)
//-------------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
+void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
{
String aEmpty;
switch(nEntry)
{
case SID_STYLE_WATERCAN:
{
- const BOOL bState = IsCheckedItem(nEntry);
- BOOL bCheck;
+ const sal_Bool bState = IsCheckedItem(nEntry);
+ sal_Bool bCheck;
SfxBoolItem aBool;
// wenn eine Vorlage ausgewaehlt ist.
if(!bState && aFmtLb.GetSelectionCount())
@@ -1848,13 +1850,13 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
GetSelectedEntry());
Execute_Impl(
SID_STYLE_WATERCAN, aTemplName, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily() );
- bCheck = TRUE;
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
+ bCheck = sal_True;
}
else
{
Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
- bCheck = FALSE;
+ bCheck = sal_False;
}
CheckItem(nEntry, bCheck);
aBool.SetValue(bCheck);
@@ -1868,7 +1870,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily();
//pStyleSheetPool->GetSearchFamily();
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
- USHORT nFilter;
+ sal_uInt16 nFilter;
if(pItem&&nActFilter!=0xffff)
{
nFilter = pItem->GetFilterList().GetObject(
@@ -1889,7 +1891,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
const String aTemplName(pDlg->GetName());
Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE,
aTemplName, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily(),
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily(),
nFilter);
}
pStyleSheetPool->SetSearchMask( eFam, nFilter );
@@ -1901,7 +1903,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
{
Execute_Impl(SID_STYLE_UPDATE_BY_EXAMPLE,
aEmpty, aEmpty,
- (USHORT)GetFamilyItem_Impl()->GetFamily());
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily());
break;
}
case SID_TEMPLATE_LOAD:
@@ -1975,11 +1977,11 @@ void SfxCommonTemplateDialog_Impl::SaveFactoryStyleFilter( SfxObjectShell* i_pOb
IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox )
{
- bDontUpdate=TRUE;
+ bDontUpdate=sal_True;
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
long ret= pStyleSheetPool->SetParent(eFam,pBox->GetStyle(), pBox->GetParent())? 1L: 0L;
- bDontUpdate=FALSE;
+ bDontUpdate=sal_False;
return ret;
}
@@ -2000,7 +2002,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam=pItem->GetFamily();
- USHORT nMask;
+ sal_uInt16 nMask;
if(pItem&&nActFilter!=0xffff)
{
nMask = pItem->GetFilterList().GetObject(
@@ -2015,7 +2017,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
Execute_Impl(SID_STYLE_NEW,
aEmpty, GetSelectedEntry(),
- ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
nMask);
Application::SetDefDialogParent( pTmp );
@@ -2027,7 +2029,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
if(!pTreeBox)
{
// aFilterLb.SelectEntryPos(nFilter);
- FilterSelect(nActFilter, TRUE);
+ FilterSelect(nActFilter, sal_True);
}
else
{
@@ -2051,7 +2053,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
{
if(IsInitialized() && HasSelectedStyle())
{
- USHORT nFilter = nActFilter;
+ sal_uInt16 nFilter = nActFilter;
String aTemplName(GetSelectedEntry());
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
@@ -2065,7 +2067,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
else
Application::SetDefDialogParent( pWindow );
if ( Execute_Impl( SID_STYLE_EDIT, aTemplName, String(),
- (USHORT)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
+ (sal_uInt16)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
{
// DBG_ASSERT(nFilter < aFilterLb.GetEntryCount(), "Filter ueberindiziert");
// aTemplName = pStyle->GetName();
@@ -2073,7 +2075,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
/* if(!pTreeBox)
{
// aFilterLb.SelectEntryPos(nFilter);
- // FilterSelect(nFilter, TRUE);
+ // FilterSelect(nFilter, sal_True);
}
else
FillTreeBox();*/
@@ -2111,15 +2113,15 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
if ( pTreeBox ) // Damit die Treelistbox beim L"oschen nicht zuklappt
{
- bDontUpdate = TRUE;
+ bDontUpdate = sal_True;
}
Execute_Impl( SID_STYLE_DELETE, aTemplName,
- String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+ String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
if ( pTreeBox )
{
pTreeBox->RemoveParentKeepChilds( pTreeBox->FirstSelected() );
- bDontUpdate = FALSE;
+ bDontUpdate = sal_False;
}
}
}
@@ -2136,7 +2138,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
const String aTemplName(GetSelectedEntry());
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
- USHORT nFilter = 0;
+ sal_uInt16 nFilter = 0;
if(pItem->GetFilterList().Count() > nActFilter)
nFilter = pItem->GetFilterList().GetObject(nActFilter)->nFlags;
if(!nFilter) // automatisch
@@ -2147,16 +2149,16 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
DBG_ASSERT(pStyle, "Style nicht gefunden");
if(pStyle && pStyle->IsUserDefined())
{
- EnableDel(TRUE);
+ EnableDel(sal_True);
}
else
{
- EnableDel(FALSE);
+ EnableDel(sal_False);
}
}
else
{
- EnableDel(FALSE);
+ EnableDel(sal_False);
}
// rBindings.Invalidate( SID_STYLE_DELETE );
// rBindings.Update( SID_STYLE_DELETE );
@@ -2188,10 +2190,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
GetSelectedEntry().Len() )
{
- USHORT nModifier = aFmtLb.GetModifier();
+ sal_uInt16 nModifier = aFmtLb.GetModifier();
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(), String(),
- ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
0, 0, &nModifier );
if(ISA(SfxTemplateCatalog_Impl))
((SfxTemplateCatalog_Impl*) this)->pReal->EndDialog(RET_OK);
@@ -2219,9 +2221,9 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox
aEmpty, aEmpty, 0);
Execute_Impl(SID_STYLE_WATERCAN,
GetSelectedEntry(), aEmpty,
- ( USHORT )GetFamilyItem_Impl()->GetFamily());
+ ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily());
}
-// EnableEdit(TRUE);
+// EnableEdit(sal_True);
EnableItem(SID_STYLE_WATERCAN, !bWaterDisabled);
EnableDelete();
}
@@ -2240,16 +2242,16 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
nLastItemId = pMenu->GetCurItemId();
Application::PostUserEvent(
LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ), 0 );
- return TRUE;
+ return sal_True;
}
switch(nLastItemId) {
case ID_NEW: NewHdl(0); break;
case ID_EDIT: EditHdl(0); break;
case ID_DELETE: DeleteHdl(0); break;
- default: return FALSE;
+ default: return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2257,7 +2259,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
void SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl( const Point& rPos, Window* pWin )
{
// Bug# 94152: This part should never be called, because before this happens, the TreeListBox should captured this!
- DBG_ASSERT( FALSE, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" );
+ DBG_ASSERT( sal_False, "+SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl(): How could this happen? Please infirm developer ASAP!" );
PopupMenu* pMenu = CreateContextMenu();
pMenu->Execute( pWin, rPos );
@@ -2277,7 +2279,7 @@ SfxStyleFamily SfxCommonTemplateDialog_Impl::GetActualFamily() const
// -----------------------------------------------------------------------
-void SfxCommonTemplateDialog_Impl::EnableExample_Impl(USHORT nId, BOOL bEnable)
+void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, sal_Bool bEnable)
{
if( nId == SID_STYLE_NEW_BY_EXAMPLE )
bNewByExampleDisabled = !bEnable;
@@ -2296,9 +2298,9 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu( void )
{
if ( bBindingUpdate )
{
- pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False );
pBindings->Update( SID_STYLE_NEW );
- bBindingUpdate = FALSE;
+ bBindingUpdate = sal_False;
}
PopupMenu* pMenu = new PopupMenu( SfxResId( MN_CONTEXT_TEMPLDLG ) );
pMenu->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ) );
@@ -2317,7 +2319,7 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
SfxCommonTemplateDialog_Impl( pB, pDlgWindow ),
m_pFloat ( pDlgWindow ),
- m_bZoomIn ( FALSE ),
+ m_bZoomIn ( sal_False ),
m_aActionTbL ( pDlgWindow, this ),
m_aActionTbR ( pDlgWindow, SfxResId( TB_ACTION ) )
@@ -2338,17 +2340,17 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
// ------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+void SfxTemplateDialog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
{
m_aActionTbL.EnableItem( nId, bEnable );
}
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::InsertFamilyItem(USHORT nId,const SfxStyleFamilyItem *pItem)
+void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 nId,const SfxStyleFamilyItem *pItem)
{
rtl::OString sHelpId;
- switch( (USHORT) pItem->GetFamily() )
+ switch( (sal_uInt16) pItem->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR: sHelpId = ".uno:CharStyle"; break;
case SFX_STYLE_FAMILY_PARA: sHelpId = ".uno:ParaStyle"; break;
@@ -2382,11 +2384,11 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL );
// and set the new images on our toolbox
- USHORT nLoop = pStyleFamilies->Count();
+ sal_uInt16 nLoop = pStyleFamilies->Count();
for( ; nLoop--; )
{
const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject( nLoop );
- USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
+ sal_uInt16 nId = SfxFamilyIdToNId( pItem->GetFamily() );
m_aActionTbL.SetItemImage( nId, pItem->GetImage() );
}
}
@@ -2410,15 +2412,15 @@ void SfxTemplateDialog_Impl::ClearFamilyList()
void SfxCommonTemplateDialog_Impl::InvalidateBindings()
{
- pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, sal_True, sal_False);
pBindings->Update( SID_STYLE_NEW_BY_EXAMPLE );
- pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, sal_True, sal_False);
pBindings->Update( SID_STYLE_UPDATE_BY_EXAMPLE );
- pBindings->Invalidate( SID_STYLE_WATERCAN, TRUE, FALSE);
+ pBindings->Invalidate( SID_STYLE_WATERCAN, sal_True, sal_False);
pBindings->Update( SID_STYLE_WATERCAN );
- pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_NEW, sal_True, sal_False );
pBindings->Update( SID_STYLE_NEW );
- pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, TRUE, FALSE );
+ pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, sal_True, sal_False );
pBindings->Update( SID_STYLE_DRAGHIERARCHIE );
}
@@ -2453,9 +2455,9 @@ void SfxTemplateDialog_Impl::Resize()
FloatingWindow *pF = m_pFloat->GetFloatingWindow();
if ( pF )
{
-// if(pF->IsZoomedIn() && m_bZoomIn==FALSE)
+// if(pF->IsZoomedIn() && m_bZoomIn==sal_False)
// pF->SetText(String(SfxResId( DLG_STYLE_DESIGNER )));
-// if(!pF->IsZoomedIn() && m_bZoomIn==TRUE && GetFamilyItem_Impl())
+// if(!pF->IsZoomedIn() && m_bZoomIn==sal_True && GetFamilyItem_Impl())
// UpdateStyles_Impl(UPDATE_FAMILY); //Bereich wieder in Titel schreiben
m_bZoomIn = pF->IsRollUp();
if ( m_bZoomIn )
@@ -2545,7 +2547,7 @@ void SfxTemplateDialog_Impl::Command( const CommandEvent& rCEvt )
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck)
+void SfxTemplateDialog_Impl::EnableItem(sal_uInt16 nMesId, sal_Bool bCheck)
{
String aEmpty;
switch(nMesId)
@@ -2562,7 +2564,7 @@ void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck)
//-------------------------------------------------------------------------
-void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
+void SfxTemplateDialog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool bCheck)
{
switch(nMesId)
{
@@ -2577,7 +2579,7 @@ void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
//-------------------------------------------------------------------------
-BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId)
+sal_Bool SfxTemplateDialog_Impl::IsCheckedItem(sal_uInt16 nMesId)
{
switch(nMesId)
{
@@ -2592,7 +2594,7 @@ BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId)
IMPL_LINK_INLINE_START( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
FamilySelect(nEntry);
return 0;
}
@@ -2620,7 +2622,7 @@ IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry != SID_STYLE_NEW_BY_EXAMPLE ||
TIB_DROPDOWN != (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
ActionSelect(nEntry);
@@ -2629,7 +2631,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
//-------------------------------------------------------------------------
IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
{
- const USHORT nEntry = pBox->GetCurItemId();
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry == SID_STYLE_NEW_BY_EXAMPLE &&
TIB_DROPDOWN == (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
{
@@ -2687,7 +2689,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
//-------------------------------------------------------------------------
IMPL_LINK( SfxTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu)
{
- USHORT nMenuId = pMenu->GetCurItemId();
+ sal_uInt16 nMenuId = pMenu->GetCurItemId();
ActionSelect(nMenuId);
return 0;
}
@@ -2808,7 +2810,7 @@ IMPL_LINK( SfxTemplateCatalog_Impl, OrgHdl, Button *, pButton )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableEdit( sal_Bool bEnable )
{
SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
aChangeBtn.Enable( bEnable );
@@ -2816,13 +2818,13 @@ void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableDel( BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableDel( sal_Bool bEnable )
{
SfxCommonTemplateDialog_Impl::EnableDel( bEnable );
aDelBtn.Enable( bEnable );
}
-void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable)
+void SfxTemplateCatalog_Impl::EnableNew(sal_Bool bEnable)
{
SfxCommonTemplateDialog_Impl::EnableNew( bEnable );
aNewBtn.Enable( bEnable );
@@ -2832,7 +2834,7 @@ void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable)
IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
{
- const USHORT nEntry = aFamIds[pList->GetSelectEntryPos()];
+ const sal_uInt16 nEntry = aFamIds[pList->GetSelectEntryPos()];
FamilySelect(nEntry);
return 0;
}
@@ -2840,14 +2842,14 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
+void SfxTemplateCatalog_Impl::EnableItem( sal_uInt16 nMesId, sal_Bool bCheck )
{
if ( nMesId == SID_STYLE_WATERCAN )
aOkBtn.Enable( bCheck );
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
return;
-/* for(USHORT i=0;i<aFamIds.Count&&aFamIds[i]!=nMesId;i++);
+/* for(sal_uInt16 i=0;i<aFamIds.Count&&aFamIds[i]!=nMesId;i++);
if(i!=aFamIds.Count())
aFamList.SelectEntry(aFamIds[i]);
else
@@ -2857,22 +2859,22 @@ void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
//-------------------------------------------------------------------------
-void SfxTemplateCatalog_Impl::CheckItem(USHORT nMesId, BOOL /*bCheck*/)
+void SfxTemplateCatalog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool /*bCheck*/)
{
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
return;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ;
aFamList.SelectEntryPos(i);
}
//-------------------------------------------------------------------------
-BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId)
+sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId)
{
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
- return FALSE;
- USHORT i;
+ return sal_False;
+ sal_uInt16 i;
for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ )
;
return aFamList.IsEntrySelected( String::CreateFromInt32(i) );
@@ -2882,10 +2884,10 @@ BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId)
// Der Katalog muss nur das Disablen beherrschen, da waehrend seiner
// Lebenszeit keine Selektionsaenderungen vorgenommen werden koennen
-void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
{
if ( !bEnable )
- for ( USHORT nPos = aFamIds.Count(); nPos--; )
+ for ( sal_uInt16 nPos = aFamIds.Count(); nPos--; )
if ( aFamIds[ nPos ] == nId )
{
aFamIds.Remove( nPos );
@@ -2893,7 +2895,7 @@ void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
}
}
-void SfxTemplateCatalog_Impl::InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pItem )
+void SfxTemplateCatalog_Impl::InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pItem )
{
if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR )
return;
@@ -2914,21 +2916,21 @@ void SfxTemplateCatalog_Impl::PrepareDeleteAction()
}
-void SfxCommonTemplateDialog_Impl::SetFamily( USHORT nId )
+void SfxCommonTemplateDialog_Impl::SetFamily( sal_uInt16 nId )
{
if ( nId != nActFamily )
{
if ( nActFamily != 0xFFFF )
- CheckItem( nActFamily, FALSE );
+ CheckItem( nActFamily, sal_False );
nActFamily = nId;
if ( nId != 0xFFFF )
- bUpdateFamily = TRUE;
+ bUpdateFamily = sal_True;
}
}
void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
{
- bUpdateFamily = FALSE;
+ bUpdateFamily = sal_False;
SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
SfxViewFrame *pViewFrame = pDispat->GetFrame();
@@ -2944,10 +2946,10 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
StartListening(*pOldStyleSheetPool);
}
- bWaterDisabled = FALSE;
- bCanNew = TRUE;
- bTreeDrag = TRUE;
- bUpdateByExampleDisabled = FALSE;
+ bWaterDisabled = sal_False;
+ bCanNew = sal_True;
+ bTreeDrag = sal_True;
+ bUpdateByExampleDisabled = sal_False;
if ( pStyleSheetPool )
{
@@ -2966,7 +2968,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
// nur, wenn dieser Bereich erlaubt ist
0 != pFamilyState[ nActFamily - 1 ] )
Execute_Impl( SID_STYLE_APPLY, GetSelectedEntry(),
- String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+ String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
}
void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
{
@@ -3013,7 +3015,7 @@ DropToolBox_Impl::~DropToolBox_Impl()
sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
{
sal_Int8 nReturn = DND_ACTION_NONE;
- USHORT nItemId = GetItemId( rEvt.maPosPixel );
+ sal_uInt16 nItemId = GetItemId( rEvt.maPosPixel );
if(USHRT_MAX != nItemId && !IsItemChecked( nItemId ))
{
SetCurItemId(nItemId);
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
index 58563fb9c160..e39108ce57a9 100644
--- a/sfx2/source/dialog/templdlg.hrc
+++ b/sfx2/source/dialog/templdlg.hrc
@@ -49,4 +49,7 @@
#define BT_VLIST 9
#define BT_TOOL 10
+//IAccessibility2 Implementation 2009-----
+#define STR_STYLE_ELEMTLIST 18
+//-----IAccessibility2 Implementation 2009
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index 60979450d9f6..ff2661181434 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -143,6 +143,10 @@ ModalDialog RID_STYLECATALOG
};
};
// Strings ---------------------------------------------------------------
+String STR_STYLE_ELEMTLIST
+{
+ Text [ en-US ] = "Style List" ;
+};
String STR_STYLE_FILTER_HIERARCHICAL
{
Text [ en-US ] = "Hierarchical" ;
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 680880229324..5d41fc214786 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -256,11 +256,11 @@ namespace sfx2
}
//------------------------------------------------------------------------------------------------------------------
- USHORT TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback )
+ sal_uInt16 TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, const rtl::OString& i_nHelpId, const Link& i_rCallback )
{
// Add the menu before the closer button.
- const USHORT nItemCount( m_aToolbox.GetItemCount() );
- const USHORT nItemId( nItemCount + 1 );
+ const sal_uInt16 nItemCount( m_aToolbox.GetItemCount() );
+ const sal_uInt16 nItemId( nItemCount + 1 );
m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND );
m_aToolbox.SetHelpId( nItemId, i_nHelpId );
m_aToolbox.SetClickHdl( i_rCallback );
@@ -277,14 +277,14 @@ namespace sfx2
//------------------------------------------------------------------------------------------------------------------
IMPL_LINK( TitledDockingWindow, OnToolboxItemSelected, ToolBox*, pToolBox )
{
- const USHORT nId = pToolBox->GetCurItemId();
+ const sal_uInt16 nId = pToolBox->GetCurItemId();
if ( nId == 1 )
{
// the closer
EndTracking();
const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() );
- const SfxBoolItem aVisibility( nChildWindowId, FALSE );
+ const SfxBoolItem aVisibility( nChildWindowId, sal_False );
GetBindings().GetDispatcher()->Execute(
nChildWindowId,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
@@ -309,7 +309,7 @@ namespace sfx2
}
//------------------------------------------------------------------------------------------------------------------
- void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, BOOL i_bFloatMode )
+ void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, sal_Bool i_bFloatMode )
{
SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode );
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 0e03106b0d5e..2b815a260e3a 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -47,7 +47,7 @@
// Konstruktor
SfxTemplateControllerItem::SfxTemplateControllerItem(
- USHORT nSlotId, // ID
+ sal_uInt16 nSlotId, // ID
SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instanz, dem dieses Item zugeordnet ist.
SfxBindings &rBindings):
SfxControllerItem(nSlotId, rBindings),
@@ -68,7 +68,7 @@ SfxTemplateControllerItem::~SfxTemplateControllerItem()
// Benachrichtigung "uber Status"anderung; wird an den
// im Konstruktor "ubergebenen Controller propagiert
-void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
+void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem )
{
switch(nSID)
@@ -79,7 +79,7 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
case SID_STYLE_FAMILY4:
case SID_STYLE_FAMILY5:
{
- FASTBOOL bAvailable = SFX_ITEM_AVAILABLE == eState;
+ bool bAvailable = SFX_ITEM_AVAILABLE == eState;
if ( !bAvailable )
rTemplateDlg.SetFamilyState(GetId(), 0);
else {
@@ -88,9 +88,9 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
DBG_ASSERT(pStateItem != 0, "SfxTemplateItem erwartet");
rTemplateDlg.SetFamilyState( GetId(), pStateItem );
}
- BOOL bDisable = eState == SFX_ITEM_DISABLED;
+ sal_Bool bDisable = eState == SFX_ITEM_DISABLED;
// Familie Disablen
- USHORT nFamily = 0;
+ sal_uInt16 nFamily = 0;
switch( GetId())
{
case SID_STYLE_FAMILY1:
@@ -175,7 +175,7 @@ IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
{
case 0 :
case 1 :
- pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? TRUE : FALSE);
+ pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? sal_True : sal_False);
break;
}
pThis->rTemplateDlg.SetWaterCanState(pState);
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 566c379df508..774c7e44e7a7 100644
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -47,9 +47,9 @@ SfxTemplateItem::SfxTemplateItem() :
SfxTemplateItem::SfxTemplateItem
(
- USHORT nWhichId, // Slot-ID
+ sal_uInt16 nWhichId, // Slot-ID
const String& rStyle, // Name des aktuellen Styles
- USHORT nValue // Flags f"ur das Filtern bei automatischer Anzeige
+ sal_uInt16 nValue // Flags f"ur das Filtern bei automatischer Anzeige
) : SfxFlagItem( nWhichId, nValue ),
aStyle( rStyle )
{
@@ -84,7 +84,7 @@ SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const
}
//-------------------------------------------------------------------------
-sal_Bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
::com::sun::star::frame::status::Template aTemplate;
@@ -96,13 +96,13 @@ sal_Bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMe
}
//-------------------------------------------------------------------------
-sal_Bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
::com::sun::star::frame::status::Template aTemplate;
if ( rVal >>= aTemplate )
{
- SetValue( sal::static_int_cast< USHORT >( aTemplate.Value ) );
+ SetValue( sal::static_int_cast< sal_uInt16 >( aTemplate.Value ) );
aStyle = aTemplate.StyleName;
return sal_True;
}
@@ -112,9 +112,9 @@ sal_Bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /
//-------------------------------------------------------------------------
-BYTE SfxTemplateItem::GetFlagCount() const
+sal_uInt8 SfxTemplateItem::GetFlagCount() const
{
- return sizeof(USHORT) * 8;
+ return sizeof(sal_uInt16) * 8;
}
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index f2a0cf2790f3..51219608b75e 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -155,7 +155,7 @@ static String ConvertDateTime_Impl(const DateTime& rTime, const LocaleDataWrappe
const String pDelim ( DEFINE_CONST_UNICODE( ", "));
String aStr(rWrapper.getDate(rTime));
aStr += pDelim;
- aStr += rWrapper.getTime(rTime, TRUE, FALSE);
+ aStr += rWrapper.getTime(rTime, sal_True, sal_False);
return aStr;
}
@@ -204,7 +204,7 @@ SfxVersionsTabListBox_Impl::SfxVersionsTabListBox_Impl( Window* pParent, const R
{
}
-SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, BOOL bIsSaveVersionOnClose )
+SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, sal_Bool bIsSaveVersionOnClose )
: SfxModalDialog( NULL, SfxResId( DLG_VERSIONS ) )
, aNewGroup( this, SfxResId( GB_NEWVERSIONS ) )
, aSaveButton( this, SfxResId( PB_SAVE ) )
@@ -285,7 +285,7 @@ void SfxVersionDialog::Init_Impl()
delete mpTable;
mpTable = new SfxVersionTableDtor( aVersions );
{
- for ( USHORT n = 0; n < mpTable->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < mpTable->Count(); ++n )
{
SfxVersionInfo *pInfo = mpTable->GetObject(n);
String aEntry = ConvertDateTime_Impl( pInfo->aCreationDate, *mpLocaleWrapper );
@@ -300,7 +300,7 @@ void SfxVersionDialog::Init_Impl()
aSaveCheckBox.Check( mbIsSaveVersionOnClose );
- BOOL bEnable = !pObjShell->IsReadOnly();
+ sal_Bool bEnable = !pObjShell->IsReadOnly();
aSaveButton.Enable( bEnable );
aSaveCheckBox.Enable( bEnable );
@@ -323,7 +323,7 @@ void SfxVersionDialog::Open_Impl()
SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
SvLBoxEntry *pEntry = aVersionBox.FirstSelected();
- ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
SfxInt16Item aItem( SID_VERSION, (short)nPos+1 );
SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
@@ -410,20 +410,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
{
SfxVersionInfo aInfo;
aInfo.aAuthor = SvtUserOptions().GetFullName();
- SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, TRUE );
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, sal_True );
short nRet = pDlg->Execute();
if ( nRet == RET_OK )
{
SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment );
- pObjShell->SetModified( TRUE );
+ pObjShell->SetModified( sal_True );
const SfxPoolItem* aItems[2];
aItems[0] = &aComment;
aItems[1] = NULL;
pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems, 0 );
- aVersionBox.SetUpdateMode( FALSE );
+ aVersionBox.SetUpdateMode( sal_False );
aVersionBox.Clear();
Init_Impl();
- aVersionBox.SetUpdateMode( TRUE );
+ aVersionBox.SetUpdateMode( sal_True );
}
delete pDlg;
@@ -431,11 +431,11 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
if ( pButton == &aDeleteButton && pEntry )
{
pObjShell->GetMedium()->RemoveVersion_Impl( ((SfxVersionInfo*) pEntry->GetUserData())->aName );
- pObjShell->SetModified( TRUE );
- aVersionBox.SetUpdateMode( FALSE );
+ pObjShell->SetModified( sal_True );
+ aVersionBox.SetUpdateMode( sal_False );
aVersionBox.Clear();
Init_Impl();
- aVersionBox.SetUpdateMode( TRUE );
+ aVersionBox.SetUpdateMode( sal_True );
}
else if ( pButton == &aOpenButton && pEntry )
{
@@ -444,20 +444,20 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
else if ( pButton == &aViewButton && pEntry )
{
SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData();
- SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, FALSE );
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, sal_False );
pDlg->Execute();
delete pDlg;
}
else if ( pEntry && pButton == &aCompareButton )
{
SfxAllItemSet aSet( pObjShell->GetPool() );
- ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ sal_uIntPtr nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
aSet.Put( SfxInt16Item( SID_VERSION, (short)nPos+1 ) );
aSet.Put( SfxStringItem( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ) );
SfxItemSet* pSet = pObjShell->GetMedium()->GetItemSet();
- SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, FALSE );
- SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False );
+ SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False );
if ( pFilterItem )
aSet.Put( *pFilterItem );
if ( pFilterOptItem )
@@ -470,7 +470,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
return 0L;
}
-SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, BOOL bEdit )
+SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, sal_Bool bEdit )
: SfxModalDialog( pParent, SfxResId( DLG_COMMENTS ) )
, aDateTimeText( this, SfxResId( FT_DATETIME ) )
, aSavedByText( this, SfxResId( FT_SAVEDBY ) )
@@ -496,7 +496,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi
{
aOKButton.Hide();
aCancelButton.Hide();
- aEdit.SetReadOnly( TRUE );
+ aEdit.SetReadOnly( sal_True );
}
else
aCloseButton.Hide();
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index ff0a15e20088..1ef90b67b173 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -381,7 +381,7 @@ const SfxObjectFactory* SfxObjectFactory::GetFactory( const String& rFactoryURL
const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
{
- USHORT nVersion=0;
+ sal_uInt16 nVersion=0;
SfxFilterMatcher aMatcher ( String::CreateFromAscii( pShortName ) );
SfxFilterMatcherIter aIter( &aMatcher );
const SfxFilter *pFilter = 0;
@@ -391,7 +391,7 @@ const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
if( pTemp->IsOwnFormat() && pTemp->IsOwnTemplateFormat() && ( pTemp->GetVersion() > nVersion ) )
{
pFilter = pTemp;
- nVersion = (USHORT) pTemp->GetVersion();
+ nVersion = (sal_uInt16) pTemp->GetVersion();
}
pTemp = aIter.Next();
@@ -476,7 +476,7 @@ sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const sal_uInt16 i_nViewId, const s
SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rViewName ) const
{
- for ( USHORT nViewNo = 0;
+ for ( sal_uInt16 nViewNo = 0;
nViewNo < GetViewFactoryCount();
++nViewNo
)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 434553bdb226..63b116ef75e8 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -727,7 +727,7 @@ const String& SfxMedium::GetPhysicalName() const
//------------------------------------------------------------------
void SfxMedium::CreateFileStream()
{
- ForceSynchronStream_Impl( TRUE );
+ ForceSynchronStream_Impl( sal_True );
GetInStream();
if( pInStream )
{
@@ -767,7 +767,7 @@ sal_Bool SfxMedium::Commit()
sal_Bool SfxMedium::IsStorage()
{
if ( pImp->xStorage.is() )
- return TRUE;
+ return sal_True;
if ( bTriedStorage )
return pImp->bIsStorage;
@@ -781,13 +781,13 @@ sal_Bool SfxMedium::IsStorage()
}
pImp->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL);
if ( !pImp->bIsStorage )
- bTriedStorage = TRUE;
+ bTriedStorage = sal_True;
}
else if ( GetInStream() )
{
pImp->bIsStorage = SotStorage::IsStorageFile( pInStream ) && !SotStorage::IsOLEStorage( pInStream );
if ( !pInStream->GetError() && !pImp->bIsStorage )
- bTriedStorage = TRUE;
+ bTriedStorage = sal_True;
}
return pImp->bIsStorage;
@@ -1225,7 +1225,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
// the error should be set in case it is storing process
// or the document has been opened for editing explicitly
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) )
SetError( ERRCODE_IO_ACCESSDENIED, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
else
@@ -1337,7 +1337,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
SFX_ITEMSET_ARG( pSet, pVersion, SfxInt16Item, SID_VERSION, sal_False);
- BOOL bResetStorage = FALSE;
+ sal_Bool bResetStorage = sal_False;
if ( pVersion && pVersion->GetValue() )
{
// Alle verf"ugbaren Versionen einlesen
@@ -1388,11 +1388,11 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
pImp->aVersions.realloc(0);
}
else
- bResetStorage = TRUE;
+ bResetStorage = sal_True;
}
}
else
- bResetStorage = TRUE;
+ bResetStorage = sal_True;
}
if ( bResetStorage )
@@ -1645,7 +1645,7 @@ sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
sal_Bool bTransactStarted = sal_False;
SFX_ITEMSET_ARG( GetItemSet(), pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False );
SFX_ITEMSET_ARG( GetItemSet(), pRename, SfxBoolItem, SID_RENAME, sal_False );
- sal_Bool bRename = pRename ? pRename->GetValue() : FALSE;
+ sal_Bool bRename = pRename ? pRename->GetValue() : sal_False;
sal_Bool bOverWrite = pOverWrite ? pOverWrite->GetValue() : !bRename;
try
@@ -2269,7 +2269,7 @@ void SfxMedium::GetMedium_Impl()
{
GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, aFileName ) );
if( !(nStorOpenMode & STREAM_WRITE ) )
- GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
if (xInteractionHandler.is())
GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny(xInteractionHandler) ) );
}
@@ -2413,7 +2413,7 @@ void SfxMedium::Init_Impl()
Reference< XOutputStream > rOutStream;
// TODO/LATER: handle lifetime of storages
- pImp->bDisposeStorage = FALSE;
+ pImp->bDisposeStorage = sal_False;
SFX_ITEMSET_ARG( pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
if ( pSalvageItem && !pSalvageItem->GetValue().Len() )
@@ -2469,7 +2469,7 @@ void SfxMedium::Init_Impl()
if ( aLogicName.Len() )
{
// if the logic name is set it should be set in MediaDescriptor as well
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if ( !pFileNameItem )
{
// let the ItemSet be created if necessary
@@ -2515,7 +2515,7 @@ SfxMedium::SfxMedium( const SfxMedium& rMedium, sal_Bool bTemporary )
//------------------------------------------------------------------
-void SfxMedium::UseInteractionHandler( BOOL bUse )
+void SfxMedium::UseInteractionHandler( sal_Bool bUse )
{
pImp->bAllowDefaultIntHdl = bUse;
}
@@ -2649,12 +2649,12 @@ void SfxMedium::Close()
pImp->xLockBytes.Clear();
if ( pSet )
pSet->ClearItem( SID_INPUTSTREAM );
- aStorage->SetDeleteStream( TRUE );
+ aStorage->SetDeleteStream( sal_True );
}
else if ( pStream && pStream == pOutStream )
{
pOutStream = NULL;
- aStorage->SetDeleteStream( TRUE );
+ aStorage->SetDeleteStream( sal_True );
} */
CloseStorage();
@@ -2682,12 +2682,12 @@ void SfxMedium::CloseAndRelease()
pImp->xLockBytes.Clear();
if ( pSet )
pSet->ClearItem( SID_INPUTSTREAM );
- aStorage->SetDeleteStream( TRUE );
+ aStorage->SetDeleteStream( sal_True );
}
else if ( pStream && pStream == pOutStream )
{
pOutStream = NULL;
- aStorage->SetDeleteStream( TRUE );
+ aStorage->SetDeleteStream( sal_True );
} */
CloseStorage();
@@ -2811,7 +2811,7 @@ void SfxMedium::SetIsRemote_Impl()
case INET_PROT_IMAP:
// case INET_PROT_OUT:
case INET_PROT_VIM:
- bRemote = TRUE; break;
+ bRemote = sal_True; break;
default:
bRemote = ( GetName().CompareToAscii( "private:msgid", 13 ) == COMPARE_EQUAL );
break;
@@ -2888,8 +2888,8 @@ sal_Bool SfxMedium::Exists( sal_Bool /*bForceSession*/ )
void SfxMedium::ReOpen()
{
- BOOL bUseInteractionHandler = pImp->bUseInteractionHandler;
- pImp->bUseInteractionHandler = FALSE;
+ sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler;
+ pImp->bUseInteractionHandler = sal_False;
GetMedium_Impl();
pImp->bUseInteractionHandler = bUseInteractionHandler;
}
@@ -2899,8 +2899,8 @@ void SfxMedium::ReOpen()
void SfxMedium::CompleteReOpen()
{
// do not use temporary file for reopen and in case of success throw the temporary file away
- BOOL bUseInteractionHandler = pImp->bUseInteractionHandler;
- pImp->bUseInteractionHandler = FALSE;
+ sal_Bool bUseInteractionHandler = pImp->bUseInteractionHandler;
+ pImp->bUseInteractionHandler = sal_False;
::utl::TempFile* pTmpFile = NULL;
if ( pImp->pTempFile )
@@ -2978,7 +2978,7 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b
// if an URL is provided in SalvageItem that means that the FileName refers to a temporary file
// that must be copied here
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if (!pFileNameItem) throw uno::RuntimeException();
::rtl::OUString aNewTempFileURL = SfxMedium::CreateTempCopyWithExt( pFileNameItem->GetValue() );
if ( aNewTempFileURL.getLength() )
@@ -2995,16 +2995,16 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b
}
}
- BOOL bReadOnly = FALSE;
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ sal_Bool bReadOnly = sal_False;
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pReadOnlyItem && pReadOnlyItem->GetValue() )
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
- SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
if (!pFileNameItem) throw uno::RuntimeException();
aLogicName = pFileNameItem->GetValue();
nStorOpenMode = bReadOnly ? SFX_STREAM_READONLY : SFX_STREAM_READWRITE;
- bDirect = FALSE;
+ bDirect = sal_False;
Init_Impl();
}
@@ -3022,7 +3022,7 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const Str
Init_Impl();
pImp->xStorage = rStor;
- pImp->bDisposeStorage = FALSE;
+ pImp->bDisposeStorage = sal_False;
// always take BaseURL first, could be overwritten by ItemSet
GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, rBaseURL ) );
@@ -3104,7 +3104,7 @@ sal_uInt32 SfxMedium::GetMIMEAndRedirect( String& /*rName*/ )
if( eProt == INET_PROT_FTP && SvBinding::ShouldUseFtpProxy( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) )
{
Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) );
- sal_Bool bIsFolder = FALSE;
+ sal_Bool bIsFolder = sal_False;
if ( ( aAny >>= bIsFolder ) && bIsFolder )
return ERRCODE_NONE;
}
@@ -3304,7 +3304,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
sal_uInt16 nKey;
for ( nKey=0; nKey<aLongs.Count(); nKey++ )
- if ( aLongs[nKey] > ( ULONG ) nKey+1 )
+ if ( aLongs[nKey] > ( sal_uIntPtr ) nKey+1 )
break;
String aRevName = DEFINE_CONST_UNICODE( "Version" );
@@ -3595,7 +3595,7 @@ void SfxMedium::SetCharset( ::rtl::OUString aChs )
sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::OUString& aODFVersion, sal_Bool bHasValidDocumentSignature )
{
- sal_Bool bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
// the medium should be closed to be able to sign, the caller is responsible to close it
if ( !IsOpen() && !GetError() )
@@ -3658,7 +3658,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
// the temporary file has been written, commit it to the original file
Commit();
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
else
@@ -3677,7 +3677,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
// the temporary file has been written, commit it to the original file
Commit();
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
}
@@ -3722,12 +3722,12 @@ void SfxMedium::SetCachedSignatureState_Impl( sal_uInt16 nState )
pImp->m_nSignatureState = nState;
}
-BOOL SfxMedium::HasStorage_Impl() const
+sal_Bool SfxMedium::HasStorage_Impl() const
{
return pImp->xStorage.is();
}
-BOOL SfxMedium::IsOpen() const
+sal_Bool SfxMedium::IsOpen() const
{
return pInStream || pOutStream || pImp->xStorage.is();
}
@@ -3834,7 +3834,7 @@ sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteraction
// remove the readonly state
sal_Bool bWasReadonly = sal_False;
nStorOpenMode = SFX_STREAM_READWRITE;
- SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
if ( pReadOnlyItem && pReadOnlyItem->GetValue() )
bWasReadonly = sal_True;
GetItemSet()->ClearItem( SID_DOC_READONLY );
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 1219d30d7b27..516f6c549b4b 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -177,7 +177,7 @@ String SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
return pType ? String::CreateFromAscii(pType) : String();
}
-String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, BOOL bTemplate,
+String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, sal_Bool bTemplate,
String* pFilterName )
throw ( beans::UnknownPropertyException,
lang::WrappedTargetException,
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index d0f6678d8641..bd23bf5659d0 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -290,7 +290,7 @@ uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(GDIMetaFile* i_pThumb)
SvMemoryStream aStream;
// magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
- aBitmap.GetBitmap().Write( aStream, FALSE, FALSE );
+ aBitmap.GetBitmap().Write( aStream, sal_False, sal_False );
// uno::Sequence<sal_uInt8> aSeq(aStream.GetSize()); // WRONG
aStream.Seek(STREAM_SEEK_TO_END);
uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 360854dc3dbf..e03f18691a09 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -111,9 +111,9 @@ SfxMedium* DocumentInserter::CreateMedium()
DBG_ASSERT( m_pURLList->Count() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
String sURL = *( m_pURLList->GetObject(0) );
pMedium = new SfxMedium(
- sURL, SFX_STREAM_READONLY, FALSE,
+ sURL, SFX_STREAM_READONLY, sal_False,
SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SfxFilterMatcher* pMatcher = NULL;
if ( m_sDocFactory.Len() )
pMatcher = new SfxFilterMatcher( m_sDocFactory );
@@ -121,7 +121,7 @@ SfxMedium* DocumentInserter::CreateMedium()
pMatcher = new SfxFilterMatcher();
const SfxFilter* pFilter = NULL;
- sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, FALSE );
+ sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, sal_False );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
@@ -145,16 +145,16 @@ SfxMediumList* DocumentInserter::CreateMediumList()
sal_Int32 nCount = m_pURLList->Count();
for ( ; i < nCount; ++i )
{
- String sURL = *( m_pURLList->GetObject( static_cast< USHORT >(i) ) );
+ String sURL = *( m_pURLList->GetObject( static_cast< sal_uInt16 >(i) ) );
SfxMedium* pMedium = new SfxMedium(
- sURL, SFX_STREAM_READONLY, FALSE,
+ sURL, SFX_STREAM_READONLY, sal_False,
SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SfxFilterMatcher aMatcher( m_sDocFactory );
const SfxFilter* pFilter = NULL;
- sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, FALSE );
+ sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, sal_False );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
@@ -180,7 +180,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, SvStringsDtor*& _rpURL
{
_rpURLList = new SvStringsDtor;
- for ( USHORT i = 0; i < aPathSeq.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aPathSeq.getLength(); ++i )
{
INetURLObject aPathObj( aPathSeq[i] );
String* pURL = new String( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
index e6726e97e96d..7a3c4a66f443 100644
--- a/sfx2/source/doc/doctdlg.cxx
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -112,8 +112,8 @@ void SfxDocumentTemplateDlg::Init()
if(!pTemplates->IsConstructed())
pTemplates->Construct();
- const USHORT nCount = pTemplates->GetRegionCount();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = pTemplates->GetRegionCount();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(pTemplates->GetFullRegionName(i));
if(!nCount)
aRegionLb.InsertEntry(String(SfxResId(STR_STANDARD)));
@@ -144,10 +144,10 @@ IMPL_LINK( SfxDocumentTemplateDlg, OrganizeHdl, Button *, pButton )
if(RET_OK == nRet)
{
// View aktualisieren
- aRegionLb.SetUpdateMode( FALSE );
+ aRegionLb.SetUpdateMode( sal_False );
aRegionLb.Clear();
Init();
- aRegionLb.SetUpdateMode( TRUE );
+ aRegionLb.SetUpdateMode( sal_True );
aRegionLb.Invalidate();
aRegionLb.Update();
aCancelBt.SetText(String(SfxResId(STR_CLOSE)));
@@ -177,14 +177,14 @@ IMPL_LINK( SfxDocumentTemplateDlg, OkHdl, Control *, pControl )
IMPL_LINK( SfxDocumentTemplateDlg, RegionSelect, ListBox *, pBox )
{
- const USHORT nRegion = pBox->GetSelectEntryPos();
- const USHORT nCount = pTemplates->GetCount(nRegion);
- aTemplateLb.SetUpdateMode(FALSE);
+ const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
+ const sal_uInt16 nCount = pTemplates->GetCount(nRegion);
+ aTemplateLb.SetUpdateMode(sal_False);
aTemplateLb.Clear();
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(pTemplates->GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0);
- aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.SetUpdateMode(sal_True);
aTemplateLb.Invalidate();
aTemplateLb.Update();
return 0;
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index f962542aac10..5b9b03f4b673 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -197,7 +197,7 @@ public:
void SetTargetURL( const OUString& rURL ) { maTargetURL = rURL; }
void SetHierarchyURL( const OUString& rURL) { maOwnURL = rURL; }
- DocTempl_EntryData_Impl* GetEntry( ULONG nIndex ) const;
+ DocTempl_EntryData_Impl* GetEntry( sal_uIntPtr nIndex ) const;
DocTempl_EntryData_Impl* GetEntry( const OUString& rName ) const;
DocTempl_EntryData_Impl* GetByTargetURL( const OUString& rName ) const;
@@ -205,14 +205,14 @@ public:
const OUString& GetTargetURL();
const OUString& GetHierarchyURL();
- ULONG GetCount() const;
+ sal_uIntPtr GetCount() const;
void SetTitle( const OUString& rTitle ) { maTitle = rTitle; }
void AddEntry( const OUString& rTitle,
const OUString& rTargetURL,
- USHORT *pPos = NULL );
- void DeleteEntry( ULONG nIndex );
+ sal_uInt16 *pPos = NULL );
+ void DeleteEntry( sal_uIntPtr nIndex );
int Compare( const OUString& rTitle ) const
{ return maTitle.compareTo( rTitle ); }
@@ -258,12 +258,12 @@ public:
void Rescan();
- void DeleteRegion( ULONG nIndex );
+ void DeleteRegion( sal_uIntPtr nIndex );
- ULONG GetRegionCount() const
+ sal_uIntPtr GetRegionCount() const
{ return maRegions.Count(); }
RegionData_Impl* GetRegion( const OUString& rName ) const;
- RegionData_Impl* GetRegion( ULONG nIndex ) const;
+ RegionData_Impl* GetRegion( sal_uIntPtr nIndex ) const;
void GetTemplates( Content& rTargetFolder,
Content& rParentFolder,
RegionData_Impl* pRegion );
@@ -272,7 +272,7 @@ public:
sal_Bool& rFound ) const;
sal_Bool GetTitleFromURL( const OUString& rURL, OUString& aTitle );
- sal_Bool InsertRegion( RegionData_Impl *pData, ULONG nPos = LIST_APPEND );
+ sal_Bool InsertRegion( RegionData_Impl *pData, sal_uIntPtr nPos = LIST_APPEND );
OUString GetRootURL() const { return maRootURL; }
uno::Reference< XDocumentTemplates > getDocTemplates() { return mxTemplates; }
@@ -321,7 +321,7 @@ static sal_Bool getTextProperty_Impl( Content& rContent,
String SfxDocumentTemplates::GetFullRegionName
(
- USHORT nIdx // Index des Bereiches
+ sal_uInt16 nIdx // Index des Bereiches
) const
/* [Beschreibung]
@@ -358,7 +358,7 @@ String SfxDocumentTemplates::GetFullRegionName
const String& SfxDocumentTemplates::GetRegionName
(
- USHORT nIdx // Index des Bereiches
+ sal_uInt16 nIdx // Index des Bereiches
) const
/* [Beschreibung]
@@ -394,7 +394,7 @@ const String& SfxDocumentTemplates::GetRegionName
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetRegionNo
+sal_uInt16 SfxDocumentTemplates::GetRegionNo
(
const String &rRegion // Name der Region
) const
@@ -406,7 +406,7 @@ USHORT SfxDocumentTemplates::GetRegionNo
[R"uckgabewert]
- USHORT Index von 'rRegion' oder USHRT_MAX falls unbekannt
+ sal_uInt16 Index von 'rRegion' oder USHRT_MAX falls unbekannt
*/
{
@@ -416,10 +416,10 @@ USHORT SfxDocumentTemplates::GetRegionNo
return USHRT_MAX;
sal_Bool bFound;
- ULONG nIndex = pImp->GetRegionPos( rRegion, bFound );
+ sal_uIntPtr nIndex = pImp->GetRegionPos( rRegion, bFound );
if ( bFound )
- return (USHORT) nIndex;
+ return (sal_uInt16) nIndex;
else
return USHRT_MAX;
}
@@ -427,7 +427,7 @@ USHORT SfxDocumentTemplates::GetRegionNo
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetRegionCount() const
+sal_uInt16 SfxDocumentTemplates::GetRegionCount() const
/* [Beschreibung]
@@ -436,7 +436,7 @@ USHORT SfxDocumentTemplates::GetRegionCount() const
[R"uckgabewert]
- USHORT Anzahl der Bereiche
+ sal_uInt16 Anzahl der Bereiche
*/
{
@@ -445,14 +445,14 @@ USHORT SfxDocumentTemplates::GetRegionCount() const
if ( !pImp->Construct() )
return 0;
- ULONG nCount = pImp->GetRegionCount();
+ sal_uIntPtr nCount = pImp->GetRegionCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
-sal_Bool SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const
+sal_Bool SfxDocumentTemplates::IsRegionLoaded( sal_uInt16 nIdx ) const
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -469,7 +469,7 @@ sal_Bool SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetCount
+sal_uInt16 SfxDocumentTemplates::GetCount
(
const String& rName /* Name des Bereiches, dessen Eintrags-
anzahl ermittelt werden soll */
@@ -494,19 +494,19 @@ USHORT SfxDocumentTemplates::GetCount
return 0;
RegionData_Impl *pData = pImp->GetRegion( rName );
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
if ( pData )
nCount = pData->GetCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
-USHORT SfxDocumentTemplates::GetCount
+sal_uInt16 SfxDocumentTemplates::GetCount
(
- USHORT nRegion /* Index des Bereiches, dessen Eintrags-
+ sal_uInt16 nRegion /* Index des Bereiches, dessen Eintrags-
anzahl ermittelt werden soll */
) const
@@ -527,20 +527,20 @@ USHORT SfxDocumentTemplates::GetCount
return 0;
RegionData_Impl *pData = pImp->GetRegion( nRegion );
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
if ( pData )
nCount = pData->GetCount();
- return (USHORT) nCount;
+ return (sal_uInt16) nCount;
}
//------------------------------------------------------------------------
const String& SfxDocumentTemplates::GetName
(
- USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
- USHORT nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ sal_uInt16 nIdx // Index des Eintrags
) const
/* [Beschreibung]
@@ -582,8 +582,8 @@ const String& SfxDocumentTemplates::GetName
String SfxDocumentTemplates::GetFileName
(
- USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
- USHORT nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ sal_uInt16 nIdx // Index des Eintrags
) const
/* [Beschreibung]
@@ -619,8 +619,8 @@ String SfxDocumentTemplates::GetFileName
String SfxDocumentTemplates::GetPath
(
- USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
- USHORT nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ sal_uInt16 nIdx // Index des Eintrags
) const
/* [Beschreibung]
@@ -656,7 +656,7 @@ String SfxDocumentTemplates::GetPath
String SfxDocumentTemplates::GetTemplatePath
(
- USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
const String& rLongName // logischer Name des Eintrags
) const
@@ -845,7 +845,7 @@ sal_Bool SfxDocumentTemplates::SaveDir
void SfxDocumentTemplates::NewTemplate
(
- USHORT nRegion, /* Index des Bereiches, in dem die Vorlage
+ sal_uInt16 nRegion, /* Index des Bereiches, in dem die Vorlage
angelegt werden soll */
const String& rLongName, // logischer Name der neuen Vorlage
@@ -889,10 +889,10 @@ void SfxDocumentTemplates::NewTemplate
sal_Bool SfxDocumentTemplates::CopyOrMove
(
- USHORT nTargetRegion, // Index des Zielbereiches
- USHORT nTargetIdx, // Index Zielposition
- USHORT nSourceRegion, // Index des Quellbereiches
- USHORT nSourceIdx, /* Index der zu kopierenden / zu verschiebenden
+ sal_uInt16 nTargetRegion, // Index des Zielbereiches
+ sal_uInt16 nTargetIdx, // Index Zielposition
+ sal_uInt16 nSourceRegion, // Index des Quellbereiches
+ sal_uInt16 nSourceIdx, /* Index der zu kopierenden / zu verschiebenden
Dokumentvorlage */
sal_Bool bMove // kopieren / verschieben
)
@@ -910,8 +910,8 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
Aktion konnte nicht ausgef2uhrt werden
[Querverweise]
- <SfxDocumentTemplates::Move(USHORT,USHORT,USHORT,USHORT)>
- <SfxDocumentTemplates::Copy(USHORT,USHORT,USHORT,USHORT)>
+ <SfxDocumentTemplates::Move(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
+ <SfxDocumentTemplates::Copy(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
*/
{
@@ -1014,10 +1014,10 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
sal_Bool SfxDocumentTemplates::Move
(
- USHORT nTargetRegion, // Index des Zielbereiches
- USHORT nTargetIdx, // Index Zielposition
- USHORT nSourceRegion, // Index des Quellbereiches
- USHORT nSourceIdx /* Index der zu kopierenden / zu verschiebenden
+ sal_uInt16 nTargetRegion, // Index des Zielbereiches
+ sal_uInt16 nTargetIdx, // Index Zielposition
+ sal_uInt16 nSourceRegion, // Index des Quellbereiches
+ sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden
Dokumentvorlage */
)
@@ -1036,7 +1036,7 @@ sal_Bool SfxDocumentTemplates::Move
[Querverweise]
- <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)>
+ <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -1049,10 +1049,10 @@ sal_Bool SfxDocumentTemplates::Move
sal_Bool SfxDocumentTemplates::Copy
(
- USHORT nTargetRegion, // Index des Zielbereiches
- USHORT nTargetIdx, // Index Zielposition
- USHORT nSourceRegion, // Index des Quellbereiches
- USHORT nSourceIdx /* Index der zu kopierenden / zu verschiebenden
+ sal_uInt16 nTargetRegion, // Index des Zielbereiches
+ sal_uInt16 nTargetIdx, // Index Zielposition
+ sal_uInt16 nSourceRegion, // Index des Quellbereiches
+ sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden
Dokumentvorlage */
)
@@ -1071,7 +1071,7 @@ sal_Bool SfxDocumentTemplates::Copy
[Querverweise]
- <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,sal_Bool)>
+ <SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
{
@@ -1085,9 +1085,9 @@ sal_Bool SfxDocumentTemplates::Copy
sal_Bool SfxDocumentTemplates::CopyTo
(
- USHORT nRegion, /* Bereich der Vorlage, die exportiert werden
+ sal_uInt16 nRegion, /* Bereich der Vorlage, die exportiert werden
soll */
- USHORT nIdx, /* Index der Vorlage, die exportiert werden
+ sal_uInt16 nIdx, /* Index der Vorlage, die exportiert werden
soll */
const String& rName /* Dateiname, unter dem die Vorlage angelegt
werden soll */
@@ -1109,7 +1109,7 @@ sal_Bool SfxDocumentTemplates::CopyTo
[Querverweise]
- <SfxDocumentTemplates::CopyFrom(USHORT,USHORT,String&)>
+ <SfxDocumentTemplates::CopyFrom(sal_uInt16,sal_uInt16,String&)>
*/
{
@@ -1164,9 +1164,9 @@ sal_Bool SfxDocumentTemplates::CopyTo
sal_Bool SfxDocumentTemplates::CopyFrom
(
- USHORT nRegion, /* Bereich, in den die Vorlage importiert
+ sal_uInt16 nRegion, /* Bereich, in den die Vorlage importiert
werden soll */
- USHORT nIdx, // Index der neuen Vorlage in diesem Bereich
+ sal_uInt16 nIdx, // Index der neuen Vorlage in diesem Bereich
String& rName /* Dateiname der Vorlage, die importiert
werden soll, als out-Parameter der (auto-
matisch aus dem Dateinamen generierte)
@@ -1188,7 +1188,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom
[Querverweise]
- <SfxDocumentTemplates::CopyTo(USHORT,USHORT,const String&)>
+ <SfxDocumentTemplates::CopyTo(sal_uInt16,sal_uInt16,const String&)>
*/
{
@@ -1313,8 +1313,8 @@ sal_Bool SfxDocumentTemplates::CopyFrom
sal_Bool SfxDocumentTemplates::Delete
(
- USHORT nRegion, // Index des Bereiches
- USHORT nIdx /* Index des Eintrags oder USHRT_MAX,
+ sal_uInt16 nRegion, // Index des Bereiches
+ sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX,
wenn ein Verzeichnis gemeint ist. */
)
@@ -1334,7 +1334,7 @@ sal_Bool SfxDocumentTemplates::Delete
[Querverweise]
- <SfxDocumentTemplates::InsertDir(const String&,USHORT)>
+ <SfxDocumentTemplates::InsertDir(const String&,sal_uInt16)>
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
<SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
*/
@@ -1384,7 +1384,7 @@ sal_Bool SfxDocumentTemplates::Delete
sal_Bool SfxDocumentTemplates::InsertDir
(
const String& rText, // der logische Name des neuen Bereiches
- USHORT nRegion // Index des Bereiches
+ sal_uInt16 nRegion // Index des Bereiches
)
/* [Beschreibung]
@@ -1438,8 +1438,8 @@ sal_Bool SfxDocumentTemplates::InsertDir
sal_Bool SfxDocumentTemplates::SetName
(
const String& rName, // Der zu setzende Name
- USHORT nRegion, // Index des Bereiches
- USHORT nIdx /* Index des Eintrags oder USHRT_MAX,
+ sal_uInt16 nRegion, // Index des Bereiches
+ sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX,
wenn ein Verzeichnis gemeint ist. */
)
@@ -1550,8 +1550,8 @@ sal_Bool SfxDocumentTemplates::Rescan()
SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
(
- USHORT nRegion, // Index des Bereiches
- USHORT nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Index des Bereiches
+ sal_uInt16 nIdx // Index des Eintrags
)
/* [Beschreibung]
@@ -1567,7 +1567,7 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
[Querverweise]
<SfxTemplateDirEntry::CreateObjectShell()>
- <SfxDocumentTemplates::DeleteObjectShell(USHORT, USHORT)>
+ <SfxDocumentTemplates::DeleteObjectShell(sal_uInt16, sal_uInt16)>
*/
{
@@ -1592,8 +1592,8 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
sal_Bool SfxDocumentTemplates::DeleteObjectShell
(
- USHORT nRegion, // Index des Bereiches
- USHORT nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Index des Bereiches
+ sal_uInt16 nIdx // Index des Eintrags
)
/* [Beschreibung]
@@ -1612,7 +1612,7 @@ sal_Bool SfxDocumentTemplates::DeleteObjectShell
[Querverweise]
<SfxTemplateDirEntry::DeleteObjectShell()>
- <SfxDocumentTemplates::CreateObjectShell(USHORT, USHORT)>
+ <SfxDocumentTemplates::CreateObjectShell(sal_uInt16, sal_uInt16)>
*/
{
@@ -1673,9 +1673,9 @@ sal_Bool SfxDocumentTemplates::GetFull
return sal_False;
DocTempl_EntryData_Impl* pEntry = NULL;
- const USHORT nCount = GetRegionCount();
+ const sal_uInt16 nCount = GetRegionCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
RegionData_Impl *pRegion = pImp->GetRegion( i );
@@ -1739,16 +1739,16 @@ sal_Bool SfxDocumentTemplates::GetLogicNames
DocTempl_EntryData_Impl *pEntry = NULL;
sal_Bool bFound = sal_False;
- ULONG nCount = GetRegionCount();
+ sal_uIntPtr nCount = GetRegionCount();
- for ( ULONG i=0; !bFound && (i<nCount); i++ )
+ for ( sal_uIntPtr i=0; !bFound && (i<nCount); i++ )
{
pData = pImp->GetRegion( i );
if ( pData )
{
- ULONG nChildCount = pData->GetCount();
+ sal_uIntPtr nChildCount = pData->GetCount();
- for ( ULONG j=0; !bFound && (j<nChildCount); j++ )
+ for ( sal_uIntPtr j=0; !bFound && (j<nChildCount); j++ )
{
pEntry = pData->GetEntry( j );
if ( pEntry->GetTargetURL() == aPath )
@@ -1913,7 +1913,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
SfxMedium *pMed=new SfxMedium(
aTargetURL,(STREAM_STD_READWRITE | STREAM_SHARE_DENYALL), sal_False, 0 );
const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
+ pMed->UseInteractionHandler(sal_True);
if( pSfxApp->GetFilterMatcher().GuessFilter(
*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) ||
(pFilter && !pFilter->IsOwnFormat()) ||
@@ -1923,7 +1923,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
aTargetURL );
delete pMed;
mbDidConvert=sal_True;
- ULONG lErr;
+ sal_uIntPtr lErr;
if ( mxObjShell.Is() ) {
lErr = pSfxApp->LoadTemplate( mxObjShell,aTargetURL);
if( lErr != ERRCODE_NONE )
@@ -1954,7 +1954,7 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
}
//------------------------------------------------------------------------
-BOOL DocTempl_EntryData_Impl::DeleteObjectShell()
+sal_Bool DocTempl_EntryData_Impl::DeleteObjectShell()
{
sal_Bool bRet = sal_True;
@@ -2072,8 +2072,8 @@ long RegionData_Impl::GetEntryPos( const OUString& rTitle,
sal_Bool& rFound ) const
{
#if 1 // Don't use binary search today
- ULONG i;
- ULONG nCount = maEntries.Count();
+ sal_uIntPtr i;
+ sal_uIntPtr nCount = maEntries.Count();
for ( i=0; i<nCount; i++ )
{
@@ -2132,7 +2132,7 @@ long RegionData_Impl::GetEntryPos( const OUString& rTitle,
// -----------------------------------------------------------------------
void RegionData_Impl::AddEntry( const OUString& rTitle,
const OUString& rTargetURL,
- USHORT *pPos )
+ sal_uInt16 *pPos )
{
INetURLObject aLinkObj( GetHierarchyURL() );
aLinkObj.insertName( rTitle, false,
@@ -2161,7 +2161,7 @@ void RegionData_Impl::AddEntry( const OUString& rTitle,
}
// -----------------------------------------------------------------------
-ULONG RegionData_Impl::GetCount() const
+sal_uIntPtr RegionData_Impl::GetCount() const
{
return maEntries.Count();
}
@@ -2227,9 +2227,9 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetByTargetURL( const OUString& rName
{
DocTempl_EntryData_Impl *pEntry;
- ULONG nCount = maEntries.Count();
+ sal_uIntPtr nCount = maEntries.Count();
- for ( ULONG i=0; i<nCount; i++ )
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
pEntry = maEntries.GetObject( i );
if ( pEntry && ( pEntry->GetTargetURL() == rName ) )
@@ -2240,20 +2240,20 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetByTargetURL( const OUString& rName
}
// -----------------------------------------------------------------------
-DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( ULONG nIndex ) const
+DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( sal_uIntPtr nIndex ) const
{
return maEntries.GetObject( nIndex );
}
// -----------------------------------------------------------------------
-void RegionData_Impl::DeleteEntry( ULONG nIndex )
+void RegionData_Impl::DeleteEntry( sal_uIntPtr nIndex )
{
DocTempl_EntryData_Impl *pEntry = maEntries.GetObject( nIndex );
if ( pEntry )
{
delete pEntry;
- maEntries.Remove( (ULONG) nIndex );
+ maEntries.Remove( (sal_uIntPtr) nIndex );
}
}
@@ -2299,7 +2299,7 @@ void SfxDocTemplate_Impl::DecrementLock()
}
// -----------------------------------------------------------------------
-RegionData_Impl* SfxDocTemplate_Impl::GetRegion( ULONG nIndex ) const
+RegionData_Impl* SfxDocTemplate_Impl::GetRegion( sal_uIntPtr nIndex ) const
{
return maRegions.GetObject( nIndex );
}
@@ -2308,10 +2308,10 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( ULONG nIndex ) const
RegionData_Impl* SfxDocTemplate_Impl::GetRegion( const OUString& rName )
const
{
- ULONG nCount = maRegions.Count();
+ sal_uIntPtr nCount = maRegions.Count();
RegionData_Impl *pData;
- for ( ULONG i=0; i<nCount; i++ )
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
pData = maRegions.GetObject( i );
@@ -2323,14 +2323,14 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( const OUString& rName )
}
// -----------------------------------------------------------------------
-void SfxDocTemplate_Impl::DeleteRegion( ULONG nIndex )
+void SfxDocTemplate_Impl::DeleteRegion( sal_uIntPtr nIndex )
{
RegionData_Impl* pRegion = maRegions.GetObject( nIndex );
if ( pRegion )
{
delete pRegion;
- maRegions.Remove( (ULONG) nIndex );
+ maRegions.Remove( (sal_uIntPtr) nIndex );
}
}
@@ -2587,7 +2587,7 @@ long SfxDocTemplate_Impl::GetRegionPos( const OUString& rTitle,
// -----------------------------------------------------------------------
sal_Bool SfxDocTemplate_Impl::InsertRegion( RegionData_Impl *pNew,
- ULONG nPos )
+ sal_uIntPtr nPos )
{
::osl::MutexGuard aGuard( maMutex );
RegionData_Impl *pData = maRegions.First();
@@ -2601,7 +2601,7 @@ sal_Bool SfxDocTemplate_Impl::InsertRegion( RegionData_Impl *pNew,
// first
if ( pNew->GetTitle() == maStandardGroup )
- maRegions.Insert( pNew, (ULONG) 0 );
+ maRegions.Insert( pNew, (sal_uIntPtr) 0 );
else
maRegions.Insert( pNew, nPos );
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index a84f4a718dc3..dd6218034bc7 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -129,7 +129,7 @@ using namespace ::comphelper;
class WaitWindow_Impl : public WorkWindow
{
Rectangle _aRect;
- USHORT _nTextStyle;
+ sal_uInt16 _nTextStyle;
String _aText;
public:
@@ -387,8 +387,8 @@ public:
const OUString& rTargetURL,
const OUString& rType,
const OUString& rHierURL );
- ULONG count() { return maEntries.Count(); }
- DocTemplates_EntryData_Impl* getEntry( ULONG nPos ) { return maEntries.GetObject( nPos ); }
+ sal_uIntPtr count() { return maEntries.Count(); }
+ DocTemplates_EntryData_Impl* getEntry( sal_uIntPtr nPos ) { return maEntries.GetObject( nPos ); }
};
DECLARE_LIST( GroupList_Impl, GroupData_Impl* )
@@ -550,9 +550,9 @@ void SfxDocTplService_Impl::readFolderList()
NamePair_Impl* pPair;
- USHORT nCount = (USHORT)( Min( aShortNames.Count(), aLongNames.Count() ) );
+ sal_uInt16 nCount = (sal_uInt16)( Min( aShortNames.Count(), aLongNames.Count() ) );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
pPair = new NamePair_Impl;
pPair->maShortName = aShortNames.GetString( i );
@@ -595,11 +595,11 @@ void SfxDocTplService_Impl::getDirList()
// TODO/LATER: let use service, register listener
INetURLObject aURL;
String aDirs = SvtPathOptions().GetTemplatePath();
- USHORT nCount = aDirs.GetTokenCount( C_DELIM );
+ sal_uInt16 nCount = aDirs.GetTokenCount( C_DELIM );
maTemplateDirs = Sequence< OUString >( nCount );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
aURL.SetSmartProtocol( INET_PROT_FILE );
aURL.SetURL( aDirs.GetToken( i, C_DELIM ) );
@@ -1249,8 +1249,8 @@ void SfxDocTplService_Impl::doUpdate()
OUString( RTL_CONSTASCII_USTRINGPARAM( TARGET_DIR_URL ) ),
makeAny( pGroup->getTargetURL() ) );
- ULONG nCount = pGroup->count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uIntPtr nCount = pGroup->count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
if ( ! pData->getInUse() )
@@ -2463,7 +2463,7 @@ void SfxDocTplService_Impl::addHierGroup( GroupList_Impl& rList,
{
while ( xResultSet->next() )
{
- BOOL bUpdateType = sal_False;
+ sal_Bool bUpdateType = sal_False;
DocTemplates_EntryData_Impl *pData;
OUString aTitle( xRow->getString( 1 ) );
@@ -2728,8 +2728,8 @@ void SfxDocTplService_Impl::addGroupToHierarchy( GroupData_Impl *pGroup )
setProperty( aGroup, aAdditionalProp, makeAny( pGroup->getTargetURL() ) );
pGroup->setHierarchyURL( aNewGroupURL );
- ULONG nCount = pGroup->count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uIntPtr nCount = pGroup->count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
addToHierarchy( pGroup, pData ); // add entry to hierarchy
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index c017a5779cdd..9b67da63ab74 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -81,7 +81,7 @@
#include <svl/svstdarr.hxx>
static const char cDelim = ':';
-BOOL SfxOrganizeListBox_Impl::bDropMoveOk = TRUE;
+sal_Bool SfxOrganizeListBox_Impl::bDropMoveOk = sal_True;
using namespace ::com::sun::star;
@@ -145,8 +145,8 @@ friend class SfxOrganizeListBox_Impl;
bool bExecDropFinished;
// save some variables for the asynchronous file dialog
- USHORT m_nRegion;
- USHORT m_nIndex;
+ sal_uInt16 m_nRegion;
+ sal_uInt16 m_nIndex;
String m_sExtension4Save;
SfxOrganizeListBox_Impl aLeftLb;
@@ -169,8 +169,8 @@ friend class SfxOrganizeListBox_Impl;
SvStringsDtor* GetAllFactoryURLs_Impl() const;
sal_Bool GetServiceName_Impl( String& rFactoryURL, String& rFileURL ) const;
- long Dispatch_Impl( USHORT nId, Menu* _pMenu );
- String GetPath_Impl( BOOL bOpen, const String& rFileName );
+ long Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu );
+ String GetPath_Impl( sal_Bool bOpen, const String& rFileName );
::com::sun::star::uno::Sequence< ::rtl::OUString >
GetPaths_Impl( const String& rFileName );
void InitBitmaps( void );
@@ -188,7 +188,7 @@ friend class SfxOrganizeListBox_Impl;
DECL_LINK( ExportHdl, sfx2::FileDialogHelper* );
DECL_LINK( AddFilesHdl, sfx2::FileDialogHelper* );
- BOOL DontDelete_Impl( SvLBoxEntry* pEntry );
+ sal_Bool DontDelete_Impl( SvLBoxEntry* pEntry );
void OkHdl( Button* );
public:
@@ -307,8 +307,8 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
aLeftLb.Show();
aRightLb.Show();
- aLeftLb.SelectAll( FALSE );
- aRightLb.SelectAll( FALSE );
+ aLeftLb.SelectAll( sal_False );
+ aRightLb.SelectAll( sal_False );
aRightLb.GrabFocus();
}
@@ -341,8 +341,8 @@ void SfxOrganizeDlg_Impl::InitBitmaps( void )
//=========================================================================
-BOOL QueryDelete_Impl(Window *pParent, // Parent der QueryBox
- USHORT nId, // Resource Id
+sal_Bool QueryDelete_Impl(Window *pParent, // Parent der QueryBox
+ sal_uInt16 nId, // Resource Id
const String &rTemplateName) // Name der zu l"oschenden Vorlage
/* [Beschreibung]
@@ -392,7 +392,7 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s
struct ImpPath_Impl
{
SvUShorts aUS;
- USHORT nRef;
+ sal_uInt16 nRef;
ImpPath_Impl();
ImpPath_Impl( const ImpPath_Impl& rCopy );
@@ -408,13 +408,13 @@ ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1)
ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
- aUS ( (BYTE)rCopy.aUS.Count() ),
+ aUS ( (sal_uInt8)rCopy.aUS.Count() ),
nRef( 1 )
{
- const USHORT nCount = rCopy.aUS.Count();
+ const sal_uInt16 nCount = rCopy.aUS.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
aUS.Insert( rCopy.aUS[i], i );
}
@@ -423,7 +423,7 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
/* [Beschreibung]
Implementierungsklasse; Darstellung einer Position in der Outline-
- Listbox als USHORT-Array; dieses beschreibt die Position jeweil
+ Listbox als sal_uInt16-Array; dieses beschreibt die Position jeweil
als relative Postion zum "ubergeordneten Eintrag
*/
@@ -454,8 +454,8 @@ public:
if(!--pData->nRef)
delete pData;
}
- USHORT Count() const { return pData->aUS.Count(); }
- USHORT operator[]( USHORT i ) const
+ sal_uInt16 Count() const { return pData->aUS.Count(); }
+ sal_uInt16 operator[]( sal_uInt16 i ) const
{
return i < Count()? pData->aUS[i]: INDEX_IGNORE;
}
@@ -471,7 +471,7 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
return;
SvLBoxEntry *pParent = pBox->GetParent(pEntry);
do {
- pData->aUS.Insert((USHORT)pBox->GetModel()->GetRelPos(pEntry), 0);
+ pData->aUS.Insert((sal_uInt16)pBox->GetModel()->GetRelPos(pEntry), 0);
if(0 == pParent)
break;
pEntry = pParent;
@@ -494,8 +494,8 @@ void Path::NewImp()
SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
SvLBoxEntry *pEntry,
- USHORT &rRegion,
- USHORT &rOffset)
+ sal_uInt16 &rRegion,
+ sal_uInt16 &rOffset)
/* [Beschreibung]
Bereich und Position innerhalb eines Bereiches f"ur eine
@@ -505,9 +505,9 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
SvLBox *pBox Listbox, an der das Ereignis auftrat
SvLBoxEntry *pEntry Eintrag, dessen Position ermittelt werden soll
- USHORT &rRegion der Bereich innerhalb der Bereiche der
+ sal_uInt16 &rRegion der Bereich innerhalb der Bereiche der
Dokumentvorlagen (Out-Parameter)
- USHORT &rOffset die Position innerhalb des Bereiches
+ sal_uInt16 &rOffset die Position innerhalb des Bereiches
Dokumentvorlagen (Out-Parameter)
[Querverweise]
@@ -525,23 +525,23 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
}
if(0 == pBox->GetModel()->GetDepth(pEntry))
{
- rRegion = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ rRegion = (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry);
rOffset = USHRT_MAX;
return pEntry;
}
SvLBoxEntry *pParent = pBox->GetParent(pEntry);
- rRegion = (USHORT)pBox->GetModel()->GetRelPos(pParent);
- rOffset = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ rRegion = (sal_uInt16)pBox->GetModel()->GetRelPos(pParent);
+ rOffset = (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry);
return pEntry;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if(!bSelect)
return SvTreeListBox::Select(pEntry,bSelect);
- USHORT nLevel = GetDocLevel();
+ sal_uInt16 nLevel = GetDocLevel();
if(GetModel()->GetDepth(pEntry)+nLevel<3)
return SvTreeListBox::Select(pEntry,bSelect);
@@ -556,12 +556,12 @@ BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)
/* [Beschreibung]
Verschieben oder Kopieren von Dokumentvorlagen
@@ -573,11 +573,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
Eintrags (Out-Parameter)
- ULONG &rIdx Index des Zieleintrags
- BOOL bCopy Flag f"ur Kopieren / Verschieben
+ sal_uIntPtr &rIdx Index des Zieleintrags
+ sal_Bool bCopy Flag f"ur Kopieren / Verschieben
- [Returnwert] BOOL: Erfolg oder Mi"serfolg
+ [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
[Querverweise]
@@ -585,27 +585,27 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if(pSource)
{
- USHORT nTargetRegion = 0, nTargetIndex = 0;
+ sal_uInt16 nTargetRegion = 0, nTargetIndex = 0;
GetIndices_Impl(this, pTarget, nTargetRegion, nTargetIndex);
- USHORT nSourceRegion = 0, nSourceIndex = 0;
+ sal_uInt16 nSourceRegion = 0, nSourceIndex = 0;
GetIndices_Impl(pSourceBox, pSource, nSourceRegion, nSourceIndex);
bOk = bCopy ?
@@ -647,12 +647,12 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)
/* [Beschreibung]
Verschieben oder Kopieren von Dokumentinhalten
@@ -664,11 +664,11 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
Eintrags (Out-Parameter)
- ULONG &rIdx Index des Zieleintrags
- BOOL bCopy Flag f"ur Kopieren / Verschieben
+ sal_uIntPtr &rIdx Index des Zieleintrags
+ sal_Bool bCopy Flag f"ur Kopieren / Verschieben
- [Returnwert] BOOL: Erfolg oder Mi"serfolg
+ [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
[Querverweise]
@@ -676,22 +676,22 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
SfxErrorContext aEc( ERRCTX_SFX_MOVEORCOPYCONTENTS, this);
- BOOL bOk = FALSE, bKeepExpansion = FALSE;
- BOOL bRemovedFromSource = FALSE;
+ sal_Bool bOk = sal_False, bKeepExpansion = sal_False;
+ sal_Bool bRemovedFromSource = sal_False;
Path aSource(pSourceBox, pSource);
Path aTarget(this, pTarget);
@@ -700,9 +700,9 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SfxObjectShellRef aSourceDoc = ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
SfxObjectShellRef aTargetDoc = GetObjectShell(aTarget);
- const USHORT nSLevel =
+ const sal_uInt16 nSLevel =
((SfxOrganizeListBox_Impl *)pSourceBox)->GetDocLevel();
- const USHORT nTLevel = GetDocLevel();
+ const sal_uInt16 nTLevel = GetDocLevel();
if(aSourceDoc.Is() && aTargetDoc.Is())
{
@@ -713,8 +713,8 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
if (aTargetDoc->GetStyleSheetPool())
aTargetDoc->GetStyleSheetPool()->SetSearchMask(
SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
- USHORT p[3];
- USHORT nIdxDeleted = INDEX_IGNORE;
+ sal_uInt16 p[3];
+ sal_uInt16 nIdxDeleted = INDEX_IGNORE;
p[0]=aTarget[nTLevel+1];
p[1]=aTarget[nTLevel+2];
if(p[1]!=INDEX_IGNORE)p[1]++;
@@ -741,12 +741,12 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
RequestingChilds(pParentIter);
SvLBoxEntry *pChildIter = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while(i < 2 && p[i+1] != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
// bis zum Index der aktuellen Ebene
- for(USHORT j = 0; j < p[i]; ++j)
+ for(sal_uInt16 j = 0; j < p[i]; ++j)
pChildIter = NextSibling(pChildIter);
// gfs Fuellen bei Items onDemand
++i;
@@ -762,7 +762,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
pNewParent->HasChildsOnDemand() &&
!GetModel()->HasChilds(pNewParent))
{
- bOk = FALSE;
+ bOk = sal_False;
if(!bCopy)
pSourceBox->GetModel()->Remove(pSource);
}
@@ -771,7 +771,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
if(nIdxDeleted != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
- for(USHORT j = 0; j < nIdxDeleted; ++j)
+ for(sal_uInt16 j = 0; j < nIdxDeleted; ++j)
pChildIter = NextSibling(pChildIter);
if( pChildIter && pChildIter != pSource )
{
@@ -779,7 +779,7 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
GetModel()->Remove(pChildIter);
}
else
- bOk = FALSE;
+ bOk = sal_False;
}
if(!bCopy && &aSourceDoc != &aTargetDoc)
{
@@ -794,15 +794,15 @@ BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
}
// rIdx++;
return (((rIdx != INDEX_IGNORE)|| bRemovedFromSource) && bOk )
- ? bKeepExpansion? (BOOL)2: TRUE: FALSE;
+ ? bKeepExpansion? (sal_Bool)2: sal_True: sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)
+ sal_uIntPtr &rIdx)
/* [Beschreibung]
@@ -815,10 +815,10 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource Quell-Eintrag, der verschoben werden soll
SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
Eintrags (Out-Parameter)
- ULONG &rIdx Index des Zieleintrags
+ sal_uIntPtr &rIdx Index des Zieleintrags
- [Returnwert] BOOL: Erfolg oder Mi"serfolg
+ [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
[Querverweise]
@@ -826,22 +826,22 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
<SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
SvLBox* pSourceBox = GetSourceView();
if ( !pSourceBox )
pSourceBox = pDlg->pSourceView;
@@ -851,19 +851,19 @@ BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
if ( pSourceBox->GetModel()->GetDepth( pSource ) <= GetDocLevel() &&
GetModel()->GetDepth( pTarget ) <= GetDocLevel() )
- bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, FALSE );
+ bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_False );
else
- bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget, pNewParent, rIdx, FALSE );
+ bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_False );
return bOk;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)
+ sal_uIntPtr &rIdx)
/* [Beschreibung]
Benachrichtigung, da"s ein Eintrag kopiert werden soll
@@ -875,10 +875,10 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource Quell-Eintrag, der kopiert werden soll
SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
Eintrags (Out-Parameter)
- ULONG &rIdx Index des Zieleintrags
+ sal_uIntPtr &rIdx Index des Zieleintrags
- [Returnwert] BOOL: Erfolg oder Mi"serfolg
+ [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
[Querverweise]
@@ -886,21 +886,21 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
<SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
SvLBoxEntry* pTarget,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx,
- BOOL bCopy)>
- <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ sal_uIntPtr &rIdx,
+ sal_Bool bCopy)>
+ <sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
- ULONG &rIdx)>
+ sal_uIntPtr &rIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
SvLBox* pSourceBox = GetSourceView();
if ( !pSourceBox )
pSourceBox = pDlg->pSourceView;
@@ -909,16 +909,16 @@ BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
pTarget = pDlg->pTargetEntry;
if ( pSourceBox->GetModel()->GetDepth( pSource ) <= GetDocLevel() &&
GetModel()->GetDepth( pTarget ) <= GetDocLevel() )
- bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, TRUE );
+ bOk = MoveOrCopyTemplates( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_True );
else
- bOk = MoveOrCopyContents( pSourceBox, pSource, pTarget, pNewParent, rIdx, TRUE );
+ bOk = MoveOrCopyContents( pSourceBox, pSource, pTarget, pNewParent, rIdx, sal_True );
return bOk;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
/* [Beschreibung]
@@ -934,14 +934,14 @@ BOOL SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
GetModel()->GetDepth(pEntry) < 2 )
{
pDlg->pSuspend = new SuspendAccel( &pDlg->aEditAcc );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
+sal_Bool SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
/* [Beschreibung]
@@ -951,8 +951,8 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
[Returnwert]
- BOOL TRUE: der Name soll in der Anzeige ge"andert werden
- FALSE:der Name soll nicht ge"andert werden
+ sal_Bool sal_True: der Name soll in der Anzeige ge"andert werden
+ sal_False:der Name soll nicht ge"andert werden
[Querverweise]
<SfxOrganizeListBox_Impl::EditingEntry(SvLBoxEntry* pEntry, const String& rText)>
@@ -968,16 +968,16 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
ErrorBox aBox( this, SfxResId( MSG_ERROR_EMPTY_NAME ) );
aBox.GrabFocus();
aBox.Execute();
- return FALSE;
+ return sal_False;
}
if ( !IsUniqName_Impl( rText, pParent, pEntry ) )
{
ErrorBox aBox( this, SfxResId( MSG_ERROR_UNIQ_NAME ) );
aBox.GrabFocus();
aBox.Execute();
- return FALSE;
+ return sal_False;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( this, pEntry, nRegion, nIndex );
String aOldName;
if ( USHRT_MAX != nIndex )
@@ -990,7 +990,7 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
SfxResId aResId( USHRT_MAX != nIndex ? MSG_ERROR_RENAME_TEMPLATE
: MSG_ERROR_RENAME_TEMPLATE_REGION );
ErrorBox( this, aResId ).Execute();
- return FALSE;
+ return sal_False;
}
/*
else
@@ -998,44 +998,44 @@ BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rTe
SfxTemplateOrganizeDlg* pDlg = (SfxTemplateOrganizeDlg*)Window::GetParent();
}
*/
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
DragDropMode SfxOrganizeListBox_Impl::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* pEntry )
{
- USHORT nSourceLevel = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nSourceLevel = GetModel()->GetDepth( pEntry );
if ( VIEW_FILES == GetViewType() )
++nSourceLevel;
if ( nSourceLevel >= 2 )
- bDropMoveOk = FALSE;
+ bDropMoveOk = sal_False;
else
- bDropMoveOk = TRUE;
+ bDropMoveOk = sal_True;
return GetDragDropMode();
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::NotifyAcceptDrop( SvLBoxEntry* pEntry )
+sal_Bool SfxOrganizeListBox_Impl::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
if(!pEntry)
- return FALSE;
+ return sal_False;
SvLBox *pSource = GetSourceView();
SvLBoxEntry *pSourceEntry = pSource->FirstSelected();
if(pEntry == pSourceEntry)
- return FALSE;
- USHORT nSourceLevel = pSource->GetModel()->GetDepth(pSourceEntry);
+ return sal_False;
+ sal_uInt16 nSourceLevel = pSource->GetModel()->GetDepth(pSourceEntry);
if(VIEW_FILES == ((SfxOrganizeListBox_Impl *)pSource)->GetViewType())
++nSourceLevel;
- USHORT nTargetLevel = GetModel()->GetDepth(pEntry);
+ sal_uInt16 nTargetLevel = GetModel()->GetDepth(pEntry);
if(VIEW_FILES == GetViewType())
++nTargetLevel;
Path aSource(pSource, pSourceEntry);
Path aTarget(this, pEntry);
- const USHORT SL = ((SfxOrganizeListBox_Impl *)pSource)->GetDocLevel();
- const USHORT TL = GetDocLevel();
+ const sal_uInt16 SL = ((SfxOrganizeListBox_Impl *)pSource)->GetDocLevel();
+ const sal_uInt16 TL = GetDocLevel();
return( (nSourceLevel == 1 && nTargetLevel == 0 &&
VIEW_TEMPLATES ==
@@ -1074,7 +1074,7 @@ sal_Int8 SfxOrganizeListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
TransferableDataHelper aHelper( rEvt.maDropEvent.Transferable );
sal_uInt32 nFormatCount = aHelper.GetFormatCount();
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
for ( sal_uInt32 i = 0; i < nFormatCount; ++i )
{
String aFileName;
@@ -1086,7 +1086,7 @@ sal_Int8 SfxOrganizeListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
bSuccess |= pMgr->InsertFile( this, aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
}
}
- bDropMoveOk = TRUE;
+ bDropMoveOk = sal_True;
sal_Int8 nRet = rEvt.mnAction;
if ( !bSuccess )
{
@@ -1119,7 +1119,7 @@ void SfxOrganizeListBox_Impl::DragFinished( sal_Int8 nDropAction )
//-------------------------------------------------------------------------
-inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const
+inline sal_uInt16 SfxOrganizeListBox_Impl::GetDocLevel() const
/* [Beschreibung]
@@ -1128,7 +1128,7 @@ inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const
[Returnwert]
- USHORT Die Ebene der Dokumente
+ sal_uInt16 Die Ebene der Dokumente
*/
@@ -1206,14 +1206,14 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
SfxErrorContext aEc(ERRCTX_SFX_CREATEOBJSH, pDlg->pDialog);
if(VIEW_TEMPLATES == GetViewType() && 0 == GetModel()->GetDepth(pEntry))
{
- USHORT i = (USHORT)GetModel()->GetRelPos(pEntry);
- const USHORT nEntryCount = pMgr->GetTemplates()->GetCount(i);
- for(USHORT j = 0; j < nEntryCount; ++j)
- InsertEntryByBmpType( pMgr->GetTemplates()->GetName( i, j ), BMPTYPE_DOC, pEntry, TRUE );
+ sal_uInt16 i = (sal_uInt16)GetModel()->GetRelPos(pEntry);
+ const sal_uInt16 nEntryCount = pMgr->GetTemplates()->GetCount(i);
+ for(sal_uInt16 j = 0; j < nEntryCount; ++j)
+ InsertEntryByBmpType( pMgr->GetTemplates()->GetName( i, j ), BMPTYPE_DOC, pEntry, sal_True );
}
else
{
- const USHORT nDocLevel = GetDocLevel();
+ const sal_uInt16 nDocLevel = GetDocLevel();
Path aPath(this, pEntry);
// it is ok to use the SfxObjectShellRef here since the object that
@@ -1221,16 +1221,16 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
SfxObjectShellRef aRef = GetObjectShell(aPath);
if(aRef.Is())
{
- const USHORT nCount = aRef->GetContentCount(
+ const sal_uInt16 nCount = aRef->GetContentCount(
aPath[nDocLevel+1], aPath[nDocLevel+2]);
String aText;
Bitmap aClosedBmp, aOpenedBmp;
- const BOOL bCanHaveChilds =
+ const sal_Bool bCanHaveChilds =
aRef->CanHaveChilds(aPath[nDocLevel+1],
aPath[nDocLevel+2]);
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
- BOOL bDeletable;
+ sal_Bool bDeletable;
aRef->GetContent(
aText, aClosedBmp, aOpenedBmp, eColorMode, bDeletable,
i, aPath[nDocLevel+1], aPath[nDocLevel+2]);
@@ -1267,7 +1267,7 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
if ( !(nImpFlags & SVLBOX_IS_EXPANDING) )
{
SvLBoxEntry* pEntry = GetHdlEntry();
- const USHORT nLevel = GetModel()->GetDepth(pEntry);
+ const sal_uInt16 nLevel = GetModel()->GetDepth(pEntry);
if((eViewType == VIEW_FILES && nLevel == 0) ||
(eViewType == VIEW_TEMPLATES && nLevel == 1))
{
@@ -1286,12 +1286,12 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
}
}
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
+sal_Bool SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
SvLBoxEntry* pParent, SvLBoxEntry *pEntry) const
/* [Beschreibung]
@@ -1305,7 +1305,7 @@ BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
[Returnwert]
- BOOL TRUE, wenn der Name eindeutig ist, sonst FALSE
+ sal_Bool sal_True, wenn der Name eindeutig ist, sonst sal_False
*/
{
@@ -1313,18 +1313,18 @@ BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
while(pChild) {
const String aEntryText(GetEntryText(pChild));
if(COMPARE_EQUAL == aEntryText.CompareIgnoreCaseToAscii(rText)&&(!pEntry || pEntry!=pChild))
- return FALSE;
+ return sal_False;
pChild = NextSibling(pChild);
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
-USHORT SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
+sal_uInt16 SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
{
SvLBoxEntry* pChild = FirstChild(pParent);
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while(pChild) {
pChild = NextSibling(pChild);
++nCount;
@@ -1335,7 +1335,7 @@ USHORT SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
//-------------------------------------------------------------------------
SvLBoxEntry* SfxOrganizeListBox_Impl::InsertEntryByBmpType( const XubString& rText, BMPTYPE eBmpType,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos, void* pUserData )
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uIntPtr nPos, void* pUserData )
{
SvLBoxEntry* pEntry = NULL;
const Image* pExp = NULL;
@@ -1444,30 +1444,30 @@ void SfxOrganizeListBox_Impl::Reset()
{
DBG_ASSERT( pMgr != 0, "kein Manager" );
// Inhalte l"oschen
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
Clear();
if ( VIEW_TEMPLATES == eViewType )
{
- const USHORT nCount = pMgr->GetTemplates()->GetRegionCount();
- for ( USHORT i = 0; i < nCount; ++i )
- InsertEntryByBmpType( pMgr->GetTemplates()->GetFullRegionName(i), BMPTYPE_FOLDER, 0, TRUE );
+ const sal_uInt16 nCount = pMgr->GetTemplates()->GetRegionCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ InsertEntryByBmpType( pMgr->GetTemplates()->GetFullRegionName(i), BMPTYPE_FOLDER, 0, sal_True );
}
else
{
const SfxObjectList& rList = pMgr->GetObjectList();
- const USHORT nCount = rList.Count();
- for ( USHORT i = 0; i < nCount; ++i )
- InsertEntryByBmpType( rList.GetBaseName(i), BMPTYPE_DOC, 0, TRUE );
+ const sal_uInt16 nCount = rList.Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ InsertEntryByBmpType( rList.GetBaseName(i), BMPTYPE_DOC, 0, sal_True );
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Invalidate();
Update();
}
//-------------------------------------------------------------------------
-const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
+const Image &SfxOrganizeListBox_Impl::GetClosedBmp(sal_uInt16 nLevel) const
/* [Beschreibung]
@@ -1476,7 +1476,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
[Parameter]
- USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
+ sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
[Returnwert]
@@ -1485,7 +1485,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
@@ -1501,7 +1501,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
//-------------------------------------------------------------------------
-const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
+const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(sal_uInt16 nLevel) const
/* [Beschreibung]
@@ -1510,7 +1510,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
[Parameter]
- USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
+ sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
[Returnwert]
@@ -1519,7 +1519,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
@@ -1544,7 +1544,7 @@ PopupMenu* SfxOrganizeListBox_Impl::CreateContextMenu()
//-------------------------------------------------------------------------
-String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
+String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, const String& rFileName )
/* [Beschreibung]
@@ -1553,7 +1553,7 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
[Parameter]
- BOOL bOpen Flag: "Offnen / Speichern
+ sal_Bool bOpen Flag: "Offnen / Speichern
const String& rFileName aktueller Dateiname als Vorschlag
[R"uckgabewert] Dateiname mit Pfad oder Leerstring, wenn
@@ -1734,9 +1734,9 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
+sal_Bool SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
{
- USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ sal_uInt16 nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
if(SfxOrganizeListBox_Impl::VIEW_FILES ==
pFocusBox->GetViewType())
nDepth++;
@@ -1748,16 +1748,16 @@ BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2))
//Mindestens eine Vorlage behalten
{
- return TRUE;
+ return sal_True;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
const SfxDocumentTemplates* pTemplates = aMgr.GetTemplates();
if ( !pTemplates || !pTemplates->HasUserContents( nRegion, nIndex ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
SvStringsDtor* SfxOrganizeDlg_Impl::GetAllFactoryURLs_Impl( ) const
@@ -1785,7 +1785,7 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
sal_Bool bRet = sal_False;
const SfxDocumentTemplates* pTemplates = aMgr.GetTemplates();
SvLBoxEntry* pEntry = pFocusBox ? pFocusBox->FirstSelected() : NULL;
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
rFileURL = pTemplates->GetPath( nRegion, nIndex );
if ( rFileURL.Len() > 0 )
@@ -1795,13 +1795,13 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
uno::Reference< embed::XStorage > xStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
rFileURL,
embed::ElementModes::READ );
- ULONG nFormat = SotStorage::GetFormatID( xStorage );
+ sal_uIntPtr nFormat = SotStorage::GetFormatID( xStorage );
const SfxFilter* pFilter =
SFX_APP()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat );
if ( pFilter )
{
rName = pFilter->GetServiceName();
- bRet = TRUE;
+ bRet = sal_True;
}
}
catch( uno::Exception& )
@@ -1811,7 +1811,7 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
return bRet;
}
-long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
+long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
/* [Beschreibung]
@@ -1819,7 +1819,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
[Parameter]
- USHORT nId ID des Events
+ sal_uInt16 nId ID des Events
[R"uckgabewert] 1: Event wurde verarbeitet,
0: Event wurde nicht verarbeitet (SV-Menu)
@@ -1843,14 +1843,14 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
const String aNoName( SfxResId(STR_NONAME) );
SvLBoxEntry* pParent = pFocusBox->GetParent(pEntry);
String aName(aNoName);
- USHORT n = 1;
+ sal_uInt16 n = 1;
while(!pFocusBox->IsUniqName_Impl(aName, pParent))
{
aName = aNoName;
aName += String::CreateFromInt32( n++ );
}
aMgr.InsertDir( pFocusBox, aName,
- (USHORT)pFocusBox->GetModel()->GetRelPos(pEntry)+1);
+ (sal_uInt16)pFocusBox->GetModel()->GetRelPos(pEntry)+1);
}
}
break;
@@ -1860,13 +1860,13 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
{
if(!pEntry || DontDelete_Impl(pEntry))
return 1;
- const USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ const sal_uInt16 nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
if(nDepth < 2)
{
if(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2) return 1;
if(SfxOrganizeListBox_Impl::VIEW_TEMPLATES == pFocusBox->GetViewType())
{
- USHORT nResId = nDepth? STR_DELETE_TEMPLATE :
+ sal_uInt16 nResId = nDepth? STR_DELETE_TEMPLATE :
STR_DELETE_REGION;
if( !QueryDelete_Impl(
pDialog, nResId, pFocusBox->GetEntryText(pEntry)))
@@ -1878,10 +1878,10 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
if(RET_NO == aQBox.Execute())
return 1;
}
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl(pFocusBox, pEntry, nRegion, nIndex);
- USHORT nDeleteInd = ( STR_DELETE_REGION == nResId? USHRT_MAX: nIndex );
+ sal_uInt16 nDeleteInd = ( STR_DELETE_REGION == nResId? USHRT_MAX: nIndex );
if ( !aMgr.Delete( pFocusBox, nRegion, nDeleteInd ) )
ErrorDelete_Impl(
pDialog,
@@ -1914,7 +1914,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
{
if(!pEntry)
return 1;
- USHORT nRegion = 0, nIndex = 0;
+ sal_uInt16 nRegion = 0, nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
const SfxStringItem aName( SID_FILE_NAME, aMgr.GetTemplates()->GetPath( nRegion, nIndex ) );
const SfxStringItem aLongName( SID_FILE_LONGNAME, pFocusBox->GetEntryText( pEntry ) );
@@ -1946,7 +1946,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
m_nRegion = 0;
m_nIndex = 0;
GetIndices_Impl( pFocusBox, pEntry, m_nRegion, m_nIndex );
- GetPath_Impl( FALSE, aMgr.GetTemplates()->GetFileName( m_nRegion, m_nIndex ) );
+ GetPath_Impl( sal_False, aMgr.GetTemplates()->GetFileName( m_nRegion, m_nIndex ) );
break;
}
@@ -1970,7 +1970,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( USHORT nId, Menu* _pMenu )
SfxObjectShellRef aRef = pFocusBox->GetObjectShell( aPath );
if ( aRef.Is() )
{
- const USHORT nDocLevel = pFocusBox->GetDocLevel();
+ const sal_uInt16 nDocLevel = pFocusBox->GetDocLevel();
if ( !pPrt )
pPrt = new Printer;
SvLBoxEntry *pDocEntry = pEntry;
@@ -2071,7 +2071,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, AccelSelect_Impl, Accelerator *, pAccel )
void SfxOrganizeDlg_Impl::OkHdl(Button *pButton)
{
if(pFocusBox && pFocusBox->IsEditingActive())
- pFocusBox->EndEditing(FALSE);
+ pFocusBox->EndEditing(sal_False);
pButton->Click();
}
@@ -2093,12 +2093,12 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
*/
{
if ( pFocusBox && pFocusBox->IsEditingActive() )
- pFocusBox->EndEditing( FALSE );
- BOOL bEnable = ( pFocusBox && pFocusBox->GetSelectionCount() );
+ pFocusBox->EndEditing( sal_False );
+ sal_Bool bEnable = ( pFocusBox && pFocusBox->GetSelectionCount() );
SvLBoxEntry* pEntry = bEnable ? pFocusBox->FirstSelected() : NULL;
- const USHORT nDepth =
+ const sal_uInt16 nDepth =
( bEnable && pFocusBox->GetSelectionCount() ) ? pFocusBox->GetModel()->GetDepth( pEntry ) : 0;
- const USHORT nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
+ const sal_uInt16 nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
int eVT = pFocusBox ? pFocusBox->GetViewType() : 0;
// nur Vorlagen anlegen
pMenu->EnableItem( ID_NEW, bEnable && 0 == nDepth && SfxOrganizeListBox_Impl::VIEW_TEMPLATES == eVT );
@@ -2119,14 +2119,14 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
pMenu->EnableItem( ID_RESCAN,
SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() ||
SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() );
- BOOL bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
+ sal_Bool bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
if ( bPrint && pPrt )
bPrint = !pPrt->IsPrinting() && !pPrt->IsJobActive();
if ( bPrint && bEnable )
{
// only styles printable
Path aPath( pFocusBox, pFocusBox->FirstSelected() );
- USHORT nIndex = aPath[ nDocLevel + 1 ];
+ sal_uInt16 nIndex = aPath[ nDocLevel + 1 ];
bPrint = ( nIndex == CONTENT_STYLE );
}
pMenu->EnableItem( ID_PRINT, bPrint );
@@ -2137,17 +2137,17 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
bEnable = GetServiceName_Impl( aFactoryURL, aFileURL );
}
else if ( bEnable )
- bEnable = FALSE;
+ bEnable = sal_False;
pMenu->EnableItem( ID_DEFAULT_TEMPLATE, bEnable );
bEnable = sal_True;
SvStringsDtor* pList = GetAllFactoryURLs_Impl();
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if ( nCount > 0 )
{
PopupMenu* pSubMenu = new PopupMenu;
- USHORT nItemId = ID_RESET_DEFAULT_TEMPLATE + 1;
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nItemId = ID_RESET_DEFAULT_TEMPLATE + 1;
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
String aObjFacURL( *pList->GetObject(i) );
String aTitle = SvFileInformationManager::GetDescription(
@@ -2187,7 +2187,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
{
if(pFocusBox && pFocusBox != pBox)
- pFocusBox->SelectAll(FALSE);
+ pFocusBox->SelectAll(sal_False);
pFocusBox = pBox;
aFilesBtn.Enable( SfxOrganizeListBox_Impl::VIEW_FILES ==
pFocusBox->GetViewType() );
@@ -2392,7 +2392,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, ExportHdl, sfx2::FileDialogHelper *, EMPTYARG )
{
INetURLObject aPathObj( aPaths[0] );
aPathObj.setFinalSlash();
- for ( USHORT i = 1; i < nCount; ++i )
+ for ( sal_uInt16 i = 1; i < nCount; ++i )
{
if ( 1 == i )
aPathObj.Append( aPaths[i] );
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 04c3e78a7e7b..848e042daa45 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -40,15 +40,15 @@
DBG_NAME(SfxFrameDescriptor);
-#define VERSION (USHORT) 3
+#define VERSION (sal_uInt16) 3
struct SfxFrameDescriptor_Impl
{
Wallpaper* pWallpaper;
SfxItemSet* pArgs;
- BOOL bEditable;
+ sal_Bool bEditable;
- SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( TRUE ) {}
+ SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( sal_True ) {}
~SfxFrameDescriptor_Impl()
{
delete pWallpaper;
@@ -63,10 +63,10 @@ SfxFrameDescriptor::SfxFrameDescriptor() :
eSizeSelector( SIZE_ABS ),
nHasBorder( BORDER_YES ),
nItemId( 0 ),
- bResizeHorizontal( TRUE ),
- bResizeVertical( TRUE ),
- bHasUI( TRUE ),
- bReadOnly( FALSE )
+ bResizeHorizontal( sal_True ),
+ bResizeVertical( sal_True ),
+ bHasUI( sal_True ),
+ bReadOnly( sal_False )
{
DBG_CTOR(SfxFrameDescriptor, 0);
@@ -110,31 +110,31 @@ void SfxFrameDescriptor::SetActualURL( const INetURLObject& rURL )
SetActualURL(String(rURL.GetMainURL( INetURLObject::DECODE_TO_IURI )));
}
-void SfxFrameDescriptor::SetEditable( BOOL bSet )
+void SfxFrameDescriptor::SetEditable( sal_Bool bSet )
{
pImp->bEditable = bSet;
}
-BOOL SfxFrameDescriptor::IsEditable() const
+sal_Bool SfxFrameDescriptor::IsEditable() const
{
return pImp->bEditable;
}
-BOOL SfxFrameDescriptor::CompareOriginal( SfxFrameDescriptor& rDescr ) const
+sal_Bool SfxFrameDescriptor::CompareOriginal( SfxFrameDescriptor& rDescr ) const
{
if( aURL != rDescr.aURL )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
-BOOL SfxFrameDescriptor::CheckContent() const
+sal_Bool SfxFrameDescriptor::CheckContent() const
{
- BOOL bRet = !( aURL == aActualURL );
+ sal_Bool bRet = !( aURL == aActualURL );
return bRet;
}
-void SfxFrameDescriptor::UnifyContent( BOOL bTakeActual )
+void SfxFrameDescriptor::UnifyContent( sal_Bool bTakeActual )
{
if ( bTakeActual )
aURL = aActualURL;
@@ -142,7 +142,7 @@ void SfxFrameDescriptor::UnifyContent( BOOL bTakeActual )
aActualURL = aURL;
}
-SfxFrameDescriptor* SfxFrameDescriptor::Clone( BOOL bWithIds ) const
+SfxFrameDescriptor* SfxFrameDescriptor::Clone( sal_Bool bWithIds ) const
{
SfxFrameDescriptor *pFrame = new SfxFrameDescriptor;
@@ -176,9 +176,9 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( BOOL bWithIds ) const
return pFrame;
}
-USHORT SfxFrameDescriptor::GetWinBits() const
+sal_uInt16 SfxFrameDescriptor::GetWinBits() const
{
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
if ( eSizeSelector == SIZE_REL )
nBits |= SWIB_RELATIVESIZE;
if ( eSizeSelector == SIZE_PERCENT )
@@ -190,7 +190,7 @@ USHORT SfxFrameDescriptor::GetWinBits() const
return nBits;
}
-BOOL SfxFrameDescriptor::HasFrameBorder() const
+sal_Bool SfxFrameDescriptor::HasFrameBorder() const
{
return (nHasBorder & BORDER_YES) != 0;
}
@@ -228,7 +228,7 @@ const Wallpaper* SfxFrameDescriptor::GetWallpaper() const
return pImp->pWallpaper;
}
-USHORT SfxFrameDescriptor::GetItemPos() const
+sal_uInt16 SfxFrameDescriptor::GetItemPos() const
{
return USHRT_MAX;
}
@@ -249,13 +249,13 @@ SfxFrameProperties::SfxFrameProperties( const SfxFrameDescriptor *pD )
, bHasBorder( pD->HasFrameBorder() )
, bBorderSet( pD->IsFrameBorderSet() )
, bResizable( pD->IsResizable() )
- , bSetResizable( FALSE )
- , bIsRootSet( FALSE )
- , bIsInColSet( FALSE )
- , bHasBorderInherited( FALSE )
+ , bSetResizable( sal_False )
+ , bIsRootSet( sal_False )
+ , bIsInColSet( sal_False )
+ , bHasBorderInherited( sal_False )
, pFrame( pD->Clone() )
{
- bBorderSet = TRUE;
+ bBorderSet = sal_True;
}
SfxFrameProperties& SfxFrameProperties::operator =(
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index f7df58ffd397..0bd63da878a3 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -185,10 +185,10 @@ throw( uno::RuntimeException )
if ( xDisp.is() )
xDisp->dispatch( aTargetURL, aProps );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SAL_CALL IFrameObject::cancel() throw( com::sun::star::uno::RuntimeException )
@@ -275,7 +275,7 @@ void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
sal_Bool bIsAutoBorder = sal_Bool();
if ( (aAny >>= bIsAutoBorder) )
{
- BOOL bBorder = maFrmDescr.IsFrameBorderOn();
+ sal_Bool bBorder = maFrmDescr.IsFrameBorderOn();
maFrmDescr.ResetBorder();
if ( bIsAutoBorder )
maFrmDescr.SetFrameBorder( bBorder );
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 932f6f10ecb0..955d231898f9 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -134,13 +134,13 @@ void SfxPreviewWin_Impl::ImpPaint(
Point aPoint;
if (dRatio>dRatioPreV)
{
- aSize=Size(nWidth, (USHORT)(nWidth/dRatio));
- aPoint=Point( 0, (USHORT)((nHeight-aSize.Height())/2));
+ aSize=Size(nWidth, (sal_uInt16)(nWidth/dRatio));
+ aPoint=Point( 0, (sal_uInt16)((nHeight-aSize.Height())/2));
}
else
{
- aSize=Size((USHORT)(nHeight*dRatio), nHeight);
- aPoint=Point((USHORT)((nWidth-aSize.Width())/2),0);
+ aSize=Size((sal_uInt16)(nHeight*dRatio), nHeight);
+ aPoint=Point((sal_uInt16)((nWidth-aSize.Width())/2),0);
}
Point bPoint=Point(nWidth,nHeight)-aPoint;
@@ -181,7 +181,7 @@ SfxPreviewWin::SfxPreviewWin(
// #107818# This preview window is for document previews. Therefore
// right-to-left mode should be off
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
void SfxPreviewWin::Paint( const Rectangle& rRect )
@@ -201,7 +201,7 @@ void SfxPreviewWin::Paint( const Rectangle& rRect )
DBG_ASSERT( aTmpSize.Height() * aTmpSize.Width(), "size of first page is 0, overload GetFirstPageSize or set vis-area!" );
aMtf.SetPrefSize( aTmpSize );
- aDevice.EnableOutput( FALSE );
+ aDevice.EnableOutput( sal_False );
aDevice.SetMapMode( rDocShell->GetMapUnit() );
aDevice.SetDrawMode( GetDrawMode() );
aMtf.Record( &aDevice );
@@ -265,7 +265,7 @@ class SfxNewFileDialog_Impl
String aNone;
String sLoadTemplate;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SfxDocumentTemplates aTemplates;
SfxObjectShellLock xDocShell;
SfxNewFileDialog* pAntiImpl;
@@ -280,23 +280,23 @@ class SfxNewFileDialog_Impl
DECL_LINK( Expand, MoreButton * );
DECL_LINK( PreviewClick, CheckBox * );
DECL_LINK( LoadFile, PushButton* );
- USHORT GetSelectedTemplatePos() const;
+ sal_uInt16 GetSelectedTemplatePos() const;
public:
- SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, USHORT nFlags );
+ SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, sal_uInt16 nFlags );
~SfxNewFileDialog_Impl();
- // Liefert FALSE, wenn '- Keine -' als Vorlage eingestellt ist
- // Nur wenn IsTemplate() TRUE liefert, koennen Vorlagennamen
+ // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist
+ // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen
// erfragt werden
- BOOL IsTemplate() const;
+ sal_Bool IsTemplate() const;
String GetTemplateRegion() const;
String GetTemplateName() const;
String GetTemplateFileName() const;
- USHORT GetTemplateFlags()const;
- void SetTemplateFlags(USHORT nSet);
+ sal_uInt16 GetTemplateFlags()const;
+ void SetTemplateFlags(sal_uInt16 nSet);
};
@@ -318,11 +318,11 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
if ( xDocShell.Is() )
{
if ( xDocShell->GetProgress() )
- return FALSE;
+ return sal_False;
xDocShell.Clear();
}
- const USHORT nEntry = GetSelectedTemplatePos();
+ const sal_uInt16 nEntry = GetSelectedTemplatePos();
if(!nEntry)
{
ClearInfo();
@@ -366,24 +366,24 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
Application::SetDefDialogParent( pAntiImpl );
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl);
SfxApplication *pSfxApp = SFX_APP();
- ULONG lErr;
+ sal_uIntPtr lErr;
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
- lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, TRUE, pSet );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
+ lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, sal_True, pSet );
if( lErr )
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent( pParent );
if ( !xDocShell.Is() )
{
aPreviewWin.SetObjectShell( 0 );
- return FALSE;
+ return sal_False;
}
}
aPreviewWin.SetObjectShell( xDocShell );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -393,20 +393,20 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- const USHORT nRegion = pBox->GetSelectEntryPos();
- const USHORT nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
- aTemplateLb.SetUpdateMode(FALSE);
+ const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
+ aTemplateLb.SetUpdateMode(sal_False);
aTemplateLb.Clear();
String aSel=aRegionLb.GetSelectEntry();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii( String(SfxResId(STR_STANDARD)) )==COMPARE_EQUAL)
aTemplateLb.InsertEntry(aNone);
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0);
- aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.SetUpdateMode(sal_True);
aTemplateLb.Invalidate();
aTemplateLb.Update();
return 0;
@@ -428,7 +428,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- USHORT nEntry = GetSelectedTemplatePos();
+ sal_uInt16 nEntry = GetSelectedTemplatePos();
if ( nEntry && pBox->IsChecked() )
{
if(!Update(0))
@@ -481,11 +481,11 @@ IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG
IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG )
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
+sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
{
- USHORT nEntry=aTemplateLb.GetSelectEntryPos();
+ sal_uInt16 nEntry=aTemplateLb.GetSelectEntryPos();
String aSel=aRegionLb.GetSelectEntry().Copy();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii(String(SfxResId(STR_STANDARD)))!=COMPARE_EQUAL)
@@ -497,7 +497,7 @@ USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog_Impl::IsTemplate() const
+sal_Bool SfxNewFileDialog_Impl::IsTemplate() const
{
return GetSelectedTemplatePos()!=0;
@@ -542,9 +542,9 @@ void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
pWin->SetPosSizePixel(aPos, aSize);
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const
{
- USHORT nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
+ sal_uInt16 nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
if(aFrameStyleCB.IsChecked())
nRet |= SFX_LOAD_FRAME_STYLES;
if(aPageStyleCB.IsChecked())
@@ -556,7 +556,7 @@ USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
return nRet;
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet)
{
aTextStyleCB.Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES ));
aFrameStyleCB.Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES));
@@ -568,7 +568,7 @@ void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
//-------------------------------------------------------------------------
SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
- SfxNewFileDialog* pAntiImplP, USHORT nFl)
+ SfxNewFileDialog* pAntiImplP, sal_uInt16 nFl)
: aRegionFt( pAntiImplP, SfxResId( FT_REGION ) ),
aRegionLb( pAntiImplP, SfxResId( LB_REGION ) ),
aTemplateFt( pAntiImplP, SfxResId( FT_TEMPLATE ) ),
@@ -654,7 +654,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
}
String &rExtra = pAntiImplP->GetExtraData();
- USHORT nTokCount = rExtra.GetTokenCount( '|' );
+ sal_uInt16 nTokCount = rExtra.GetTokenCount( '|' );
if( nTokCount > 0 && nFlags )
MORE_BTN(SetState( rExtra.GetToken( 0, '|' ) == 'Y' ));
if( nTokCount > 1 && nFlags )
@@ -668,10 +668,10 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
aTemplates.Update( sal_True /* be smart */ );
}
// fill the list boxes
- const USHORT nCount = aTemplates.GetRegionCount();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount();
if (nCount)
{
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(aTemplates.GetFullRegionName(i));
aRegionLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
}
@@ -697,7 +697,7 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
delete pMoreBt;
}
//-------------------------------------------------------------------------
-SfxNewFileDialog::SfxNewFileDialog(Window *pParent, USHORT nFlags)
+SfxNewFileDialog::SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags)
: SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) )
{
pImpl = new SfxNewFileDialog_Impl( this, nFlags );
@@ -708,7 +708,7 @@ SfxNewFileDialog::~SfxNewFileDialog()
delete pImpl;
}
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog::IsTemplate() const
+sal_Bool SfxNewFileDialog::IsTemplate() const
{
return pImpl->IsTemplate();
}
@@ -728,13 +728,13 @@ String SfxNewFileDialog::GetTemplateFileName() const
return pImpl->GetTemplateFileName();
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog::GetTemplateFlags()const
{
return pImpl->GetTemplateFlags();
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog::SetTemplateFlags(sal_uInt16 nSet)
{
pImpl->SetTemplateFlags(nSet);
}
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 4aea842e44e9..b389f980185d 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -140,7 +140,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig
::boost::shared_ptr<GDIMetaFile> pFile(new GDIMetaFile);
VirtualDevice aDevice;
- aDevice.EnableOutput( FALSE );
+ aDevice.EnableOutput( sal_False );
// adjust the output device if HC-metafile is requested
if ( bHighContrast )
@@ -252,7 +252,7 @@ void SfxObjectShell::UpdateTime_Impl(
// Initialize some local member! Its neccessary for wollow operations!
DateTime aNow ; // Date and time at current moment
Time n24Time (24,0,0,0) ; // Time-value for 24 hours - see follow calculation
- ULONG nDays = 0 ; // Count of days between now and last editing
+ sal_uIntPtr nDays = 0 ; // Count of days between now and last editing
Time nAddTime (0) ; // Value to add on aOldTime
// Safe impossible cases!
@@ -328,9 +328,9 @@ void SfxObjectShell::SetOrganizerSearchMask(
//--------------------------------------------------------------------
-USHORT SfxObjectShell::GetContentCount(
- USHORT nIdx1,
- USHORT /*nIdx2*/)
+sal_uInt16 SfxObjectShell::GetContentCount(
+ sal_uInt16 nIdx1,
+ sal_uInt16 /*nIdx2*/)
{
switch(nIdx1)
{
@@ -359,7 +359,7 @@ USHORT SfxObjectShell::GetContentCount(
//--------------------------------------------------------------------
//TODO/CLEANUP: remove this method (it's virtual)
-void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2, USHORT)
+void SfxObjectShell::TriggerHelpPI(sal_uInt16 nIdx1, sal_uInt16 nIdx2, sal_uInt16)
{
if(nIdx1==CONTENT_STYLE && nIdx2 != INDEX_IGNORE) //StyleSheets
{
@@ -368,23 +368,23 @@ void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2, USHORT)
}
}
-BOOL SfxObjectShell::CanHaveChilds(USHORT nIdx1,
- USHORT nIdx2)
+sal_Bool SfxObjectShell::CanHaveChilds(sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2)
{
switch(nIdx1) {
case INDEX_IGNORE:
- return TRUE;
+ return sal_True;
case CONTENT_STYLE:
- return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool()? FALSE: TRUE;
+ return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool()? sal_False: sal_True;
case CONTENT_MACRO:
-//!! return INDEX_IGNORE == nIdx2? FALSE: TRUE;
- return FALSE;
+//!! return INDEX_IGNORE == nIdx2? sal_False: sal_True;
+ return sal_False;
/*
case CONTENT_CONFIG:
- return INDEX_IGNORE == nIdx2 ? FALSE : TRUE;
+ return INDEX_IGNORE == nIdx2 ? sal_False : sal_True;
*/
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -392,10 +392,10 @@ BOOL SfxObjectShell::CanHaveChilds(USHORT nIdx1,
void SfxObjectShell::GetContent(String &rText,
Bitmap &rClosedBitmap,
Bitmap &rOpenedBitmap,
- BOOL &bCanDel,
- USHORT i,
- USHORT nIdx1,
- USHORT nIdx2 )
+ sal_Bool &bCanDel,
+ sal_uInt16 i,
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 )
{
DBG_ERRORFILE( "Non high contrast method called. Please update calling code!" );
SfxObjectShell::GetContent( rText, rClosedBitmap, rOpenedBitmap, BMP_COLOR_NORMAL, bCanDel, i, nIdx1, nIdx2 );
@@ -407,20 +407,20 @@ void SfxObjectShell::GetContent(String &rText,
Bitmap &rClosedBitmap,
Bitmap &rOpenedBitmap,
BmpColorMode eColorMode,
- BOOL &bCanDel,
- USHORT i,
- USHORT nIdx1,
- USHORT /*nIdx2*/ )
+ sal_Bool &bCanDel,
+ sal_uInt16 i,
+ sal_uInt16 nIdx1,
+ sal_uInt16 /*nIdx2*/ )
{
- bCanDel=TRUE;
+ bCanDel=sal_True;
switch(nIdx1)
{
case INDEX_IGNORE:
{
- USHORT nTextResId = 0;
- USHORT nClosedBitmapResId = 0; // evtl. sp"ater mal unterschiedliche
- USHORT nOpenedBitmapResId = 0; // " " " "
+ sal_uInt16 nTextResId = 0;
+ sal_uInt16 nClosedBitmapResId = 0; // evtl. sp"ater mal unterschiedliche
+ sal_uInt16 nOpenedBitmapResId = 0; // " " " "
switch(i)
{
case CONTENT_STYLE:
@@ -508,7 +508,7 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily )
Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily, BmpColorMode eColorMode )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch(eFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -537,16 +537,16 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily, BmpColorMode
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
- USHORT nSourceIdx1,
- USHORT nSourceIdx2,
- USHORT /*nSourceIdx3*/,
- USHORT &nIdx1,
- USHORT &nIdx2,
- USHORT &/*nIdx3*/,
- USHORT &/*nDeleted*/)
+sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 /*nSourceIdx3*/,
+ sal_uInt16 &nIdx1,
+ sal_uInt16 &nIdx2,
+ sal_uInt16 &/*nIdx3*/,
+ sal_uInt16 &/*nDeleted*/)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (INDEX_IGNORE == nIdx1 && CONTENT_STYLE == nSourceIdx1)
nIdx1 = CONTENT_STYLE;
@@ -577,8 +577,8 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
- // USHORT nOldHelpId = pExist->GetHelpId(??? VB ueberlegt sich was);
- BOOL bUsedOrUserDefined;
+ // sal_uInt16 nOldHelpId = pExist->GetHelpId(??? VB ueberlegt sich was);
+ sal_Bool bUsedOrUserDefined;
if( pExist )
{
bUsedOrUserDefined =
@@ -586,13 +586,13 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
if( ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, aOldName ) )
!= ERRCODE_BUTTON_OK )
- return FALSE;
+ return sal_False;
else
{
pMyPool->Replace( *pHisSheet, *pExist );
- SetModified( TRUE );
+ SetModified( sal_True );
nIdx2 = nIdx1 = INDEX_IGNORE;
- return TRUE;
+ return sal_True;
}
}
@@ -656,13 +656,13 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
}
}
- SetModified( TRUE );
+ SetModified( sal_True );
if( !bUsedOrUserDefined ) nIdx2 = nIdx1 = INDEX_IGNORE;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
/*
else if (nSourceIdx1 == CONTENT_CONFIG)
@@ -673,7 +673,7 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
if ( !GetConfigManager() )
{
SetConfigManager(new SfxConfigManager(0, pCfgMgr));
- SetTemplateConfig(FALSE);
+ SetTemplateConfig(sal_False);
if (this == Current())
GetConfigManager()->Activate(pCfgMgr);
}
@@ -681,9 +681,9 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
if (GetConfigManager()->CopyItem(
nSourceIdx2, nIdx2, rSource.GetConfigManager()))
{
- SetModified(TRUE);
- bRet = TRUE;
- SFX_APP()->GetDispatcher_Impl()->Update_Impl(TRUE);
+ SetModified(sal_True);
+ bRet = sal_True;
+ SFX_APP()->GetDispatcher_Impl()->Update_Impl(sal_True);
}
}
*/
@@ -692,14 +692,14 @@ BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Remove
+sal_Bool SfxObjectShell::Remove
(
- USHORT nIdx1,
- USHORT nIdx2,
- USHORT /*nIdx3*/
+ sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2,
+ sal_uInt16 /*nIdx3*/
)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -712,7 +712,7 @@ BOOL SfxObjectShell::Remove
String aEmpty;
SfxStyleFamily eFamily = pMySheet->GetFamily();
pMyPool->Remove(pMySheet);
- bRet = TRUE;
+ bRet = sal_True;
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
@@ -734,7 +734,7 @@ BOOL SfxObjectShell::Remove
pTestSheet = pMyPool->Next();
}
- SetModified( TRUE );
+ SetModified( sal_True );
}
return bRet;
@@ -742,12 +742,12 @@ BOOL SfxObjectShell::Remove
//--------------------------------------------------------------------
-BOOL SfxObjectShell::Print
+sal_Bool SfxObjectShell::Print
(
Printer& rPrt,
- USHORT nIdx1,
- USHORT /*nIdx2*/,
- USHORT /*nIdx3*/,
+ sal_uInt16 nIdx1,
+ sal_uInt16 /*nIdx2*/,
+ sal_uInt16 /*nIdx3*/,
const String* pObjectName
)
@@ -763,10 +763,10 @@ BOOL SfxObjectShell::Print
SetOrganizerSearchMask(pStylePool);
SfxStyleSheetIterator* pIter = pStylePool->CreateIterator(
pStylePool->GetSearchFamily(), pStylePool->GetSearchMask() );
- USHORT nStyles = pIter->Count();
+ sal_uInt16 nStyles = pIter->Count();
SfxStyleSheetBase *pStyle = pIter->First();
if ( !pStyle )
- return TRUE;
+ return sal_True;
// pepare adaptor for old style StartPage/EndPage printing
boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) );
@@ -780,8 +780,8 @@ BOOL SfxObjectShell::Print
aFont.SetWeight(WEIGHT_BOLD);
pPrinter->SetFont(aFont);
const Size aPageSize(pPrinter->GetOutputSize());
- const USHORT nXIndent = 200;
- USHORT nYIndent = 200;
+ const sal_uInt16 nXIndent = 200;
+ sal_uInt16 nYIndent = 200;
Point aOutPos(nXIndent, nYIndent);
String aHeader(SfxResId(STR_PRINT_STYLES_HEADER));
if ( pObjectName )
@@ -817,13 +817,13 @@ BOOL SfxObjectShell::Print
pPrinter->SetFont(aFont);
aStr = pStyle->GetDescription();
const char cDelim = ' ';
- USHORT nStart = 0, nIdx = 0;
+ sal_uInt16 nStart = 0, nIdx = 0;
nTextHeight = pPrinter->GetTextHeight();
// break text into lines
while(nIdx < aStr.Len())
{
- USHORT nOld = nIdx;
+ sal_uInt16 nOld = nIdx;
long nTextWidth;
nIdx = aStr.Search(cDelim, nStart);
nTextWidth = pPrinter->GetTextWidth(aStr, nStart, nIdx-nStart);
@@ -844,7 +844,7 @@ BOOL SfxObjectShell::Print
}
else
{
- USHORT nChar = 1;
+ sal_uInt16 nChar = 1;
while(
nStart + nChar < aStr.Len() &&
aOutPos.X() + pPrinter->GetTextWidth(
@@ -875,9 +875,9 @@ BOOL SfxObjectShell::Print
break;
}
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -912,7 +912,7 @@ void SfxObjectShell::LoadStyles
DBG_ASSERT(pMyPool, "Dest-DocumentShell ohne StyleSheetPool");
pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL, 0xffff);
Styles_Impl *pFound = new Styles_Impl[pSourcePool->Count()];
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
SfxStyleSheetBase *pSource = pSourcePool->First();
while ( pSource )
@@ -931,7 +931,7 @@ void SfxObjectShell::LoadStyles
pSource = pSourcePool->Next();
}
- for ( USHORT i = 0; i < nFound; ++i )
+ for ( sal_uInt16 i = 0; i < nFound; ++i )
{
pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT);
// pFound[i].pDest->SetHelpId(pFound[i].pSource->GetHelpId());
@@ -1005,13 +1005,13 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
{
// check existence of template storage
aTemplURL = aFoundName;
- BOOL bLoad = FALSE;
+ sal_Bool bLoad = sal_False;
// should the document checked against changes in the template ?
if ( IsQueryLoadTemplate() )
{
// load document info of template
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
util::DateTime aTemplDate;
try
{
@@ -1028,7 +1028,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
if ( aAny >>= aTemplDate )
{
// get modify date from document info
- bOK = TRUE;
+ bOK = sal_True;
}
}
catch ( Exception& )
@@ -1045,21 +1045,21 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
// ask user
if( bCanUpdateFromTemplate == document::UpdateDocMode::QUIET_UPDATE
|| bCanUpdateFromTemplate == document::UpdateDocMode::FULL_UPDATE )
- bLoad = TRUE;
+ bLoad = sal_True;
else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG )
{
String sMessage( SfxResId( STR_QRYTEMPL_MESSAGE ) );
sMessage.SearchAndReplace( String::CreateFromAscii("$(ARG1)"), aTemplName );
sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage );
if ( RET_YES == aBox.Execute() )
- bLoad = TRUE;
+ bLoad = sal_True;
}
if( !bLoad )
{
// user refuses, so don't ask again for this document
- SetQueryLoadTemplate(FALSE);
- SetModified( TRUE );
+ SetQueryLoadTemplate(sal_False);
+ SetModified( sal_True );
}
}
}
@@ -1146,14 +1146,14 @@ sal_Bool SfxObjectShell::IsUseUserData() const
void SfxObjectShell::SetQueryLoadTemplate( sal_Bool bNew )
{
if ( pImp->bQueryLoadTemplate != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bQueryLoadTemplate = bNew;
}
void SfxObjectShell::SetUseUserData( sal_Bool bNew )
{
if ( pImp->bUseUserData != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bUseUserData = bNew;
}
@@ -1170,14 +1170,14 @@ sal_Bool SfxObjectShell::IsSaveVersionOnClose() const
void SfxObjectShell::SetLoadReadonly( sal_Bool bNew )
{
if ( pImp->bLoadReadonly != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bLoadReadonly = bNew;
}
void SfxObjectShell::SetSaveVersionOnClose( sal_Bool bNew )
{
if ( pImp->bSaveVersionOnClose != bNew )
- SetModified( TRUE );
+ SetModified( sal_True );
pImp->bSaveVersionOnClose = bNew;
}
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 1c2105c210b9..a83335ea9fcd 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -101,7 +101,7 @@ void SfxObjectShell::OnDocumentPrinterChanged( Printer* /*pNewPrinter*/ )
}
// -----------------------------------------------------------------------
-Rectangle SfxObjectShell::GetVisArea( USHORT nAspect ) const
+Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const
{
if( nAspect == ASPECT_CONTENT )
return pImp->m_aVisArea;
@@ -131,7 +131,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
if ( IsEnableSetModified() )
- SetModified( TRUE );
+ SetModified( sal_True );
SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
@@ -184,7 +184,7 @@ void SfxObjectShell::SetVisAreaSize( const Size & rVisSize )
}
// -----------------------------------------------------------------------
-ULONG SfxObjectShell::GetMiscStatus() const
+sal_uIntPtr SfxObjectShell::GetMiscStatus() const
{
return 0;
}
@@ -213,7 +213,7 @@ void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescrip
rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MAP_100TH_MM );
rDesc.maDragStartPos = Point();
rDesc.maDisplayName = String();
- rDesc.mbCanLink = FALSE;
+ rDesc.mbCanLink = sal_False;
}
// -----------------------------------------------------------------------
@@ -221,7 +221,7 @@ void SfxObjectShell::DoDraw( OutputDevice* pDev,
const Point & rObjPos,
const Size & rSize,
const JobSetup & rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
MapMode aMod = pDev->GetMapMode();
Size aSize = GetVisArea( nAspect ).GetSize();
@@ -245,7 +245,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
const Fraction & rScaleX,
const Fraction & rScaleY,
const JobSetup & rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
Rectangle aVisArea = GetVisArea( nAspect );
// MapUnit des Ziels
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index 2980d984fd78..01fb87f29eac 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -64,7 +64,7 @@ SfxPoolItem* SfxObjectShellItem::Clone( SfxItemPool *) const
//--------------------------------------------------------------------
-sal_Bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
if ( pObjSh )
{
@@ -76,12 +76,12 @@ sal_Bool SfxObjectShellItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*
{
rVal <<= ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >();
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-sal_Bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
// This item MUST have a model. Please don't change this, there are UNO-based
// implementations which need it!!
@@ -100,21 +100,21 @@ sal_Bool SfxObjectShellItem::PutValue( const com::sun::star::uno::Any& rVal, BYT
if ( nHandle )
{
pObjSh = reinterpret_cast< SfxObjectShell* >(sal::static_int_cast<sal_IntPtr>( nHandle ));
- return TRUE;
+ return sal_True;
}
}
}
pObjSh = 0;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//=========================================================================
-SfxObjectItem::SfxObjectItem( USHORT nWhichId, SfxShell *pSh )
+SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh )
: SfxPoolItem( nWhichId ),
_pSh( pSh )
{}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 3b27db855e39..d961c2df3aef 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1733,7 +1733,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
catch ( const uno::Exception& )
{
aException = ::cppu::getCaughtException();
- bCaughtException = TRUE;
+ bCaughtException = sal_True;
nErr = ERRCODE_BASIC_INTERNAL_ERROR;
}
@@ -1934,7 +1934,7 @@ sal_Bool SfxObjectShell::IsSecure()
if ( GetMedium()->GetContent().is() )
{
Any aAny( ::utl::UCBContentHelper::GetProperty( aURL.GetMainURL( INetURLObject::NO_DECODE ), String( RTL_CONSTASCII_USTRINGPARAM("IsProtected")) ) );
- sal_Bool bIsProtected = FALSE;
+ sal_Bool bIsProtected = sal_False;
if ( ( aAny >>= bIsProtected ) && bIsProtected )
return sal_False;
else
@@ -1947,7 +1947,7 @@ sal_Bool SfxObjectShell::IsSecure()
return sal_False;
}
-void SfxObjectShell::SetWaitCursor( BOOL bSet ) const
+void SfxObjectShell::SetWaitCursor( sal_Bool bSet ) const
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
{
@@ -1969,7 +1969,7 @@ String SfxObjectShell::GetAPIName() const
return aName;
}
-void SfxObjectShell::Invalidate( USHORT nId )
+void SfxObjectShell::Invalidate( sal_uInt16 nId )
{
for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
Invalidate_Impl( pFrame->GetBindings(), nId );
@@ -1992,7 +1992,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
{
Window* pWindow = 0;
SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
- SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pUnoItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
if ( pUnoItem )
{
uno::Reference < frame::XFrame > xFrame( pUnoItem->GetFrame() );
@@ -2002,7 +2002,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
if ( !pWindow )
{
SfxFrame* pFrame = 0;
- SFX_ITEMSET_ARG( pSet, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFrameItem, SfxFrameItem, SID_DOCFRAME, sal_False );
if( pFrameItem && pFrameItem->GetFrame() )
// get target frame from ItemSet
pFrame = pFrameItem->GetFrame();
@@ -2036,7 +2036,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
return pWindow;
}
-String SfxObjectShell::UpdateTitle( SfxMedium* pMed, USHORT nDocViewNumber )
+String SfxObjectShell::UpdateTitle( SfxMedium* pMed, sal_uInt16 nDocViewNumber )
{
// Titel des Fensters
String aTitle;
@@ -2077,29 +2077,29 @@ void SfxObjectShell::SetCreateMode_Impl( SfxObjectCreateMode nMode )
eCreateMode = nMode;
}
-BOOL SfxObjectShell::IsInPlaceActive()
+sal_Bool SfxObjectShell::IsInPlaceActive()
{
if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
- return FALSE;
+ return sal_False;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
return pFrame && pFrame->GetFrame().IsInPlace();
}
-BOOL SfxObjectShell::IsUIActive()
+sal_Bool SfxObjectShell::IsUIActive()
{
if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
- return FALSE;
+ return sal_False;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
return pFrame && pFrame->GetFrame().IsInPlace() && pFrame->GetFrame().GetWorkWindow_Impl()->IsVisible_Impl();
}
-void SfxObjectShell::UIActivate( BOOL )
+void SfxObjectShell::UIActivate( sal_Bool )
{
}
-void SfxObjectShell::InPlaceActivate( BOOL )
+void SfxObjectShell::InPlaceActivate( sal_Bool )
{
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e53e7148e561..73d836938183 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -295,7 +295,7 @@ sal_Bool SfxObjectShell::APISaveAs_Impl
SfxItemSet* aParams
)
{
- BOOL bOk = sal_False;
+ sal_Bool bOk = sal_False;
{DBG_CHKTHIS(SfxObjectShell, 0);}
@@ -345,7 +345,7 @@ sal_Bool SfxObjectShell::APISaveAs_Impl
}
// prevent picklist-entry
- GetMedium()->SetUpdatePickList( FALSE );
+ GetMedium()->SetUpdatePickList( sal_False );
}
return bOk;
@@ -357,7 +357,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
{DBG_CHKTHIS(SfxObjectShell, 0);}
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
@@ -406,7 +406,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_DOCINFO:
{
- SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO, FALSE);
+ SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO, sal_False);
if ( pDocInfItem )
{
// parameter, e.g. from replayed macro
@@ -416,8 +416,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
else
{
// no argument containing DocInfo; check optional arguments
- BOOL bReadOnly = IsReadOnly();
- SFX_REQUEST_ARG(rReq, pROItem, SfxBoolItem, SID_DOC_READONLY, FALSE);
+ sal_Bool bReadOnly = IsReadOnly();
+ SFX_REQUEST_ARG(rReq, pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False);
if ( pROItem )
// override readonly attribute of document
// e.g. if a readonly document is saved elsewhere and user asks for editing DocInfo before
@@ -442,7 +442,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
IsUseUserData() );
if ( !GetSlotState( SID_DOCTEMPLATE ) )
// templates not supported
- aDocInfoItem.SetTemplate(FALSE);
+ aDocInfoItem.SetTemplate(sal_False);
SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO, SID_DOC_READONLY, SID_DOC_READONLY,
SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, SID_BASEURL, SID_BASEURL,
@@ -456,7 +456,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxDocumentInfoDialog *pDlg = CreateDocumentInfoDialog(0, aSet);
if ( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, FALSE);
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, sal_False);
if ( pDocInfoItem )
{
// user has done some changes to DocumentInfo
@@ -492,7 +492,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// derived class may decide to abort this
if( !QuerySlotExecutable( nId ) )
{
- rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) );
return;
}
@@ -517,7 +517,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( nId == SID_SAVEASDOC )
{
// in case of plugin mode the SaveAs operation means SaveTo
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pViewOnlyItem, SfxBoolItem, SID_VIEWONLY, FALSE );
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pViewOnlyItem, SfxBoolItem, SID_VIEWONLY, sal_False );
if ( pViewOnlyItem && pViewOnlyItem->GetValue() )
rReq.AppendItem( SfxBoolItem( SID_SAVETO, sal_True ) );
}
@@ -525,7 +525,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// TODO/LATER: do the following GUI related actions in standalown method
// ========================================================================================================
// Introduce a status indicator for GUI operation
- SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE );
+ SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False );
if ( !pStatusIndicatorItem )
{
// get statusindicator
@@ -564,7 +564,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Introduce an interaction handler for GUI operation
- SFX_REQUEST_ARG( rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE );
+ SFX_REQUEST_ARG( rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False );
if ( !pInteractionHandlerItem )
{
uno::Reference< task::XInteractionHandler > xInteract;
@@ -599,8 +599,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// ========================================================================================================
sal_Bool bPreselectPassword = sal_False;
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, FALSE );
- SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, FALSE );
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pOldPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
if ( pOldEncryptionDataItem || pOldPasswordItem )
bPreselectPassword = sal_True;
@@ -643,7 +643,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
NULL );
rReq.SetArgs( aResultParams );
- SFX_REQUEST_ARG( rReq, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, sal_False );
::rtl::OUString aFilterName = pFilterNameItem ? ::rtl::OUString( pFilterNameItem->GetValue() )
: ::rtl::OUString();
const SfxFilter* pFilt = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
@@ -680,14 +680,14 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// by default versions should be preserved always except in case of an explicit
// SaveAs via GUI, so the flag must be reset to guarantee this
pImp->bPreserveVersions = sal_True;
- ULONG lErr=GetErrorCode();
+ sal_uIntPtr lErr=GetErrorCode();
if ( !lErr && nErrorCode )
lErr = nErrorCode;
if ( lErr && nErrorCode == ERRCODE_NONE )
{
- SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, FALSE );
+ SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, sal_False );
if ( pWarnItem && pWarnItem->GetValue() )
nErrorCode = lErr;
}
@@ -730,8 +730,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
return;
}
- BOOL bInFrameSet = FALSE;
- USHORT nFrames=0;
+ sal_Bool bInFrameSet = sal_False;
+ sal_uInt16 nFrames=0;
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
@@ -740,7 +740,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// Auf dieses Dokument existiert noch eine Sicht, die
// in einem FrameSet liegt; diese darf nat"urlich nicht
// geclosed werden
- bInFrameSet = TRUE;
+ bInFrameSet = sal_True;
}
else
nFrames++;
@@ -761,8 +761,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Parameter auswerten
- SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, FALSE);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, sal_False);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, sal_False);
if ( pSaveItem )
{
if ( pSaveItem->GetValue() )
@@ -785,22 +785,22 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
else
- SetModified(FALSE);
+ SetModified(sal_False);
}
// Benutzer bricht ab?
if ( !PrepareClose( 2 ) )
{
- rReq.SetReturnValue( SfxBoolItem(0, FALSE) );
+ rReq.SetReturnValue( SfxBoolItem(0, sal_False) );
rReq.Done();
return;
}
- SetModified( FALSE );
- ULONG lErr = GetErrorCode();
+ SetModified( sal_False );
+ sal_uIntPtr lErr = GetErrorCode();
ErrorHandler::HandleError(lErr);
- rReq.SetReturnValue( SfxBoolItem(0, TRUE) );
+ rReq.SetReturnValue( SfxBoolItem(0, sal_True) );
rReq.Done();
rReq.ReleaseArgs(); // da der Pool in Close zerst"ort wird
DoClose();
@@ -833,9 +833,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
- SFX_REQUEST_ARG(rReq, pRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
- SFX_REQUEST_ARG(rReq, pRegionNrItem, SfxUInt16Item, SID_TEMPLATE_REGION, FALSE);
+ SFX_REQUEST_ARG(rReq, pRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False);
+ SFX_REQUEST_ARG(rReq, pRegionNrItem, SfxUInt16Item, SID_TEMPLATE_REGION, sal_False);
if ( (!pRegionItem && !pRegionNrItem ) || !pNameItem )
{
DBG_ASSERT( rReq.IsAPI(), "non-API call without Arguments" );
@@ -891,10 +891,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// Picklisten-Eintrag verhindern
if ( rReq.IsAPI() )
- GetMedium()->SetUpdatePickList( FALSE );
+ GetMedium()->SetUpdatePickList( sal_False );
else if ( rReq.GetArgs() )
{
- SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, FALSE );
+ SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, sal_False );
if ( pPicklistItem )
GetMedium()->SetUpdatePickList( pPicklistItem->GetValue() );
}
@@ -910,7 +910,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
DBG_CHKTHIS(SfxObjectShell, 0);
SfxWhichIter aIter( rSet );
- for ( USHORT nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
+ for ( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
{
switch ( nWhich )
{
@@ -944,7 +944,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
}
case SID_SAVEDOC:
{
- BOOL bMediumRO = IsReadOnlyMedium();
+ sal_Bool bMediumRO = IsReadOnlyMedium();
if ( !bMediumRO && GetMedium() && IsModified() )
rSet.Put(SfxStringItem(
nWhich, String(SfxResId(STR_SAVEDOC))));
@@ -1118,7 +1118,7 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
{
@@ -1200,7 +1200,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
{
case SID_ACTIVATE:
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, TRUE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_True );
if ( pFrame )
pFrame->GetFrame().Appear();
rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) );
@@ -1219,7 +1219,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
if ( aFileName.Len() )
{
SfxStringItem aName( SID_FILE_NAME, aFileName );
- SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, TRUE );
+ SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, sal_True );
SFX_APP()->GetAppDispatcher_Impl()->Execute(
SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aName,
&aCreateView, 0L);
@@ -1384,7 +1384,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
if ( (bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES)
|| (!bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES) )
{
- USHORT nId = SID_SAVEDOC;
+ sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || !GetMedium()->GetName().Len() )
nId = SID_SAVEASDOC;
SfxRequest aSaveRequest( nId, 0, GetPool() );
@@ -1472,22 +1472,22 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
sal_uInt16 SfxObjectShell::GetDocumentSignatureState()
{
- return ImplGetSignatureState( FALSE );
+ return ImplGetSignatureState( sal_False );
}
void SfxObjectShell::SignDocumentContent()
{
- ImplSign( FALSE );
+ ImplSign( sal_False );
}
sal_uInt16 SfxObjectShell::GetScriptingSignatureState()
{
- return ImplGetSignatureState( TRUE );
+ return ImplGetSignatureState( sal_True );
}
void SfxObjectShell::SignScriptingContent()
{
- ImplSign( TRUE );
+ ImplSign( sal_True );
}
// static
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 60921e825e20..9a86e962cac6 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -195,7 +195,7 @@ sal_Bool SfxObjectShell::SaveAs( SfxMedium& rMedium )
//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::QuerySlotExecutable( USHORT /*nSlotId*/ )
+sal_Bool SfxObjectShell::QuerySlotExecutable( sal_uInt16 /*nSlotId*/ )
{
return sal_True;
}
@@ -889,7 +889,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
if( xFilterCFG.is() )
{
- BOOL bAbort = FALSE;
+ sal_Bool bAbort = sal_False;
try {
const SfxFilter* pFilter = pMedium->GetFilter();
Sequence < PropertyValue > aProps;
@@ -949,7 +949,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
pSet->Put( *pFilterData );
}
else
- bAbort = TRUE;
+ bAbort = sal_True;
}
}
@@ -1081,7 +1081,7 @@ sal_Bool SfxObjectShell::DoSave()
return bOk;
}
-void Lock_Impl( SfxObjectShell* pDoc, BOOL bLock )
+void Lock_Impl( SfxObjectShell* pDoc, sal_Bool bLock )
{
SfxViewFrame *pFrame= SfxViewFrame::GetFirst( pDoc );
while ( pFrame )
@@ -1569,7 +1569,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if( bOk && !bCopyTo )
// we also don't touch any graphical replacements here
- bOk = SaveChildren( TRUE );
+ bOk = SaveChildren( sal_True );
}
if ( bOk )
@@ -1769,8 +1769,8 @@ sal_Bool SfxObjectShell::SaveTo_Impl
#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
// Header for a single-valued ASCII EA data item
typedef struct _EA_ASCII_header {
- USHORT usAttr; /* value: EAT_ASCII */
- USHORT usLen; /* length of data */
+ sal_uInt16 usAttr; /* value: EAT_ASCII */
+ sal_uInt16 usLen; /* length of data */
CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
} EA_ASCII_HEADER;
char filePath[_MAX_PATH];
@@ -1812,7 +1812,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
eaAscii.usLen = strlen( eaAscii.szType);
// fill libc EA data structure
eaType.flags = 0;
- eaType.size = sizeof(USHORT)*2 + eaAscii.usLen;
+ eaType.size = sizeof(sal_uInt16)*2 + eaAscii.usLen;
eaType.value = &eaAscii;
// put EA to file
rc = _ea_put( &eaType, filePath, 0, ".TYPE");
@@ -1966,7 +1966,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
//-------------------------------------------------------------------------
-sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, BOOL bCommit )
+sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
{
sal_Bool bOk = sal_False;
{
@@ -2293,7 +2293,7 @@ sal_Bool SfxObjectShell::InsertFrom( SfxMedium& rMedium )
const OUString sInputStream ( RTL_CONSTASCII_USTRINGPARAM ( "InputStream" ) );
sal_Bool bHasInputStream = sal_False;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = lDescriptor.getLength();
@@ -2388,7 +2388,7 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium )
const OUString sInputStream ( RTL_CONSTASCII_USTRINGPARAM ( "InputStream" ) );
sal_Bool bHasInputStream = sal_False;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = lDescriptor.getLength();
@@ -2479,9 +2479,9 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
// put in the REAL file name, and copy all PropertyValues
const OUString sOutputStream ( RTL_CONSTASCII_USTRINGPARAM ( "OutputStream" ) );
const OUString sStream ( RTL_CONSTASCII_USTRINGPARAM ( "StreamForOutput" ) );
- BOOL bHasOutputStream = FALSE;
- BOOL bHasStream = FALSE;
- BOOL bHasBaseURL = FALSE;
+ sal_Bool bHasOutputStream = sal_False;
+ sal_Bool bHasStream = sal_False;
+ sal_Bool bHasBaseURL = sal_False;
sal_Int32 i;
sal_Int32 nEnd = aOldArgs.getLength();
@@ -2678,7 +2678,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
DBG_CHKTHIS(SfxObjectShell, 0);
pImp->bIsSaving = sal_True;
- sal_Bool bSaved = FALSE;
+ sal_Bool bSaved = sal_False;
SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
if ( pSalvageItem )
{
@@ -2772,7 +2772,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
SfxMedium *pActMed = GetMedium();
const INetURLObject aActName(pActMed->GetName());
- BOOL bWasReadonly = IsReadOnly();
+ sal_Bool bWasReadonly = IsReadOnly();
if ( aURL == aActName && aURL != INetURLObject( OUString::createFromAscii( "private:stream" ) )
&& IsReadOnly() )
@@ -2968,7 +2968,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
if ( !bCopyTo )
{
// reconnect to the old medium
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
bRet = DoSaveCompleted( pMedium );
DBG_ASSERT( bRet, "Error in DoSaveCompleted, can't be handled!");
}
@@ -3062,7 +3062,7 @@ sal_uInt16 SfxObjectShell::GetHiddenInformationState( sal_uInt16 nStates )
sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent )
{
sal_Int16 nRet = RET_YES;
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
SvtSecurityOptions::EOption eOption = static_cast< SvtSecurityOptions::EOption >( -1 );
switch ( eFact )
@@ -3242,7 +3242,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
}
-sal_Bool SfxObjectShell::SaveChildren( BOOL bObjectsOnly )
+sal_Bool SfxObjectShell::SaveChildren( sal_Bool bObjectsOnly )
{
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveChildren" );
@@ -3348,7 +3348,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
#ifdef DBG_UTIL
// check for wrong creation of object container
- BOOL bHasContainer = ( pImp->mpObjectContainer != 0 );
+ sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 );
#endif
if ( !xStorage.is() || xStorage == GetStorage() )
@@ -3496,7 +3496,7 @@ sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorag
sal_Bool bResult = sal_False;
#ifdef DBG_UTIL
// check for wrong creation of object container
- BOOL bHasContainer = ( pImp->mpObjectContainer != 0 );
+ sal_Bool bHasContainer = ( pImp->mpObjectContainer != 0 );
#endif
if ( xStorage.is() )
{
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index 32d50de40d51..8573c4afc0f4 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -128,10 +128,10 @@ const SfxItemPropertyMapEntry* lcl_GetDocInfoPropertyMap()
return aDocInfoPropertyMap_Impl;
}
-static USHORT aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
+static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
-inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
+inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
{
if ( nMonth != 2 )
return aDaysInMonth[nMonth-1];
@@ -708,7 +708,7 @@ void SAL_CALL SfxDocumentInfoObject::removeProperty(const ::rtl::OUString& sName
return xPropSet->removeProperty(sName);
}
-BOOL equalsDateTime( const util::DateTime& D1, const util::DateTime& D2 )
+sal_Bool equalsDateTime( const util::DateTime& D1, const util::DateTime& D2 )
{
return D1.HundredthSeconds == D2.HundredthSeconds &&
D1.Seconds == D2.Seconds &&
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index a5141662fa3d..4255e9bd2939 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -815,7 +815,7 @@ void SfxObjectShell::InitBasicManager_Impl()
changed to return the Basic manager currently under construction, when
called repeatedly.
- The variable pImp->bBasicInitialized will be set to TRUE after
+ The variable pImp->bBasicInitialized will be set to sal_True after
construction now, to ensure that the recursive call of the function
lcl_getBasicManagerForDocument() will be routed into this function too.
@@ -826,7 +826,7 @@ void SfxObjectShell::InitBasicManager_Impl()
DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicManager->isValid(), "Lokaler BasicManager bereits vorhanden");
pImp->pBasicManager->reset( BasicManagerRepository::getDocumentBasicManager( GetModel() ) );
DBG_ASSERT( pImp->pBasicManager->isValid(), "SfxObjectShell::InitBasicManager_Impl: did not get a BasicManager!" );
- pImp->bBasicInitialized = TRUE;
+ pImp->bBasicInitialized = sal_True;
}
//--------------------------------------------------------------------
@@ -941,7 +941,7 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact )
String aPrefix = String::CreateFromAscii( "private:factory/" );
if ( aPrefix.Len() == aFact.Match( aPrefix ) )
aFact.Erase( 0, aPrefix.Len() );
- USHORT nPos = aFact.Search( '?' );
+ sal_uInt16 nPos = aFact.Search( '?' );
String aParam;
if ( nPos != STRING_NOTFOUND )
{
@@ -1034,8 +1034,8 @@ SfxObjectShell* SfxObjectShell::CreateAndLoadObject( const SfxItemSet& rSet, Sfx
{
uno::Sequence < beans::PropertyValue > aProps;
TransformItems( SID_OPENDOC, rSet, aProps );
- SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
- SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
+ SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
::rtl::OUString aURL;
::rtl::OUString aTarget = rtl::OUString::createFromAscii("_blank");
if ( pFileNameItem )
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index d6192542d1a1..2e0df56ba141 100755
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -590,14 +590,14 @@ void SfxOleFileTimeProperty::ImplSave( SvStream& rStrm )
{
DateTime aDateTimeUtc(
Date(
- static_cast< USHORT >( maDateTime.Day ),
- static_cast< USHORT >( maDateTime.Month ),
- static_cast< USHORT >( maDateTime.Year ) ),
+ static_cast< sal_uInt16 >( maDateTime.Day ),
+ static_cast< sal_uInt16 >( maDateTime.Month ),
+ static_cast< sal_uInt16 >( maDateTime.Year ) ),
Time(
- static_cast< ULONG >( maDateTime.Hours ),
- static_cast< ULONG >( maDateTime.Minutes ),
- static_cast< ULONG >( maDateTime.Seconds ),
- static_cast< ULONG >( maDateTime.HundredthSeconds ) ) );
+ static_cast< sal_uIntPtr >( maDateTime.Hours ),
+ static_cast< sal_uIntPtr >( maDateTime.Minutes ),
+ static_cast< sal_uIntPtr >( maDateTime.Seconds ),
+ static_cast< sal_uIntPtr >( maDateTime.HundredthSeconds ) ) );
// invalid time stamp is not converted to UTC
// heuristic to detect editing durations (which we assume to be < 1 year):
// check only the year, not the entire date
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 9ff8c73acbf6..8c731845554f 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -105,7 +105,7 @@ throw( uno::RuntimeException )
{
uno::Reference< plugin::XPluginManager > xPMgr( mxFact->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.plugin.PluginManager") ), uno::UNO_QUERY );
if (!xPMgr.is() )
- return FALSE;
+ return sal_False;
if ( SvtMiscOptions().IsPluginsEnabled() )
{
@@ -115,10 +115,10 @@ throw( uno::RuntimeException )
pWin->SetBackground();
pWin->Show();
- ULONG nCount = maCmdList.Count();
+ sal_uIntPtr nCount = maCmdList.Count();
uno::Sequence < ::rtl::OUString > aCmds( nCount ), aArgs( nCount );
::rtl::OUString *pCmds = aCmds.getArray(), *pArgs = aArgs.getArray();
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
SvCommand & rCmd = maCmdList.GetObject( i );
pCmds[i] = rCmd.GetCommand();
@@ -136,7 +136,7 @@ throw( uno::RuntimeException )
{
pWin->xWindow = xWindow;
pWin->Resize();
- xWindow->setVisible( TRUE );
+ xWindow->setVisible( sal_True );
}
try
@@ -165,10 +165,10 @@ throw( uno::RuntimeException )
// we must destroy the plugin before the parent is destroyed
xWindow->addEventListener( this );
xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
- return mxPlugin.is() ? TRUE : FALSE;
+ return mxPlugin.is() ? sal_True : sal_False;
}
- return FALSE;
+ return sal_False;
}
void SAL_CALL PluginObject::cancel() throw( com::sun::star::uno::RuntimeException )
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index d088f6981f49..8bf97ba5b435 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -422,8 +422,8 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
rtl::OUString aTmp;
if ( ( rProp.Value >>= aTmp ) == sal_False )
throw ::com::sun::star::lang::IllegalArgumentException();
- USHORT nCount = pPrinter->GetPaperBinCount();
- for (USHORT nBin=0; nBin<nCount; nBin++)
+ sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ for (sal_uInt16 nBin=0; nBin<nCount; nBin++)
{
::rtl::OUString aName( pPrinter->GetPaperBinName(nBin) );
if ( aName == aTmp )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 13a42e3721c4..32b46bb67e4d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -511,10 +511,10 @@ SfxSaveGuard::~SfxSaveGuard()
m_pData->m_bSaving = sal_False;
// m_bSuicide was set e.g. in case somewhere tried to close a document, while it was used for
- // storing at the same time. Further m_bSuicide was set to TRUE only if close(TRUE) was called.
+ // storing at the same time. Further m_bSuicide was set to sal_True only if close(sal_True) was called.
// So the owner ship was delegated to the place where a veto exception was thrown.
// Now we have to call close() again and delegate the owner ship to the next one, which
- // cant accept that. Close(FALSE) cant work in this case. Because then the document will may be never closed ...
+ // cant accept that. Close(sal_False) cant work in this case. Because then the document will may be never closed ...
if ( m_pData->m_bSuicide )
{
@@ -1860,7 +1860,7 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
}
// !TODO: currently not working
- //SFX_ITEMSET_ARG( pParams, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE );
+ //SFX_ITEMSET_ARG( pParams, pFrameItem, SfxFrameItem, SID_DOCFRAME, sal_False );
//if( pFrameItem && pFrameItem->GetFrame() )
//{
// SfxFrame* pFrame = pFrameItem->GetFrame();
@@ -1889,7 +1889,7 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
if ( nError == ERRCODE_IO_BROKENPACKAGE && xHandler.is() )
{
::rtl::OUString aDocName = pMedium->GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, FALSE );
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, sal_False );
if ( !pRepairItem || !pRepairItem->GetValue() )
{
RequestPackageReparation aRequest( aDocName );
@@ -1948,12 +1948,12 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
if ( nError )
{
- BOOL bSilent = FALSE;
+ sal_Bool bSilent = sal_False;
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if( pSilentItem )
bSilent = pSilentItem->GetValue();
- BOOL bWarning = ((nError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
+ sal_Bool bWarning = ((nError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
if ( nError != ERRCODE_IO_BROKENPACKAGE && !bSilent )
{
// broken package was handled already
@@ -1979,7 +1979,7 @@ void SAL_CALL SfxBaseModel::load( const uno::Sequence< beans::PropertyValue >&
}
}
- BOOL bHidden = FALSE;
+ sal_Bool bHidden = sal_False;
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
if ( pHidItem )
bHidden = pHidItem->GetValue();
@@ -2028,7 +2028,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
aDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM );
aDesc.maDragStartPos = Point();
aDesc.maDisplayName = String();
- aDesc.mbCanLink = FALSE;
+ aDesc.mbCanLink = sal_False;
SvMemoryStream aMemStm( 1024, 1024 );
aMemStm << aDesc;
@@ -2044,7 +2044,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor )
try
{
utl::TempFile aTmp;
- aTmp.EnableKillingFile( TRUE );
+ aTmp.EnableKillingFile( sal_True );
storeToURL( aTmp.GetURL(), uno::Sequence < beans::PropertyValue >() );
SvStream* pStream = aTmp.GetStream( STREAM_READ );
const sal_uInt32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
@@ -3090,7 +3090,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell ); pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame, m_pData->m_pObjectShell ) )
{
- BOOL bIsActive = ( pFrame == pActFrame );
+ sal_Bool bIsActive = ( pFrame == pActFrame );
pFrame->GetViewShell()->WriteUserDataSequence( aSeq );
aAny <<= aSeq;
xCont->insertByIndex( bIsActive ? 0 : nCount, aAny );
@@ -3361,7 +3361,7 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, uno::Reference< contai
rtl::OUString aSlot( aCommand.copy( 5 ));
// We have to replace the old "slot-Command" with our new ".uno:-Command"
- const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( USHORT( aSlot.toInt32() ));
+ const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( sal_uInt16( aSlot.toInt32() ));
if ( pSlot )
{
rtl::OUStringBuffer aStrBuf( aUnoCmd );
@@ -3611,12 +3611,12 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const uno::Reference< XSTORAGE >& x
pMedium->GetItemSet()->Put( aSet );
// allow to use an interactionhandler (if there is one)
- pMedium->UseInteractionHandler( TRUE );
+ pMedium->UseInteractionHandler( sal_True );
SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False);
- BOOL bTemplate = pTemplateItem && pTemplateItem->GetValue();
+ sal_Bool bTemplate = pTemplateItem && pTemplateItem->GetValue();
m_pData->m_pObjectShell->SetActivateEvent_Impl( bTemplate ? SFX_EVENT_CREATEDOC : SFX_EVENT_OPENDOC );
- m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
+ m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = sal_False;
// load document
if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
@@ -3669,11 +3669,11 @@ void SAL_CALL SfxBaseModel::storeToStorage( const uno::Reference< XSTORAGE >& xS
// BaseURL is part of the ItemSet
SfxMedium aMedium( xStorage, String(), &aSet );
- aMedium.CanDisposeStorage_Impl( FALSE );
+ aMedium.CanDisposeStorage_Impl( sal_False );
if ( aMedium.GetFilter() )
{
// storing without a valid filter will often crash
- bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, TRUE );
+ bSuccess = m_pData->m_pObjectShell->DoSaveObjectAs( aMedium, sal_True );
m_pData->m_pObjectShell->DoSaveCompleted( NULL );
}
}
@@ -3712,7 +3712,7 @@ void SAL_CALL SfxBaseModel::switchToStorage( const uno::Reference< XSTORAGE >& x
nError ? nError : ERRCODE_IO_GENERAL );
}
- m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
+ m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = sal_False;
}
uno::Reference< XSTORAGE > SAL_CALL SfxBaseModel::getDocumentStorage()
@@ -4037,9 +4037,9 @@ namespace sfx { namespace intern {
SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame >& i_rFrame, ::sfx::intern::ViewCreationGuard& i_rGuard ) const
{
SfxViewFrame* pViewFrame = NULL;
- for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), FALSE );
+ for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), sal_False );
pViewFrame;
- pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), FALSE )
+ pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), sal_False )
)
{
if ( pViewFrame->GetFrame().GetFrameInterface() == i_rFrame )
@@ -4146,18 +4146,18 @@ css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createVie
// some initial view settings, coming from our most recent attachResource call
::comphelper::NamedValueCollection aDocumentLoadArgs( getArgs() );
if ( aDocumentLoadArgs.getOrDefault( "ViewOnly", false ) )
- pViewFrame->GetFrame().SetMenuBarOn_Impl( FALSE );
+ pViewFrame->GetFrame().SetMenuBarOn_Impl( sal_False );
const sal_Int16 nPluginMode = aDocumentLoadArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode == 1 )
{
- pViewFrame->ForceOuterResize_Impl( FALSE );
- pViewFrame->GetBindings().HidePopups( TRUE );
+ pViewFrame->ForceOuterResize_Impl( sal_False );
+ pViewFrame->GetBindings().HidePopups( sal_True );
SfxFrame& rFrame = pViewFrame->GetFrame();
// MBA: layoutmanager of inplace frame starts locked and invisible
- rFrame.GetWorkWindow_Impl()->MakeVisible_Impl( FALSE );
- rFrame.GetWorkWindow_Impl()->Lock_Impl( TRUE );
+ rFrame.GetWorkWindow_Impl()->MakeVisible_Impl( sal_False );
+ rFrame.GetWorkWindow_Impl()->Lock_Impl( sal_True );
rFrame.GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
pViewFrame->GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index 63c165bea7eb..32d1cf2cf6fd 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -72,7 +72,7 @@ public:
class CntItemPool: public SfxItemPool
{
static CntItemPool* _pThePool;
- USHORT _nRefs;
+ sal_uInt16 _nRefs;
protected:
CntItemPool();
@@ -80,7 +80,7 @@ protected:
public:
static CntItemPool* Acquire();
- static USHORT Release();
+ static sal_uInt16 Release();
};
//----------------------------------------------------------------------------
@@ -95,7 +95,7 @@ SfxItemPool* NoChaos::GetItemPool()
//----------------------------------------------------------------------------
// static
-USHORT NoChaos::ReleaseItemPool()
+sal_uInt16 NoChaos::ReleaseItemPool()
{
// Release CHAOS item pool.
return CntItemPool::Release();
diff --git a/sfx2/source/inc/appbas.hxx b/sfx2/source/inc/appbas.hxx
index 8b10fcb843de..05c182419514 100644
--- a/sfx2/source/inc/appbas.hxx
+++ b/sfx2/source/inc/appbas.hxx
@@ -36,7 +36,7 @@ class SbxObject;
//=========================================================================
SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
- const char *pName, ULONG nSID, SbxDataType eType=SbxOBJECT,
+ const char *pName, sal_uIntPtr nSID, SbxDataType eType=SbxOBJECT,
SbxClassType = SbxCLASS_PROPERTY );
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 1b3a943c4690..7da892ca89c9 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -126,11 +126,11 @@ public:
SfxProgress* pProgress;
ISfxTemplateCommon* pTemplateCommon;
- USHORT nDocModalMode; // counts documents in modal mode
- USHORT nAutoTabPageId;
- USHORT nRescheduleLocks;
- USHORT nInReschedule;
- USHORT nAsynchronCalls;
+ sal_uInt16 nDocModalMode; // counts documents in modal mode
+ sal_uInt16 nAutoTabPageId;
+ sal_uInt16 nRescheduleLocks;
+ sal_uInt16 nInReschedule;
+ sal_uInt16 nAsynchronCalls;
rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
@@ -152,19 +152,19 @@ public:
SfxDispatcher* pAppDispat; // Dispatcher falls kein Doc
SfxInterface** pInterfaces;
- USHORT nDocNo; // Laufende Doc-Nummer (AutoName)
- USHORT nInterfaces;
+ sal_uInt16 nDocNo; // Laufende Doc-Nummer (AutoName)
+ sal_uInt16 nInterfaces;
- BOOL bDispatcherLocked:1; // nichts ausf"uhren
- BOOL bDowning:1; // TRUE ab Exit und danach
- BOOL bInQuit : 1;
- BOOL bInvalidateOnUnlock : 1;
- BOOL bODFVersionWarningLater : 1;
+ sal_Bool bDispatcherLocked:1; // nichts ausf"uhren
+ sal_Bool bDowning:1; // sal_True ab Exit und danach
+ sal_Bool bInQuit : 1;
+ sal_Bool bInvalidateOnUnlock : 1;
+ sal_Bool bODFVersionWarningLater : 1;
SfxAppData_Impl( SfxApplication* );
~SfxAppData_Impl();
- void UpdateApplicationSettings( BOOL bDontHide );
+ void UpdateApplicationSettings( sal_Bool bDontHide );
SfxDocumentTemplates* GetDocumentTemplates();
void DeInitDDE();
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 83ed69ccb78e..4964cf30233d 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -130,7 +130,7 @@ public:
virtual void SAL_CALL disposing( const EVENTOBJECT& Source )
throw( RUNTIMEEXCEPTION );
- static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, BOOL bNormalizeMacro );
+ static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, sal_Bool bNormalizeMacro );
static void NormalizeMacro( const ANY& rIn, ANY& rOut, SfxObjectShell* pDoc );
static void NormalizeMacro(
const ::comphelper::NamedValueCollection& i_eventDescriptor,
diff --git a/sfx2/source/inc/fltfnc.hxx b/sfx2/source/inc/fltfnc.hxx
index 0a078a33c5be..bac498b6f765 100644
--- a/sfx2/source/inc/fltfnc.hxx
+++ b/sfx2/source/inc/fltfnc.hxx
@@ -29,7 +29,7 @@
#include <sfx2/fcontnr.hxx>
-BOOL SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
+sal_Bool SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
#endif
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index 45aed74b154a..6e0061a69cf2 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -66,7 +66,7 @@ public:
static sal_Bool MakeFolder( const String& rFolder );
static ErrCode QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
- static ULONG GetSize( const String& rContent );
+ static sal_uIntPtr GetSize( const String& rContent );
// please don't use this!
static sal_Bool Exists( const String& rContent );
diff --git a/sfx2/source/inc/mailmodel.hxx b/sfx2/source/inc/mailmodel.hxx
index 43e938d46800..148c99095edb 100644
--- a/sfx2/source/inc/mailmodel.hxx
+++ b/sfx2/source/inc/mailmodel.hxx
@@ -100,6 +100,6 @@ public:
SendMailResult Send( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const rtl::OUString& rType );
};
-BOOL CreateFromAddress_Impl( String& rFrom );
+sal_Bool CreateFromAddress_Impl( String& rFrom );
#endif // INCLUDED_SFX_MAILMODEL_HXX
diff --git a/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
index bbc3c1cd63ac..609661e638e9 100644
--- a/sfx2/source/inc/mnucfga.hxx
+++ b/sfx2/source/inc/mnucfga.hxx
@@ -38,7 +38,7 @@ class SfxMenuCfgItemArr;
struct SfxMenuCfgItem
{
- USHORT nId; // id of the binding or 0 if none
+ sal_uInt16 nId; // id of the binding or 0 if none
String aTitle; // title of the item
String aHelpText; // Hilfetext
String aCommand;
diff --git a/sfx2/source/inc/nfltdlg.hxx b/sfx2/source/inc/nfltdlg.hxx
index 371fa96c57a2..09a5c0a2c5ec 100644
--- a/sfx2/source/inc/nfltdlg.hxx
+++ b/sfx2/source/inc/nfltdlg.hxx
@@ -57,7 +57,7 @@ public:
SfxFilterDialog( Window * pParent,
SfxMedium* pMed,
const SfxFilterMatcher &rMatcher,
- const String *pDefFilter, BOOL bShowConvert = TRUE );
+ const String *pDefFilter, sal_Bool bShowConvert = sal_True );
String GetSelectEntry() const;
};
diff --git a/sfx2/source/inc/nochaos.hxx b/sfx2/source/inc/nochaos.hxx
index 4b5d7fb1f40e..daa06f8e4371 100644
--- a/sfx2/source/inc/nochaos.hxx
+++ b/sfx2/source/inc/nochaos.hxx
@@ -33,7 +33,7 @@ class NoChaos
{
public:
static SfxItemPool* GetItemPool();
- static USHORT ReleaseItemPool();
+ static sal_uInt16 ReleaseItemPool();
};
#endif
diff --git a/sfx2/source/inc/objmnctl.hxx b/sfx2/source/inc/objmnctl.hxx
index e58c6cd5592d..cac1da05fd48 100644
--- a/sfx2/source/inc/objmnctl.hxx
+++ b/sfx2/source/inc/objmnctl.hxx
@@ -44,10 +44,10 @@ class SfxObjectVerbsControl: public SfxMenuControl
private:
void FillMenu();
DECL_LINK( MenuSelect, Menu * );
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
public:
- SfxObjectVerbsControl(USHORT, Menu&, SfxBindings&);
+ SfxObjectVerbsControl(sal_uInt16, Menu&, SfxBindings&);
~SfxObjectVerbsControl();
virtual PopupMenu* GetPopup() const;
SFX_DECL_MENU_CONTROL();
diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx
index 5667a6c1e67a..b8e5bb35068c 100644
--- a/sfx2/source/inc/recfloat.hxx
+++ b/sfx2/source/inc/recfloat.hxx
@@ -38,7 +38,7 @@ class SfxRecordingFloatWrapper_Impl : public SfxChildWindow
SfxBindings* pBindings;
public:
SfxRecordingFloatWrapper_Impl( Window* pParent ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo );
~SfxRecordingFloatWrapper_Impl();
@@ -57,7 +57,7 @@ public:
SfxChildWindow* pChildWin ,
Window* pParent );
virtual ~SfxRecordingFloat_Impl();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
virtual void StateChanged( StateChangedType nStateChange );
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index 202ed6f6f00f..615445bd919e 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -24,13 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//============================================================================
-// Lokale Resourcen
-//
-// (C) 1996 - 2000 Star Division GmbH, Hamburg, Germany
-// $Author: rt $ $Date: 2008-07-30 09:24:39 $ $Revision: 1.8 $
-// $Logfile: T:/sfx2/source/inc/sfxlocal.hrv $ $Workfile: SFXLOCAL.HRC $
-//----------------------------------------------------------------------------
+
+// local resources
+
#ifndef _SFXLOCAL_HRC
#define _SFXLOCAL_HRC
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index 8b5069f20296..830ba2e3b810 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -63,7 +63,7 @@ class SfxPickList : public SfxListener
static osl::Mutex* GetOrCreateMutex();
- void CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const String& aURL, sal_uInt32 nNo );
+ void CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURL, sal_uInt32 nNo );
PickListEntry* GetPickListEntry( sal_uInt32 nIndex );
void CreatePickListEntries();
void RemovePickListEntries();
@@ -76,7 +76,7 @@ class SfxPickList : public SfxListener
sal_uInt32 GetAllowedMenuSize() { return m_nAllowedMenuSize; }
sal_uInt32 GetNumOfEntries() const { return m_aPicklistVector.size(); }
void CreateMenuEntries( Menu* pMenu );
- void ExecuteMenuEntry( USHORT nId );
+ void ExecuteMenuEntry( sal_uInt16 nId );
void ExecuteEntry( sal_uInt32 nIndex );
String GetMenuEntryTitle( sal_uInt32 nIndex );
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 73014121541e..5c01b0d53259 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -62,12 +62,6 @@
class SfxShell;
class Timer;
-#if !defined(_SFX_APPCTOR_CXX) && defined(WNT)
-#ifndef _DLL_
-#error _DLL_ mal wieder nicht defined => GetpApp() == 0
-#endif
-#endif
-
//------------------------------------------------------------------------
// Macro fuer den Call-Profiler unter WinNT
@@ -161,29 +155,29 @@ struct StringList_Impl : private Resource
ResId aResId;
- StringList_Impl( const ResId& rErrIdP, USHORT nId)
+ StringList_Impl( const ResId& rErrIdP, sal_uInt16 nId)
: Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr()){}
~StringList_Impl() { FreeResource(); }
String GetString(){ return String( aResId ); }
- operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+ operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
};
#define SFX_DEL_PTRARR(pArr) \
{ \
- for ( USHORT n = (pArr)->Count(); n--; ) \
+ for ( sal_uInt16 n = (pArr)->Count(); n--; ) \
delete (pArr)->GetObject(n); \
DELETEX(pArr); \
}
class SfxBoolResetter
{
- BOOL& _rVar;
- BOOL _bOld;
+ sal_Bool& _rVar;
+ sal_Bool _bOld;
public:
- SfxBoolResetter( BOOL &rVar )
+ SfxBoolResetter( sal_Bool &rVar )
: _rVar( rVar ),
_bOld( rVar )
{}
diff --git a/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
index 9b0a8e94733c..afef5e926f5f 100644
--- a/sfx2/source/inc/slotserv.hxx
+++ b/sfx2/source/inc/slotserv.hxx
@@ -35,14 +35,14 @@ class SfxSlotServer
{
private:
const SfxSlot* _pSlot;
- USHORT _nShellLevel;
+ sal_uInt16 _nShellLevel;
public:
- SfxSlotServer( const SfxSlot &rSlot, USHORT nShell );
+ SfxSlotServer( const SfxSlot &rSlot, sal_uInt16 nShell );
SfxSlotServer();
- USHORT GetShellLevel() const;
- void SetShellLevel(USHORT nLevel) { _nShellLevel = nLevel; }
+ sal_uInt16 GetShellLevel() const;
+ void SetShellLevel(sal_uInt16 nLevel) { _nShellLevel = nLevel; }
void SetSlot(const SfxSlot* pSlot) {
_pSlot = pSlot;
}
@@ -52,7 +52,7 @@ public:
//--------------------------------------------------------------------
-inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, USHORT nShell ):
+inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, sal_uInt16 nShell ):
_pSlot( &rSlot),
_nShellLevel( nShell )
{
@@ -68,7 +68,7 @@ inline SfxSlotServer::SfxSlotServer():
//--------------------------------------------------------------------
-inline USHORT SfxSlotServer::GetShellLevel() const
+inline sal_uInt16 SfxSlotServer::GetShellLevel() const
{
return _nShellLevel;
}
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 5105d27dd536..4c4ad9cf9390 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -46,21 +46,21 @@ private:
SfxChildAlignment eAlign;
SfxWorkWindow* pWorkWin;
SfxDockArr_Impl* pDockArr;
- BOOL bLocked;
- BOOL bPinned;
+ sal_Bool bLocked;
+ sal_Bool bPinned;
SfxEmptySplitWin_Impl* pEmptyWin;
SfxDockingWindow* pActive;
void InsertWindow_Impl( SfxDock_Impl* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
DECL_LINK( TimerHdl, Timer* );
- BOOL CursorIsOverRect( BOOL bForceAdding = FALSE ) const;
- void SetPinned_Impl( BOOL );
- void SetFadeIn_Impl( BOOL );
+ sal_Bool CursorIsOverRect( sal_Bool bForceAdding = sal_False ) const;
+ void SetPinned_Impl( sal_Bool );
+ void SetFadeIn_Impl( sal_Bool );
void SaveConfig_Impl();
void FadeOut_Impl();
@@ -74,57 +74,57 @@ protected:
public:
SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
- SfxWorkWindow *pW, BOOL bWithButtons,
+ SfxWorkWindow *pW, sal_Bool bWithButtons,
WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK );
~SfxSplitWindow();
- void ReleaseWindow_Impl(SfxDockingWindow *pWin, BOOL bSaveConfig=TRUE);
+ void ReleaseWindow_Impl(SfxDockingWindow *pWin, sal_Bool bSaveConfig=sal_True);
void InsertWindow( SfxDockingWindow* pDockWin,
const Size& rSize);
void InsertWindow( SfxDockingWindow* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
void MoveWindow( SfxDockingWindow* pDockWin,
const Size& rSize,
- USHORT nLine,
- USHORT nPos,
- BOOL bNewLine=FALSE );
+ sal_uInt16 nLine,
+ sal_uInt16 nPos,
+ sal_Bool bNewLine=sal_False );
- void RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide=TRUE);
+ void RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide=sal_True);
- void Lock( BOOL bLock=TRUE )
+ void Lock( sal_Bool bLock=sal_True )
{
bLocked = bLock;
SetUpdateMode( !bLock );
}
using Window::IsLocked;
- BOOL IsLocked() const { return bLocked; }
- BOOL GetWindowPos( const SfxDockingWindow* pWindow,
- USHORT& rLine, USHORT& rPos ) const;
- BOOL GetWindowPos( const Point& rTestPos,
- USHORT& rLine, USHORT& rPos ) const;
- USHORT GetLineCount() const;
- long GetLineSize( USHORT ) const;
- USHORT GetWindowCount(USHORT nLine) const;
- USHORT GetWindowCount() const;
-
- BOOL IsPinned() const { return bPinned; }
- BOOL IsFadeIn() const;
- BOOL IsAutoHide( BOOL bSelf = FALSE ) const;
+ sal_Bool IsLocked() const { return bLocked; }
+ sal_Bool GetWindowPos( const SfxDockingWindow* pWindow,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const;
+ sal_Bool GetWindowPos( const Point& rTestPos,
+ sal_uInt16& rLine, sal_uInt16& rPos ) const;
+ sal_uInt16 GetLineCount() const;
+ long GetLineSize( sal_uInt16 ) const;
+ sal_uInt16 GetWindowCount(sal_uInt16 nLine) const;
+ sal_uInt16 GetWindowCount() const;
+
+ sal_Bool IsPinned() const { return bPinned; }
+ sal_Bool IsFadeIn() const;
+ sal_Bool IsAutoHide( sal_Bool bSelf = sal_False ) const;
SplitWindow* GetSplitWindow();
virtual void AutoHide();
virtual void FadeOut();
virtual void FadeIn();
void Show_Impl();
- void Pin_Impl( BOOL bPinned );
- BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ void Pin_Impl( sal_Bool bPinned );
+ sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
void SetActiveWindow_Impl( SfxDockingWindow* pWin );
};
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 03b0d72dac61..19e1c3e12587 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -95,7 +95,7 @@ friend class BindDispatch_Impl;
private:
SfxStateCache( const SfxStateCache& rOrig ); // n.i.
- void SetState_Impl( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
+ void SetState_Impl( SfxItemState, const SfxPoolItem*, sal_Bool bMaybeDirty=sal_False );
public:
SfxStateCache( sal_uInt16 nFuncId );
@@ -113,11 +113,11 @@ public:
SfxPoolItem* GetItem() const { return pLastItem; }
void ClearCache();
- void SetState( SfxItemState, const SfxPoolItem*, BOOL bMaybeDirty=FALSE );
- void SetCachedState(BOOL bAlways = FALSE);
+ void SetState( SfxItemState, const SfxPoolItem*, sal_Bool bMaybeDirty=sal_False );
+ void SetCachedState(sal_Bool bAlways = sal_False);
void DeleteFloatingWindows();
void Invalidate( sal_Bool bWithSlot );
- void SetVisibleState( BOOL bShow=TRUE );
+ void SetVisibleState( sal_Bool bShow=sal_True );
SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewBinding );
SfxControllerItem* GetItemLink() const;
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 116f56163681..64c9b539d2be 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -75,7 +75,7 @@ private:
protected:
SfxCommonTemplateDialog_Impl* pDialog;
- USHORT nModifier;
+ sal_uInt16 nModifier;
public:
DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) :
@@ -88,7 +88,7 @@ public:
using SvLBox::ExecuteDrop;
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
- USHORT GetModifier() const { return nModifier; }
+ sal_uInt16 GetModifier() const { return nModifier; }
virtual long Notify( NotifyEvent& rNEvt );
};
@@ -166,11 +166,11 @@ protected:
ListBox aFilterLb;
Size aSize;
- USHORT nActFamily; // Id in der ToolBox = Position - 1
- USHORT nActFilter; // FilterIdx
- USHORT nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
+ sal_uInt16 nActFamily; // Id in der ToolBox = Position - 1
+ sal_uInt16 nActFilter; // FilterIdx
+ sal_uInt16 nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
- BOOL bDontUpdate :1,
+ sal_Bool bDontUpdate :1,
bIsWater :1,
bEnabled :1,
bUpdate :1,
@@ -192,14 +192,14 @@ protected:
DECL_LINK( TimeOut, Timer * );
- virtual void EnableItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
- virtual void CheckItem( USHORT /*nMesId*/, BOOL /*bCheck*/ = TRUE ) {}
- virtual BOOL IsCheckedItem( USHORT /*nMesId*/ ) { return TRUE; }
+ virtual void EnableItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
+ virtual void CheckItem( sal_uInt16 /*nMesId*/, sal_Bool /*bCheck*/ = sal_True ) {}
+ virtual sal_Bool IsCheckedItem( sal_uInt16 /*nMesId*/ ) { return sal_True; }
virtual void LoadedFamilies() {}
virtual void Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); }
virtual void InvalidateBindings();
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten ) = 0;
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE ) = 0;
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten ) = 0;
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True ) = 0;
virtual void ClearFamilyList() = 0;
virtual void ReplaceUpdateButtonByMenu();
@@ -207,37 +207,37 @@ protected:
void EditHdl( void* );
void DeleteHdl( void* );
- BOOL Execute_Impl( USHORT nId, const String& rStr, const String& rRefStr,
- USHORT nFamily, USHORT nMask = 0,
- USHORT* pIdx = NULL, const USHORT* pModifier = NULL );
+ sal_Bool Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr,
+ sal_uInt16 nFamily, sal_uInt16 nMask = 0,
+ sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL );
- void UpdateStyles_Impl(USHORT nFlags);
+ void UpdateStyles_Impl(sal_uInt16 nFlags);
const SfxStyleFamilyItem* GetFamilyItem_Impl() const;
- BOOL IsInitialized() { return nActFamily != 0xffff; }
+ sal_Bool IsInitialized() { return nActFamily != 0xffff; }
void ResetFocus();
void EnableDelete();
void Initialize();
- void FilterSelect( USHORT nFilterIdx, BOOL bForce = FALSE );
- void SetFamilyState( USHORT nSlotId, const SfxTemplateItem* );
+ void FilterSelect( sal_uInt16 nFilterIdx, sal_Bool bForce = sal_False );
+ void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* );
void SetWaterCanState( const SfxBoolItem* pItem );
void SelectStyle( const String& rStyle );
- BOOL HasSelectedStyle() const;
+ sal_Bool HasSelectedStyle() const;
void FillTreeBox();
void Update_Impl();
void UpdateFamily_Impl();
// In welchem FamilyState muss ich nachsehen, um die Info der i-ten
// Family in der pStyleFamilies zu bekommen.
- USHORT StyleNrToInfoOffset( USHORT i );
- USHORT InfoOffsetToStyleNr( USHORT i );
+ sal_uInt16 StyleNrToInfoOffset( sal_uInt16 i );
+ sal_uInt16 InfoOffsetToStyleNr( sal_uInt16 i );
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- void FamilySelect( USHORT nId );
- void SetFamily( USHORT nId );
- void ActionSelect( USHORT nId );
+ void FamilySelect( sal_uInt16 nId );
+ void SetFamily( sal_uInt16 nId );
+ void ActionSelect( sal_uInt16 nId );
sal_Int32 LoadFactoryStyleFilter( SfxObjectShell* i_pObjSh );
void SaveFactoryStyleFilter( SfxObjectShell* i_pObjSh, sal_Int32 i_nFilter );
@@ -251,31 +251,31 @@ public:
DECL_LINK( MenuSelectHdl, Menu * );
- virtual void EnableEdit( BOOL b = TRUE ) { bCanEdit = b; }
- virtual void EnableDel( BOOL b = TRUE ) { bCanDel = b; }
- virtual void EnableNew( BOOL b = TRUE ) { bCanNew = b; }
+ virtual void EnableEdit( sal_Bool b = sal_True ) { bCanEdit = b; }
+ virtual void EnableDel( sal_Bool b = sal_True ) { bCanDel = b; }
+ virtual void EnableNew( sal_Bool b = sal_True ) { bCanNew = b; }
ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
Window* GetWindow() { return pWindow; }
- void EnableTreeDrag( BOOL b = TRUE );
+ void EnableTreeDrag( sal_Bool b = sal_True );
void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
- void EnableExample_Impl( USHORT nId, BOOL bEnable );
+ void EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable );
SfxStyleFamily GetActualFamily() const;
String GetSelectedEntry() const;
SfxObjectShell* GetObjectShell() const { return pCurObjShell; }
virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen
- inline BOOL CanEdit( void ) const { return bCanEdit; }
- inline BOOL CanDel( void ) const { return bCanDel; }
- inline BOOL CanNew( void ) const { return bCanNew; }
+ inline sal_Bool CanEdit( void ) const { return bCanEdit; }
+ inline sal_Bool CanDel( void ) const { return bCanDel; }
+ inline sal_Bool CanNew( void ) const { return bCanNew; }
// normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
virtual PopupMenu* CreateContextMenu( void );
// Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um
- static USHORT SfxFamilyIdToNId( SfxStyleFamily nFamily );
+ static sal_uInt16 SfxFamilyIdToNId( SfxStyleFamily nFamily );
void SetAutomaticFilter();
};
@@ -303,7 +303,7 @@ private:
friend class DropToolBox_Impl;
SfxTemplateDialog* m_pFloat;
- BOOL m_bZoomIn;
+ sal_Bool m_bZoomIn;
DropToolBox_Impl m_aActionTbL;
ToolBox m_aActionTbR;
@@ -314,13 +314,13 @@ private:
protected:
virtual void Command( const CommandEvent& rMEvt );
- virtual void EnableEdit( BOOL = TRUE );
- virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void EnableEdit( sal_Bool = sal_True );
+ virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId );
virtual void LoadedFamilies();
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
virtual void ClearFamilyList();
virtual void ReplaceUpdateButtonByMenu();
@@ -360,15 +360,15 @@ private:
SfxModalDefParentHelper aHelper;
protected:
- virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
- virtual BOOL IsCheckedItem( USHORT nMesId );
- virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
- virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void EnableItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual void CheckItem( sal_uInt16 nMesId, sal_Bool bCheck = sal_True );
+ virtual sal_Bool IsCheckedItem( sal_uInt16 nMesId );
+ virtual void InsertFamilyItem( sal_uInt16 nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnabled = sal_True );
virtual void ClearFamilyList();
- virtual void EnableEdit( BOOL = TRUE );
- virtual void EnableDel( BOOL = TRUE );
- virtual void EnableNew( BOOL = TRUE );
+ virtual void EnableEdit( sal_Bool = sal_True );
+ virtual void EnableDel( sal_Bool = sal_True );
+ virtual void EnableNew( sal_Bool = sal_True );
using SfxCommonTemplateDialog_Impl::NewHdl;
DECL_LINK( FamListSelect, ListBox * );
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
index f97d7f89868c..af2ede51701d 100644
--- a/sfx2/source/inc/tplcitem.hxx
+++ b/sfx2/source/inc/tplcitem.hxx
@@ -34,17 +34,17 @@ class SfxCommonTemplateDialog_Impl;
class SfxTemplateControllerItem: public SfxControllerItem {
SfxCommonTemplateDialog_Impl &rTemplateDlg;
- BYTE nWaterCanState;
+ sal_uInt8 nWaterCanState;
long nUserEventId;
DECL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
SfxTemplateControllerItem*);
protected:
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
public:
- SfxTemplateControllerItem( USHORT nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
+ SfxTemplateControllerItem( sal_uInt16 nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
~SfxTemplateControllerItem();
};
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
index 73b686d91252..0203d7744e9e 100644
--- a/sfx2/source/inc/versdlg.hxx
+++ b/sfx2/source/inc/versdlg.hxx
@@ -103,7 +103,7 @@ class SfxViewVersionDialog_Impl : public SfxModalDialog
public:
SfxViewVersionDialog_Impl( Window *pParent,
- SfxVersionInfo& rInfo, BOOL bEdit );
+ SfxVersionInfo& rInfo, sal_Bool bEdit );
};
#endif
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index 4b000133d11c..c54a627e2a78 100644
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -54,21 +54,21 @@ private:
PopupMenu* pPickMenu;
PopupMenu* pAddonsMenu;
Timer* pAutoDeactivate; // Hack fuer QAP-Bug
- USHORT nVisibleItems;
- USHORT nId;
- USHORT nCount;
- USHORT nLocks;
- BOOL bResCtor : 1; // SV Menu created from resource
- BOOL bOLE : 1; // InPlaceMenu
- BOOL bHelpInitialized : 1;
- BOOL bIsActive : 1;
- BOOL bControllersUnBound : 1;
- BOOL bWasHighContrast : 1;
- BOOL bIsAddonPopupMenu : 1;
+ sal_uInt16 nVisibleItems;
+ sal_uInt16 nId;
+ sal_uInt16 nCount;
+ sal_uInt16 nLocks;
+ sal_Bool bResCtor : 1; // SV Menu created from resource
+ sal_Bool bOLE : 1; // InPlaceMenu
+ sal_Bool bHelpInitialized : 1;
+ sal_Bool bIsActive : 1;
+ sal_Bool bControllersUnBound : 1;
+ sal_Bool bWasHighContrast : 1;
+ sal_Bool bIsAddonPopupMenu : 1;
private:
void Construct_Impl();
- FASTBOOL Bind_Impl( Menu *pMenu );
+ bool Bind_Impl( Menu *pMenu );
inline SfxMenuCtrlArr_Impl& GetAppCtrl_Impl()
{
return pAppCtrl? *pAppCtrl: *(pAppCtrl = new SfxMenuCtrlArr_Impl) ;
@@ -77,8 +77,8 @@ private:
void BindControllers();
protected:
- SfxVirtualMenu( USHORT nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, BOOL bWithHelp,
- SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
+ SfxVirtualMenu( sal_uInt16 nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, sal_Bool bWithHelp,
+ SfxBindings &rBind, sal_Bool bOLEServer=sal_False, sal_Bool bRes=sal_False, sal_Bool bIsAddonMenu=sal_False );
void CreateFromSVMenu();
DECL_LINK( Highlight, Menu * );
@@ -93,22 +93,22 @@ protected:
public:
~SfxVirtualMenu();
- SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
- SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE, BOOL bIsAddonMenu=FALSE );
- void CheckItem( USHORT nItemId, BOOL bCheck );
- void EnableItem( USHORT nItemId, BOOL bEnable );
- void SetItemText( USHORT nItemId, const String& rText );
+ SfxVirtualMenu( Menu *pStarViewMenu, sal_Bool bWithHelp,
+ SfxBindings &rBind, sal_Bool bOLEServer=sal_False, sal_Bool bRes=sal_False, sal_Bool bIsAddonMenu=sal_False );
+ void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck );
+ void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable );
+ void SetItemText( sal_uInt16 nItemId, const String& rText );
- USHORT GetItemPos( USHORT nItemId ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
- USHORT GetItemCount() const;
+ sal_uInt16 GetItemCount() const;
Menu* GetSVMenu() const;
- SfxMenuControl& operator[]( USHORT nPos ) const;
+ SfxMenuControl& operator[]( sal_uInt16 nPos ) const;
- USHORT GetItemId( USHORT nPos ) const;
- SfxVirtualMenu* GetPopupMenu( USHORT nId ) const;
- String GetItemText( USHORT nId ) const;
- String GetItemHelpText( USHORT nId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ SfxVirtualMenu* GetPopupMenu( sal_uInt16 nId ) const;
+ String GetItemText( sal_uInt16 nId ) const;
+ String GetItemHelpText( sal_uInt16 nId ) const;
//void InvalidateKeyCodes();
@@ -116,15 +116,15 @@ public:
void SetParentMenu( SfxVirtualMenu* pNewParent )
{ pParent = pNewParent; }
- void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
- BOOL IsFromResource() const
+ void SetPopupMenu( sal_uInt16 nId, PopupMenu *pMenu );
+ sal_Bool IsFromResource() const
{ return bResCtor; }
- void InitPopup(USHORT nPos, BOOL bOLE = TRUE);
+ void InitPopup(sal_uInt16 nPos, sal_Bool bOLE = sal_True);
void InitializeHelp();
void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
ResMgr* GetResMgr() { return pResMgr; }
void SetHelpIds( ResMgr* );
- BOOL IsHiContrastMode() const;
+ sal_Bool IsHiContrastMode() const;
void UpdateImages();
DECL_LINK( Select, Menu * );
@@ -134,7 +134,7 @@ public:
// return the number of virtual items in this menu
-inline USHORT SfxVirtualMenu::GetItemCount() const
+inline sal_uInt16 SfxVirtualMenu::GetItemCount() const
{
return nCount;
}
@@ -142,7 +142,7 @@ inline USHORT SfxVirtualMenu::GetItemCount() const
//
-inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
+inline SfxMenuControl& SfxVirtualMenu::operator[]( sal_uInt16 nPos ) const
{
return *(pItems+nPos);
}
@@ -150,7 +150,7 @@ inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
// returns the item id at position nPos in the menu (or 0 if sep.)
-inline USHORT SfxVirtualMenu::GetItemId( USHORT nPos ) const
+inline sal_uInt16 SfxVirtualMenu::GetItemId( sal_uInt16 nPos ) const
{
return pItems ? pItems[nPos].GetId() : 0;
}
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 0e263a58b90e..8c06e1233297 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -61,10 +61,10 @@ class SfxWorkWindow;
struct SfxObjectBar_Impl
{
- USHORT nId; // Resource - und ConfigId der Toolbox
- USHORT nMode; // spezielle Sichtbarkeitsflags
- USHORT nPos;
- USHORT nIndex;
+ sal_uInt16 nId; // Resource - und ConfigId der Toolbox
+ sal_uInt16 nMode; // spezielle Sichtbarkeitsflags
+ sal_uInt16 nPos;
+ sal_uInt16 nIndex;
sal_Bool bDestroy;
String aName;
SfxInterface* pIFace;
@@ -81,14 +81,14 @@ struct SfxObjectBar_Impl
// Dieser struct h"alt alle relevanten Informationen "uber die Statuszeile bereit.
struct SfxStatBar_Impl
{
- USHORT nId;
- BOOL bOn;
- BOOL bTemp;
+ sal_uInt16 nId;
+ sal_Bool bOn;
+ sal_Bool bTemp;
SfxStatBar_Impl() :
nId(0),
- bOn(TRUE),
- bTemp(FALSE)
+ bOn(sal_True),
+ bTemp(sal_False)
{}
};
@@ -106,15 +106,15 @@ struct SfxChild_Impl
Window* pWin;
Size aSize;
SfxChildAlignment eAlign;
- USHORT nVisible;
- BOOL bResize;
- BOOL bCanGetFocus;
- BOOL bSetFocus;
+ sal_uInt16 nVisible;
+ sal_Bool bResize;
+ sal_Bool bCanGetFocus;
+ sal_Bool bSetFocus;
SfxChild_Impl( Window& rChild, const Size& rSize,
- SfxChildAlignment eAlignment, BOOL bIsVisible ):
- pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(FALSE),
- bCanGetFocus( FALSE ), bSetFocus( FALSE )
+ SfxChildAlignment eAlignment, sal_Bool bIsVisible ):
+ pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(sal_False),
+ bCanGetFocus( sal_False ), bSetFocus( sal_False )
{
nVisible = bIsVisible ? CHILD_VISIBLE : CHILD_NOT_VISIBLE;
}
@@ -126,34 +126,34 @@ class SfxChildWinController_Impl : public SfxControllerItem
SfxWorkWindow* pWorkwin;
public:
- SfxChildWinController_Impl( USHORT nId, SfxWorkWindow *pWin );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ SfxChildWinController_Impl( sal_uInt16 nId, SfxWorkWindow *pWin );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
};
struct SfxChildWin_Impl
{
- USHORT nSaveId; // die ChildWindow-Id
- USHORT nInterfaceId; // der aktuelle Context
- USHORT nId; // aktuelle Id
+ sal_uInt16 nSaveId; // die ChildWindow-Id
+ sal_uInt16 nInterfaceId; // der aktuelle Context
+ sal_uInt16 nId; // aktuelle Id
SfxChildWindow* pWin;
- BOOL bCreate;
+ sal_Bool bCreate;
SfxChildWinInfo aInfo;
SfxChild_Impl* pCli; // != 0 bei direkten Children
- USHORT nVisibility;
- BOOL bEnable;
- BOOL bDisabled;
+ sal_uInt16 nVisibility;
+ sal_Bool bEnable;
+ sal_Bool bDisabled;
SfxChildWin_Impl( sal_uInt32 nID ) :
- nSaveId((USHORT) (nID & 0xFFFF) ),
- nInterfaceId((USHORT) (nID >> 16)),
+ nSaveId((sal_uInt16) (nID & 0xFFFF) ),
+ nInterfaceId((sal_uInt16) (nID >> 16)),
nId(nSaveId),
pWin(0),
- bCreate(FALSE),
+ bCreate(sal_False),
pCli(0),
- nVisibility( FALSE ),
- bEnable( TRUE ),
- bDisabled( FALSE )
+ nVisibility( sal_False ),
+ bEnable( sal_True ),
+ bDisabled( sal_False )
{}
};
@@ -180,9 +180,9 @@ DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
struct SfxObjectBarList_Impl
{
std::deque<SfxObjectBar_Impl> aArr;
- USHORT nAct;
+ sal_uInt16 nAct;
- SfxObjectBar_Impl operator[] ( USHORT n )
+ SfxObjectBar_Impl operator[] ( sal_uInt16 n )
{ return aArr[n]; }
SfxObjectBar_Impl Actual()
{ return aArr[nAct]; }
@@ -258,15 +258,15 @@ protected:
Window* pWorkWin;
SfxShell* pConfigShell;
Window* pActiveChild;
- USHORT nUpdateMode;
- USHORT nChilds;
- USHORT nOrigMode;
- BOOL bSorted : 1;
- BOOL bDockingAllowed : 1;
- BOOL bInternalDockingAllowed : 1;
- BOOL bAllChildsVisible : 1;
- BOOL bIsFullScreen : 1;
- BOOL bShowStatusBar : 1;
+ sal_uInt16 nUpdateMode;
+ sal_uInt16 nChilds;
+ sal_uInt16 nOrigMode;
+ sal_Bool bSorted : 1;
+ sal_Bool bDockingAllowed : 1;
+ sal_Bool bInternalDockingAllowed : 1;
+ sal_Bool bAllChildsVisible : 1;
+ sal_Bool bIsFullScreen : 1;
+ sal_Bool bShowStatusBar : 1;
sal_Int32 m_nLock;
rtl::OUString m_aStatusBarResName;
rtl::OUString m_aLayoutManagerPropName;
@@ -275,13 +275,13 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xLayoutManagerListener;
protected:
- void CreateChildWin_Impl(SfxChildWin_Impl*,BOOL);
+ void CreateChildWin_Impl(SfxChildWin_Impl*,sal_Bool);
void RemoveChildWin_Impl(SfxChildWin_Impl*);
void Sort_Impl();
void AlignChild_Impl( Window& rWindow, const Size& rNewSize,
SfxChildAlignment eAlign );
SfxChild_Impl* FindChild_Impl( const Window& rWindow ) const;
- virtual BOOL RequestTopToolSpacePixel_Impl( SvBorder aBorder );
+ virtual sal_Bool RequestTopToolSpacePixel_Impl( SvBorder aBorder );
virtual Rectangle GetTopRect_Impl();
SvBorder Arrange_Impl();
virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
@@ -295,14 +295,14 @@ public:
{ return *pBindings; }
Window* GetWindow() const
{ return pWorkWin; }
- Rectangle GetFreeArea( BOOL bAutoHide ) const;
- void SetDockingAllowed(BOOL bSet)
+ Rectangle GetFreeArea( sal_Bool bAutoHide ) const;
+ void SetDockingAllowed(sal_Bool bSet)
{ bDockingAllowed = bSet; }
- void SetInternalDockingAllowed(BOOL bSet)
+ void SetInternalDockingAllowed(sal_Bool bSet)
{ bInternalDockingAllowed = bSet; }
- BOOL IsDockingAllowed() const
+ sal_Bool IsDockingAllowed() const
{ return bDockingAllowed; }
- BOOL IsInternalDockingAllowed() const
+ sal_Bool IsInternalDockingAllowed() const
{ return bInternalDockingAllowed; }
SfxWorkWindow* GetParent_Impl() const
{ return pParent; }
@@ -311,64 +311,64 @@ public:
// Methoden f"ur alle Child-Fenster
void DataChanged_Impl( const DataChangedEvent& rDCEvt );
void ReleaseChild_Impl( Window& rWindow );
- SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, BOOL bCanGetFocus=FALSE );
+ SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, sal_Bool bCanGetFocus=sal_False );
void ShowChilds_Impl();
void HideChilds_Impl();
void Close_Impl();
- BOOL PrepareClose_Impl();
- virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ sal_Bool PrepareClose_Impl();
+ virtual void ArrangeChilds_Impl( sal_Bool bForce = sal_True );
void DeleteControllers_Impl();
void SaveStatus_Impl();
- void HidePopups_Impl(BOOL bHide, BOOL bParent=FALSE, USHORT nId=0);
+ void HidePopups_Impl(sal_Bool bHide, sal_Bool bParent=sal_False, sal_uInt16 nId=0);
void ConfigChild_Impl(SfxChildIdentifier,
- SfxDockingConfig, USHORT);
- void MakeChildsVisible_Impl( BOOL bVis );
+ SfxDockingConfig, sal_uInt16);
+ void MakeChildsVisible_Impl( sal_Bool bVis );
void ArrangeAutoHideWindows( SfxSplitWindow *pSplit );
- BOOL IsAutoHideMode( const SfxSplitWindow *pSplit );
+ sal_Bool IsAutoHideMode( const SfxSplitWindow *pSplit );
void EndAutoShow_Impl( Point aPos );
- void SetFullScreen_Impl( BOOL bSet ) { bIsFullScreen = bSet; }
- BOOL IsFullScreen_Impl() const { return bIsFullScreen; }
+ void SetFullScreen_Impl( sal_Bool bSet ) { bIsFullScreen = bSet; }
+ sal_Bool IsFullScreen_Impl() const { return bIsFullScreen; }
// Methoden f"ur Objectbars
virtual void UpdateObjectBars_Impl();
void ResetObjectBars_Impl();
- void SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
+ void SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
SfxInterface *pIFace, const String* pName=0 );
- Window* GetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId );
- FASTBOOL KnowsObjectBar_Impl( USHORT nPos ) const;
- BOOL IsVisible_Impl();
- void MakeVisible_Impl( BOOL );
- void SetObjectBarVisibility_Impl( USHORT nVis );
- BOOL IsContainer_Impl() const;
- void Lock_Impl( BOOL );
- void NextObjectBar_Impl( USHORT nPos );
- USHORT HasNextObjectBar_Impl( USHORT nPos, String* pStr=0 );
- void SetObjectBarCustomizeMode_Impl( BOOL );
+ Window* GetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId );
+ bool KnowsObjectBar_Impl( sal_uInt16 nPos ) const;
+ sal_Bool IsVisible_Impl();
+ void MakeVisible_Impl( sal_Bool );
+ void SetObjectBarVisibility_Impl( sal_uInt16 nVis );
+ sal_Bool IsContainer_Impl() const;
+ void Lock_Impl( sal_Bool );
+ void NextObjectBar_Impl( sal_uInt16 nPos );
+ sal_uInt16 HasNextObjectBar_Impl( sal_uInt16 nPos, String* pStr=0 );
+ void SetObjectBarCustomizeMode_Impl( sal_Bool );
// Methoden f"ur ChildWindows
void UpdateChildWindows_Impl();
void ResetChildWindows_Impl();
- void SetChildWindowVisible_Impl( sal_uInt32, BOOL, USHORT );
- void ToggleChildWindow_Impl(USHORT,BOOL);
- BOOL HasChildWindow_Impl(USHORT);
- BOOL KnowsChildWindow_Impl(USHORT);
- void ShowChildWindow_Impl(USHORT, BOOL bVisible, BOOL bSetFocus);
- void SetChildWindow_Impl(USHORT, BOOL bOn, BOOL bSetFocus);
- SfxChildWindow* GetChildWindow_Impl(USHORT);
+ void SetChildWindowVisible_Impl( sal_uInt32, sal_Bool, sal_uInt16 );
+ void ToggleChildWindow_Impl(sal_uInt16,sal_Bool);
+ sal_Bool HasChildWindow_Impl(sal_uInt16);
+ sal_Bool KnowsChildWindow_Impl(sal_uInt16);
+ void ShowChildWindow_Impl(sal_uInt16, sal_Bool bVisible, sal_Bool bSetFocus);
+ void SetChildWindow_Impl(sal_uInt16, sal_Bool bOn, sal_Bool bSetFocus);
+ SfxChildWindow* GetChildWindow_Impl(sal_uInt16);
virtual void InitializeChild_Impl(SfxChildWin_Impl*);
SfxSplitWindow* GetSplitWindow_Impl(SfxChildAlignment);
- BOOL IsVisible_Impl( USHORT nMode ) const;
- void DisableChildWindow_Impl( USHORT nId, BOOL bDisable );
- BOOL IsFloating( USHORT nId );
+ sal_Bool IsVisible_Impl( sal_uInt16 nMode ) const;
+ void DisableChildWindow_Impl( sal_uInt16 nId, sal_Bool bDisable );
+ sal_Bool IsFloating( sal_uInt16 nId );
void ChangeWindow_Impl( Window *pNew );
void SetActiveChild_Impl( Window *pChild );
Window* GetActiveChild_Impl();
- virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ virtual sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
// Methoden f"ur StatusBar
- void SetTempStatusBar_Impl( BOOL bSet );
+ void SetTempStatusBar_Impl( sal_Bool bSet );
void ResetStatusBar_Impl();
void SetStatusBar_Impl(sal_uInt32 nResId, SfxShell *pShell, SfxBindings& );
void UpdateStatusBar_Impl();
@@ -382,7 +382,7 @@ class SfxFrameWorkWin_Impl : public SfxWorkWindow
SfxFrame* pFrame;
public:
SfxFrameWorkWin_Impl( Window* pWin, SfxFrame* pFrm, SfxFrame* pMaster );
- virtual void ArrangeChilds_Impl( BOOL bForce = TRUE );
+ virtual void ArrangeChilds_Impl( sal_Bool bForce = sal_True );
virtual void UpdateObjectBars_Impl();
virtual Rectangle GetTopRect_Impl();
};
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 4ac85a7c98fe..e420f5a04b5b 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -82,7 +82,7 @@ using namespace ::com::sun::star::task;
SFX_IMPL_TOOLBOX_CONTROL(SfxURLToolBoxControl_Impl,SfxStringItem)
-SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox )
+SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
: SfxToolBoxControl( nSlotId, nId, rBox ),
pAccExec( 0 )
{
@@ -101,7 +101,7 @@ SvtURLBox* SfxURLToolBoxControl_Impl::GetURLBox() const
//***************************************************************************
-void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, BOOL /*bNew*/ ) const
+void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, sal_Bool /*bNew*/ ) const
{
String aName;
String aFilter;
@@ -190,7 +190,7 @@ IMPL_LINK( SfxURLToolBoxControl_Impl, SelectHdl, void*, EMPTYARG )
String aName( pURLBox->GetURL() );
if ( !pURLBox->IsTravelSelect() && aName.Len() )
- OpenURL( aName, FALSE );
+ OpenURL( aName, sal_False );
return 1L;
}
@@ -240,7 +240,7 @@ IMPL_LINK( SfxURLToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEve
void SfxURLToolBoxControl_Impl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState
)
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 3d2f2db47def..c93fa116172b 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::util;
class SfxEnumMenu: public PopupMenu
{
- USHORT nSlot;
+ sal_uInt16 nSlot;
SfxEnumItem *pItem;
SfxBindings* pBindings;
@@ -93,20 +93,20 @@ protected:
virtual void Select();
public:
- SfxEnumMenu( USHORT nSlot, SfxBindings* pBind, const SfxEnumItem &rItem );
+ SfxEnumMenu( sal_uInt16 nSlot, SfxBindings* pBind, const SfxEnumItem &rItem );
~SfxEnumMenu();
};
//=========================================================================
-SfxEnumMenu::SfxEnumMenu( USHORT nSlotId, SfxBindings* pBind, const SfxEnumItem &rItem ):
+SfxEnumMenu::SfxEnumMenu( sal_uInt16 nSlotId, SfxBindings* pBind, const SfxEnumItem &rItem ):
nSlot( nSlotId ),
pItem( (SfxEnumItem*) rItem.Clone() ),
pBindings( pBind )
{
- for ( USHORT nVal = 0; nVal < pItem->GetValueCount(); ++nVal )
+ for ( sal_uInt16 nVal = 0; nVal < pItem->GetValueCount(); ++nVal )
InsertItem( nVal+1, pItem->GetValueTextByPos(nVal) );
- CheckItem( pItem->GetValue() + 1, TRUE );
+ CheckItem( pItem->GetValue() + 1, sal_True );
}
//-------------------------------------------------------------------------
@@ -142,7 +142,7 @@ void SfxMenuControl::SetOwnMenu( SfxVirtualMenu* pMenu )
void SfxMenuControl::Bind(
SfxVirtualMenu* pOwn,
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
const String& rTitle,
const String &rHelpText,
SfxBindings &rBindings )
@@ -168,7 +168,7 @@ void SfxMenuControl::Bind(
void SfxMenuControl::Bind(
SfxVirtualMenu* pOwn,
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxVirtualMenu& rMenu,
const String& rTitle,
const String &rHelpText,
@@ -187,7 +187,7 @@ void SfxMenuControl::Bind(
// ctor for explicit registration
-SfxMenuControl::SfxMenuControl( BOOL bShowStrings )
+SfxMenuControl::SfxMenuControl( sal_Bool bShowStrings )
: pOwnMenu(0),
pSubMenu(0),
b_ShowStrings(bShowStrings)
@@ -202,18 +202,18 @@ SfxMenuControl::SfxMenuControl( BOOL bShowStrings )
SfxMenuControl::SfxMenuControl():
pOwnMenu(0),
pSubMenu(0),
- b_ShowStrings(FALSE)
+ b_ShowStrings(sal_False)
{
DBG_MEMTEST();
}
//--------------------------------------------------------------------
-SfxMenuControl::SfxMenuControl(USHORT nSlotId, SfxBindings& rBindings):
+SfxMenuControl::SfxMenuControl(sal_uInt16 nSlotId, SfxBindings& rBindings):
SfxControllerItem(nSlotId, rBindings),
pOwnMenu(0),
pSubMenu(0),
- b_ShowStrings(FALSE)
+ b_ShowStrings(sal_False)
{
DBG_MEMTEST();
@@ -245,7 +245,7 @@ void SfxMenuControl::RemovePopup()
void SfxMenuControl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -255,14 +255,14 @@ void SfxMenuControl::StateChanged
DBG_ASSERT( nSID == GetId(), "strange SID" );
DBG_ASSERT( pOwnMenu != 0, "setting state to dangling SfxMenuControl" );
- FASTBOOL bIsObjMenu =
+ bool bIsObjMenu =
GetId() >= SID_OBJECTMENU0 && GetId() < SID_OBJECTMENU_LAST;
// enabled/disabled-Flag pauschal korrigieren
#ifdef UNIX
if (nSID == SID_PASTE)
- pOwnMenu->EnableItem( GetId(), TRUE );
+ pOwnMenu->EnableItem( GetId(), sal_True );
else
#endif
pOwnMenu->EnableItem( GetId(), bIsObjMenu
@@ -273,7 +273,7 @@ void SfxMenuControl::StateChanged
{
// checken nur bei nicht-Object-Menus
if ( !bIsObjMenu )
- pOwnMenu->CheckItem( GetId(), FALSE );
+ pOwnMenu->CheckItem( GetId(), sal_False );
// SetItemText flackert in MenuBar insbes. unter OS/2 (Bug #20658)
if ( // !bIsObjMenu && nicht wegen "Format/Datenbank"
@@ -340,14 +340,14 @@ void SfxMenuControl::StateChanged
//--------------------------------------------------------------------
-SfxMenuControl* SfxMenuControl::CreateImpl( USHORT /*nId*/, Menu& /*rMenu*/, SfxBindings& /*rBindings*/ )
+SfxMenuControl* SfxMenuControl::CreateImpl( sal_uInt16 /*nId*/, Menu& /*rMenu*/, SfxBindings& /*rBindings*/ )
{
- return new SfxMenuControl( TRUE );
+ return new SfxMenuControl( sal_True );
}
//--------------------------------------------------------------------
-void SfxMenuControl::RegisterControl( USHORT nSlotId, SfxModule *pMod )
+void SfxMenuControl::RegisterControl( sal_uInt16 nSlotId, SfxModule *pMod )
{
RegisterMenuControl( pMod, new SfxMenuCtrlFactory(
SfxMenuControl::CreateImpl, TYPE(SfxStringItem), nSlotId ) );
@@ -359,7 +359,7 @@ void SfxMenuControl::RegisterMenuControl(SfxModule* pMod, SfxMenuCtrlFactory* pF
SFX_APP()->RegisterMenuControl_Impl( pMod, pFact );
}
-SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindings &rBindings )
+SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings )
{
TypeId aSlotType = SFX_SLOTPOOL().GetSlotType(nId);
if ( aSlotType )
@@ -373,7 +373,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
if ( pFactories )
{
SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
@@ -383,7 +383,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
SfxMenuCtrlFactArr_Impl &rFactories = pApp->GetMenuCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
@@ -392,7 +392,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindi
return 0;
}
-BOOL SfxMenuControl::IsSpecialControl( USHORT nId, SfxModule* pMod )
+sal_Bool SfxMenuControl::IsSpecialControl( sal_uInt16 nId, SfxModule* pMod )
{
TypeId aSlotType = SFX_SLOTPOOL().GetSlotType( nId );
if ( aSlotType )
@@ -403,21 +403,21 @@ BOOL SfxMenuControl::IsSpecialControl( USHORT nId, SfxModule* pMod )
if ( pFactories )
{
SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
- return TRUE;
+ return sal_True;
}
}
SfxMenuCtrlFactArr_Impl &rFactories = SFX_APP()->GetMenuCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nId) ) )
- return TRUE;
+ return sal_True;
}
return 0;
}
@@ -437,7 +437,7 @@ long Select_Impl( void* pHdl, void* pVoid );
SFX_IMPL_MENU_CONTROL( SfxAppMenuControl_Impl, SfxStringItem );
SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
- USHORT nPos, Menu& rMenu, SfxBindings& rBindings )
+ sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings )
: SfxMenuControl( nPos, rBindings ), pMenu(0)
{
String aText = rMenu.GetItemText( nPos );
@@ -470,9 +470,9 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
- BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
+ sal_uIntPtr nSymbolsStyle = rSettings.GetSymbolsStyle();
+ sal_Bool bIsHiContrastMode = rSettings.GetHighContrastMode();
+ sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
( bIsHiContrastMode != m_bWasHiContrastMode ) ||
@@ -482,10 +482,10 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
m_bWasHiContrastMode = bIsHiContrastMode;
m_bShowMenuImages = bShowMenuImages;
- USHORT nCount = pActMenu->GetItemCount();
- for ( USHORT nSVPos = 0; nSVPos < nCount; nSVPos++ )
+ sal_uInt16 nCount = pActMenu->GetItemCount();
+ for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ )
{
- USHORT nItemId = pActMenu->GetItemId( nSVPos );
+ sal_uInt16 nItemId = pActMenu->GetItemId( nSVPos );
if ( pActMenu->GetItemType( nSVPos ) != MENUITEM_SEPARATOR )
{
if ( bShowMenuImages )
@@ -501,7 +501,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( aImageId.getLength() > 0 )
{
Reference< ::com::sun::star::frame::XFrame > xFrame;
- Image aImage = GetImage( xFrame, aImageId, FALSE, bIsHiContrastMode );
+ Image aImage = GetImage( xFrame, aImageId, sal_False, bIsHiContrastMode );
if ( !!aImage )
{
bImageSet = sal_True;
@@ -513,7 +513,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
if ( !bImageSet && aCmd.Len() )
{
Image aImage = SvFileInformationManager::GetImage(
- INetURLObject(aCmd), FALSE, bIsHiContrastMode );
+ INetURLObject(aCmd), sal_False, bIsHiContrastMode );
if ( !!aImage )
pActMenu->SetItemImage( nItemId, aImage );
}
@@ -524,26 +524,26 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd,
- USHORT nId, Menu& rMenu, SfxBindings &rBindings, SfxVirtualMenu* pVirt )
+ sal_uInt16 nId, Menu& rMenu, SfxBindings &rBindings, SfxVirtualMenu* pVirt )
{
return new SfxUnoMenuControl( rCmd, nId, rMenu, rBindings, pVirt );
}
SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd,
- USHORT nId, Menu& rMenu, const String& sItemText, const String& sHelpText,
+ sal_uInt16 nId, Menu& rMenu, const String& sItemText, const String& sHelpText,
SfxBindings& rBindings, SfxVirtualMenu* pVirt)
{
return new SfxUnoMenuControl( rCmd, nId, rMenu, sItemText, sHelpText, rBindings, pVirt);
}
-SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId,
+SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, sal_uInt16 nSlotId,
Menu& rMenu, SfxBindings& rBindings, SfxVirtualMenu* pVirt )
: SfxMenuControl( nSlotId, rBindings )
{
@@ -556,7 +556,7 @@ SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nSlotId,
}
SfxUnoMenuControl::SfxUnoMenuControl(
- const String& rCmd, USHORT nSlotId, Menu& /*rMenu*/,
+ const String& rCmd, sal_uInt16 nSlotId, Menu& /*rMenu*/,
const String& rItemText, const String& rHelpText,
SfxBindings& rBindings, SfxVirtualMenu* pVirt)
: SfxMenuControl( nSlotId, rBindings )
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index f1eadf744863..ed3bd40fb558 100755
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -86,8 +86,8 @@
#include "thessubmenu.hxx"
-static const USHORT nCompatVersion = 4;
-static const USHORT nVersion = 5;
+static const sal_uInt16 nCompatVersion = 4;
+static const sal_uInt16 nVersion = 5;
// static member initialization
PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL;
@@ -118,7 +118,7 @@ SfxMenuManager::SfxMenuManager( const ResId& rResId, SfxBindings &rBindings )
pResMgr(rResId.GetResMgr()),
nType( rResId.GetId() )
{
- bAddClipboardFuncs = FALSE;
+ bAddClipboardFuncs = sal_False;
DBG_MEMTEST();
}
@@ -153,8 +153,8 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
{
SfxObjectShell* pDoc = pView->GetObjectShell();
pMenu->InsertSeparator();
- USHORT nr=0;
- for ( USHORT n = 0; n < aVerbs.getLength(); ++n )
+ sal_uInt16 nr=0;
+ for ( sal_uInt16 n = 0; n < aVerbs.getLength(); ++n )
{
// check for ReadOnly verbs
if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) )
@@ -165,7 +165,7 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
continue;
// neue Id vergeben
- USHORT nId = SID_VERB_START + nr++;
+ sal_uInt16 nId = SID_VERB_START + nr++;
DBG_ASSERT(nId <= SID_VERB_END, "Zuviele Verben!");
if ( nId > SID_VERB_END )
break;
@@ -238,10 +238,10 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0)
aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) );
- for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i)
+ for (sal_uInt16 i = 0; (size_t)i < nNumSynonyms; ++i)
{
//! item ids should start with values > 0, since 0 has special meaning
- const USHORT nId = i + 1;
+ const sal_uInt16 nId = i + 1;
String aItemText( linguistic::GetThesaurusReplaceText( aSynonyms[i] ) );
pThesSubMenu->InsertItem( nId, aItemText );
@@ -296,10 +296,10 @@ void SfxMenuManager::UseDefault()
if ( bAddClipboardFuncs )
{
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -311,13 +311,13 @@ void SfxMenuManager::UseDefault()
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
}
}
}
- pVMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ pVMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True );
}
Construct(*pVMenu);
@@ -335,7 +335,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu )
{
DBG_MEMTEST();
- USHORT nId = (USHORT) pSelMenu->GetCurItemId();
+ sal_uInt16 nId = (sal_uInt16) pSelMenu->GetCurItemId();
String aCommand = pSelMenu->GetItemCommand( nId );
if ( !aCommand.Len() && pBindings )
{
@@ -358,12 +358,12 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu )
// special menu function
pBindings->GetDispatcher_Impl()->Execute( nId );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
-void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp )
+void SfxMenuManager::Construct_Impl( Menu* pSVMenu, sal_Bool bWithHelp )
{
SfxVirtualMenu *pOldVirtMenu=0;
if ( pMenu )
@@ -374,7 +374,7 @@ void SfxMenuManager::Construct_Impl( Menu* pSVMenu, BOOL bWithHelp )
}
TryToHideDisabledEntries_Impl( pSVMenu );
- SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, TRUE );
+ SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, sal_True );
Construct(*pVMenu);
if ( pOldVirtMenu )
@@ -408,10 +408,10 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
{
DBG_MEMTEST();
- USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ sal_uInt16 nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
delete pStaticThesSubMenu; pStaticThesSubMenu = NULL;
return nVal;
}
@@ -427,13 +427,13 @@ IMPL_LINK_INLINE_END( SfxPopupMenuManager, SelectHdl, void *, EMPTYARG )
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 )
{
DBG_MEMTEST();
PopupMenu* pPopMenu = ( (PopupMenu*)GetMenu()->GetSVMenu() );
pPopMenu->SetSelectHdl( LINK( this, SfxPopupMenuManager, SelectHdl ) );
- USHORT nId = pPopMenu->Execute( pWindow, rPoint );
+ sal_uInt16 nId = pPopMenu->Execute( pWindow, rPoint );
pPopMenu->SetSelectHdl( Link() );
if ( nId )
@@ -444,7 +444,7 @@ USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, va_li
//--------------------------------------------------------------------
-USHORT SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... )
+sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1, ... )
{
DBG_MEMTEST();
@@ -469,21 +469,21 @@ void SfxPopupMenuManager::StartInsert()
void SfxPopupMenuManager::EndInsert()
{
pBindings->ENTERREGISTRATIONS();
- pMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ pMenu = new SfxVirtualMenu( pSVMenu, sal_False, *pBindings, sal_True, sal_True );
Construct( *pMenu );
pBindings->LEAVEREGISTRATIONS();
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::InsertSeparator( USHORT nPos )
+void SfxPopupMenuManager::InsertSeparator( sal_uInt16 nPos )
{
pSVMenu->InsertSeparator( nPos );
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, USHORT nPos )
+void SfxPopupMenuManager::InsertItem( sal_uInt16 nId, const String& rName, MenuItemBits nBits, const rtl::OString& rHelpId, sal_uInt16 nPos )
{
pSVMenu->InsertItem( nId, rName, nBits,nPos );
pSVMenu->SetHelpId( nId, rHelpId );
@@ -491,21 +491,21 @@ void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemB
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::RemoveItem( USHORT nId )
+void SfxPopupMenuManager::RemoveItem( sal_uInt16 nId )
{
pSVMenu->RemoveItem( nId );
}
//-------------------------------------------------------------------------
-void SfxPopupMenuManager::CheckItem( USHORT nId, BOOL bCheck )
+void SfxPopupMenuManager::CheckItem( sal_uInt16 nId, sal_Bool bCheck )
{
pSVMenu->CheckItem( nId, bCheck );
}
void SfxPopupMenuManager::AddClipboardFunctions()
{
- bAddClipboardFuncs = TRUE;
+ bAddClipboardFuncs = sal_True;
}
SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings )
@@ -515,8 +515,8 @@ SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings )
pResMgr(NULL),
nType(0)
{
- bAddClipboardFuncs = FALSE;
- SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, FALSE, rBindings, TRUE, TRUE );
+ bAddClipboardFuncs = sal_False;
+ SfxVirtualMenu* pVMenu = new SfxVirtualMenu( pMenuArg, sal_False, rBindings, sal_True, sal_True );
Construct(*pVMenu);
}
@@ -529,10 +529,10 @@ SfxPopupMenuManager::SfxPopupMenuManager( PopupMenu* pMenuArg, SfxBindings& rBin
SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow )
{
PopupMenu *pSVMenu = new PopupMenu( rResId );
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -548,7 +548,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId ));
}
@@ -581,10 +581,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFrame, const Point& rPoint, Window* pWindow )
{
PopupMenu *pSVMenu = new PopupMenu( rResId );
- USHORT n, nCount = pSVMenu->GetItemCount();
+ sal_uInt16 n, nCount = pSVMenu->GetItemCount();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = pSVMenu->GetItemId( n );
+ sal_uInt16 nId = pSVMenu->GetItemId( n );
if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
break;
}
@@ -598,7 +598,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
pSVMenu->InsertSeparator();
for ( n=0; n<nCount; n++ )
{
- USHORT nId = aPop.GetItemId( n );
+ sal_uInt16 nId = aPop.GetItemId( n );
pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
pSVMenu->SetHelpId( nId, aPop.GetHelpId( nId ));
}
diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
index e9d609151504..639669ab90c3 100644
--- a/sfx2/source/menu/objmnctl.cxx
+++ b/sfx2/source/menu/objmnctl.cxx
@@ -59,7 +59,7 @@ using namespace com::sun::star;
in seinen Parent ein.
*/
-SfxObjectVerbsControl::SfxObjectVerbsControl(USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings)
+SfxObjectVerbsControl::SfxObjectVerbsControl(sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings)
: SfxMenuControl( nSlotId, rBindings )
, pMenu(new PopupMenu)
, rParent(rMenu)
@@ -85,8 +85,8 @@ void SfxObjectVerbsControl::FillMenu()
const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs = pView->GetVerbs();
if ( aVerbs.getLength() )
{
- USHORT nSlotId = SID_VERB_START;
- for (USHORT n=0; n<aVerbs.getLength(); n++)
+ sal_uInt16 nSlotId = SID_VERB_START;
+ for (sal_uInt16 n=0; n<aVerbs.getLength(); n++)
{
// check for ReadOnly verbs
if ( pDoc->IsReadOnly() && !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_NEVERDIRTIES) )
@@ -105,7 +105,7 @@ void SfxObjectVerbsControl::FillMenu()
}
}
- rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() );
+ rParent.EnableItem( GetId(), (sal_Bool)pMenu->GetItemCount() );
}
//--------------------------------------------------------------------
@@ -119,7 +119,7 @@ void SfxObjectVerbsControl::FillMenu()
*/
void SfxObjectVerbsControl::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
{
@@ -137,7 +137,7 @@ void SfxObjectVerbsControl::StateChanged(
IMPL_LINK_INLINE_START( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
{
- const USHORT nSlotId = pSelMenu->GetCurItemId();
+ const sal_uInt16 nSlotId = pSelMenu->GetCurItemId();
if( nSlotId )
GetBindings().Execute(nSlotId);
return 1;
diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx
index d82c0a6dbdf3..501d3e35f326 100755
--- a/sfx2/source/menu/thessubmenu.cxx
+++ b/sfx2/source/menu/thessubmenu.cxx
@@ -66,7 +66,7 @@ SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem);
Ctor; setzt Select-Handler am Menu und traegt Menu
in seinen Parent ein.
*/
-SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings )
+SfxThesSubMenuControl::SfxThesSubMenuControl( sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings )
: SfxMenuControl( nSlotId, rBindings ),
pMenu(new PopupMenu),
rParent(rMenu)
@@ -74,7 +74,7 @@ SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBi
rMenu.SetPopupMenu(nSlotId, pMenu);
pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect));
pMenu->Clear();
- rParent.EnableItem( GetId(), FALSE );
+ rParent.EnableItem( GetId(), sal_False );
}
@@ -90,7 +90,7 @@ SfxThesSubMenuControl::~SfxThesSubMenuControl()
Menueeintrag im Parentmenu disabled, andernfalls wird er enabled.
*/
void SfxThesSubMenuControl::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
{
@@ -104,7 +104,7 @@ void SfxThesSubMenuControl::StateChanged(
*/
IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu )
{
- const USHORT nSlotId = pSelMenu->GetCurItemId();
+ const sal_uInt16 nSlotId = pSelMenu->GetCurItemId();
if( nSlotId )
GetBindings().Execute(nSlotId);
return 1;
diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx
index 0b86a534de52..394c22b6e497 100644
--- a/sfx2/source/menu/thessubmenu.hxx
+++ b/sfx2/source/menu/thessubmenu.hxx
@@ -52,11 +52,11 @@ class SfxThesSubMenuControl : public SfxMenuControl
Menu& rParent;
private:
- virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16, SfxItemState, const SfxPoolItem* pState );
DECL_LINK( MenuSelect, Menu * );
public:
- SfxThesSubMenuControl(USHORT, Menu&, SfxBindings&);
+ SfxThesSubMenuControl(sal_uInt16, Menu&, SfxBindings&);
~SfxThesSubMenuControl();
virtual PopupMenu* GetPopup() const;
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index b60681e95afa..76be183057c0 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -83,21 +83,21 @@ class SfxMenuImageControl_Impl : public SfxControllerItem
{
SfxVirtualMenu* pMenu;
long lRotation;
- BOOL bIsMirrored;
+ sal_Bool bIsMirrored;
protected:
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
public:
- SfxMenuImageControl_Impl( USHORT nSlotId, SfxBindings& rBindings, SfxVirtualMenu* pVMenu )
+ SfxMenuImageControl_Impl( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxVirtualMenu* pVMenu )
: SfxControllerItem( nSlotId, rBindings )
, pMenu( pVMenu )
, lRotation( 0 )
- , bIsMirrored( FALSE )
+ , bIsMirrored( sal_False )
{}
void Update();
};
-void SfxMenuImageControl_Impl::StateChanged( USHORT /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
+void SfxMenuImageControl_Impl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
{
const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState );
if ( pItem )
@@ -114,13 +114,13 @@ void SfxMenuImageControl_Impl::Update()
SfxModule* pModule = pViewFrame->GetObjectShell()->GetModule();
SfxSlotPool* pPool = pModule->GetSlotPool();
Menu* pSVMenu = pMenu->GetSVMenu();
- for (USHORT nPos = 0; nPos<pSVMenu->GetItemCount(); nPos++)
+ for (sal_uInt16 nPos = 0; nPos<pSVMenu->GetItemCount(); nPos++)
{
- USHORT nslotId = pSVMenu->GetItemId( nPos );
+ sal_uInt16 nslotId = pSVMenu->GetItemId( nPos );
const SfxSlot* pSlot = pPool->GetSlot( nslotId );
if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ) )
{
- pSVMenu->SetItemImageMirrorMode( nslotId, FALSE );
+ pSVMenu->SetItemImageMirrorMode( nslotId, sal_False );
pSVMenu->SetItemImageAngle( nslotId, lRotation );
}
@@ -134,8 +134,8 @@ void SfxMenuImageControl_Impl::Update()
static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFrame,
const rtl::OUString& aImageId,
const rtl::OUString& aURL,
- BOOL bBigImage,
- BOOL bHiContrast )
+ sal_Bool bBigImage,
+ sal_Bool bHiContrast )
{
Image aImage;
@@ -160,7 +160,7 @@ static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFr
darauf, ob die Applikation OLE-Server ist oder nicht.
*/
-BOOL IsItemHidden_Impl( USHORT nItemId, int bOleServer, int bMac )
+sal_Bool IsItemHidden_Impl( sal_uInt16 nItemId, int bOleServer, int bMac )
{
return ( bMac &&
( nItemId == SID_MINIMIZED ) ) ||
@@ -191,9 +191,9 @@ void SfxVirtualMenu::Construct_Impl()
//--------------------------------------------------------------------
-SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
- SfxVirtualMenu* pOwnParent, Menu& rMenu, BOOL bWithHelp,
- SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes, BOOL bIsAddonMenu ):
+SfxVirtualMenu::SfxVirtualMenu( sal_uInt16 nOwnId,
+ SfxVirtualMenu* pOwnParent, Menu& rMenu, sal_Bool bWithHelp,
+ SfxBindings &rBindings, sal_Bool bOLEServer, sal_Bool bRes, sal_Bool bIsAddonMenu ):
pItems(0),
pImageControl(0),
pBindings(&rBindings),
@@ -201,7 +201,7 @@ SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
pAutoDeactivate(0),
nLocks(0),
bHelpInitialized( bWithHelp ),
- bWasHighContrast( FALSE ),
+ bWasHighContrast( sal_False ),
bIsAddonPopupMenu( bIsAddonMenu )
{
DBG_MEMTEST();
@@ -217,19 +217,19 @@ SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
pWindowMenu = NULL;
pPickMenu = NULL;
pAddonsMenu = NULL;
- bIsActive = FALSE;
- bControllersUnBound = FALSE;
+ bIsActive = sal_False;
+ bControllersUnBound = sal_False;
CreateFromSVMenu();
Construct_Impl();
- bHelpInitialized = FALSE;
+ bHelpInitialized = sal_False;
}
//--------------------------------------------------------------------
// creates a virtual menu from a StarView MenuBar or PopupMenu
-SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
- SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes, BOOL bIsAddonMenu ):
+SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, sal_Bool bWithHelp,
+ SfxBindings &rBindings, sal_Bool bOLEServer, sal_Bool bRes, sal_Bool bIsAddonMenu ):
pItems(0),
pImageControl(0),
pBindings(&rBindings),
@@ -237,7 +237,7 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
pAutoDeactivate(0),
nLocks(0),
bHelpInitialized( bWithHelp ),
- bWasHighContrast( FALSE ),
+ bWasHighContrast( sal_False ),
bIsAddonPopupMenu( bIsAddonMenu )
{
DBG_MEMTEST();
@@ -254,11 +254,11 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
pWindowMenu = NULL;
pPickMenu = NULL;
pAddonsMenu = NULL;
- bIsActive = FALSE;
- bControllersUnBound = FALSE;
+ bIsActive = sal_False;
+ bControllersUnBound = sal_False;
CreateFromSVMenu();
Construct_Impl();
- bHelpInitialized = FALSE;
+ bHelpInitialized = sal_False;
}
//--------------------------------------------------------------------
@@ -279,7 +279,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
if ( bIsActive )
{
- pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = sal_False;
}
// QAP-Hack
@@ -324,7 +324,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
}
//--------------------------------------------------------------------
-BOOL SfxVirtualMenu::IsHiContrastMode() const
+sal_Bool SfxVirtualMenu::IsHiContrastMode() const
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
return rSettings.GetHighContrastMode();
@@ -345,7 +345,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
if ( pSVMenu->IsMenuBar() )
{
- USHORT nPos = pSVMenu->GetItemPos( SID_MDIWINDOWLIST );
+ sal_uInt16 nPos = pSVMenu->GetItemPos( SID_MDIWINDOWLIST );
if ( nPos != MENU_ITEM_NOTFOUND && xFrame.is() )
{
// Retrieve addon popup menus and add them to our menu bar
@@ -386,8 +386,8 @@ void SfxVirtualMenu::CreateFromSVMenu()
// remember some values
SFX_APP();
- const int bOleServer = FALSE;
- const int bMac = FALSE;
+ const int bOleServer = sal_False;
+ const int bMac = sal_False;
SvtMenuOptions aOptions;
aOptions.AddListenerLink( LINK( this, SfxVirtualMenu, SettingsChanged ) );
@@ -398,10 +398,10 @@ void SfxVirtualMenu::CreateFromSVMenu()
// Update high contrast state
bWasHighContrast = IsHiContrastMode();
- USHORT nSVPos = 0;
- for ( USHORT nPos=0; nPos<nCount; ++nPos, ++nSVPos )
+ sal_uInt16 nSVPos = 0;
+ for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos, ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId(nSVPos);
+ sal_uInt16 nSlotId = pSVMenu->GetItemId(nSVPos);
PopupMenu* pPopup = pSVMenu->GetPopupMenu(nSlotId);
if( pPopup && nSlotId >= SID_OBJECTMENU0 && nSlotId <= SID_OBJECTMENU_LAST )
{
@@ -438,7 +438,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- Image aImage = GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast );
+ Image aImage = GetImage( xFrame, aSlotURL, sal_False, bWasHighContrast );
pSVMenu->SetItemImage( nSlotId, aImage );
}
}
@@ -517,13 +517,13 @@ void SfxVirtualMenu::CreateFromSVMenu()
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bWasHighContrast );
+ aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, sal_False, bWasHighContrast );
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- aImage = GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast );
+ aImage = GetImage( xFrame, aSlotURL, sal_False, bWasHighContrast );
}
if ( !!aImage )
@@ -565,27 +565,27 @@ IMPL_LINK( SfxVirtualMenu, Highlight, Menu *, pMenu )
if ( pMenu == pSVMenu )
{
// AutoDeactivate ist jetzt nicht mehr n"otig
- //USHORT nSlotId = pMenu->GetCurItemId();
+ //sal_uInt16 nSlotId = pMenu->GetCurItemId();
if ( pAutoDeactivate )
pAutoDeactivate->Stop();
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
{
- USHORT nItemCount = pSVMenu->GetItemCount();
+ sal_uInt16 nItemCount = pSVMenu->GetItemCount();
SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
- BOOL bIsHiContrastMode = IsHiContrastMode();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIsHiContrastMode = IsHiContrastMode();
Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
if ( !bIsAddonPopupMenu )
{
- for ( USHORT nSVPos=0; nSVPos<nItemCount; ++nSVPos )
+ for ( sal_uInt16 nSVPos=0; nSVPos<nItemCount; ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId( nSVPos );
+ sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos );
MenuItemType nType = pSVMenu->GetItemType( nSVPos );
if ( nType == MENUITEM_STRING && bIcons )
{
@@ -601,13 +601,13 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bIsHiContrastMode ));
+ pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, sal_False, bIsHiContrastMode ));
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast ));
+ pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, sal_False, bWasHighContrast ));
}
}
else if( nType == MENUITEM_STRINGIMAGE && !bIcons )
@@ -644,18 +644,18 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
void SfxVirtualMenu::UpdateImages()
{
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
if ( bIcons )
{
- BOOL bIsHiContrastMode = IsHiContrastMode();
- USHORT nItemCount = pSVMenu->GetItemCount();
+ sal_Bool bIsHiContrastMode = IsHiContrastMode();
+ sal_uInt16 nItemCount = pSVMenu->GetItemCount();
SfxViewFrame * pViewFrame = pBindings->GetDispatcher()->GetFrame();
Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() );
- for ( USHORT nSVPos=0; nSVPos < nItemCount; ++nSVPos )
+ for ( sal_uInt16 nSVPos=0; nSVPos < nItemCount; ++nSVPos )
{
- USHORT nSlotId = pSVMenu->GetItemId( nSVPos );
+ sal_uInt16 nSlotId = pSVMenu->GetItemId( nSVPos );
if ( pSVMenu->GetItemType( nSVPos ) == MENUITEM_STRINGIMAGE )
{
if ( framework::AddonMenuManager::IsAddonMenuId( nSlotId ))
@@ -670,13 +670,13 @@ void SfxVirtualMenu::UpdateImages()
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bIsHiContrastMode ));
+ pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, sal_False, bIsHiContrastMode ));
}
else
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
- pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast ));
+ pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, sal_False, bWasHighContrast ));
}
}
}
@@ -695,16 +695,16 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu )
framework::AddonsOptions aAddonOptions;
- BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
+ sal_Bool bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
if ( bIcons )
{
- BOOL bIsHiContrastMode = IsHiContrastMode();
- USHORT nItemCount = pMenu->GetItemCount();
+ sal_Bool bIsHiContrastMode = IsHiContrastMode();
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
Reference<com::sun::star::frame::XFrame> aXFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
- for ( USHORT nPos=0; nPos < nItemCount; ++nPos )
+ for ( sal_uInt16 nPos=0; nPos < nItemCount; ++nPos )
{
- USHORT nSlotId = pMenu->GetItemId( nPos );
+ sal_uInt16 nSlotId = pMenu->GetItemId( nPos );
PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId );
if ( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
{
@@ -716,7 +716,7 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu )
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), FALSE, bIsHiContrastMode ));
+ pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), sal_False, bIsHiContrastMode ));
}
if ( pPopup )
@@ -735,10 +735,10 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu )
if ( !pMenu )
return;
- USHORT nItemCount = pMenu->GetItemCount();
- for ( USHORT nPos=0; nPos < nItemCount; ++nPos )
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos < nItemCount; ++nPos )
{
- USHORT nSlotId = pMenu->GetItemId( nPos );
+ sal_uInt16 nSlotId = pMenu->GetItemId( nPos );
PopupMenu* pPopup = pMenu->GetPopupMenu( nSlotId );
if ( pMenu->GetItemType( nPos ) == MENUITEM_STRINGIMAGE )
pMenu->SetItemImage( nSlotId, Image() );
@@ -749,18 +749,18 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu )
//--------------------------------------------------------------------
-FASTBOOL SfxVirtualMenu::Bind_Impl( Menu *pMenu )
+bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
{
- // Selber suchen, da SV mit 'USHORT nSID = pSVMenu->GetCurItemId();' immer
+ // Selber suchen, da SV mit 'sal_uInt16 nSID = pSVMenu->GetCurItemId();' immer
// 0 liefert. Das ist so, weil die Event-Weiterleitung lt. TH nichts mit
// CurItem des Parent-Menus zu tun hat.
sal_uInt32 nAddonsPopupPrefixLen = ADDONSPOPUPMENU_URL_PREFIX.getLength();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
// angesprochenes Sub-Menu gefunden?
- FASTBOOL bFound = FALSE;
- USHORT nSID = pSVMenu->GetItemId(nPos);
+ bool bFound = false;
+ sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
SfxMenuControl &rCtrl = pItems[nPos];
bFound = pSVMenu->GetPopupMenu(nSID) == pMenu;
SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
@@ -770,7 +770,7 @@ FASTBOOL SfxVirtualMenu::Bind_Impl( Menu *pMenu )
// Nur ein gebundener Menu-Controller hat schon seine Id!
if ( !rCtrl.GetId() )
{
- bIsAddonPopupMenu = FALSE;
+ bIsAddonPopupMenu = sal_False;
DBG_ASSERT( !pSubMenu, "Popup schon vorhanden!");
// Check if the popup is an Add-On popup menu
@@ -780,12 +780,12 @@ FASTBOOL SfxVirtualMenu::Bind_Impl( Menu *pMenu )
( nSID == SID_ADDONHELP ) ||
(( (sal_uInt32)aCommand.getLength() > nAddonsPopupPrefixLen ) &&
( aCommand.indexOf( ADDONSPOPUPMENU_URL_PREFIX ) == 0 )) )
- bIsAddonPopupMenu = TRUE;
+ bIsAddonPopupMenu = sal_True;
// VirtualMenu f"ur Sub-Menu erzeugen
- BOOL bRes = bResCtor;
+ sal_Bool bRes = bResCtor;
pSubMenu = new SfxVirtualMenu( nSID, this,
- *pMenu, FALSE, *pBindings, bOLE, bRes, bIsAddonPopupMenu );
+ *pMenu, sal_False, *pBindings, bOLE, bRes, bIsAddonPopupMenu );
DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
@@ -805,18 +805,18 @@ FASTBOOL SfxVirtualMenu::Bind_Impl( Menu *pMenu )
// gefunden, dann abbrechen
if ( bFound )
- return TRUE;
+ return true;
}
// nicht in diesem Untermenu gefunden
- return FALSE;
+ return false;
}
void SfxVirtualMenu::BindControllers()
{
pBindings->ENTERREGISTRATIONS();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < nCount; ++nPos )
{
SfxMenuControl& rCtrl = pItems[nPos];
@@ -828,20 +828,20 @@ void SfxVirtualMenu::BindControllers()
for ( nPos=0; nPos<rCtrlArr.Count(); nPos++ )
{
SfxMenuControl* pCtrl = rCtrlArr[nPos];
- USHORT nSlotId = pCtrl->GetId();
+ sal_uInt16 nSlotId = pCtrl->GetId();
if ( !pSVMenu->GetItemCommand(nSlotId).Len() )
pCtrl->ReBind();
}
pBindings->LEAVEREGISTRATIONS();
- bControllersUnBound = FALSE;
+ bControllersUnBound = sal_False;
}
void SfxVirtualMenu::UnbindControllers()
{
pBindings->ENTERREGISTRATIONS();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < nCount; ++nPos )
{
SfxMenuControl &rCtrl = pItems[nPos];
@@ -859,7 +859,7 @@ void SfxVirtualMenu::UnbindControllers()
}
pBindings->LEAVEREGISTRATIONS();
- bControllersUnBound = TRUE;
+ bControllersUnBound = sal_True;
}
@@ -883,7 +883,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
// Create menu item at the end of the tools popup menu for the addons popup menu
if ( pAddonMenu && pAddonMenu->GetItemCount() > 0 )
{
- USHORT nItemCount = pMenu->GetItemCount();
+ sal_uInt16 nItemCount = pMenu->GetItemCount();
String aAddonsTitle( SfxResId( STR_MENU_ADDONS ));
if ( nItemCount > 0 && pMenu->GetItemType( nItemCount-1 ) != MENUITEM_SEPARATOR )
pMenu->InsertSeparator();
@@ -894,7 +894,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
{
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS ));
- pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast ));
+ pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, sal_False, bWasHighContrast ));
}
}
else
@@ -932,7 +932,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
{
// doppelt-Activate verhindern
if ( bIsActive )
- return TRUE;
+ return sal_True;
// ggf. Pick-Menu erzeugen
if ( pParent && pSVMenu == pParent->pPickMenu )
@@ -949,8 +949,8 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
Reference< XDesktop > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
- USHORT nActiveItemId = 0;
- USHORT nItemId = START_ITEMID_WINDOWLIST;
+ sal_uInt16 nActiveItemId = 0;
+ sal_uInt16 nItemId = START_ITEMID_WINDOWLIST;
if ( xDesktop.is() )
{
@@ -1019,9 +1019,9 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
//InvalidateKeyCodes();
pBindings->GetDispatcher_Impl()->Flush();
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
- USHORT nSlotId = (pItems+nPos)->GetId();
+ sal_uInt16 nSlotId = (pItems+nPos)->GetId();
if ( nSlotId && nSlotId > END_ITEMID_WINDOWLIST )
pBindings->Update(nSlotId);
}
@@ -1036,7 +1036,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
}
// bis zum Deactivate die Statusupdates unterdr"ucken
- pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = TRUE;
+ pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = sal_True;
if ( pAutoDeactivate ) // QAP-Hack
pAutoDeactivate->Start();
@@ -1052,7 +1052,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
}
// erledigt
- return TRUE;
+ return sal_True;
}
else
{
@@ -1081,9 +1081,9 @@ IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
// das Menue deaktiviert ( = zugeklappt ) wird
if ( pParent )
UnbindControllers();
- pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = sal_False;
}
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1091,20 +1091,20 @@ IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
{
- USHORT nSlotId = (USHORT) pMenu->GetCurItemId();
+ sal_uInt16 nSlotId = (sal_uInt16) pMenu->GetCurItemId();
DBG_OUTF( ("SfxVirtualMenu %lx selected %u from %lx", this, nSlotId, pMenu) );
/*
if ( pSVMenu->GetItemCommand( nSlotId ).Len() )
{
SfxMenuCtrlArr_Impl& rCtrlArr = GetAppCtrl_Impl();
- for ( USHORT nPos=0; nPos<rCtrlArr.Count(); nPos++ )
+ for ( sal_uInt16 nPos=0; nPos<rCtrlArr.Count(); nPos++ )
{
SfxMenuControl* pCtrl = rCtrlArr[nPos];
if ( pCtrl->GetId() == nSlotId )
{
SfxUnoMenuControl *pUnoCtrl = (SfxUnoMenuControl*) pCtrl;
pUnoCtrl->Select();
- return TRUE;
+ return sal_True;
}
}
}
@@ -1116,7 +1116,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
DEFINE_CONST_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
if ( xDesktop.is() )
{
- USHORT nTaskId = START_ITEMID_WINDOWLIST;
+ sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST;
Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY );
sal_Int32 nFrameCount = xList->getCount();
for ( sal_Int32 i=0; i<nFrameCount; ++i )
@@ -1135,7 +1135,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
}
}
- return TRUE;
+ return sal_True;
}
else if ( nSlotId >= START_ITEMID_PICKLIST && nSlotId <= END_ITEMID_PICKLIST )
{
@@ -1148,7 +1148,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
else
pBindings->Execute( nSlotId );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1167,12 +1167,12 @@ Menu* SfxVirtualMenu::GetSVMenu() const
// return the position of the specified item
-USHORT SfxVirtualMenu::GetItemPos( USHORT nItemId ) const
+sal_uInt16 SfxVirtualMenu::GetItemPos( sal_uInt16 nItemId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
if ( (pItems+nPos)->GetId() == nItemId )
return nPos;
return MENU_ITEM_NOTFOUND;
@@ -1182,12 +1182,12 @@ USHORT SfxVirtualMenu::GetItemPos( USHORT nItemId ) const
// returns the popup-menu assigned to the item or 0 if none
-SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( USHORT nItemId ) const
+SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( sal_uInt16 nItemId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nPos = GetItemPos(nItemId);
+ sal_uInt16 nPos = GetItemPos(nItemId);
if ( nPos != MENU_ITEM_NOTFOUND )
return (pItems+nPos)->GetPopupMenu();
return 0;
@@ -1196,12 +1196,12 @@ SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( USHORT nItemId ) const
// returns the text of the item as currently shown in the menu
-String SfxVirtualMenu::GetItemText( USHORT nSlotId ) const
+String SfxVirtualMenu::GetItemText( sal_uInt16 nSlotId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nPos = GetItemPos(nSlotId);
+ sal_uInt16 nPos = GetItemPos(nSlotId);
if ( nPos != MENU_ITEM_NOTFOUND )
return (pItems+nPos)->GetTitle();
return String();
@@ -1210,12 +1210,12 @@ String SfxVirtualMenu::GetItemText( USHORT nSlotId ) const
// returns the text of the item as currently shown in the menu
-String SfxVirtualMenu::GetItemHelpText( USHORT nSlotId ) const
+String SfxVirtualMenu::GetItemHelpText( sal_uInt16 nSlotId ) const
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nPos = GetItemPos(nSlotId);
+ sal_uInt16 nPos = GetItemPos(nSlotId);
if ( nPos != MENU_ITEM_NOTFOUND )
return (pItems+nPos)->GetHelpText();
return String();
@@ -1225,7 +1225,7 @@ String SfxVirtualMenu::GetItemHelpText( USHORT nSlotId ) const
// set the checkmark of the specified item
-void SfxVirtualMenu::CheckItem( USHORT nItemId, BOOL bCheck )
+void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1238,7 +1238,7 @@ void SfxVirtualMenu::CheckItem( USHORT nItemId, BOOL bCheck )
// set the enabled-state of the specified item
-void SfxVirtualMenu::EnableItem( USHORT nItemId, BOOL bEnable )
+void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1252,7 +1252,7 @@ void SfxVirtualMenu::EnableItem( USHORT nItemId, BOOL bEnable )
// set the text of the specified item
-void SfxVirtualMenu::SetItemText( USHORT nItemId, const String& rText )
+void SfxVirtualMenu::SetItemText( sal_uInt16 nItemId, const String& rText )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
@@ -1266,14 +1266,14 @@ void SfxVirtualMenu::SetItemText( USHORT nItemId, const String& rText )
//
-void SfxVirtualMenu::SetPopupMenu( USHORT nItemId, PopupMenu *pMenu )
+void SfxVirtualMenu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu *pMenu )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
GetSVMenu()->SetPopupMenu( nItemId, pMenu );
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SfxVirtualMenu *pSubMenu = (pItems+n)->GetPopupMenu();
if ( pSubMenu )
@@ -1285,12 +1285,12 @@ void SfxVirtualMenu::SetPopupMenu( USHORT nItemId, PopupMenu *pMenu )
// Erzwingt die Initialisierung, die sonst nur im Activate kommt
-void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
+void SfxVirtualMenu::InitPopup( sal_uInt16 nPos, sal_Bool /*bOLE*/ )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- USHORT nSID = pSVMenu->GetItemId(nPos);
+ sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
PopupMenu *pMenu = pSVMenu->GetPopupMenu( nSID );
DBG_ASSERT( pMenu, "Hier gibt es kein Popup!");
@@ -1299,9 +1299,9 @@ void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
if ( !rCtrl.GetId() )
{
// VirtualMenu f"ur Sub-Menu erzeugen
- BOOL bRes = bResCtor;
+ sal_Bool bRes = bResCtor;
SfxVirtualMenu *pSubMenu =
- new SfxVirtualMenu(nSID, this, *pMenu, FALSE, *pBindings, bOLE, bRes);
+ new SfxVirtualMenu(nSID, this, *pMenu, sal_False, *pBindings, bOLE, bRes);
DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
@@ -1313,16 +1313,16 @@ void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL /*bOLE*/ )
void SfxVirtualMenu::InitializeHelp()
{
- for ( USHORT nPos = 0; nPos<pSVMenu->GetItemCount(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos<pSVMenu->GetItemCount(); ++nPos )
{
- USHORT nSlotId = pSVMenu->GetItemId(nPos);
+ sal_uInt16 nSlotId = pSVMenu->GetItemId(nPos);
// TODO/CLEANUP: this code does nothing!
// if ( !bHelpInitialized )
// pSVMenu->SetHelpText( nId, rSlotPool.GetSlotHelpText_Impl( nId ) );
SfxMenuControl &rCtrl = pItems[nPos];
if ( nSlotId && !rCtrl.GetId() )
{
- InitPopup( nPos, TRUE );
+ InitPopup( nPos, sal_True );
}
SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
@@ -1330,10 +1330,10 @@ void SfxVirtualMenu::InitializeHelp()
pSubMenu->InitializeHelp();
}
- bHelpInitialized = TRUE;
+ bHelpInitialized = sal_True;
}
-typedef ULONG (__LOADONCALLAPI *HelpIdFunc) ( const String& );
+typedef sal_uIntPtr (__LOADONCALLAPI *HelpIdFunc) ( const String& );
void SfxVirtualMenu::SetHelpIds( ResMgr *pRes )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 9ffc2200cfe8..fd1327e423ca 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -97,7 +97,7 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUSTRING & aName, const ANY &
// create Configuration at first, creation might call this method also and that would overwrite everything
// we might have stored before!
if ( mpObjShell && !mpObjShell->IsLoading() )
- mpObjShell->SetModified( TRUE );
+ mpObjShell->SetModified( sal_True );
::comphelper::NamedValueCollection aNormalizedDescriptor;
NormalizeMacro( aEventDescriptor, aNormalizedDescriptor, mpObjShell );
@@ -375,7 +375,7 @@ SfxEvents_Impl::~SfxEvents_Impl()
}
//--------------------------------------------------------------------------------------------------------
-SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* pObjShell, BOOL bNormalizeMacro )
+SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* pObjShell, sal_Bool bNormalizeMacro )
{
SvxMacro* pMacro = NULL;
SEQUENCE < PROPERTYVALUE > aProperties;
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 68d855cbf6c6..387a6d09f89a 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -66,9 +66,9 @@ using namespace ::com::sun::star;
//--------------------------------------------------------------------
-USHORT SfxStatusBarControl::convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons )
+sal_uInt16 SfxStatusBarControl::convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons )
{
- USHORT nVCLMouseButtons( 0 );
+ sal_uInt16 nVCLMouseButtons( 0 );
if ( nAwtMouseButtons & awt::MouseButton::LEFT )
nVCLMouseButtons |= MOUSE_LEFT;
@@ -130,7 +130,7 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
const SfxSlot* pSlot = pSlotPool->GetUnoSlot( aTargetURL.Path );
if ( pSlot )
{
- USHORT nSlotId = pSlot->GetSlotId();
+ sal_uInt16 nSlotId = pSlot->GetSlotId();
if ( nSlotId > 0 )
{
rtl::OString aCmd(".uno:");
@@ -147,12 +147,12 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
SfxStatusBarControl::SfxStatusBarControl
(
- USHORT nSlotID, /* Slot-Id, mit der diese Instanz
+ sal_uInt16 nSlotID, /* Slot-Id, mit der diese Instanz
verbunden wird. Wurde bei der
Registrierung eine Slot-Id != 0
angegeben, ist dies immer die dort
angegebene. */
- USHORT nCtrlID, /* ID of this controller in the status bar */
+ sal_uInt16 nCtrlID, /* ID of this controller in the status bar */
StatusBar& rBar /* Referenz auf die StatusBar, f"ur die
dieses Control erzeugt wurde. */
@@ -251,7 +251,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotID = 0;
+ sal_uInt16 nSlotID = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -337,7 +337,7 @@ throw ( uno::RuntimeException )
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -355,7 +355,7 @@ throw (uno::RuntimeException)
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -372,7 +372,7 @@ throw ( uno::RuntimeException )
::Point aPos( rMouseEvent.X, rMouseEvent.Y );
::MouseEvent aMouseEvent( aPos,
- (USHORT)rMouseEvent.ClickCount,
+ (sal_uInt16)rMouseEvent.ClickCount,
0,
convertAwtToVCLMouseButtons( rMouseEvent.Buttons ),
0 );
@@ -390,7 +390,7 @@ throw (::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
::Point aPos( rPos.X, rPos.Y );
- CommandEvent aCmdEvent( aPos, (USHORT)nCommand, TRUE, NULL );
+ CommandEvent aCmdEvent( aPos, (sal_uInt16)nCommand, sal_True, NULL );
Command( aCmdEvent );
}
@@ -410,7 +410,7 @@ throw ( ::uno::RuntimeException )
if ( pOutDev )
{
::Rectangle aRect = VCLRectangle( rOutputRectangle );
- UserDrawEvent aUserDrawEvent( pOutDev, aRect, (USHORT)nItemId, (USHORT)nStyle );
+ UserDrawEvent aUserDrawEvent( pOutDev, aRect, (sal_uInt16)nItemId, (sal_uInt16)nStyle );
Paint( aUserDrawEvent );
}
}
@@ -439,7 +439,7 @@ throw ( uno::RuntimeException )
void SfxStatusBarControl::StateChanged
(
- USHORT nSID,
+ sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState /* Zeiger auf ein SfxPoolItem, welches nur
innerhalb dieses Methodenaufrufs g"ultig
@@ -474,7 +474,7 @@ void SfxStatusBarControl::StateChanged
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
/* [Beschreibung]
@@ -488,7 +488,7 @@ BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
[Rueckgabewert]
- BOOL TRUE
+ sal_Bool TRUE
das Event wurde bearbeitet und soll nicht an
die StatusBar weitergeleitet werden
@@ -498,12 +498,12 @@ BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseMove( const MouseEvent & )
/* [Beschreibung]
@@ -517,7 +517,7 @@ BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
[Rueckgabewert]
- BOOL TRUE
+ sal_Bool TRUE
das Event wurde bearbeitet und soll nicht an
die StatusBar weitergeleitet werden
@@ -527,12 +527,12 @@ BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
+sal_Bool SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
/* [Beschreibung]
@@ -546,7 +546,7 @@ BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
[Rueckgabewert]
- BOOL TRUE
+ sal_Bool TRUE
das Event wurde bearbeitet und soll nicht an
die StatusBar weitergeleitet werden
@@ -556,7 +556,7 @@ BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -641,8 +641,8 @@ void SfxStatusBarControl::ReleaseMouse()
SfxStatusBarControl* SfxStatusBarControl::CreateControl
(
- USHORT nSlotID,
- USHORT nStbId,
+ sal_uInt16 nSlotID,
+ sal_uInt16 nStbId,
StatusBar* pBar,
SfxModule* pMod
)
@@ -665,7 +665,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
if ( pFactories )
{
SfxStbCtrlFactArr_Impl &rFactories = *pFactories;
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
@@ -674,7 +674,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
}
SfxStbCtrlFactArr_Impl &rFactories = pApp->GetStbCtrlFactories_Impl();
- for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
if ( rFactories[nFactory]->nTypeId == aSlotType &&
( ( rFactories[nFactory]->nSlotId == 0 ) ||
( rFactories[nFactory]->nSlotId == nSlotID) ) )
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 231baa76fc76..3afea8890535 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -58,7 +58,7 @@ const sal_uInt32 IMAGELIST_COUNT = 4; // small, small-hi, large, large-hi
struct ToolBoxInf_Impl
{
ToolBox* pToolBox;
- USHORT nFlags;
+ sal_uInt16 nFlags;
};
class SfxImageManager_Impl
@@ -70,8 +70,8 @@ public:
ImageList* m_pImageList[IMAGELIST_COUNT];
SfxModule* m_pModule;
- ImageList* GetImageList( BOOL bBig, BOOL bHiContrast );
- Image GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast );
+ ImageList* GetImageList( sal_Bool bBig, sal_Bool bHiContrast );
+ Image GetImage( sal_uInt16 nId, sal_Bool bBig, sal_Bool bHiContrast );
void SetSymbolsSize_Impl( sal_Int16 );
DECL_LINK( OptionsChanged_Impl, void* );
@@ -122,7 +122,7 @@ static SfxImageManager_Impl* GetImageManager( SfxModule* pModule )
}
// Global image list
-static ImageList* GetImageList( BOOL bBig, BOOL bHiContrast )
+static ImageList* GetImageList( sal_Bool bBig, sal_Bool bHiContrast )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -185,7 +185,7 @@ SfxImageManager_Impl::~SfxImageManager_Impl()
//-------------------------------------------------------------------------
-ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast )
+ImageList* SfxImageManager_Impl::GetImageList( sal_Bool bBig, sal_Bool bHiContrast )
{
sal_Int32 nIndex = impl_convertBools( bBig, bHiContrast );
if ( !m_pImageList[nIndex] )
@@ -201,7 +201,7 @@ ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast )
//-------------------------------------------------------------------------
-Image SfxImageManager_Impl::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast )
+Image SfxImageManager_Impl::GetImage( sal_uInt16 nId, sal_Bool bBig, sal_Bool bHiContrast )
{
ImageList* pImageList = GetImageList( bBig, bHiContrast );
if ( pImageList )
@@ -218,7 +218,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( nNewSymbolsSize != m_nSymbolsSize )
{
m_nSymbolsSize = nNewSymbolsSize;
- BOOL bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
+ sal_Bool bLarge( m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
for ( sal_uInt32 n=0; n < m_aToolBoxes.size(); n++ )
{
@@ -226,11 +226,11 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET )
{
ToolBox *pBox = pInf->pToolBox;
- BOOL bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
- USHORT nCount = pBox->GetItemCount();
- for ( USHORT nPos=0; nPos<nCount; nPos++ )
+ sal_Bool bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_uInt16 nCount = pBox->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos<nCount; nPos++ )
{
- USHORT nId = pBox->GetItemId( nPos );
+ sal_uInt16 nId = pBox->GetItemId( nPos );
if ( pBox->GetItemType(nPos) == TOOLBOXITEM_BUTTON )
{
pBox->SetItemImage( nId, GetImage( nId, bLarge, bHiContrast ) );
@@ -312,7 +312,7 @@ SfxImageManager* SfxImageManager::GetImageManager( SfxModule* pModule )
//-------------------------------------------------------------------------
-Image SfxImageManager::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const
+Image SfxImageManager::GetImage( sal_uInt16 nId, sal_Bool bBig, sal_Bool bHiContrast ) const
{
ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast );
if ( pImageList && pImageList->HasImageAtPos( nId ) )
@@ -322,15 +322,15 @@ Image SfxImageManager::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const
//-------------------------------------------------------------------------
-Image SfxImageManager::GetImage( USHORT nId, BOOL bHiContrast ) const
+Image SfxImageManager::GetImage( sal_uInt16 nId, sal_Bool bHiContrast ) const
{
- BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
return GetImage( nId, bLarge, bHiContrast );
}
//-------------------------------------------------------------------------
-Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const
+Image SfxImageManager::SeekImage( sal_uInt16 nId, sal_Bool bBig, sal_Bool bHiContrast ) const
{
sal_Bool bGlobal = ( pImp->m_pModule == 0 );
ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast );
@@ -347,15 +347,15 @@ Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) cons
//-------------------------------------------------------------------------
-Image SfxImageManager::SeekImage( USHORT nId, BOOL bHiContrast ) const
+Image SfxImageManager::SeekImage( sal_uInt16 nId, sal_Bool bHiContrast ) const
{
- BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
return SeekImage( nId, bLarge, bHiContrast );
}
//-------------------------------------------------------------------------
-void SfxImageManager::RegisterToolBox( ToolBox *pBox, USHORT nFlags )
+void SfxImageManager::RegisterToolBox( ToolBox *pBox, sal_uInt16 nFlags )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -384,21 +384,21 @@ void SfxImageManager::ReleaseToolBox( ToolBox *pBox )
//-------------------------------------------------------------------------
-void SfxImageManager::SetImages( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge )
+void SfxImageManager::SetImages( ToolBox& rToolBox, sal_Bool bHiContrast, sal_Bool bLarge )
{
SetImagesForceSize( rToolBox, bLarge, bHiContrast );
}
//-------------------------------------------------------------------------
-void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge )
+void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, sal_Bool bHiContrast, sal_Bool bLarge )
{
ImageList* pImageList = pImp->GetImageList( bLarge, bHiContrast );
- USHORT nCount = rToolBox.GetItemCount();
- for (USHORT n=0; n<nCount; n++)
+ sal_uInt16 nCount = rToolBox.GetItemCount();
+ for (sal_uInt16 n=0; n<nCount; n++)
{
- USHORT nId = rToolBox.GetItemId(n);
+ sal_uInt16 nId = rToolBox.GetItemId(n);
switch ( rToolBox.GetItemType(n) )
{
case TOOLBOXITEM_BUTTON:
@@ -420,7 +420,7 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, B
void SfxImageManager::SetImages( ToolBox& rToolBox )
{
- BOOL bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
- BOOL bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
+ sal_Bool bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode();
SetImagesForceSize( rToolBox, bHiContrast, bLarge );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 6bf2dc26edd6..730926351a05 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -124,7 +124,7 @@ using namespace ::com::sun::star::ui;
//====================================================================
-SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, TRUE);
+SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, sal_True);
SFX_IMPL_TOOLBOX_CONTROL(SfxAppToolBoxControl_Impl, SfxStringItem);
static Window* GetTopMostParentSystemWindow( Window* pWindow )
@@ -195,7 +195,7 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
const SfxSlot* pSlot = pSlotPool->GetUnoSlot( aTargetURL.Path );
if ( pSlot )
{
- USHORT nSlotId = pSlot->GetSlotId();
+ sal_uInt16 nSlotId = pSlot->GetSlotId();
if ( nSlotId > 0 )
return SfxToolBoxControl::CreateControl( nSlotId, nID, pToolbox, pModule );
}
@@ -206,11 +206,11 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
struct SfxToolBoxControl_Impl
{
ToolBox* pBox;
- BOOL bShowString;
- USHORT nSelectModifier;
+ sal_Bool bShowString;
+ sal_uInt16 nSelectModifier;
SfxTbxCtrlFactory* pFact;
- USHORT nTbxId;
- USHORT nSlotId;
+ sal_uInt16 nTbxId;
+ sal_uInt16 nSlotId;
SfxPopupWindow* mpFloatingWindow;
SfxPopupWindow* mpPopupWindow;
Reference< XUIElement > mxUIElement;
@@ -240,10 +240,10 @@ IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent
//--------------------------------------------------------------------
SfxToolBoxControl::SfxToolBoxControl(
- USHORT nSlotID,
- USHORT nID,
+ sal_uInt16 nSlotID,
+ sal_uInt16 nID,
ToolBox& rBox,
- BOOL bShowStringItems )
+ sal_Bool bShowStringItems )
: svt::ToolboxController()
{
pImpl = new SfxToolBoxControl_Impl;
@@ -327,7 +327,7 @@ void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, SfxTbxCtrlFacto
SFX_APP()->RegisterToolBoxControl_Impl( pMod, pFact );
}
-SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbxId, ToolBox *pBox, SfxModule* pMod )
+SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule* pMod )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -348,8 +348,8 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbx
if ( pFactories )
{
SfxTbxCtrlFactArr_Impl &rFactories = *pFactories;
- USHORT nFactory;
- const USHORT nCount = rFactories.Count();
+ sal_uInt16 nFactory;
+ const sal_uInt16 nCount = rFactories.Count();
// search for a factory with the given slot id
for( nFactory = 0; nFactory < nCount; ++nFactory )
@@ -375,8 +375,8 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nSlotId, USHORT nTbx
}
SfxTbxCtrlFactArr_Impl &rFactories = pApp->GetTbxCtrlFactories_Impl();
- USHORT nFactory;
- const USHORT nCount = rFactories.Count();
+ sal_uInt16 nFactory;
+ const sal_uInt16 nCount = rFactories.Count();
for( nFactory = 0; nFactory < nCount; ++nFactory )
if( (rFactories[nFactory]->nTypeId == aSlotType) && (rFactories[nFactory]->nSlotId == nSlotId) )
@@ -561,7 +561,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -669,7 +669,7 @@ void SAL_CALL SfxToolBoxControl::updateImage() throw (::com::sun::star::uno::Run
void SAL_CALL SfxToolBoxControl::execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- Select( (USHORT)KeyModifier );
+ Select( (sal_uInt16)KeyModifier );
}
void SAL_CALL SfxToolBoxControl::click() throw (::com::sun::star::uno::RuntimeException)
{
@@ -826,7 +826,7 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const ::rtl::OUString& rSub
{
static WeakReference< XUIElementFactory > xWeakUIElementFactory;
- USHORT nItemId = pImpl->pBox->GetDownItemId();
+ sal_uInt16 nItemId = pImpl->pBox->GetDownItemId();
if ( !nItemId )
return;
@@ -961,7 +961,7 @@ IMPL_LINK( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow )
void SfxToolBoxControl::StateChanged
(
- USHORT nId,
+ sal_uInt16 nId,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -975,7 +975,7 @@ void SfxToolBoxControl::StateChanged
// enabled/disabled-Flag pauschal korrigieren
pImpl->pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
- USHORT nItemBits = pImpl->pBox->GetItemBits( GetId() );
+ sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() );
nItemBits &= ~TIB_CHECKABLE;
TriState eTri = STATE_NOCHECK;
switch ( eState )
@@ -1015,15 +1015,15 @@ void SfxToolBoxControl::StateChanged
//--------------------------------------------------------------------
-void SfxToolBoxControl::Select( USHORT nModifier )
+void SfxToolBoxControl::Select( sal_uInt16 nModifier )
{
pImpl->nSelectModifier = nModifier;
- Select( BOOL((nModifier & KEY_MOD1)!=0) );
+ Select( sal_Bool((nModifier & KEY_MOD1)!=0) );
}
//--------------------------------------------------------------------
-void SfxToolBoxControl::Select( BOOL /*bMod1*/ )
+void SfxToolBoxControl::Select( sal_Bool /*bMod1*/ )
{
if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# #i102805#
{
@@ -1134,7 +1134,7 @@ throw ( ::com::sun::star::uno::RuntimeException )
}
}
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( pViewFrame );
const SfxSlot* pSlot = rPool.GetUnoSlot( rEvent.FeatureURL.Path );
if ( pSlot )
@@ -1222,12 +1222,12 @@ throw ( ::com::sun::star::uno::RuntimeException )
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
WinBits nBits ) :
FloatingWindow( SFX_APP()->GetTopWindow(), nBits )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1242,12 +1242,12 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
const ResId &rId ) :
FloatingWindow( SFX_APP()->GetTopWindow(), rId )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1262,13 +1262,13 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const Reference< XFrame >& rFrame,
Window* pParentWindow,
WinBits nBits ) :
FloatingWindow( pParentWindow, nBits )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1283,13 +1283,13 @@ SfxPopupWindow::SfxPopupWindow(
//--------------------------------------------------------------------
SfxPopupWindow::SfxPopupWindow(
- USHORT nId,
+ sal_uInt16 nId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
Window* pParentWindow,
const ResId &rId ) :
FloatingWindow( pParentWindow, rId )
- , m_bFloating(FALSE)
- , m_bCascading( FALSE )
+ , m_bFloating(sal_False)
+ , m_bCascading( sal_False )
, m_nId( nId )
, m_xFrame( rFrame )
, m_pStatusListener( 0 )
@@ -1380,13 +1380,13 @@ void SfxPopupWindow::UpdateStatus( const rtl::OUString& rCommandURL )
//--------------------------------------------------------------------
-BOOL SfxPopupWindow::Close()
+sal_Bool SfxPopupWindow::Close()
{
- m_bFloating = FALSE;
+ m_bFloating = sal_False;
FloatingWindow::Close();
Delete(0);
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1400,7 +1400,7 @@ void SfxPopupWindow::PopupModeEnd()
{
// wurde abgerissen
DeleteFloatingWindow();
- m_bFloating = TRUE;
+ m_bFloating = sal_True;
}
else
Close();
@@ -1421,14 +1421,14 @@ void SfxPopupWindow::DeleteFloatingWindow()
void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt )
{
- if ( m_bCascading == FALSE )
+ if ( m_bCascading == sal_False )
FloatingWindow::MouseMove( rMEvt );
else
{
// MouseMove-Event an die Children forwarden
::Point aPos = rMEvt.GetPosPixel();
::Point aScrPos = OutputToScreenPixel( aPos );
- USHORT i = 0;
+ sal_uInt16 i = 0;
Window* pWindow = GetChild( i );
while ( pWindow )
{
@@ -1447,12 +1447,12 @@ void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt )
void SfxPopupWindow::StartCascading()
{
- m_bCascading= TRUE;
+ m_bCascading= sal_True;
}
void SfxPopupWindow::EndCascading()
{
- m_bCascading = FALSE;
+ m_bCascading = sal_False;
}
//--------------------------------------------------------------------
@@ -1476,7 +1476,7 @@ SfxPopupWindow* SfxPopupWindow::Clone() const
//--------------------------------------------------------------------
void SfxPopupWindow::StateChanged(
- USHORT /*nSID*/,
+ sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
/* [Bescheibung]
@@ -1498,7 +1498,7 @@ void SfxPopupWindow::StateChanged(
}
else if ( m_bFloating )
{
- Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
}
@@ -1514,9 +1514,9 @@ IMPL_LINK( SfxPopupWindow, Delete, void *, EMPTYARG )
//--------------------------------------------------------------------
-SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox )
+SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
: SfxToolBoxControl( nSlotId, nId, rBox )
- , bBigImages( FALSE )
+ , bBigImages( sal_False )
, pMenu( 0 )
{
rBox.SetHelpId( nId, HID_TBXCONTROL_FILENEW );
@@ -1541,8 +1541,8 @@ SfxAppToolBoxControl_Impl::~SfxAppToolBoxControl_Impl()
it return the existing state of the given URL in the popupmenu of this toolbox control.
If the given URL can be located as an action command of one menu item of the
- popup menu of this control, we return TRUE. Otherwhise we return FALSE.
- Further we return a fallback URL, in case we have to return FALSE. Because
+ popup menu of this control, we return sal_True. Otherwhise we return sal_False.
+ Further we return a fallback URL, in case we have to return sal_False. Because
the outside code must select a valid item of the popup menu everytime ...
and we define it here. By the way this m ethod was written to handle
error situations gracefully. E.g. it can be called during creation time
@@ -1563,34 +1563,34 @@ SfxAppToolBoxControl_Impl::~SfxAppToolBoxControl_Impl()
@param pImage
contains the image of the menu for the URL.
- @return TRUE - if URL could be located as an item of the popup menu.
- FALSE - otherwhise.
+ @return sal_True - if URL could be located as an item of the popup menu.
+ sal_False - otherwhise.
*/
-BOOL Impl_ExistURLInMenu( const PopupMenu *pMenu ,
+sal_Bool Impl_ExistURLInMenu( const PopupMenu *pMenu ,
String &sURL ,
String *pFallback ,
Image *pImage )
{
- BOOL bValidFallback = FALSE;
+ sal_Bool bValidFallback = sal_False;
if (pMenu && sURL.Len())
{
- USHORT c = pMenu->GetItemCount();
- for (USHORT p=0; p<c; ++p)
+ sal_uInt16 c = pMenu->GetItemCount();
+ for (sal_uInt16 p=0; p<c; ++p)
{
- USHORT nId = pMenu->GetItemId(p);
+ sal_uInt16 nId = pMenu->GetItemId(p);
String aCmd( pMenu->GetItemCommand(nId) );
if (!bValidFallback && aCmd.Len())
{
*pFallback = aCmd;
- bValidFallback = TRUE;
+ bValidFallback = sal_True;
}
if (aCmd.Search(sURL)==0)//match even if the menu command is more detailed (maybe an additional query) #i28667#
{
sURL = aCmd;
*pImage = pMenu->GetItemImage( nId );
- return TRUE;
+ return sal_True;
}
}
}
@@ -1601,7 +1601,7 @@ BOOL Impl_ExistURLInMenu( const PopupMenu *pMenu ,
*pFallback += String(SvtModuleOptions().GetDefaultModuleName());
}
- return FALSE;
+ return sal_False;
}
long Select_Impl( void* pHdl, void* pVoid );
@@ -1624,15 +1624,15 @@ SfxPopupWindow* SfxAppToolBoxControl_Impl::CreatePopupWindow()
{
pMenu->SetSelectHdl( Link( NULL, Select_Impl ) );
pMenu->SetActivateHdl( LINK( this, SfxAppToolBoxControl_Impl, Activate ));
- rBox.SetItemDown( GetId(), TRUE );
- USHORT nSelected = pMenu->Execute( &rBox, aRect, POPUPMENU_EXECUTE_DOWN );
+ rBox.SetItemDown( GetId(), sal_True );
+ sal_uInt16 nSelected = pMenu->Execute( &rBox, aRect, POPUPMENU_EXECUTE_DOWN );
if ( nSelected )
{
aLastURL = pMenu->GetItemCommand( nSelected );
SetImage( pMenu->GetItemCommand( nSelected ) );
}
- rBox.SetItemDown( GetId(), FALSE );
+ rBox.SetItemDown( GetId(), sal_False );
}
return 0;
@@ -1645,12 +1645,12 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
String aURL = rURL;
String sFallback;
Image aMenuImage;
- BOOL bValid = Impl_ExistURLInMenu(pMenu,aURL,&sFallback,&aMenuImage);
+ sal_Bool bValid = Impl_ExistURLInMenu(pMenu,aURL,&sFallback,&aMenuImage);
if (!bValid)
aURL = sFallback;
- BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
- BOOL bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
+ sal_Bool bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode();
Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig, bHC );
if ( !aImage )
aImage = !!aMenuImage ? aMenuImage :
@@ -1669,7 +1669,7 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
void SfxAppToolBoxControl_Impl::StateChanged
(
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
SfxItemState eState,
const SfxPoolItem* pState
)
@@ -1699,7 +1699,7 @@ void SfxAppToolBoxControl_Impl::StateChanged
//--------------------------------------------------------------------
-void SfxAppToolBoxControl_Impl::Select( BOOL bMod1 )
+void SfxAppToolBoxControl_Impl::Select( sal_Bool bMod1 )
{
if( aLastURL.Len() )
{
@@ -1792,7 +1792,7 @@ long Select_Impl( void* /*pHdl*/, void* pVoid )
Application::PostUserEvent( STATIC_LINK( 0, SfxAppToolBoxControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
@@ -1800,9 +1800,9 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
- BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
+ sal_uIntPtr nSymbolsStyle = rSettings.GetSymbolsStyle();
+ sal_Bool bIsHiContrastMode = rSettings.GetHighContrastMode();
+ sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
( bIsHiContrastMode != m_bWasHiContrastMode ) ||
@@ -1812,10 +1812,10 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
m_bWasHiContrastMode = bIsHiContrastMode;
m_bShowMenuImages = bShowMenuImages;
- USHORT nCount = pActMenu->GetItemCount();
- for ( USHORT nSVPos = 0; nSVPos < nCount; nSVPos++ )
+ sal_uInt16 nCount = pActMenu->GetItemCount();
+ for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ )
{
- USHORT nId = pActMenu->GetItemId( nSVPos );
+ sal_uInt16 nId = pActMenu->GetItemId( nSVPos );
if ( pActMenu->GetItemType( nSVPos ) != MENUITEM_SEPARATOR )
{
if ( bShowMenuImages )
@@ -1831,7 +1831,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( aImageId.getLength() > 0 )
{
Reference< ::com::sun::star::frame::XFrame > xFrame;
- Image aImage = GetImage( xFrame, aImageId, FALSE, bIsHiContrastMode );
+ Image aImage = GetImage( xFrame, aImageId, sal_False, bIsHiContrastMode );
if ( !!aImage )
{
bImageSet = sal_True;
@@ -1843,7 +1843,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
if ( !bImageSet && aCmd.Len() )
{
Image aImage = SvFileInformationManager::GetImage(
- INetURLObject(aCmd), FALSE, bIsHiContrastMode );
+ INetURLObject(aCmd), sal_False, bIsHiContrastMode );
if ( !!aImage )
pActMenu->SetItemImage( nId, aImage );
}
@@ -1854,10 +1854,10 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 49deab951843..1b9260474938 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -145,14 +145,14 @@ SfxFrame::~SfxFrame()
sal_Bool SfxFrame::DoClose()
{
// Eigentlich wird noch ein PrepareClose gebraucht !!!
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !pImp->bClosing )
{
pImp->bClosing = sal_True;
CancelTransfers();
// now close frame; it will be deleted if this call is successful, so don't use any members after that!
- bRet = TRUE;
+ bRet = sal_True;
try
{
Reference< XCloseable > xCloseable ( pImp->xFrame, UNO_QUERY );
@@ -170,7 +170,7 @@ sal_Bool SfxFrame::DoClose()
catch( ::com::sun::star::util::CloseVetoException& )
{
pImp->bClosing = sal_False;
- bRet = FALSE;
+ bRet = sal_False;
}
catch( ::com::sun::star::lang::DisposedException& )
{
@@ -247,7 +247,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
if ( nRet == RET_OK )
{
// if this frame has child frames, ask them too
- for( USHORT nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
+ for( sal_uInt16 nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
nRet = pChildArr->GetObject( nPos )->PrepareClose_Impl( bUI, bForBrowsing );
}
@@ -296,7 +296,7 @@ sal_Bool SfxFrame::IsClosing_Impl() const
void SfxFrame::SetIsClosing_Impl()
{
- pImp->bClosing = TRUE;
+ pImp->bClosing = sal_True;
}
sal_uInt16 SfxFrame::GetChildFrameCount() const
@@ -592,18 +592,18 @@ SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const
return pNew;
}
-sal_Bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
if ( wFrame )
{
rVal <<= wFrame->GetFrameInterface();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
Reference < XFrame > xFrame;
if ( (rVal >>= xFrame) && xFrame.is() )
@@ -614,15 +614,15 @@ sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
if ( pFr->GetFrameInterface() == xFrame )
{
wFrame = pFrame = pFr;
- return TRUE;
+ return sal_True;
}
pFr = SfxFrame::GetNext( *pFr );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -643,13 +643,13 @@ SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const
return new SfxUsrAnyItem( Which(), aValue );
}
-sal_Bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal = aValue;
return sal_True;
}
-sal_Bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
aValue = rVal;
return sal_True;
@@ -677,13 +677,13 @@ SfxPoolItem* SfxUnoFrameItem::Clone( SfxItemPool* ) const
return new SfxUnoFrameItem( Which(), m_xFrame );
}
-sal_Bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= m_xFrame;
return sal_True;
}
-sal_Bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
return ( rVal >>= m_xFrame );
}
@@ -978,7 +978,7 @@ SfxFrame* SfxFrame::GetFirst()
SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
{
- USHORT nPos = pFramesArr_Impl->GetPos( &rFrame );
+ sal_uInt16 nPos = pFramesArr_Impl->GetPos( &rFrame );
if ( nPos+1 < pFramesArr_Impl->Count() )
return pFramesArr_Impl->GetObject(nPos+1);
else
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index ef963b36d7bb..ea6ab3abfb74 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -122,7 +122,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
{
DBG_TRACE("SfxFrame: GotFocus");
- pView->MakeActive_Impl( FALSE );
+ pView->MakeActive_Impl( sal_False );
}
// TODO/LATER: do we still need this code?
@@ -145,7 +145,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
else if( rNEvt.GetType() == EVENT_KEYINPUT )
{
if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
- return TRUE;
+ return sal_True;
}
else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ )
{
@@ -164,7 +164,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP )
{
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
@@ -199,7 +199,7 @@ long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
void SfxFrameWindow_Impl::GetFocus()
{
if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )
- pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
+ pFrame->GetCurrentViewFrame()->MakeActive_Impl( sal_True );
}
void SfxFrameWindow_Impl::Resize()
@@ -212,7 +212,7 @@ void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
- pFrame->pImp->bHidden = FALSE;
+ pFrame->pImp->bHidden = sal_False;
if ( pFrame->IsInPlace() )
// TODO/MBA: workaround for bug in LayoutManager: the final resize does not get through because the
// LayoutManager works asynchronously and between resize and time execution the DockingAcceptor was exchanged so that
@@ -250,7 +250,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
return xFrame;
}
-SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden )
+SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, sal_uInt16 nViewId, bool bHidden )
{
SfxFrame* pFrame = NULL;
try
@@ -341,7 +341,7 @@ SfxFrame::SfxFrame( Window& i_rContainerWindow, bool i_bHidden )
pWindow->Show();
}
-void SfxFrame::SetPresentationMode( BOOL bSet )
+void SfxFrame::SetPresentationMode( sal_Bool bSet )
{
if ( GetCurrentViewFrame() )
GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WINDOW_BORDER_NOBORDER : WINDOW_BORDER_NORMAL );
@@ -362,7 +362,7 @@ void SfxFrame::SetPresentationMode( BOOL bSet )
if ( GetWorkWindow_Impl() )
GetWorkWindow_Impl()->SetDockingAllowed( !bSet );
if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetDispatcher()->Update_Impl( TRUE );
+ GetCurrentViewFrame()->GetDispatcher()->Update_Impl( sal_True );
}
SystemWindow* SfxFrame::GetSystemWindow() const
@@ -389,14 +389,14 @@ sal_Bool SfxFrame::Close()
return sal_True;
}
-void SfxFrame::LockResize_Impl( BOOL bLock )
+void SfxFrame::LockResize_Impl( sal_Bool bLock )
{
pImp->bLockResize = bLock;
}
IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
{
- if ( pFrame && !pFrame->PrepareClose_Impl( TRUE ) )
+ if ( pFrame && !pFrame->PrepareClose_Impl( sal_True ) )
return 0L;
if ( pFrame )
@@ -404,7 +404,7 @@ IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
return 0L;
}
-void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
+void SfxFrame::SetMenuBarOn_Impl( sal_Bool bOn )
{
pImp->bMenuBarOn = bOn;
@@ -428,7 +428,7 @@ void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
}
}
-BOOL SfxFrame::IsMenuBarOn_Impl() const
+sal_Bool SfxFrame::IsMenuBarOn_Impl() const
{
return pImp->bMenuBarOn;
}
@@ -472,7 +472,7 @@ void SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )
// plugin mode
sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode && ( nPluginMode != 2 ) )
- SetInPlace_Impl( TRUE );
+ SetInPlace_Impl( sal_True );
}
bool SfxFrame::IsMarkedHidden_Impl() const
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 4dbb8a3c640e..958f37f12916 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -252,13 +252,13 @@ namespace
}
// --------------------------------------------------------------------------------------------------------------------
-sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const USHORT _nSlotID, const Reference< XFrame >& i_rxFrame,
+sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _nSlotID, const Reference< XFrame >& i_rxFrame,
const bool i_bHidden )
{
SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SFX_APP()->GetPool() );
aRequest.AppendItem( SfxUnoFrameItem( SID_FILLFRAME, i_rxFrame ) );
if ( i_bHidden )
- aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
return lcl_getDispatchResult( SFX_APP()->ExecuteSlot( aRequest ) );
}
@@ -314,7 +314,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
// --------------------------------------------------------------------------------------------------------------------
SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
{
- for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
+ for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, sal_False ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, sal_False ) )
{
if ( i_rxDocument == pDoc->GetModel() )
{
@@ -372,7 +372,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal
}
// --------------------------------------------------------------------------------------------------------------------
-USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
+sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
{
::rtl::OUString sSlotParam;
const sal_Int32 nParamPos = i_rFactoryURL.indexOf( '?' );
@@ -385,7 +385,7 @@ USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactor
}
if ( sSlotParam.getLength() )
- return USHORT( sSlotParam.toInt32() );
+ return sal_uInt16( sSlotParam.toInt32() );
return 0;
}
@@ -552,7 +552,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
{
const ::rtl::OUString sFactory = sURL.copy( sizeof( "private:factory/" ) -1 );
// special handling for some weird factory URLs a la private:factory/swriter?slot=21053
- const USHORT nSlotParam = impl_findSlotParam( sFactory );
+ const sal_uInt16 nSlotParam = impl_findSlotParam( sFactory );
if ( nSlotParam != 0 )
{
return impl_createNewDocWithSlotParam( nSlotParam, _rTargetFrame, aDescriptor.getOrDefault( "Hidden", false ) );
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index abe4cb6852d9..8fea153aed52 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -78,13 +78,13 @@ struct SfxViewFrame_Impl
class SfxFrameViewWindow_Impl : public Window
{
- BOOL bActive;
+ sal_Bool bActive;
SfxViewFrame* pFrame;
public:
SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) :
Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
- bActive( FALSE ),
+ bActive( sal_False ),
pFrame( p )
{
p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 997cb584f83d..30f2d568a3a8 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -399,7 +399,7 @@ void SAL_CALL SfxInPlaceClient_Impl::activatingUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->ResetAllClients_Impl(m_pClient);
- m_bUIActive = TRUE;
+ m_bUIActive = sal_True;
m_pClient->GetViewShell()->UIActivating( m_pClient );
}
@@ -423,7 +423,7 @@ void SAL_CALL SfxInPlaceClient_Impl::deactivatedUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->UIDeactivated( m_pClient );
- m_bUIActive = FALSE;
+ m_bUIActive = sal_False;
}
//--------------------------------------------------------------------
@@ -771,7 +771,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
}
//--------------------------------------------------------------------
-BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
+sal_Bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
{
if( rArea != m_pImp->m_aObjArea )
{
@@ -779,10 +779,10 @@ BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
m_pImp->SizeHasChanged();
Invalidate();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -992,7 +992,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
try
{
m_pImp->m_xObject->setClientSite( m_pImp->m_xClient );
@@ -1042,7 +1042,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
if ( m_pViewSh )
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1094,8 +1094,8 @@ void SfxInPlaceClient::DeactivateObject()
{
try
{
- m_pImp->m_bUIActive = FALSE;
- BOOL bHasFocus = FALSE;
+ m_pImp->m_bUIActive = sal_False;
+ sal_Bool bHasFocus = sal_False;
uno::Reference< frame::XModel > xModel( m_pImp->m_xObject->getComponent(), uno::UNO_QUERY );
if ( xModel.is() )
{
@@ -1103,12 +1103,12 @@ void SfxInPlaceClient::DeactivateObject()
if ( xController.is() )
{
Window* pWindow = VCLUnoHelper::GetWindow( xController->getFrame()->getContainerWindow() );
- bHasFocus = pWindow->HasChildPathFocus( TRUE );
+ bHasFocus = pWindow->HasChildPathFocus( sal_True );
}
}
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1130,7 +1130,7 @@ void SfxInPlaceClient::DeactivateObject()
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
SfxViewFrame::SetViewFrame( pFrame );
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1145,7 +1145,7 @@ void SfxInPlaceClient::ResetObject()
{
try
{
- m_pImp->m_bUIActive = FALSE;
+ m_pImp->m_bUIActive = sal_False;
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
else
@@ -1163,7 +1163,7 @@ void SfxInPlaceClient::ResetObject()
}
}
-BOOL SfxInPlaceClient::IsUIActive()
+sal_Bool SfxInPlaceClient::IsUIActive()
{
return m_pImp->m_bUIActive;
}
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 6c92cd448adf..21bc74affd70 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -78,12 +78,12 @@ struct _FileListEntry
//REMOVE SvStorageRef aStor; // Referenz auf Storage, wenn wir diesen geoeffnet haben
//uno::Reference< embed::XStorage > xStorage;
- BOOL bFile; // als Datei auf Platte
+ sal_Bool bFile; // als Datei auf Platte
// (!= unbenannt1, nicht als Dok. geladen;
// diese werden nicht gespeichert!)
- BOOL bOwner; // selbst erzeugt
- BOOL bNoName;
- BOOL bOwnFormat;
+ sal_Bool bOwner; // selbst erzeugt
+ sal_Bool bNoName;
+ sal_Bool bOwnFormat;
_FileListEntry( const String& rFileName,
const CollatorWrapper* pColl, const String* pTitle = NULL );
@@ -91,7 +91,7 @@ struct _FileListEntry
int operator==( const _FileListEntry &rCmp) const;
int operator< ( const _FileListEntry &rCmp) const;
- BOOL DeleteObjectShell();
+ sal_Bool DeleteObjectShell();
};
//-------------------------------------------------------------------------
@@ -117,10 +117,10 @@ _FileListEntry::_FileListEntry( const String& rFileName,
aFileName ( rFileName ),
pCollator ( pColl ),
- bFile ( FALSE ),
- bOwner ( FALSE ),
- bNoName ( TRUE ),
- bOwnFormat ( TRUE )
+ bFile ( sal_False ),
+ bOwner ( sal_False ),
+ bNoName ( sal_True ),
+ bOwnFormat ( sal_True )
{
if ( pTitle )
aBaseName = *pTitle;
@@ -145,20 +145,20 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*)
//=========================================================================
-BOOL _FileListEntry::DeleteObjectShell()
+sal_Bool _FileListEntry::DeleteObjectShell()
/* [Beschreibung]
Freigabe der DokumentShell
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Falls wir die Shell angelegt haben und sie veraendert wurde
if(bOwner && aDocShell.Is() && aDocShell->IsModified())
{
@@ -166,7 +166,7 @@ BOOL _FileListEntry::DeleteObjectShell()
if( bOwnFormat )
{
if(!aDocShell->Save() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
try {
@@ -218,14 +218,14 @@ SfxObjectList::~SfxObjectList()
//-------------------------------------------------------------------------
-const String &SfxObjectList::GetBaseName(USHORT i) const
+const String &SfxObjectList::GetBaseName(sal_uInt16 i) const
{
return (*this)[i]->aBaseName;
}
//-------------------------------------------------------------------------
-const String& SfxObjectList::GetFileName( USHORT i ) const
+const String& SfxObjectList::GetFileName( sal_uInt16 i ) const
{
return (*this)[i]->aFileName;
}
@@ -281,7 +281,7 @@ SfxOrganizeMgr::~SfxOrganizeMgr()
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx )
/* [Beschreibung]
@@ -298,17 +298,17 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
{
//(mba)/task SfxWaitCursor aWaitCursor;
INetURLObject aFileObj( pEntry->aFileName );
- BOOL bDum = FALSE;
+ sal_Bool bDum = sal_False;
SfxApplication* pSfxApp = SFX_APP();
String aFilePath = aFileObj.GetMainURL( INetURLObject::NO_DECODE );
- pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, FALSE, bDum );
+ pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, sal_False, bDum );
if ( !pEntry->aDocShell.Is() )
{
- pEntry->bOwner = TRUE;
+ pEntry->bOwner = sal_True;
SfxMedium* pMed = new SfxMedium(
- aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, 0 );
+ aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), sal_False, 0 );
const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
+ pMed->UseInteractionHandler(sal_True);
if (
pSfxApp->GetFilterMatcher().GuessFilter(*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0) ||
(pFilter && !pFilter->IsOwnFormat()) ||
@@ -316,7 +316,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
)
{
pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath );
- pEntry->bOwnFormat = FALSE;
+ pEntry->bOwnFormat = sal_False;
delete pMed;
if ( pEntry->aDocShell.Is() )
return (SfxObjectShellRef)(SfxObjectShell*)(pEntry->aDocShell);
@@ -325,7 +325,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
{
if ( pFilter )
{
- pEntry->bOwnFormat = TRUE;
+ pEntry->bOwnFormat = sal_True;
pEntry->aDocShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
if ( pEntry->aDocShell.Is() )
{
@@ -343,14 +343,14 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx)
/* [Beschreibung]
Freigabe der DokumentShell an der Position nIdx
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
@@ -360,8 +360,8 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
- USHORT nIdx)
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion,
+ sal_uInt16 nIdx)
/* [Beschreibung]
Zugriff auf die DokumentShell an der Position nIdx im Bereich
@@ -377,15 +377,15 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
Freigabe der DokumentShell an der Position nIdx im Bereich
nRegion (Dokumentvorlage)
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
@@ -396,10 +396,10 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Beschreibung]
@@ -407,10 +407,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index des Zielbereiches
- USHORT nTargetIdx Index Zielposition
- USHORT nSourceRegion Index des Quellbereiches
- USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ sal_uInt16 nTargetRegion Index des Zielbereiches
+ sal_uInt16 nTargetIdx Index Zielposition
+ sal_uInt16 nSourceRegion Index des Quellbereiches
+ sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -418,17 +418,17 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Querverweise]
- <SfxDocumentTemplates::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren
- return FALSE ;
- const BOOL bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -437,10 +437,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Beschreibung]
@@ -448,10 +448,10 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index des Zielbereiches
- USHORT nTargetIdx Index Zielposition
- USHORT nSourceRegion Index des Quellbereiches
- USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ sal_uInt16 nTargetRegion Index des Zielbereiches
+ sal_uInt16 nTargetIdx Index Zielposition
+ sal_uInt16 nSourceRegion Index des Quellbereiches
+ sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -459,17 +459,17 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
[Querverweise]
- <SfxDocumentTemplates::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben
- return FALSE ;
- const BOOL bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -478,8 +478,8 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
@@ -492,20 +492,20 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
durch das Keyboard angetriggert wird,
mu"s das Model der ListBox anschlie"send
aktualisiert werden.
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
[Querverweise]
- <SfxDocumentTemplates::Delete(USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( USHRT_MAX == nIdx )
{
@@ -514,11 +514,11 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
SvLBoxEntry *pGroupToDelete = pCaller->SvLBox::GetEntry(nRegion);
if ( pGroupToDelete )
{
- USHORT nItemNum = (USHORT)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
- USHORT nToDeleteNum = 0;
+ sal_uInt16 nItemNum = (sal_uInt16)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
+ sal_uInt16 nToDeleteNum = 0;
SvLBoxEntry **pEntriesToDelete = new SvLBoxEntry*[nItemNum];
- USHORT nInd = 0;
+ sal_uInt16 nInd = 0;
for ( nInd = 0; nInd < nItemNum; nInd++ )
pEntriesToDelete[nInd] = NULL;
@@ -563,7 +563,7 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertDir
+sal_Bool SfxOrganizeMgr::InsertDir
(
SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event
durch das Men"u oder durch das
@@ -571,7 +571,7 @@ BOOL SfxOrganizeMgr::InsertDir
mu\s das Model der ListBox
anschlie\send aktualisiert werden */
const String& rText, // logischer Name des Bereiches
- USHORT nRegion // Index des Bereiches
+ sal_uInt16 nRegion // Index des Bereiches
)
/* [Beschreibung]
@@ -581,23 +581,23 @@ BOOL SfxOrganizeMgr::InsertDir
[R"uckgabewert]
- Erfolg (TRUE) oder Mi\serfolg (FALSE)
+ Erfolg (sal_True) oder Mi\serfolg (sal_False)
[Querverweise]
- <SfxDocumentTemplates::InsertDir(const String &, USHORT nRegion)>
+ <SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)>
*/
{
- const BOOL bOk = pTemplates->InsertDir(rText, nRegion);
+ const sal_Bool bOk = pTemplates->InsertDir(rText, nRegion);
if(bOk)
{
bModified = 1;
SvLBoxEntry *pEntry = pCaller->InsertEntry(rText,
pCaller->GetOpenedBmp(0),
pCaller->GetClosedBmp(0),
- 0, TRUE, nRegion);
+ 0, sal_True, nRegion);
pCaller->Update();
pCaller->EditEntry(pEntry);
}
@@ -606,8 +606,8 @@ BOOL SfxOrganizeMgr::InsertDir
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::SetName(const String &rName,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::SetName(const String &rName,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
@@ -616,20 +616,20 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
[Parameter]
const String &rName der neue Name
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
[Querverweise]
- <SfxDocumentTemplates::SetName(const String &, USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- const BOOL bOk = pTemplates->SetName(rName, nRegion, nIdx);
+ const sal_Bool bOk = pTemplates->SetName(rName, nRegion, nIdx);
if(bOk)
bModified = 1;
return bOk;
@@ -637,7 +637,7 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const
+sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const
/* [Beschreibung]
@@ -645,8 +645,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
[Parameter]
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
const String &rName Dateiname
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -654,7 +654,7 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
[Querverweise]
- <SfxDocumentTemplates::CopyTo( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
@@ -664,8 +664,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx, String &rName)
+sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName)
/* [Beschreibung]
@@ -677,8 +677,8 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
Event durch das Men"u angetriggert wird,
mu"s das Model der ListBox anschlie"send
aktualisiert werden.
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
String &rName Dateiname
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -686,7 +686,7 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
[Querverweise]
- <SfxDocumentTemplates::CopyFrom( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
@@ -705,20 +705,20 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
pCaller->GetOpenedBmp(1),
pCaller->GetClosedBmp(1),
pParent,
- TRUE,
+ sal_True,
nIdx);
pCaller->Update();
// pCaller->EditEntry( pEntry );
pCaller->Expand( pParent );
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
+sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
/* [Beschreibung]
@@ -741,18 +741,18 @@ BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String&
_FileListEntry* pEntry = new _FileListEntry( rFileName, pCollator );
if ( pImpl->pDocList->C40_PTR_INSERT( _FileListEntry, pEntry ) )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
pImpl->pDocList->Seek_Entry( pEntry, &nPos );
pCaller->InsertEntry( pEntry->aBaseName, pCaller->GetOpenedBmp(1),
- pCaller->GetClosedBmp(1), 0, TRUE, nPos );
- return TRUE;
+ pCaller->GetClosedBmp(1), 0, sal_True, nPos );
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Rescan()
+sal_Bool SfxOrganizeMgr::Rescan()
/* [Beschreibung]
@@ -760,7 +760,7 @@ BOOL SfxOrganizeMgr::Rescan()
[R"uckgabewert]
- TRUE es bestanden Unterschiede
+ sal_True es bestanden Unterschiede
FALSE keine "Anderung
[Querverweise]
@@ -771,10 +771,10 @@ BOOL SfxOrganizeMgr::Rescan()
{
if(pTemplates->Rescan())
{
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -792,14 +792,14 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
*/
{
- USHORT nRangeCount = pTemplates->GetRegionCount();
- USHORT i;
+ sal_uInt16 nRangeCount = pTemplates->GetRegionCount();
+ sal_uInt16 i;
for(i = 0; i < nRangeCount; ++i)
{
if( pTemplates->IsRegionLoaded( i ))
{
- const USHORT nCount = pTemplates->GetCount(i);
- for(USHORT j = 0; j < nCount; ++j)
+ const sal_uInt16 nCount = pTemplates->GetCount(i);
+ for(sal_uInt16 j = 0; j < nCount; ++j)
{
if(!pTemplates->DeleteObjectShell(i, j))
{
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 64bebccd60fd..470b96106184 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -50,16 +50,16 @@
struct SfxPrinter_Impl
{
- BOOL mbAll;
- BOOL mbSelection;
- BOOL mbFromTo;
- BOOL mbRange;
+ sal_Bool mbAll;
+ sal_Bool mbSelection;
+ sal_Bool mbFromTo;
+ sal_Bool mbRange;
SfxPrinter_Impl() :
- mbAll ( TRUE ),
- mbSelection ( TRUE ),
- mbFromTo ( TRUE ),
- mbRange ( TRUE ) {}
+ mbAll ( sal_True ),
+ mbSelection ( sal_True ),
+ mbFromTo ( sal_True ),
+ mbRange ( sal_True ) {}
~SfxPrinter_Impl() {}
};
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 8fd223279372..b3a7bea50946 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -424,7 +424,7 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const EV
SfxViewShell* pShell = m_pController->GetViewShell_Impl();
if ( m_pController != NULL && pShell )
{
- BOOL bCanClose = (BOOL) pShell->PrepareClose( FALSE );
+ sal_Bool bCanClose = (sal_Bool) pShell->PrepareClose( sal_False );
if ( !bCanClose )
{
if ( bDeliverOwnership && ( !pShell->GetWindow() || !pShell->GetWindow()->IsReallyVisible() ) )
@@ -514,7 +514,7 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACT
if ( aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_UI_ACTIVATED )
{
if ( !m_pController->GetViewShell_Impl()->GetUIActiveIPClient_Impl() )
- m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( FALSE );
+ m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( sal_False );
}
else if ( aEvent.Action == ::com::sun::star::frame::FrameAction_CONTEXT_CHANGED )
{
@@ -698,7 +698,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell ); !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell ) )
bOther = (pFrame != pActFrame);
- BOOL bRet = bOther || pDocShell->PrepareClose();
+ sal_Bool bRet = bOther || pDocShell->PrepareClose();
if ( bRet )
{
ConnectSfxFrame_Impl( E_DISCONNECT );
@@ -795,7 +795,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
{
SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame();
if ( eSearchFlags & ( ::com::sun::star::frame::FrameSearchFlag::CREATE ))
- pFrame->SetChildWindow( SID_BROWSER, TRUE );
+ pFrame->SetChildWindow( SID_BROWSER, sal_True );
SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
REFERENCE < XFRAME > xFrame;
if ( pChildWin )
@@ -866,7 +866,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
}
else if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL )
{
- USHORT nId = (USHORT) aURL.Path.toInt32();
+ sal_uInt16 nId = (sal_uInt16) aURL.Path.toInt32();
pAct = m_pData->m_pViewShell->GetViewFrame() ;
if (nId >= SID_VERB_START && nId <= SID_VERB_END)
@@ -1206,10 +1206,10 @@ throw (::com::sun::star::uno::RuntimeException)
SfxSlotPool* pPool = &SfxSlotPool::GetSlotPool( pViewFrame );
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- 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<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1238,14 +1238,14 @@ throw (::com::sun::star::uno::RuntimeException)
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell )
{
- 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 );
SfxViewFrame* pViewFrame( m_pData->m_pViewShell->GetFrame() );
SfxSlotPool* pPool( &SfxSlotPool::GetSlotPool( pViewFrame ));
rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- for ( USHORT i=0; i<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1278,17 +1278,17 @@ throw (::com::sun::star::uno::RuntimeException)
return aSeq;
}
-BOOL SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
+sal_Bool SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
{
return m_pData->m_aUserInputInterception.handleNotifyEvent( rEvent );
}
-BOOL SfxBaseController::HasKeyListeners_Impl()
+sal_Bool SfxBaseController::HasKeyListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasKeyHandlers();
}
-BOOL SfxBaseController::HasMouseClickListeners_Impl()
+sal_Bool SfxBaseController::HasMouseClickListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasMouseClickListeners();
}
@@ -1367,15 +1367,15 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( !rFrame.IsMarkedHidden_Impl() )
{
if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) )
- pViewFrame->GetDispatcher()->HideUI( TRUE );
+ pViewFrame->GetDispatcher()->HideUI( sal_True );
else
- pViewFrame->GetDispatcher()->HideUI( FALSE );
+ pViewFrame->GetDispatcher()->HideUI( sal_False );
if ( rFrame.IsInPlace() )
pViewFrame->LockAdjustPosSizePixel();
if ( nPluginMode == 3 )
- rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( FALSE );
+ rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( sal_False );
if ( !rFrame.IsInPlace() )
pViewFrame->GetDispatcher()->Update_Impl();
@@ -1390,7 +1390,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// force resize for OLE server to fix layout problems of writer and math
// see i53651
if ( nPluginMode == 3 )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
}
}
else
@@ -1403,7 +1403,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
pViewFrame->UpdateTitle();
if ( !rFrame.IsInPlace() )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
// if there's a JumpMark given, then, well, jump to it
::comphelper::NamedValueCollection aViewArgs( getCreationArguments() );
@@ -1466,7 +1466,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
Sequence< PropertyValue > aViewData;
OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
if ( aViewData.getLength() > 0 )
- m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, sal_True );
}
}
catch( const Exception& )
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index ad910a944e0f..97c9e7926e39 100644
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -184,7 +184,7 @@ namespace sfx2
{
Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl );
- USHORT nType = _rEvent.GetType();
+ sal_uInt16 nType = _rEvent.GetType();
bool bHandled = false;
switch ( nType )
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index 3eed678420dd..1b48d716ff79 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -71,7 +71,7 @@ String SfxViewFactory::GetAPIViewName() const
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const sal_Char* asciiViewName ):
+ sal_uInt16 nOrdinal, const sal_Char* asciiViewName ):
fnCreate(fnC),
fnInit(fnI),
nOrd(nOrdinal),
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 4dcd4bb4709e..eb8fb8cf6125 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -606,7 +606,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
bForEdit = !bForEdit;
// ggf. beim User nachfragen
- sal_Bool bDo = ( GetViewShell()->PrepareClose() != FALSE );
+ sal_Bool bDo = ( GetViewShell()->PrepareClose() != sal_False );
SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
@@ -633,7 +633,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// collect the views of the document
// TODO: when UNO ViewFactories are available for SFX-based documents, the below code should
// be UNOized, too
- typedef ::std::pair< Reference< XFrame >, USHORT > ViewDescriptor;
+ typedef ::std::pair< Reference< XFrame >, sal_uInt16 > ViewDescriptor;
::std::list< ViewDescriptor > aViewFrames;
SfxViewFrame *pView = GetFirst( xOldObj );
while ( pView )
@@ -710,9 +710,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( pSilentItem && pSilentItem->GetValue() )
pNewSet->Put( SfxBoolItem( SID_SILENT, sal_True ) );
- SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
- SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , FALSE);
- SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , FALSE);
+ SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , sal_False);
if (!pInteractionItem)
{
@@ -1861,7 +1861,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
if ( !bEnable )
pImp->bWindowWasEnabled = pWindow->IsInputEnabled();
if ( !bEnable || pImp->bWindowWasEnabled )
- pWindow->EnableInput( bEnable, TRUE );
+ pWindow->EnableInput( bEnable, sal_True );
}
// cursor and focus
@@ -1927,11 +1927,11 @@ void SfxViewFrame::Show()
pCurrent != this &&
( !pCurrent || pCurrent->GetParentViewFrame_Impl() != this ) &&
!GetActiveChildFrame_Impl() )
- MakeActive_Impl( FALSE );*/
+ MakeActive_Impl( sal_False );*/
if ( xObjSh.Is() && xObjSh->Get_Impl()->bHiddenLockedByAPI )
{
- xObjSh->Get_Impl()->bHiddenLockedByAPI = FALSE;
- xObjSh->OwnerLock(FALSE);
+ xObjSh->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ xObjSh->OwnerLock(sal_False);
}
}
@@ -1960,7 +1960,7 @@ void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
}
//--------------------------------------------------------------------
-void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
+void SfxViewFrame::MakeActive_Impl( sal_Bool bGrabFocus )
{
if ( GetViewShell() && !GetFrame().IsClosing_Impl() )
{
@@ -1968,10 +1968,10 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
if ( GetViewShell() )
{
- BOOL bPreview = FALSE;
+ sal_Bool bPreview = sal_False;
if ( GetObjectShell()->IsPreview() )
{
- bPreview = TRUE;
+ bPreview = sal_True;
}
else
{
@@ -2004,7 +2004,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
GetBindings().SetDispatcher( GetDispatcher() );
GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
- GetDispatcher()->Update_Impl( FALSE );
+ GetDispatcher()->Update_Impl( sal_False );
}
}
}
@@ -2072,7 +2072,7 @@ SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
//--------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
- const USHORT i_nViewId, const bool i_bHidden )
+ const sal_uInt16 i_nViewId, const bool i_bHidden )
{
Reference< XFrame > xFrame( i_rFrame );
bool bOwnFrame = false;
@@ -2145,7 +2145,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
//--------------------------------------------------------------------
SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
- const Sequence< PropertyValue >& i_rLoadArgs, const USHORT i_nViewId,
+ const Sequence< PropertyValue >& i_rLoadArgs, const sal_uInt16 i_nViewId,
const bool i_bHidden )
{
Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
@@ -2175,37 +2175,37 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : NULL, i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId )
{
- SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
- SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
return LoadViewIntoFrame_Impl_NoThrow(
i_rDoc,
@@ -2237,9 +2237,9 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
}
SfxViewFrame* pViewFrame = NULL;
- for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, FALSE );
+ for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, sal_False );
pViewFrame;
- pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, FALSE )
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, sal_False )
)
{
if ( pViewFrame->GetViewShell()->GetController() == i_rController )
@@ -2251,7 +2251,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
//--------------------------------------------------------------------
-void SfxViewFrame::SaveCurrentViewData_Impl( const USHORT i_nNewViewId )
+void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
{
SfxViewShell* pCurrentShell = GetViewShell();
ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
@@ -2365,7 +2365,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
if ( pOldSh )
{
// ask wether it can be closed
- if ( !pOldSh->PrepareClose( TRUE ) )
+ if ( !pOldSh->PrepareClose( sal_True ) )
return sal_False;
// remove sub shells from Dispatcher before switching to new ViewShell
@@ -2377,7 +2377,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
// ID of the new view
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
- const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
+ const sal_uInt16 nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
// save the view data of the old view, so it can be restored later on (when needed)
SaveCurrentViewData_Impl( nViewId );
@@ -2413,7 +2413,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
}
//-------------------------------------------------------------------------
-void SfxViewFrame::SetCurViewId_Impl( const USHORT i_nID )
+void SfxViewFrame::SetCurViewId_Impl( const sal_uInt16 i_nID )
{
pImp->nCurViewId = i_nID;
}
@@ -2461,7 +2461,7 @@ void SfxViewFrame::ExecView_Impl
)
{
const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
- BOOL bSuccess = SwitchToViewShell_Impl( nViewId );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewId );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
}
break;
@@ -2474,7 +2474,7 @@ void SfxViewFrame::ExecView_Impl
case SID_VIEWSHELL4:
{
const sal_uInt16 nViewNo = rReq.GetSlot() - SID_VIEWSHELL0;
- BOOL bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
break;
}
@@ -2497,7 +2497,7 @@ void SfxViewFrame::ExecView_Impl
// the view ID (optional arg. TODO: this is currently not supported in the slot definition ...)
SFX_REQUEST_ARG( rReq, pViewIdItem, SfxUInt16Item, SID_VIEW_ID, sal_False );
- const USHORT nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
+ const sal_uInt16 nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
Reference < XFrame > xFrame;
// the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
@@ -2743,12 +2743,12 @@ void SfxViewFrame::SetModalMode( sal_Bool bModal )
}
}
-BOOL SfxViewFrame::IsInModalMode() const
+sal_Bool SfxViewFrame::IsInModalMode() const
{
return pImp->bModal || GetFrame().GetWindow().IsInModalMode();
}
-void SfxViewFrame::Resize( BOOL bForce )
+void SfxViewFrame::Resize( sal_Bool bForce )
{
Size aSize = GetWindow().GetOutputSizePixel();
if ( bForce || aSize != pImp->aSize )
@@ -2772,7 +2772,7 @@ void SfxViewFrame::Resize( BOOL bForce )
#define LINE_SEP 0x0A
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nEndPos = 0;
@@ -2839,7 +2839,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
SfxApplication* pSfxApp = SFX_APP();
SfxRequest aReq( SID_BASICCHOOSER, SFX_CALLMODE_SYNCHRON, pSfxApp->GetPool() );
- aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,TRUE) );
+ aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,sal_True) );
const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot( aReq );
String aScriptURL;
if ( pRet )
@@ -2898,11 +2898,11 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
aOUSource = pModule->GetSource32();
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
- ULONG nlStart = nStart;
- ULONG nlEnd = nEnd;
- CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, TRUE );
+ sal_uIntPtr nlStart = nStart;
+ sal_uIntPtr nlEnd = nEnd;
+ CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, sal_True );
}
}
}
@@ -2950,7 +2950,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
::rtl::OUString sCode;
::rtl::OUStringBuffer sRoutine(10000);
::rtl::OUString sMacroName( aMacroName );
- BOOL bReplace = FALSE;
+ sal_Bool bReplace = sal_False;
// get module
::rtl::OUString sModule( aModuleName );
@@ -2967,7 +2967,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
sRoutine.append( sCode );
}
- bReplace = TRUE;
+ bReplace = sal_True;
}
// append new method
@@ -3018,7 +3018,6 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- FASTBOOL bDone = FALSE;
switch ( rReq.GetSlot() )
{
case SID_STOP_RECORDING :
@@ -3038,7 +3037,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
if (xSupplier.is())
xRecorder = xSupplier->getDispatchRecorder();
- BOOL bIsRecording = xRecorder.is();
+ sal_Bool bIsRecording = xRecorder.is();
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_RECORDMACRO, sal_False);
if ( pItem && pItem->GetValue() == bIsRecording )
return;
@@ -3058,7 +3057,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
xRecorder = NULL;
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, FALSE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_False );
if ( rReq.GetSlot() != SID_RECORDMACRO )
GetBindings().Invalidate( SID_RECORDMACRO );
}
@@ -3082,7 +3081,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
aProp <<= xSupplier;
xSet->setPropertyValue(sProperty,aProp);
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, TRUE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_True );
}
rReq.Done();
@@ -3113,8 +3112,8 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
// Parameter auswerten
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), FALSE);
- BOOL bShow( TRUE );
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), sal_False);
+ sal_Bool bShow( sal_True );
if ( !pShowItem )
bShow = xLayoutManager->isElementVisible( aStatusbarResString );
else
@@ -3138,7 +3137,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_WIN_FULLSCREEN:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), FALSE);
+ SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), sal_False);
SfxViewFrame *pTop = GetTopViewFrame();
if ( pTop )
{
@@ -3163,7 +3162,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
}
}
- BOOL bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
+ sal_Bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
if ( bNewFullScreenMode != pWork->IsFullScreenMode() )
{
Reference< ::com::sun::star::beans::XPropertySet > xLMPropSet( xLayoutManager, UNO_QUERY );
@@ -3193,24 +3192,21 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
else
rReq.Ignore();
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
break;
}
}
-
- if ( bDone )
- rReq.Done();
}
void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
{
DBG_MEMTEST();
- 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)
{
@@ -3278,11 +3274,11 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )) );
if ( !( aProp >>= xLayoutManager ))
- rSet.Put( SfxBoolItem( nWhich, FALSE ));
+ rSet.Put( SfxBoolItem( nWhich, sal_False ));
else
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- BOOL bShow = xLayoutManager->isElementVisible( aStatusbarResString );
+ sal_Bool bShow = xLayoutManager->isElementVisible( aStatusbarResString );
rSet.Put( SfxBoolItem( nWhich, bShow ));
}
break;
@@ -3335,17 +3331,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
{
// Parameter auswerten
- USHORT nSID = rReq.GetSlot();
+ sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, FALSE);
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
return;
Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface();
Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) );
- BOOL bShow = FALSE;
- BOOL bHasChild = xBeamer.is();
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = xBeamer.is();
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
if ( pShowItem )
{
@@ -3357,7 +3353,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
if ( !bShow )
{
- SetChildWindow( SID_BROWSER, FALSE );
+ SetChildWindow( SID_BROWSER, sal_False );
}
else
{
@@ -3384,8 +3380,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
return;
}
- BOOL bShow = FALSE;
- BOOL bHasChild = HasChildWindow(nSID);
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = HasChildWindow(nSID);
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
// ausf"uhren
@@ -3393,7 +3389,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
ToggleChildWindow( nSID );
GetBindings().Invalidate( nSID );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// ggf. recorden
if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG )
@@ -3421,7 +3417,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
{
SfxWhichIter aIter( rState );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
@@ -3474,7 +3470,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
//--------------------------------------------------------------------
-SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
+SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( sal_uInt16 /*nId*/ )
{
SfxWorkWindow* pWork = 0;
pWork = GetFrame().GetWorkWindow_Impl();
@@ -3482,12 +3478,12 @@ SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
}
/*
-void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn)
+void SfxViewFrame::SetChildWindow(sal_uInt16 nId, sal_Bool bOn)
{
- SetChildWindow( nId, bOn, TRUE );
+ SetChildWindow( nId, bOn, sal_True );
}*/
-void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
+void SfxViewFrame::SetChildWindow(sal_uInt16 nId, sal_Bool bOn, sal_Bool bSetFocus )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
@@ -3496,44 +3492,44 @@ void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
//--------------------------------------------------------------------
-void SfxViewFrame::ToggleChildWindow(USHORT nId)
+void SfxViewFrame::ToggleChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
- pWork->ToggleChildWindow_Impl( nId, TRUE );
+ pWork->ToggleChildWindow_Impl( nId, sal_True );
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::HasChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::HasChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->HasChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->HasChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::KnowsChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::KnowsChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->KnowsChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->KnowsChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-void SfxViewFrame::ShowChildWindow( USHORT nId, BOOL bVisible )
+void SfxViewFrame::ShowChildWindow( sal_uInt16 nId, sal_Bool bVisible )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
{
GetDispatcher()->Update_Impl(sal_True);
- pWork->ShowChildWindow_Impl(nId, bVisible, TRUE );
+ pWork->ShowChildWindow_Impl(nId, bVisible, sal_True );
}
}
//--------------------------------------------------------------------
-SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
+SfxChildWindow* SfxViewFrame::GetChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 05ce981a51b6..6352adfb53e4 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -278,10 +278,10 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
case SID_SHOWPOPUPS :
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, FALSE);
- BOOL bShow = pShowItem ? pShowItem->GetValue() : TRUE;
- SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, FALSE);
- USHORT nId = pIdItem ? pIdItem->GetValue() : 0;
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
+ SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False);
+ sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0;
// ausfuehren
SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
@@ -289,7 +289,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
// Zuerst die Floats auch anzeigbar machen
pWorkWin->MakeChildsVisible_Impl( bShow );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// Dann anzeigen
GetBindings().HidePopups( !bShow );
@@ -304,7 +304,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
pBind = pBind->GetSubBindings_Impl();
}
- pWorkWin->HidePopups_Impl( !bShow, TRUE, nId );
+ pWorkWin->HidePopups_Impl( !bShow, sal_True, nId );
pWorkWin->MakeChildsVisible_Impl( bShow );
}
@@ -315,14 +315,14 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
case SID_ACTIVATE:
{
- MakeActive_Impl( TRUE );
+ MakeActive_Impl( sal_True );
rReq.SetReturnValue( SfxObjectItem( 0, this ) );
break;
}
case SID_NEWDOCDIRECT :
{
- 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();
@@ -366,11 +366,11 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
// Doc braucht nur gefragt zu werden, wenn keine weitere View
sal_Bool bClosed = sal_False;
- sal_Bool bUI = TRUE;
+ sal_Bool bUI = sal_True;
if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
{
if ( !bOther )
- pDocSh->SetModified( FALSE );
+ pDocSh->SetModified( sal_False );
rReq.Done(); // unbedingt vor Close() rufen!
bClosed = sal_False;
try
@@ -440,7 +440,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
{
uno::Any aAny;
aAny <<= GetViewShell()->GetVerbs();
- rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
+ rSet.Put( SfxUnoAnyItem( sal_uInt16( SID_OBJECT ), aAny ) );
}
else
rSet.DisableItem( SID_OBJECT );
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 0826e78870bb..83c916d3071e 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -61,7 +61,7 @@ struct SfxViewShell_Impl
SvBorder aBorder;
Size aOptimalSize;
Size aMargin;
- USHORT m_nPrinterLocks;
+ sal_uInt16 m_nPrinterLocks;
bool m_bCanPrint;
bool m_bHasPrintOptions;
bool m_bPlugInsActive;
@@ -71,14 +71,14 @@ struct SfxViewShell_Impl
bool m_bGotOwnership;
bool m_bGotFrameOwnership;
SfxScrollingMode m_eScroll;
- USHORT m_nFamily;
+ sal_uInt16 m_nFamily;
::rtl::Reference<SfxBaseController> m_pController;
::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
::boost::shared_ptr< vcl::PrinterController > m_pPrinterController;
- SfxViewShell_Impl(USHORT const nFlags);
+ SfxViewShell_Impl(sal_uInt16 const nFlags);
};
#endif
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 24ed85556466..515149c5a2d3 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -426,16 +426,16 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
//-------------------------------------------------------------------------
-BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
+sal_Bool UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
{
// Optionen abfragen, ob gewarnt werden soll (Doc uebersteuert App)
- BOOL bWarn = FALSE;
+ sal_Bool bWarn = sal_False;
const SfxItemSet *pDocOptions = &pDocPrinter->GetOptions();
if ( pDocOptions )
{
- USHORT nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN);
+ sal_uInt16 nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN);
const SfxBoolItem* pBoolItem = NULL;
- pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pBoolItem );
+ pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pBoolItem );
if ( pBoolItem )
bWarn = pBoolItem->GetValue();
}
@@ -450,7 +450,7 @@ BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
}
*/
// nicht gewarnt => einfach so den StandardDrucker nehmen
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -465,15 +465,15 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
SfxPrinter *pDocPrinter = GetPrinter();
// Printer-Options auswerten
- FASTBOOL bOriToDoc = FALSE;
- FASTBOOL bSizeToDoc = FALSE;
+ bool bOriToDoc = false;
+ bool bSizeToDoc = false;
if ( &pDocPrinter->GetOptions() )
{
- USHORT nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
+ sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
const SfxFlagItem *pFlagItem = 0;
- pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pFlagItem );
- bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : FALSE;
- bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : FALSE;
+ pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pFlagItem );
+ bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : sal_False;
+ bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False;
}
// vorheriges Format und Size feststellen
@@ -485,8 +485,8 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
Size aNewPgSz = pNewPrinter->GetPaperSizePixel();
// "Anderungen am Seitenformat feststellen
- BOOL bOriChg = (eOldOri != eNewOri) && bOriToDoc;
- BOOL bPgSzChg = ( aOldPgSz.Height() !=
+ sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc;
+ sal_Bool bPgSzChg = ( aOldPgSz.Height() !=
( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) ||
aOldPgSz.Width() !=
( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
@@ -494,7 +494,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
// Message und Flags f"ur Seitenformat-"Anderung zusammenstellen
String aMsg;
- USHORT nNewOpt=0;
+ sal_uInt16 nNewOpt=0;
if( bOriChg && bPgSzChg )
{
aMsg = String(SfxResId(STR_PRINT_NEWORISIZE));
@@ -512,7 +512,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
}
// in dieser Variable sammeln, was sich so ge"aendert hat
- USHORT nChangedFlags = 0;
+ sal_uInt16 nChangedFlags = 0;
// ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll
if ( ( bOriChg || bPgSzChg ) &&
@@ -603,7 +603,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
// FIXME: job setup
- SfxPrinter* pDocPrt = GetPrinter(FALSE);
+ SfxPrinter* pDocPrt = GetPrinter(sal_False);
JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup();
if( bIsDirect )
aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
@@ -620,16 +620,16 @@ Printer* SfxViewShell::GetActivePrinter() const
void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
- // USHORT nCopies=1;
- USHORT nDialogRet = RET_CANCEL;
- // BOOL bCollate=FALSE;
+ // sal_uInt16 nCopies=1;
+ sal_uInt16 nDialogRet = RET_CANCEL;
+ // sal_Bool bCollate=sal_False;
SfxPrinter* pPrinter = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
- BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
+ sal_Bool bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
if ( bIsAPI )
{
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
bSilent = pSilentItem && pSilentItem->GetValue();
}
@@ -642,7 +642,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
- const USHORT nId = rReq.GetSlot();
+ const sal_uInt16 nId = rReq.GetSlot();
switch( nId )
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -654,7 +654,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// derived class may decide to abort this
if( !pDoc->QuerySlotExecutable( nId ) )
{
- rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) );
return;
}
@@ -662,10 +662,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
break;
- SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE);
+ SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False);
sal_Bool bSelection = pSelectItem && pSelectItem->GetValue();
if( pSelectItem && rReq.GetArgs()->Count() == 1 )
- bIsAPI = FALSE;
+ bIsAPI = sal_False;
uno::Sequence < beans::PropertyValue > aProps;
if ( bIsAPI )
@@ -720,10 +720,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
case SID_PRINTER_NAME : // only for recorded macros
{
// get printer and printer settings from the document
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
+ SfxPrinter *pDocPrinter = GetPrinter(sal_True);
// look for printer in parameters
- SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, sal_False );
if ( pPrinterItem )
{
// use PrinterName parameter to create a printer
@@ -752,7 +752,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// no valid printer either in ItemSet or at the document
if ( bSilent )
{
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
else
@@ -762,7 +762,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( !pPrinter->IsOriginal() && rReq.GetArgs() && !UseStandardPrinter_Impl( NULL, pPrinter ) )
{
// printer is not available, but standard printer should not be used
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
@@ -772,7 +772,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// if printer is busy, abort printing
if ( !bSilent )
InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
@@ -839,7 +839,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
DELETEZ( pDlgPrinter );
rReq.Ignore();
if ( SID_PRINTDOC == nId )
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
}
}
}
@@ -855,16 +855,16 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
-BOOL SfxViewShell::IsPrinterLocked() const
+sal_Bool SfxViewShell::IsPrinterLocked() const
{
return pImp->m_nPrinterLocks > 0;
}
//--------------------------------------------------------------------
-void SfxViewShell::LockPrinter( BOOL bLock)
+void SfxViewShell::LockPrinter( sal_Bool bLock)
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( bLock )
{
bChanged = 1 == ++pImp->m_nPrinterLocks;
@@ -884,14 +884,14 @@ void SfxViewShell::LockPrinter( BOOL bLock)
//--------------------------------------------------------------------
-SfxPrinter* SfxViewShell::GetPrinter( BOOL /*bCreate*/ )
+SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ )
{
return 0;
}
//--------------------------------------------------------------------
-USHORT SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, USHORT /*nDiffFlags*/, bool )
+sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, sal_uInt16 /*nDiffFlags*/, bool )
{
return 0;
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index ca3452e24168..88b185482abb 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -300,7 +300,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
}
//=========================================================================
-SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags)
+SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags)
: aInterceptorContainer( aMutex )
, m_bControllerSet(false)
, m_nPrinterLocks(0)
@@ -439,12 +439,12 @@ enum ETypeFamily
void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
- const USHORT nId = rReq.GetSlot();
+ const sal_uInt16 nId = rReq.GetSlot();
switch( nId )
{
case SID_STYLE_FAMILY :
{
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE);
+ SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, sal_False);
if (pItem)
{
pImp->m_nFamily = pItem->GetValue();
@@ -495,10 +495,10 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
ToolBox* pTextToolbox = dynamic_cast< ToolBox* >( pWin );
if( pTextToolbox )
{
- USHORT nItemCount = pTextToolbox->GetItemCount();
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem )
+ sal_uInt16 nItemCount = pTextToolbox->GetItemCount();
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem )
{
- USHORT nItemId = pTextToolbox->GetItemId( nItem );
+ sal_uInt16 nItemId = pTextToolbox->GetItemId( nItem );
const XubString& rCommand = pTextToolbox->GetItemCommand( nItemId );
if( rCommand.EqualsAscii( ".uno:StyleApply" ) )
{
@@ -534,18 +534,18 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( SvtInternalOptions().MailUIEnabled() )
{
- GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE );
+ GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, sal_True );
}
else
{
SfxMailModel aModel;
rtl::OUString aDocType;
- SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, sal_False );
if ( pMailSubject )
aModel.SetSubject( pMailSubject->GetValue() );
- SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, sal_False );
if ( pMailRecipient )
{
String aRecipient( pMailRecipient->GetValue() );
@@ -555,7 +555,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
aRecipient = aRecipient.Erase( 0, aMailToStr.Len() );
aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO );
}
- SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, sal_False );
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
@@ -610,7 +610,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
css::uno::Reference< css::frame::XModuleManager > xModuleManager( xSMGR->createInstance( aModuleManager ), css::uno::UNO_QUERY_THROW );
if ( !xModuleManager.is() )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -668,7 +668,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// No type and no location => error
if (( aFilterName.getLength() == 0 ) || ( aTypeName.getLength() == 0 ))
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -709,7 +709,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
catch ( com::sun::star::io::IOException& )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -717,7 +717,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )),
css::uno::UNO_QUERY );
- BOOL bRet( TRUE );
+ sal_Bool bRet( sal_True );
if ( xSystemShellExecute.is() )
{
try
@@ -730,7 +730,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
vos::OGuard aGuard( Application::GetSolarMutex() );
Window *pParent = SFX_APP()->GetTopWindow();
ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -739,7 +739,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
else
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
}
@@ -747,7 +747,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_PLUGINS_ACTIVE:
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE);
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, sal_False);
bool const bActive = (pShowItem)
? pShowItem->GetValue()
: !pImp->m_bPlugInsActive;
@@ -757,7 +757,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool
// benutzen, der demn"achst weg ist
- rReq.Done(TRUE);
+ rReq.Done(sal_True);
// ausfuehren
if (!pShowItem || (bActive != pImp->m_bPlugInsActive))
@@ -785,10 +785,10 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
VisAreaChanged(aVisArea);
// the plugins might need change in their state
- SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(sal_False);
if ( pClients )
{
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient )
@@ -817,7 +817,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
DBG_CHKTHIS(SfxViewShell, 0);
SfxWhichIter aIter( rSet );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
{
@@ -838,7 +838,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
if ( bEnabled )
{
- SfxPrinter *pPrinter = GetPrinter(FALSE);
+ SfxPrinter *pPrinter = GetPrinter(sal_False);
if ( SID_PRINTDOCDIRECT == nSID )
{
@@ -879,7 +879,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
case SID_MAIL_SENDDOC:
case SID_MAIL_SENDDOCASFORMAT:
{
- BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
+ sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
if ( !bEnable )
rSet.DisableItem( nSID );
break;
@@ -903,7 +903,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
// SelectionTextExt
case SID_SELECTION_TEXT_EXT:
{
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) );
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) );
break;
}
*/
@@ -975,8 +975,8 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
- pFrame->GetBindings().HidePopups(TRUE);
- pFrame->GetDispatcher()->Update_Impl( TRUE );
+ pFrame->GetBindings().HidePopups(sal_True);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
}
//--------------------------------------------------------------------
@@ -985,8 +985,8 @@ void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ )
{
if ( !pFrame->GetFrame().IsClosing_Impl() ||
SfxViewFrame::Current() != pFrame )
- pFrame->GetDispatcher()->Update_Impl( TRUE );
- pFrame->GetBindings().HidePopups(FALSE);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
+ pFrame->GetBindings().HidePopups(sal_False);
// uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
// uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
@@ -1002,13 +1002,13 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
Window* pObjParentWin
) const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
if( !pObjParentWin )
pObjParentWin = GetWindow();
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n);
if ( pIPClient->GetObject() == xObj && pIPClient->GetEditWin() == pObjParentWin )
@@ -1030,11 +1030,11 @@ SfxInPlaceClient* SfxViewShell::GetIPClient() const
SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
{
// this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize)
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsUIActive() )
@@ -1046,11 +1046,11 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsObjectUIActive() )
@@ -1062,7 +1062,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
//--------------------------------------------------------------------
-void SfxViewShell::Activate( BOOL bMDI )
+void SfxViewShell::Activate( sal_Bool bMDI )
{
DBG_CHKTHIS(SfxViewShell, 0);
if ( bMDI )
@@ -1077,7 +1077,7 @@ void SfxViewShell::Activate( BOOL bMDI )
//--------------------------------------------------------------------
-void SfxViewShell::Deactivate(BOOL /*bMDI*/)
+void SfxViewShell::Deactivate(sal_Bool /*bMDI*/)
{
DBG_CHKTHIS(SfxViewShell, 0);
}
@@ -1294,13 +1294,13 @@ void SfxViewShell::SetWindow
DiscardClients_Impl();
// View-Port austauschen
- BOOL bHadFocus = pWindow ? pWindow->HasChildPathFocus( TRUE ) : FALSE;
+ sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False;
pWindow = pViewPort;
if( pWindow )
{
// Disable automatic GUI mirroring (right-to-left) for document windows
- pWindow->EnableRTL( FALSE );
+ pWindow->EnableRTL( sal_False );
}
if ( bHadFocus && pWindow )
@@ -1323,7 +1323,7 @@ Size SfxViewShell::GetOptimalSizePixel() const
SfxViewShell::SfxViewShell
(
SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View dargestellt wird */
- USHORT nFlags /* siehe <SfxViewShell-Flags> */
+ sal_uInt16 nFlags /* siehe <SfxViewShell-Flags> */
)
: SfxShell(this)
@@ -1384,10 +1384,10 @@ SfxViewShell::~SfxViewShell()
//--------------------------------------------------------------------
-USHORT SfxViewShell::PrepareClose
+sal_uInt16 SfxViewShell::PrepareClose
(
- BOOL bUI, // TRUE: Dialoge etc. erlaubt, FALSE: silent-mode
- BOOL /*bForBrowsing*/
+ sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode
+ sal_Bool /*bForBrowsing*/
)
{
SfxPrinter *pPrinter = GetPrinter();
@@ -1399,16 +1399,16 @@ USHORT SfxViewShell::PrepareClose
aInfoBox.Execute();
}
- return FALSE;
+ return sal_False;
}
if( GetViewFrame()->IsInModalMode() )
- return FALSE;
+ return sal_False;
if( bUI && GetViewFrame()->GetDispatcher()->IsLocked() )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1426,9 +1426,9 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
if ( !i_rController.is() )
return NULL;
- for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, FALSE );
+ for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, sal_False );
pViewShell;
- pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, FALSE )
+ pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, sal_False )
)
{
if ( pViewShell->GetController() == i_rController )
@@ -1457,7 +1457,7 @@ SdrView* SfxViewShell::GetDrawView() const
String SfxViewShell::GetSelectionText
(
- BOOL /*bCompleteWords*/ /* FALSE (default)
+ sal_Bool /*bCompleteWords*/ /* sal_False (default)
Nur der tats"achlich selektierte Text wird
zur"uckgegeben.
@@ -1486,17 +1486,17 @@ String SfxViewShell::GetSelectionText
//--------------------------------------------------------------------
-BOOL SfxViewShell::HasSelection( BOOL ) const
+sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
/* [Beschreibung]
Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der
- aktuellen View etwas selektiert ist. Wenn der Parameter <BOOL> TRUE ist,
+ aktuellen View etwas selektiert ist. Wenn der Parameter <sal_Bool> sal_True ist,
wird abgefragt, ob Text selektiert ist.
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -1549,10 +1549,10 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( !pShell )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( pDisp->IsActive(*this) )
{
- for ( USHORT n=nCount; n>0; n-- )
+ for ( sal_uInt16 n=nCount; n>0; n-- )
pDisp->Pop( *pImp->aArr[n-1] );
pDisp->Flush();
}
@@ -1561,7 +1561,7 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
else
{
- USHORT nPos = pImp->aArr.GetPos( pShell );
+ sal_uInt16 nPos = pImp->aArr.GetPos( pShell );
if ( nPos != 0xFFFF )
{
pImp->aArr.Remove( nPos );
@@ -1574,21 +1574,21 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
}
-SfxShell* SfxViewShell::GetSubShell( USHORT nNo )
+SfxShell* SfxViewShell::GetSubShell( sal_uInt16 nNo )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( nNo<nCount )
return pImp->aArr[nCount-nNo-1];
return NULL;
}
-void SfxViewShell::PushSubShells_Impl( BOOL bPush )
+void SfxViewShell::PushSubShells_Impl( sal_Bool bPush )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( bPush )
{
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
pDisp->Push( *pImp->aArr[n] );
}
else if ( nCount )
@@ -1603,13 +1603,13 @@ void SfxViewShell::PushSubShells_Impl( BOOL bPush )
//--------------------------------------------------------------------
-void SfxViewShell::WriteUserData( String&, BOOL )
+void SfxViewShell::WriteUserData( String&, sal_Bool )
{
}
//--------------------------------------------------------------------
-void SfxViewShell::ReadUserData(const String&, BOOL )
+void SfxViewShell::ReadUserData(const String&, sal_Bool )
{
}
@@ -1628,13 +1628,13 @@ void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::c
SfxViewShell* SfxViewShell::GetFirst
(
const TypeId* pType,
- BOOL bOnlyVisible
+ sal_Bool bOnlyVisible
)
{
// search for a SfxViewShell of the specified type
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- for ( USHORT nPos = 0; nPos < rShells.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rShells.Count(); ++nPos )
{
SfxViewShell *pShell = rShells.GetObject(nPos);
if ( pShell )
@@ -1666,12 +1666,12 @@ SfxViewShell* SfxViewShell::GetNext
(
const SfxViewShell& rPrev,
const TypeId* pType,
- BOOL bOnlyVisible
+ sal_Bool bOnlyVisible
)
{
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < rShells.Count(); ++nPos )
if ( rShells.GetObject(nPos) == &rPrev )
break;
@@ -1743,7 +1743,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
//--------------------------------------------------------------------
-BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
+sal_Bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
{
if (!pImp->m_pAccExec.get())
{
@@ -1769,7 +1769,7 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
[R"uckgabewert]
- FASTBOOL TRUE
+ FASTBOOL sal_True
die Taste ist konfiguriert, der betreffende
Handler wurde gerufen
@@ -1785,7 +1785,7 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
return ExecKey_Impl(rKeyEvent);
}
-FASTBOOL SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
+bool SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
{
return ExecKey_Impl(rKeyEvent);
}
@@ -1828,11 +1828,11 @@ void SfxViewShell::GotFocus() const
void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for ( USHORT n=0; n < pClients->Count(); n++ )
+ for ( sal_uInt16 n=0; n < pClients->Count(); n++ )
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if( pIPClient != pIP )
@@ -1844,11 +1844,11 @@ void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
void SfxViewShell::DisconnectAllClients()
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for ( USHORT n=0; n<pClients->Count(); )
+ for ( sal_uInt16 n=0; n<pClients->Count(); )
// clients will remove themselves from the list
delete pClients->GetObject(n);
}
@@ -1871,11 +1871,11 @@ void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/)
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsObjectInPlaceActive() )
@@ -1924,7 +1924,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
//--------------------------------------------------------------------
-BOOL SfxViewShell::PlugInsActive() const
+sal_Bool SfxViewShell::PlugInsActive() const
{
return pImp->m_bPlugInsActive;
}
@@ -1940,11 +1940,11 @@ void SfxViewShell::DiscardClients_Impl()
*/
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for (USHORT n=0; n < pClients->Count(); )
+ for (sal_uInt16 n=0; n < pClients->Count(); )
delete pClients->GetObject(n);
}
@@ -2024,7 +2024,7 @@ void SfxViewShell::MarginChanged()
//--------------------------------------------------------------------
-BOOL SfxViewShell::IsShowView_Impl() const
+sal_Bool SfxViewShell::IsShowView_Impl() const
{
return pImp->m_bIsShowView;
}
@@ -2049,7 +2049,7 @@ void SfxViewShell::JumpToMark( const String& rMark )
//------------------------------------------------------------------------
-SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
+SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( sal_Bool bCreate ) const
{
if ( !pIPClientList && bCreate )
( (SfxViewShell*) this )->pIPClientList = new SfxInPlaceClientList;
@@ -2096,10 +2096,10 @@ void SfxViewShell::RemoveContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTM
void Change( Menu* pMenu, SfxViewShell* pView )
{
SfxDispatcher *pDisp = pView->GetViewFrame()->GetDispatcher();
- USHORT nCount = pMenu->GetItemCount();
- for ( USHORT nPos=0; nPos<nCount; ++nPos )
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos )
{
- USHORT nId = pMenu->GetItemId(nPos);
+ sal_uInt16 nId = pMenu->GetItemId(nPos);
String aCmd = pMenu->GetItemCommand(nId);
PopupMenu* pPopup = pMenu->GetPopupMenu(nId);
if ( pPopup )
@@ -2110,7 +2110,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
{
if ( aCmd.CompareToAscii(".uno:", 5) == 0 )
{
- for (USHORT nIdx=0;;)
+ for (sal_uInt16 nIdx=0;;)
{
SfxShell *pShell=pDisp->GetShell(nIdx++);
if (pShell == NULL)
@@ -2131,10 +2131,10 @@ void Change( Menu* pMenu, SfxViewShell* pView )
}
-BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
+sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
{
rpOut = NULL;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
// create container from menu
// #110897#
@@ -2157,14 +2157,14 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
{
case ui::ContextMenuInterceptorAction_CANCELLED :
// interceptor does not want execution
- return FALSE;
+ return sal_False;
case ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED :
// interceptor wants his modified menu to be executed
- bModified = TRUE;
+ bModified = sal_True;
break;
case ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED :
// interceptor has modified menu, but allows for calling other interceptors
- bModified = TRUE;
+ bModified = sal_True;
continue;
case ui::ContextMenuInterceptorAction_IGNORED :
// interceptor is indifferent
@@ -2191,7 +2191,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
Change( rpOut, this );
}
- return TRUE;
+ return sal_True;
}
void SfxViewShell::TakeOwnerShip_Impl()
@@ -2210,7 +2210,7 @@ void SfxViewShell::TakeFrameOwnerShip_Impl()
void SfxViewShell::CheckOwnerShip_Impl()
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
if (pImp->m_bGotOwnership)
{
uno::Reference < util::XCloseable > xModel(
@@ -2221,7 +2221,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
{
// this call will destroy this object in case of success!
xModel->close( sal_True );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
catch ( util::CloseVetoException& )
{
@@ -2254,16 +2254,16 @@ long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
return 0;
}
-BOOL SfxViewShell::HasKeyListeners_Impl()
+sal_Bool SfxViewShell::HasKeyListeners_Impl()
{
return (pImp->m_pController.is())
- ? pImp->m_pController->HasKeyListeners_Impl() : FALSE;
+ ? pImp->m_pController->HasKeyListeners_Impl() : sal_False;
}
-BOOL SfxViewShell::HasMouseClickListeners_Impl()
+sal_Bool SfxViewShell::HasMouseClickListeners_Impl()
{
return (pImp->m_pController.is())
- ? pImp->m_pController->HasMouseClickListeners_Impl() : FALSE;
+ ? pImp->m_pController->HasMouseClickListeners_Impl() : sal_False;
}
void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
@@ -2272,7 +2272,7 @@ void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequenc
// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
}
-BOOL SfxViewShell::Escape()
+sal_Bool SfxViewShell::Escape()
{
return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
}
@@ -2299,7 +2299,7 @@ uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetC
return xClipboardNotifier;
}
-void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd )
+void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, sal_Bool bAdd )
{
try
{