include/svx/svdetc.hxx       |   10 +++++-----
 svx/source/svdraw/svdetc.cxx |   30 +++++++++++++++---------------
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 63ac5cadc8e594a7c440b410d747dfb37791c34a
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue May 27 08:17:41 2025 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue May 27 10:38:04 2025 +0200

    svx: prefix members of OLEObjCache
    
    See tdf#94879 for motivation.
    
    Change-Id: Ifdf360fed1567065ed5efe819aa2aa890f90f179
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185876
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index d7b3d6295ea8..dd01624cc9db 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -151,8 +151,8 @@ class OLEObjCache
 {
     std::vector<SdrOle2Obj*> maObjs;
 
-    size_t         nSize;
-    std::unique_ptr<AutoTimer>  pTimer;
+    size_t         mnSize;
+    std::unique_ptr<AutoTimer>  mpTimer;
 
     static bool UnloadObj(SdrOle2Obj& rObj);
     DECL_LINK( UnloadCheckHdl, Timer*, void );
@@ -175,14 +175,14 @@ class SVXCORE_DLLPUBLIC SdrGlobalData
     SvtSysLocale  maSysLocale;     // follows always locale settings
 public:
     std::vector<Link<SdrObjCreatorParams, rtl::Reference<SdrObject>>>
-                        aUserMakeObjHdl;
-    OLEObjCache         aOLEObjCache;
+                        maUserMakeObjHdl;
+    OLEObjCache         maOLEObjCache;
 
     SAL_DLLPRIVATE SdrGlobalData();
 
     const SvtSysLocale& GetSysLocale() { return maSysLocale;  } // follows 
always locale settings
     const LocaleDataWrapper& GetLocaleData();    // follows always SysLocale
-    OLEObjCache&        GetOLEObjCache() { return aOLEObjCache; }
+    OLEObjCache&        GetOLEObjCache() { return maOLEObjCache; }
 };
 
 SVXCORE_DLLPUBLIC SdrGlobalData & GetSdrGlobalData();
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 29f369cbff44..5d3788789136 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -92,34 +92,34 @@ OLEObjCache::OLEObjCache()
 // This limit is only useful on 32-bit windows, where we can run out of 
virtual memory (see tdf#95579)
 // For everything else, we are better off keeping it in main memory rather 
than using our hacky page-out thing
 #if defined _WIN32 && !defined _WIN64
-        nSize = 
officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
+        mnSize = 
officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
 #else
-        nSize = SAL_MAX_INT32; // effectively disable the page-out mechanism
+        mnSize = SAL_MAX_INT32; // effectively disable the page-out mechanism
 #endif
     }
     else
-        nSize = 100;
-    pTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );
-    pTimer->SetInvokeHandler( LINK(this, OLEObjCache, UnloadCheckHdl) );
-    pTimer->SetTimeout(20000);
-    pTimer->SetStatic();
+        mnSize = 100;
+    mpTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );
+    mpTimer->SetInvokeHandler( LINK(this, OLEObjCache, UnloadCheckHdl) );
+    mpTimer->SetTimeout(20000);
+    mpTimer->SetStatic();
 }
 
 OLEObjCache::~OLEObjCache()
 {
-    pTimer->Stop();
+    mpTimer->Stop();
 }
 
 IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void)
 {
-    if (nSize >= maObjs.size())
+    if (mnSize >= maObjs.size())
         return;
 
     // more objects than configured cache size try to remove objects
     // of course not the freshly inserted one at nIndex=0
     size_t nCount2 = maObjs.size();
     size_t nIndex = nCount2-1;
-    while( nIndex && nCount2 > nSize )
+    while( nIndex && nCount2 > mnSize )
     {
         SdrOle2Obj* pUnloadObj = maObjs[nIndex--];
         if (!pUnloadObj)
@@ -188,10 +188,10 @@ void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
 
     // if a new object was inserted, recalculate the cache
     if (!bFound)
-        pTimer->Invoke();
+        mpTimer->Invoke();
 
-    if (!bFound || !pTimer->IsActive())
-        pTimer->Start();
+    if (!bFound || !mpTimer->IsActive())
+        mpTimer->Start();
 }
 
 void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
@@ -200,7 +200,7 @@ void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
     if (it != maObjs.end())
         maObjs.erase(it);
     if (maObjs.empty())
-        pTimer->Stop();
+        mpTimer->Stop();
 }
 
 size_t OLEObjCache::size() const
@@ -364,7 +364,7 @@ std::unique_ptr<SdrOutliner> SdrMakeOutliner(OutlinerMode 
nOutlinerMode, SdrMode
 std::vector<Link<SdrObjCreatorParams, rtl::Reference<SdrObject>>>& 
ImpGetUserMakeObjHdl()
 {
     SdrGlobalData& rGlobalData=GetSdrGlobalData();
-    return rGlobalData.aUserMakeObjHdl;
+    return rGlobalData.maUserMakeObjHdl;
 }
 
 bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* 
pbOnlyEE)

Reply via email to