Kaydet (Commit) 513212eb authored tarafından Julien Nabet's avatar Julien Nabet

fdo#46037: no more comphelper/configurationhelper.hxx in svx

+ sal_Bool -> bool conversion

Change-Id: Id8dc56e61984af599dcd53bb2cc9665db5fa0a1e
üst 9f8a350c
...@@ -29,6 +29,10 @@ $(eval $(call gb_Library_set_include,svx,\ ...@@ -29,6 +29,10 @@ $(eval $(call gb_Library_set_include,svx,\
$(eval $(call gb_Library_use_sdk_api,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,\ $(eval $(call gb_Library_add_defs,svx,\
-DSVX_DLLIMPLEMENTATION \ -DSVX_DLLIMPLEMENTATION \
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \ -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "docrecovery.hxx" #include "docrecovery.hxx"
#include "docrecovery.hrc" #include "docrecovery.hrc"
#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx> #include <comphelper/sequenceashashmap.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
...@@ -56,6 +55,7 @@ ...@@ -56,6 +55,7 @@
#include <unotools/pathoptions.hxx> #include <unotools/pathoptions.hxx>
#include <unotools/localfilehelper.hxx> #include <unotools/localfilehelper.hxx>
#include "svtools/treelistentry.hxx" #include "svtools/treelistentry.hxx"
#include <officecfg/Office/Recovery.hxx>
namespace svx{ namespace svx{
namespace DocRecovery{ namespace DocRecovery{
...@@ -959,11 +959,11 @@ RecoveryDialog::RecoveryDialog(Window* pParent, ...@@ -959,11 +959,11 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
, m_pDefButton ( NULL ) , m_pDefButton ( NULL )
, m_pCore ( pCore ) , m_pCore ( pCore )
, m_eRecoveryState (RecoveryDialog::E_RECOVERY_PREPARED) , m_eRecoveryState (RecoveryDialog::E_RECOVERY_PREPARED)
, m_bWaitForUser (sal_False) , m_bWaitForUser (false)
, m_bWaitForCore (sal_False) , m_bWaitForCore (false)
, m_bUserDecideNext (sal_False) , m_bUserDecideNext (false)
, m_bWasRecoveryStarted (sal_False) , m_bWasRecoveryStarted (false)
, m_bRecoveryOnly (sal_False) , m_bRecoveryOnly (false)
{ {
static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 }; static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 };
m_aFileListLB.SetTabs( &nTabs[0] ); m_aFileListLB.SetTabs( &nTabs[0] );
...@@ -971,18 +971,7 @@ RecoveryDialog::RecoveryDialog(Window* pParent, ...@@ -971,18 +971,7 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
FreeResource(); FreeResource();
OUString CFG_PACKAGE_RECOVERY( "org.openoffice.Office.Recovery/" ); bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get());
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;
m_bRecoveryOnly = !bCrashRepEnabled; m_bRecoveryOnly = !bCrashRepEnabled;
PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() ); PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() );
...@@ -1044,7 +1033,7 @@ short RecoveryDialog::execute() ...@@ -1044,7 +1033,7 @@ short RecoveryDialog::execute()
// This decision will be made inside the NextBtn handler. // This decision will be made inside the NextBtn handler.
m_aNextBtn.Enable(sal_True); m_aNextBtn.Enable(sal_True);
m_aCancelBtn.Enable(sal_True); m_aCancelBtn.Enable(sal_True);
m_bWaitForUser = sal_True; m_bWaitForUser = true;
while(m_bWaitForUser) while(m_bWaitForUser)
Application::Yield(); Application::Yield();
if (m_bUserDecideNext) if (m_bUserDecideNext)
...@@ -1057,7 +1046,7 @@ short RecoveryDialog::execute() ...@@ -1057,7 +1046,7 @@ short RecoveryDialog::execute()
case RecoveryDialog::E_RECOVERY_IN_PROGRESS : case RecoveryDialog::E_RECOVERY_IN_PROGRESS :
{ {
// user decided to start recovery ... // user decided to start recovery ...
m_bWasRecoveryStarted = sal_True; m_bWasRecoveryStarted = true;
// do it asynchronous (to allow repaints) // do it asynchronous (to allow repaints)
// and wait for this asynchronous operation. // and wait for this asynchronous operation.
m_aDescrFT.SetText( m_aTitleRecoveryInProgress ); m_aDescrFT.SetText( m_aTitleRecoveryInProgress );
...@@ -1067,7 +1056,7 @@ short RecoveryDialog::execute() ...@@ -1067,7 +1056,7 @@ short RecoveryDialog::execute()
m_pCore->setUpdateListener(this); m_pCore->setUpdateListener(this);
m_pCore->doRecovery(); m_pCore->doRecovery();
m_bWaitForCore = sal_True; m_bWaitForCore = true;
while(m_bWaitForCore) while(m_bWaitForCore)
Application::Yield(); Application::Yield();
...@@ -1095,7 +1084,7 @@ short RecoveryDialog::execute() ...@@ -1095,7 +1084,7 @@ short RecoveryDialog::execute()
m_aCancelBtn.Enable(sal_True); m_aCancelBtn.Enable(sal_True);
} }
m_bWaitForUser = sal_True; m_bWaitForUser = true;
while(m_bWaitForUser) while(m_bWaitForUser)
Application::Yield(); Application::Yield();
...@@ -1233,7 +1222,7 @@ short RecoveryDialog::execute() ...@@ -1233,7 +1222,7 @@ short RecoveryDialog::execute()
case RecoveryDialog::E_RECOVERY_HANDLED : case RecoveryDialog::E_RECOVERY_HANDLED :
{ {
m_bWaitForUser = sal_True; m_bWaitForUser = true;
while(m_bWaitForUser) while(m_bWaitForUser)
Application::Yield(); Application::Yield();
...@@ -1321,14 +1310,14 @@ void RecoveryDialog::end() ...@@ -1321,14 +1310,14 @@ void RecoveryDialog::end()
m_pDefButton->GrabFocus(); m_pDefButton->GrabFocus();
m_pDefButton = NULL; m_pDefButton = NULL;
} }
m_bWaitForCore = sal_False; m_bWaitForCore = false;
} }
//=============================================== //===============================================
IMPL_LINK_NOARG(RecoveryDialog, NextButtonHdl) IMPL_LINK_NOARG(RecoveryDialog, NextButtonHdl)
{ {
m_bUserDecideNext = sal_True; m_bUserDecideNext = true;
m_bWaitForUser = sal_False; m_bWaitForUser = false;
return 0; return 0;
} }
...@@ -1340,8 +1329,8 @@ IMPL_LINK_NOARG(RecoveryDialog, CancelButtonHdl) ...@@ -1340,8 +1329,8 @@ IMPL_LINK_NOARG(RecoveryDialog, CancelButtonHdl)
if (impl_askUserForWizardCancel(this, RID_SVXQB_EXIT_RECOVERY) == DLG_RET_CANCEL) if (impl_askUserForWizardCancel(this, RID_SVXQB_EXIT_RECOVERY) == DLG_RET_CANCEL)
return 0; return 0;
} }
m_bUserDecideNext = sal_False; m_bUserDecideNext = false;
m_bWaitForUser = sal_False; m_bWaitForUser = false;
return 0; return 0;
} }
......
...@@ -633,11 +633,11 @@ class RecoveryDialog : public IExtendedTabPage ...@@ -633,11 +633,11 @@ class RecoveryDialog : public IExtendedTabPage
E_RECOVERY_HANDLED // the recovery wizard page was shown already ... and will be shown now again ... E_RECOVERY_HANDLED // the recovery wizard page was shown already ... and will be shown now again ...
}; };
sal_Int32 m_eRecoveryState; sal_Int32 m_eRecoveryState;
sal_Bool m_bWaitForUser; bool m_bWaitForUser;
sal_Bool m_bWaitForCore; bool m_bWaitForCore;
sal_Bool m_bUserDecideNext; bool m_bUserDecideNext;
sal_Bool m_bWasRecoveryStarted; bool m_bWasRecoveryStarted;
sal_Bool m_bRecoveryOnly; bool m_bRecoveryOnly;
//------------------------------------------- //-------------------------------------------
// member // member
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
#include <osl/file.hxx> #include <osl/file.hxx>
#include <rtl/bootstrap.hxx> #include <rtl/bootstrap.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <officecfg/Office/Recovery.hxx>
#define IMPLEMENTATIONNAME_RECOVERYUI OUString("com.sun.star.comp.svx.RecoveryUI") #define IMPLEMENTATIONNAME_RECOVERYUI OUString("com.sun.star.comp.svx.RecoveryUI")
...@@ -276,18 +276,7 @@ void RecoveryUI::impl_doRecovery() ...@@ -276,18 +276,7 @@ void RecoveryUI::impl_doRecovery()
{ {
bool bRecoveryOnly( false ); bool bRecoveryOnly( false );
OUString CFG_PACKAGE_RECOVERY( "org.openoffice.Office.Recovery/"); bool bCrashRepEnabled(officecfg::Office::Recovery::CrashReporter::Enabled::get());
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;
bRecoveryOnly = !bCrashRepEnabled; bRecoveryOnly = !bCrashRepEnabled;
// create core service, which implements the real "emergency save" algorithm. // create core service, which implements the real "emergency save" algorithm.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment