diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-07-26 09:36:53 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-07-26 09:38:10 +0200 |
commit | 513212eb71ffca09e47025ac82e0203d3df22d4a (patch) | |
tree | 321cd8e99f92416bd74a9d9fb4b42160dfe2e3da /svx | |
parent | 9f8a350c2131f1289f9edb652c8e86e7b806040f (diff) |
fdo#46037: no more comphelper/configurationhelper.hxx in svx
+ sal_Bool -> bool conversion
Change-Id: Id8dc56e61984af599dcd53bb2cc9665db5fa0a1e
Diffstat (limited to 'svx')
-rw-r--r-- | svx/Library_svx.mk | 4 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 45 | ||||
-rw-r--r-- | svx/source/inc/docrecovery.hxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/recoveryui.cxx | 15 |
4 files changed, 28 insertions, 46 deletions
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 2a51f46e43ad..e1e7f455f700 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -29,6 +29,10 @@ $(eval $(call gb_Library_set_include,svx,\ $(eval $(call gb_Library_use_sdk_api,svx)) +$(eval $(call gb_Library_use_custom_headers,svx,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_add_defs,svx,\ -DSVX_DLLIMPLEMENTATION \ -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index dc1e62cb5522..e3c57b41add1 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -25,7 +25,6 @@ #include "docrecovery.hxx" #include "docrecovery.hrc" -#include <comphelper/configurationhelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/string.hxx> @@ -56,6 +55,7 @@ #include <unotools/pathoptions.hxx> #include <unotools/localfilehelper.hxx> #include "svtools/treelistentry.hxx" +#include <officecfg/Office/Recovery.hxx> namespace svx{ namespace DocRecovery{ @@ -959,11 +959,11 @@ RecoveryDialog::RecoveryDialog(Window* pParent, , m_pDefButton ( NULL ) , m_pCore ( pCore ) , m_eRecoveryState (RecoveryDialog::E_RECOVERY_PREPARED) - , m_bWaitForUser (sal_False) - , m_bWaitForCore (sal_False) - , m_bUserDecideNext (sal_False) - , m_bWasRecoveryStarted (sal_False) - , m_bRecoveryOnly (sal_False) + , m_bWaitForUser (false) + , m_bWaitForCore (false) + , m_bUserDecideNext (false) + , m_bWasRecoveryStarted (false) + , m_bRecoveryOnly (false) { static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 }; m_aFileListLB.SetTabs( &nTabs[0] ); @@ -971,18 +971,7 @@ RecoveryDialog::RecoveryDialog(Window* pParent, FreeResource(); - OUString CFG_PACKAGE_RECOVERY( "org.openoffice.Office.Recovery/" ); - OUString CFG_PATH_CRASHREPORTER( "CrashReporter" ); - OUString CFG_ENTRY_ENABLED( "Enabled" ); - - sal_Bool bCrashRepEnabled( sal_False ); - css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( - pCore->getComponentContext(), - CFG_PACKAGE_RECOVERY, - CFG_PATH_CRASHREPORTER, - CFG_ENTRY_ENABLED, - ::comphelper::ConfigurationHelper::E_READONLY); - aVal >>= bCrashRepEnabled; + bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get()); m_bRecoveryOnly = !bCrashRepEnabled; PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() ); @@ -1044,7 +1033,7 @@ short RecoveryDialog::execute() // This decision will be made inside the NextBtn handler. m_aNextBtn.Enable(sal_True); m_aCancelBtn.Enable(sal_True); - m_bWaitForUser = sal_True; + m_bWaitForUser = true; while(m_bWaitForUser) Application::Yield(); if (m_bUserDecideNext) @@ -1057,7 +1046,7 @@ short RecoveryDialog::execute() case RecoveryDialog::E_RECOVERY_IN_PROGRESS : { // user decided to start recovery ... - m_bWasRecoveryStarted = sal_True; + m_bWasRecoveryStarted = true; // do it asynchronous (to allow repaints) // and wait for this asynchronous operation. m_aDescrFT.SetText( m_aTitleRecoveryInProgress ); @@ -1067,7 +1056,7 @@ short RecoveryDialog::execute() m_pCore->setUpdateListener(this); m_pCore->doRecovery(); - m_bWaitForCore = sal_True; + m_bWaitForCore = true; while(m_bWaitForCore) Application::Yield(); @@ -1095,7 +1084,7 @@ short RecoveryDialog::execute() m_aCancelBtn.Enable(sal_True); } - m_bWaitForUser = sal_True; + m_bWaitForUser = true; while(m_bWaitForUser) Application::Yield(); @@ -1233,7 +1222,7 @@ short RecoveryDialog::execute() case RecoveryDialog::E_RECOVERY_HANDLED : { - m_bWaitForUser = sal_True; + m_bWaitForUser = true; while(m_bWaitForUser) Application::Yield(); @@ -1321,14 +1310,14 @@ void RecoveryDialog::end() m_pDefButton->GrabFocus(); m_pDefButton = NULL; } - m_bWaitForCore = sal_False; + m_bWaitForCore = false; } //=============================================== IMPL_LINK_NOARG(RecoveryDialog, NextButtonHdl) { - m_bUserDecideNext = sal_True; - m_bWaitForUser = sal_False; + m_bUserDecideNext = true; + m_bWaitForUser = false; return 0; } @@ -1340,8 +1329,8 @@ IMPL_LINK_NOARG(RecoveryDialog, CancelButtonHdl) if (impl_askUserForWizardCancel(this, RID_SVXQB_EXIT_RECOVERY) == DLG_RET_CANCEL) return 0; } - m_bUserDecideNext = sal_False; - m_bWaitForUser = sal_False; + m_bUserDecideNext = false; + m_bWaitForUser = false; return 0; } diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index 1e3beaaf60e5..370c36fea52a 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -633,11 +633,11 @@ class RecoveryDialog : public IExtendedTabPage E_RECOVERY_HANDLED // the recovery wizard page was shown already ... and will be shown now again ... }; sal_Int32 m_eRecoveryState; - sal_Bool m_bWaitForUser; - sal_Bool m_bWaitForCore; - sal_Bool m_bUserDecideNext; - sal_Bool m_bWasRecoveryStarted; - sal_Bool m_bRecoveryOnly; + bool m_bWaitForUser; + bool m_bWaitForCore; + bool m_bUserDecideNext; + bool m_bWasRecoveryStarted; + bool m_bRecoveryOnly; //------------------------------------------- // member diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 652511b2c113..e6d4c3346ad5 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -26,11 +26,11 @@ #include <osl/file.hxx> #include <rtl/bootstrap.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/configurationhelper.hxx> #include <vcl/svapp.hxx> #include <boost/scoped_ptr.hpp> +#include <officecfg/Office/Recovery.hxx> #define IMPLEMENTATIONNAME_RECOVERYUI OUString("com.sun.star.comp.svx.RecoveryUI") @@ -276,18 +276,7 @@ void RecoveryUI::impl_doRecovery() { bool bRecoveryOnly( false ); - OUString CFG_PACKAGE_RECOVERY( "org.openoffice.Office.Recovery/"); - OUString CFG_PATH_CRASHREPORTER( "CrashReporter" ); - OUString CFG_ENTRY_ENABLED( "Enabled" ); - - sal_Bool bCrashRepEnabled(sal_False); - css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( - m_xContext, - CFG_PACKAGE_RECOVERY, - CFG_PATH_CRASHREPORTER, - CFG_ENTRY_ENABLED, - ::comphelper::ConfigurationHelper::E_READONLY); - aVal >>= bCrashRepEnabled; + bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get()); bRecoveryOnly = !bCrashRepEnabled; // create core service, which implements the real "emergency save" algorithm. |