[Libreoffice-commits] .: Branch 'feature/calc-key-binding-compat' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Oct 13 13:17:23 PDT 2010
sc/source/core/tool/docoptio.cxx | 12 +--------
sc/source/ui/app/scmod.cxx | 48 ---------------------------------------
sc/source/ui/docshell/docsh.cxx | 44 -----------------------------------
3 files changed, 2 insertions(+), 102 deletions(-)
New commits:
commit bc6e1f649f9e86daaaba8c22155de6cb7c342c76
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Oct 13 16:17:04 2010 -0400
Cleaned up my debug statements.
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index ecc2669..cee1d7c 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -546,13 +546,8 @@ ScDocCfg::ScDocCfg() :
{
case SCCOMPATOPT_KEY_BINDING:
{
- fprintf(stdout, "ScDocCfg::ScDocCfg: SCCOMPATOPT_KEY_BINDING\n");
- nIntVal = 0;
- if (pValues[nProp] >>= nIntVal)
- fprintf(stdout, "ScDocCfg::ScDocCfg: key binding = %ld\n", nIntVal);
- else
- fprintf(stdout, "ScDocCfg::ScDocCfg: key binding failed to load\n");
-
+ nIntVal = 0; // 0 = 'Default'
+ pValues[nProp] >>= nIntVal;
SetKeyBindingType(static_cast<ScOptionsUtil::KeyBindingType>(nIntVal));
}
break;
@@ -695,10 +690,7 @@ IMPL_LINK( ScDocCfg, CompatCommitHdl, void *, EMPTYARG )
switch(nProp)
{
case SCCOMPATOPT_KEY_BINDING:
- {
- fprintf(stdout, "IMPL_LINK: pushing key binding type (%d)\n", GetKeyBindingType());
pValues[nProp] <<= static_cast<sal_Int32>(GetKeyBindingType());
- }
break;
}
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 0af48a4..e1734be 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -118,49 +118,6 @@
#define SC_IDLE_STEP 75
#define SC_IDLE_COUNT 50
-
-#include <stdio.h>
-#include <string>
-#include <sys/time.h>
-
-namespace {
-
-class StackPrinter
-{
-public:
- explicit StackPrinter(const char* msg) :
- msMsg(msg)
- {
- fprintf(stdout, "%s: --begin\n", msMsg.c_str());
- mfStartTime = getTime();
- }
-
- ~StackPrinter()
- {
- double fEndTime = getTime();
- fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
- }
-
- void printTime(int line) const
- {
- double fEndTime = getTime();
- fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
- }
-
-private:
- double getTime() const
- {
- timeval tv;
- gettimeofday(&tv, NULL);
- return tv.tv_sec + tv.tv_usec / 1000000.0;
- }
-
- ::std::string msMsg;
- double mfStartTime;
-};
-
-}
-
static USHORT nIdleCount = 0;
//------------------------------------------------------------------
@@ -1064,7 +1021,6 @@ USHORT ScModule::GetOptDigitLanguage()
void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
- StackPrinter __stack_printer__("ScModule::ModifyOptions");
USHORT nOldSpellLang, nOldCjkLang, nOldCtlLang;
BOOL bOldAutoSpell;
GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell );
@@ -1198,12 +1154,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
ScOptionsUtil::KeyBindingType eKeyOld = rOldOpt.GetKeyBindingType();
ScOptionsUtil::KeyBindingType eKeyNew = rNewOpt.GetKeyBindingType();
- fprintf(stdout, "ScModule::ModifyOptions: key (old: %d new: %d)\n", eKeyOld, eKeyNew);
if (eKeyOld != eKeyNew)
- {
- fprintf(stdout, "ScModule::ModifyOptions: key binding base changed. Reset the key bindings.\n");
pDocSh->ResetKeyBindings(eKeyNew);
- }
bRepaint = ( bRepaint || ( rOldOpt != rNewOpt ) );
bCalcAll = bRepaint &&
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 7a2a0d2..9a43e32 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -150,49 +150,6 @@ using ::rtl::OUStringBuffer;
using ::boost::shared_ptr;
using ::std::vector;
-
-#include <stdio.h>
-#include <string>
-#include <sys/time.h>
-
-namespace {
-
-class StackPrinter
-{
-public:
- explicit StackPrinter(const char* msg) :
- msMsg(msg)
- {
- fprintf(stdout, "%s: --begin\n", msMsg.c_str());
- mfStartTime = getTime();
- }
-
- ~StackPrinter()
- {
- double fEndTime = getTime();
- fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
- }
-
- void printTime(int line) const
- {
- double fEndTime = getTime();
- fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
- }
-
-private:
- double getTime() const
- {
- timeval tv;
- gettimeofday(&tv, NULL);
- return tv.tv_sec + tv.tv_usec / 1000000.0;
- }
-
- ::std::string msMsg;
- double mfStartTime;
-};
-
-}
-
// STATIC DATA -----------------------------------------------------------
// Stream-Namen im Storage
@@ -2870,7 +2827,6 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
{
using namespace ::com::sun::star::ui;
- StackPrinter __stack_printer__("ScDocShell::ResetKeyBindings");
Reference<XMultiServiceFactory> xServiceManager = ::comphelper::getProcessServiceFactory();
if (!xServiceManager.is())
return;
More information about the Libreoffice-commits
mailing list