summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-10-29 10:37:16 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-11-07 10:45:11 +0100
commitd4653a95896698f7dbaaeae253c5c06d78a4fe32 (patch)
treea0e3d407b276fd9163987b83fcb0e8a8ce50fc90 /svtools
parent70dff8d4bb97a5b9b59f91f3cc168be84b473873 (diff)
Remove these useless static bool variables.
Change-Id: I7a8ad7814231f129d5d1146ceb36eb2c22b2aff1
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx46
1 files changed, 14 insertions, 32 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index cdc7d7f453a3..7c1dc2f4b9ab 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -443,43 +443,25 @@ void GraphicObject::SetSwapStreamHdl()
}
}
-#define SWAPGRAPHIC_TIMEOUT 5000
-
// #i122985# it is not correct to set the swap-timeout to a hard-coded 5000ms
// as it was before. Added code and experimented what to do as a good
// compromise, see description.
static sal_uInt32 GetCacheTimeInMs()
{
- static bool bSetAtAll(true);
-
- if (bSetAtAll)
- {
- static bool bSetToPreferenceTime(true);
-
- if (bSetToPreferenceTime)
- {
- const sal_uInt32 nSeconds =
- officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get(
- comphelper::getProcessComponentContext());
-
-
- // The default is 10 minutes. The minimum is one minute, thus 60
- // seconds. When the minimum should match to the former hard-coded
- // 5 seconds, we have a divisor of 12 to use. For the default of 10
- // minutes this would mean 50 seconds. Compared to before this is
- // ten times more (would allow better navigation by switching
- // through pages) and is controllable by the user by setting the
- // tools/options/memory/Remove_from_memory_after setting. Seems to
- // be a good compromise to me.
- return nSeconds * 1000 / 12;
- }
- else
- {
- return SWAPGRAPHIC_TIMEOUT;
- }
- }
-
- return 0;
+ const sal_uInt32 nSeconds =
+ officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get(
+ comphelper::getProcessComponentContext());
+
+
+ // The default is 10 minutes. The minimum is one minute, thus 60
+ // seconds. When the minimum should match to the former hard-coded
+ // 5 seconds, we have a divisor of 12 to use. For the default of 10
+ // minutes this would mean 50 seconds. Compared to before this is
+ // ten times more (would allow better navigation by switching
+ // through pages) and is controllable by the user by setting the
+ // tools/options/memory/Remove_from_memory_after setting. Seems to
+ // be a good compromise to me.
+ return nSeconds * 1000 / 12;
}
void GraphicObject::SetSwapStreamHdl(const Link& rHdl)