summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-11 16:03:57 +0200
committerNoel Grandin <noel@peralex.com>2014-03-14 07:50:32 +0200
commit4bdf7bf87cd2a48b0b8a77d6cbb6f77bdfc5a8a9 (patch)
tree90172c40fb51686a95b3cf02363bc93f1b7ca398
parent13bc4094dadb6accfbe00ba93dee178c22922c56 (diff)
sfx2: sal_Bool->bool
Change-Id: I3a266e0c0de413fd0e160dc089f494393cf5e438
-rw-r--r--include/sfx2/app.hxx14
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/dlg/dlgass.cxx4
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerProviders.cxx2
-rw-r--r--sfx2/source/appl/app.cxx6
-rw-r--r--sfx2/source/appl/appcfg.cxx90
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appmisc.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appquit.cxx8
-rw-r--r--sfx2/source/doc/new.cxx2
11 files changed, 67 insertions, 67 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 95e987b92271..122cb0da4dc1 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -152,7 +152,7 @@ public:
#if defined( WNT )
long DdeExecute( const OUString& rCmd );
#endif
- sal_Bool InitializeDde();
+ bool InitializeDde();
const DdeService* GetDdeService() const;
DdeService* GetDdeService();
#if defined( WNT )
@@ -164,7 +164,7 @@ public:
/**
* @param pArgs Takes ownership
*/
- sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, sal_Bool bCopy=sal_True, SfxItemSet* pArgs = 0 );
+ sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = 0 );
SfxTemplateDialog* GetTemplateDialog();
Window* GetTopWindow() const;
@@ -179,8 +179,8 @@ public:
void ReleaseIndex(sal_uInt16 i);
// Basic/Scripting
- static sal_Bool IsXScriptURL( const OUString& rScriptURL );
- static OUString ChooseScript();
+ static bool IsXScriptURL( const OUString& rScriptURL );
+ static OUString ChooseScript();
static void MacroOrganizer( sal_Int16 nTabId );
static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet );
static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = NULL, SbxValue* i_ret = NULL )
@@ -192,18 +192,18 @@ public:
sal_uInt16 SaveBasicAndDialogContainer() const;
// misc.
- sal_Bool GetOptions(SfxItemSet &);
+ bool GetOptions(SfxItemSet &);
void SetOptions(const SfxItemSet &);
virtual void Invalidate(sal_uInt16 nId = 0);
void NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
- sal_Bool IsDowning() const;
+ bool IsDowning() const;
void ResetLastDir();
SAL_DLLPRIVATE static SfxApplication* Get() { return pApp;}
SAL_DLLPRIVATE SfxDispatcher* GetAppDispatcher_Impl();
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
- SAL_DLLPRIVATE sal_Bool QueryExit_Impl();
+ SAL_DLLPRIVATE bool QueryExit_Impl();
SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
SAL_DLLPRIVATE bool Initialize_Impl();
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 584b5df403c0..d4cd23b18792 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -508,7 +508,7 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) );
- sal_uLong lErr = SFX_APP()->LoadTemplate( xDocShell, rTemplatePath, sal_True, pSet );
+ sal_uLong lErr = SFX_APP()->LoadTemplate( xDocShell, rTemplatePath, true, pSet );
SfxObjectShell* pDocShell = xDocShell;
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 8bed87aaf502..79d4879654b6 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1550,7 +1550,7 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
if(bDocPreview)
pSet->Put( SfxBoolItem( SID_PREVIEW, true ) );
RestorePassword( pSet, aDocFile );
- if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, sal_True, pSet )) != 0 )
+ if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, true, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
else
SavePassword( xDocShell, aDocFile );
@@ -1595,7 +1595,7 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
pSet->Put( SfxBoolItem( SID_PREVIEW, true ) );
RestorePassword( pSet, aLayoutFile );
- if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, sal_True, pSet )) != 0 )
+ if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, true, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
SavePassword( xLayoutDocShell, aLayoutFile );
}
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 54f9aff5037d..a4abeaeca3b4 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -186,7 +186,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
SfxItemSet* pSet = new SfxAllItemSet (pSfxApp->GetPool());
pSet->Put (SfxBoolItem (SID_TEMPLATE, true));
pSet->Put (SfxBoolItem (SID_PREVIEW, true));
- if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, sal_True, pSet))
+ if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, true, pSet))
{
mxDocumentShell = NULL;
}
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 85560fc5d602..92d1c7c7ed64 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -522,9 +522,9 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
#endif
}
-sal_Bool SfxApplication::IsXScriptURL( const OUString& rScriptURL )
+bool SfxApplication::IsXScriptURL( const OUString& rScriptURL )
{
- sal_Bool result = sal_False;
+ bool result = false;
#ifdef DISABLE_SCRIPTING
(void) rScriptURL;
@@ -546,7 +546,7 @@ sal_Bool SfxApplication::IsXScriptURL( const OUString& rScriptURL )
if ( xUrl.is() )
{
- result = sal_True;
+ result = true;
}
}
catch (const ::com::sun::star::uno::RuntimeException&)
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index c7bdf9703ff5..821f91c1f0ae 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -150,9 +150,9 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
-sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
+bool SfxApplication::GetOptions( SfxItemSet& rSet )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
SfxItemPool &rPool = GetPool();
const sal_uInt16 *pRanges = rSet.GetRanges();
@@ -170,92 +170,92 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_ATTR_BUTTON_OUTSTYLE3D :
if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_OUTSTYLE3D ),
aMiscOptions.GetToolboxStyle() != TOOLBOX_STYLE_FLAT)))
- bRet = sal_True;
+ bRet = true;
break;
case SID_ATTR_BUTTON_BIGSIZE :
{
if( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_BIGSIZE ), aMiscOptions.AreCurrentSymbolsLarge() ) ) )
- bRet = sal_True;
+ bRet = true;
break;
}
case SID_ATTR_BACKUP :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_BACKUP))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BACKUP ),aSaveOptions.IsBackup())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_PRETTYPRINTING:
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), aSaveOptions.IsPrettyPrinting())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_WARNALIENFORMAT:
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WARNALIENFORMAT ), aSaveOptions.IsWarnAlienFormat())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_AUTOSAVE :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ), aSaveOptions.IsAutoSave())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_AUTOSAVEPROMPT :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVEPROMPT))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVEPROMPT ), aSaveOptions.IsAutoSavePrompt())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_AUTOSAVEMINUTE :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_AUTOSAVETIME))
if (!rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ), (sal_uInt16)aSaveOptions.GetAutoSaveTime())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_USERAUTOSAVE :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_USERAUTOSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_USERAUTOSAVE ), aSaveOptions.IsUserAutoSave())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_DOCINFO :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_DOCINFO ), aSaveOptions.IsDocInfoSave())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_WORKINGSET :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEWORKINGSET))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WORKINGSET ), aSaveOptions.IsSaveWorkingSet())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_SAVEDOCVIEW :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVEDOCVIEW))
if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCVIEW ), aSaveOptions.IsSaveDocView())))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_ATTR_METRIC :
@@ -263,22 +263,22 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_HELPBALLOONS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPBALLOONS ),
aHelpOptions.IsExtendedHelp() ) ) )
- bRet = sal_True;
+ bRet = true;
break;
case SID_HELPTIPS :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPTIPS ),
aHelpOptions.IsHelpTips() ) ) )
- bRet = sal_True;
+ bRet = true;
break;
case SID_ATTR_WELCOMESCREEN :
if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_WELCOMESCREEN ),
aHelpOptions.IsWelcomeScreen() ) ) )
- bRet = sal_True;
+ bRet = true;
break;
case SID_HELP_STYLESHEET :
if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_HELP_STYLESHEET ),
aHelpOptions.GetHelpStyleSheet() ) ) )
- bRet = sal_True;
+ bRet = true;
break;
case SID_ATTR_UNDO_COUNT :
if (rSet.Put(
@@ -295,74 +295,74 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
{
if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ),
ShutdownIcon::GetAutostart() ) ) )
- bRet = sal_True;
+ bRet = true;
}
else
{
rSet.DisableItem( rPool.GetWhich( SID_ATTR_QUICKLAUNCHER ) );
- bRet = sal_True;
+ bRet = true;
}
break;
}
case SID_SAVEREL_INET :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELINET))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_INET ), aSaveOptions.IsSaveRelINet() )))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_SAVEREL_FSYS :
{
- bRet = sal_True;
+ bRet = true;
if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_SAVERELFSYS))
if (!rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_FSYS ), aSaveOptions.IsSaveRelFSys() )))
- bRet = sal_False;
+ bRet = false;
}
break;
case SID_BASIC_ENABLED :
{
- bRet = sal_True;
+ bRet = true;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_BASICMODE))
{
if ( !rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ), sal::static_int_cast< sal_uInt16 >(aSecurityOptions.GetBasicMode()))))
- bRet = sal_False;
+ bRet = false;
}
}
break;
case SID_INET_EXE_PLUGIN :
{
- bRet = sal_True;
+ bRet = true;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_EXECUTEPLUGINS))
{
if ( !rSet.Put( SfxBoolItem( SID_INET_EXE_PLUGIN, aSecurityOptions.IsExecutePlugins() ) ) )
- bRet = sal_False;
+ bRet = false;
}
}
break;
case SID_MACRO_WARNING :
{
- bRet = sal_True;
+ bRet = true;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_WARNING))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_WARNING, aSecurityOptions.IsWarningEnabled() ) ) )
- bRet = sal_False;
+ bRet = false;
}
}
break;
case SID_MACRO_CONFIRMATION :
{
- bRet = sal_True;
+ bRet = true;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_CONFIRMATION))
{
if ( !rSet.Put( SfxBoolItem( SID_MACRO_CONFIRMATION, aSecurityOptions.IsConfirmationEnabled() ) ) )
- bRet = sal_False;
+ bRet = false;
}
}
break;
case SID_SECURE_URL :
{
- bRet = sal_True;
+ bRet = true;
if (!aSecurityOptions.IsReadOnly(SvtSecurityOptions::E_SECUREURLS))
{
::com::sun::star::uno::Sequence< OUString > seqURLs = aSecurityOptions.GetSecureURLs();
@@ -372,7 +372,7 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
aList.push_back(seqURLs[nURL]);
if( !rSet.Put( SfxStringListItem( rPool.GetWhich(SID_SECURE_URL), &aList ) ) )
- bRet = sal_False;
+ bRet = false;
}
}
break;
@@ -476,7 +476,7 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
}
if ( rSet.Put(aNames) || rSet.Put(aValues) )
- bRet = sal_True;
+ bRet = true;
}
break;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index b4b949fd9618..6bcc99fa6edb 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -482,7 +482,7 @@ bool SfxViewFrame::DdeSetData( const OUString&, // the Item to
return 0;
}
-sal_Bool SfxApplication::InitializeDde()
+bool SfxApplication::InitializeDde()
{
int nError = 0;
#if defined( WNT )
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 50215417c39c..d1c64c1f01d4 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -152,7 +152,7 @@ ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBind
return 0;
}
-sal_Bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; }
+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; }
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 33f0aec31456..80cf5a892bdf 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -315,7 +315,7 @@ sal_uInt32 CheckPasswd_Impl
-sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, sal_Bool bCopy, SfxItemSet* pSet )
+sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, bool bCopy, SfxItemSet* pSet )
{
const SfxFilter* pFilter = NULL;
SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ) );
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 6f586f1c70f4..ca7a1bab371f 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -57,9 +57,9 @@
using ::basic::BasicManagerRepository;
-sal_Bool SfxApplication::QueryExit_Impl()
+bool SfxApplication::QueryExit_Impl()
{
- sal_Bool bQuit = sal_True;
+ bool bQuit = true;
// Does some instance, that can not be shut down, still require the app?
if ( !bQuit )
@@ -68,10 +68,10 @@ sal_Bool SfxApplication::QueryExit_Impl()
InfoBox aInfoBox( NULL, SfxResId(MSG_CANT_QUIT) );
aInfoBox.Execute();
OSL_TRACE( "QueryExit => sal_False (in use)" );
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index f5e570c681c5..ae62b8f82d75 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -225,7 +225,7 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update)
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) );
pSet->Put( SfxBoolItem( SID_PREVIEW, true ) );
- lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, sal_True, pSet );
+ lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, true, pSet );
if( lErr )
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent( pParent );