[Libreoffice-commits] core.git: cui/source cui/uiconfig

Zolnai Tamás tamas.zolnai at collabora.com
Tue Dec 2 17:15:07 PST 2014


 cui/source/options/optmemory.cxx |    2 ++
 cui/uiconfig/ui/optmemorypage.ui |    8 --------
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit f20043a0805c3a75eb4024ed59f45291aea93ac0
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Wed Dec 3 02:14:26 2014 +0100

    Add a limit for graphic cache based on used integer type to avoid overflow
    
    Change-Id: Ibdf2cbf3c50f6732301d894d91a1b8ea58e4e5d6

diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 34f0975..2faa4ea 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -57,6 +57,7 @@
 #include <cuires.hrc>
 #include "helpid.hrc"
 #include <dialmgr.hxx>
+#include <limits>
 
 #include <config_vclplug.h>
 
@@ -115,6 +116,7 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe
 {
     get(m_pUndoEdit, "undo");
     get(m_pNfGraphicCache, "graphiccache");
+    m_pNfGraphicCache->SetMax(std::numeric_limits< long >::max() >> 20);
     get(m_pNfGraphicObjectCache, "objectcache");
     get(m_pTfGraphicObjectTime,"objecttime");
     get(m_pNfOLECache, "olecache");
diff --git a/cui/uiconfig/ui/optmemorypage.ui b/cui/uiconfig/ui/optmemorypage.ui
index d17f5ea..b32f461 100644
--- a/cui/uiconfig/ui/optmemorypage.ui
+++ b/cui/uiconfig/ui/optmemorypage.ui
@@ -23,13 +23,6 @@
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
-  <object class="GtkAdjustment" id="adjustment4">
-    <property name="lower">1</property>
-    <property name="upper">4096</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
   <object class="GtkBox" id="OptMemoryPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -189,7 +182,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="invisible_char">•</property>
-                    <property name="adjustment">adjustment4</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>


More information about the Libreoffice-commits mailing list