[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 08:05:13 PDT 2012
sc/source/filter/inc/lotattr.hxx | 7 +++++--
sc/source/filter/lotus/lotattr.cxx | 12 +++++++++---
sc/source/filter/lotus/lotimpop.cxx | 2 +-
3 files changed, 15 insertions(+), 6 deletions(-)
New commits:
commit 57ce0e13e9228868854749867109c9dbd5b60121
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun Sep 9 17:20:27 2012 +0200
don't use unitialized global variable, fdo#53713
Change-Id: I9e5150fb4c5681abe9c786f4c2d80f5a10e8a66b
(cherry picked from commit 2ac26e6b5248f2f3fde8dc4341b01ef15b6c3a29)
Signed-off-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 8a861b99ee0b53d03b6f93a3bd6d256a27172ace)
diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx
index e3acb2c..844da07 100644
--- a/sc/source/filter/inc/lotattr.hxx
+++ b/sc/source/filter/inc/lotattr.hxx
@@ -42,6 +42,7 @@ class ScPatternAttr;
class SvxColorItem;
class Color;
class LotAttrTable;
+class LOTUS_ROOT;
namespace editeng { class SvxBorderLine; }
@@ -68,7 +69,7 @@ class LotAttrCache
{
public:
- LotAttrCache ();
+ LotAttrCache(LOTUS_ROOT* pLotRoot);
~LotAttrCache();
@@ -112,13 +113,14 @@ private:
SvxColorItem* pWhite;
Color* pColTab;
boost::ptr_vector<ENTRY> aEntries;
+
+ LOTUS_ROOT* mpLotusRoot;
};
class LotAttrCol
{
public:
-
void SetAttr (const SCROW nRow, const ScPatternAttr&);
void Apply (const SCCOL nCol, const SCTAB nTab );
@@ -138,6 +140,7 @@ private:
class LotAttrTable
{
public:
+ LotAttrTable(LOTUS_ROOT* pLotRoot);
void SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3& );
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index a74d093..b88dab6 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -54,9 +54,10 @@ LotAttrCache::ENTRY::~ENTRY ()
delete pPattAttr;
}
-LotAttrCache::LotAttrCache ()
+LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot):
+ mpLotusRoot(pLotRoot)
{
- pDocPool = pLotusRoot->pDoc->GetPool();
+ pDocPool = mpLotusRoot->pDoc->GetPool();
pColTab = new Color [ 8 ];
pColTab[ 0 ] = Color( COL_WHITE );
@@ -111,7 +112,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
pAkt->nHash0 = nRefHash;
- pLotusRoot->pFontBuff->Fill( rAttr.nFont, rItemSet );
+ mpLotusRoot->pFontBuff->Fill( rAttr.nFont, rItemSet );
sal_uInt8 nLine = rAttr.nLineStyle;
if( nLine )
@@ -241,6 +242,11 @@ void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum )
}
}
+LotAttrTable::LotAttrTable(LOTUS_ROOT* pLotRoot):
+ aAttrCache(pLotRoot)
+{
+}
+
void LotAttrTable::SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow,
const LotAttrWK3& rAttr )
{
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 4eda7c5..a35892d 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -56,7 +56,7 @@ LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, CharSet eQ )
eActType( Lotus_X),
pRngNmBffWK3( new RangeNameBufferWK3),
pFontBuff( new LotusFontBuffer),
- pAttrTable( new LotAttrTable)
+ pAttrTable( new LotAttrTable(this))
{
}
More information about the Libreoffice-commits
mailing list