[Libreoffice-commits] core.git: 9 commits - editeng/source filter/source include/editeng sd/qa sd/source

Caolán McNamara caolanm at redhat.com
Thu Aug 27 06:45:26 PDT 2015


 editeng/source/editeng/editattr.cxx            |    6 ---
 editeng/source/items/textitem.cxx              |   38 +++++++------------------
 filter/source/graphicfilter/itiff/lzwdecom.cxx |    8 ++---
 filter/source/msfilter/svdfppt.cxx             |   28 +++++++++++++++---
 include/editeng/colritem.hxx                   |    1 
 sd/qa/unit/data/ppt/pass/hang-10.ppt           |binary
 sd/qa/unit/data/ppt/pass/hang-4.ppt            |binary
 sd/qa/unit/data/ppt/pass/hang-5.ppt            |binary
 sd/qa/unit/data/ppt/pass/hang-6.ppt            |binary
 sd/qa/unit/data/ppt/pass/hang-7.ppt            |binary
 sd/qa/unit/data/ppt/pass/hang-8.ppt            |binary
 sd/qa/unit/data/ppt/pass/hang-9.ppt            |binary
 sd/source/filter/ppt/pptin.cxx                 |   16 +++++++---
 sd/source/filter/ppt/propread.cxx              |   31 +++++++++++++-------
 14 files changed, 72 insertions(+), 56 deletions(-)

New commits:
commit 7e373e92fc02393732422d05264dd5115076183f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 14:40:37 2015 +0100

    crashtesting: tiff loop detection too slow
    
    moz323894-1.tiff and moz456356-1.tiff take too long to load
    
    Change-Id: Iaafa064fd05e4a4152004e7ceb6256af68aeef01

diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index 5fb7514..dc437e2 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -20,7 +20,7 @@
 
 #include "lzwdecom.hxx"
 #include <algorithm>
-#include <vector>
+#include <set>
 
 #define MAX_TABLE_SIZE 4096
 
@@ -163,16 +163,16 @@ void LZWDecompressor::AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData
         return;
     }
 
-    std::vector<sal_uInt16> aSeenIndexes;
+    unsigned char aSeenIndexes[MAX_TABLE_SIZE] = {0};
     while (pTable[nCodeFirstData].nDataCount>1)
     {
-        if (std::find(aSeenIndexes.begin(), aSeenIndexes.end(), nCodeFirstData) != aSeenIndexes.end())
+        if (aSeenIndexes[nCodeFirstData])
         {
             SAL_WARN("filter.tiff", "Loop in chain");
             bEOIFound = true;
             return;
         }
-        aSeenIndexes.push_back(nCodeFirstData);
+        aSeenIndexes[nCodeFirstData] = 1;
         nCodeFirstData=pTable[nCodeFirstData].nPrevCode;
     }
 
commit 932f6de91904f86f38d2914b9ce07b94dfadac0c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 14:28:35 2015 +0100

    check status of SeekTo
    
    Change-Id: Ia2bb397c3fdd783cab77a6b0dbc31c9e3d19326b

diff --git a/sd/qa/unit/data/ppt/pass/hang-10.ppt b/sd/qa/unit/data/ppt/pass/hang-10.ppt
new file mode 100644
index 0000000..99a81c4
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-10.ppt differ
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index d37855d..31fe108 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -787,7 +787,8 @@ bool ImplSdPPTImport::Import()
                                                     if ( nObjCount++ )      // skipping the first object
                                                     {
                                                         Rectangle aEmpty;
-                                                        aHd2.SeekToBegOfRecord( rStCtrl );
+                                                        if (!aHd2.SeekToBegOfRecord(rStCtrl))
+                                                            break;
                                                         SdrObject* pImpObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty );
                                                         if ( pImpObj )
                                                         {
@@ -796,7 +797,8 @@ bool ImplSdPPTImport::Import()
                                                         }
                                                     }
                                                 }
-                                                aHd2.SeekToEndOfRecord( rStCtrl );
+                                                if (!aHd2.SeekToEndOfRecord(rStCtrl))
+                                                    break;
                                             }
                                         }
                                     }
commit de71eae5807ff94c8eace0eccaabf1ffa08e77b6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 14:22:23 2015 +0100

    avoid loops in atom chains
    
    Change-Id: Icc40c0ee6c7d8d305cf7cc60cbf3e511c763aedd

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 30e8cfc..0f419dd 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2553,11 +2553,17 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
                     while( ( pMasterPersist && pMasterPersist->aSlideAtom.nFlags & 2 )  // it is possible that a masterpage
                         && pMasterPersist->aSlideAtom.nMasterId )                        // itself is following a master colorscheme
                     {
-                        sal_uInt16 nNextMaster = m_pMasterPages->FindPage( pMasterPersist->aSlideAtom.nMasterId );
+                        auto nOrigMasterId = pMasterPersist->aSlideAtom.nMasterId;
+                        sal_uInt16 nNextMaster = m_pMasterPages->FindPage(nOrigMasterId);
                         if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
                             break;
                         else
                             pMasterPersist = &(*pPageList2)[ nNextMaster ];
+                        if (pMasterPersist->aSlideAtom.nMasterId == nOrigMasterId)
+                        {
+                            SAL_WARN("filter.ms", "loop in atom chain");
+                            break;
+                        }
                     }
                 }
                 if ( pMasterPersist )
@@ -2566,7 +2572,7 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
                 }
             }
         }
-        // resgister current color scheme
+        // register current color scheme
         const_cast<SdrPowerPointImport*>(this)->nPageColorsNum = nAktPageNum;
         const_cast<SdrPowerPointImport*>(this)->ePageColorsKind = eAktPageKind;
     }
@@ -2790,11 +2796,17 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
                                             PptSlidePersistEntry* pE = &(*pPageList)[ nMasterNum ];
                                             while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId )
                                             {
-                                                sal_uInt16 nNextMaster = m_pMasterPages->FindPage( pE->aSlideAtom.nMasterId );
+                                                auto nOrigMasterId = pE->aSlideAtom.nMasterId;
+                                                sal_uInt16 nNextMaster = m_pMasterPages->FindPage(nOrigMasterId);
                                                 if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
                                                     break;
                                                 else
                                                     pE = &(*pPageList)[ nNextMaster ];
+                                                if (pE->aSlideAtom.nMasterId == nOrigMasterId)
+                                                {
+                                                    SAL_WARN("filter.ms", "loop in atom chain");
+                                                    break;
+                                                }
                                             }
                                             if ( pE->nBackgroundOffset )
                                             {
diff --git a/sd/qa/unit/data/ppt/pass/hang-9.ppt b/sd/qa/unit/data/ppt/pass/hang-9.ppt
new file mode 100644
index 0000000..97e0158
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-9.ppt differ
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 8c2d75d..d37855d 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -733,11 +733,17 @@ bool ImplSdPPTImport::Import()
                 PptSlidePersistEntry* pE = pPersist;
                 while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId )
                 {
-                    sal_uInt16 nNextMaster = m_pMasterPages->FindPage( pE->aSlideAtom.nMasterId );
+                    auto nOrigMasterId = pE->aSlideAtom.nMasterId;
+                    sal_uInt16 nNextMaster = m_pMasterPages->FindPage(nOrigMasterId);
                     if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
                         break;
                     else
                         pE = &(*pList)[ nNextMaster ];
+                    if (pE->aSlideAtom.nMasterId == nOrigMasterId)
+                    {
+                        SAL_WARN("filter.ms", "loop in atom chain");
+                        break;
+                    }
                 }
                 SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, true );   // import background
                 if ( pObj )
commit 9a695e071020639926f8b038aba64eb016a1801a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 14:06:04 2015 +0100

    check stream state after read attempt
    
    Change-Id: Ie3836f2e95acab963634181a07565343501f00f8

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 662611e..30e8cfc 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5218,9 +5218,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
 
             PPTCharPropSet aCharPropSet( nCurrentPara );
             if ( bTextPropAtom )
+            {
                 ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
                                bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
                                nBuBlip, nHasAnm, nAnmScheme );
+                if (!rIn.good())
+                    break;
+            }
             else
                 nCharCount = nStringLen;
 
@@ -5296,7 +5300,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
                     break;
                 }
             }
-         }
+        }
         if ( !aCharPropList.empty() && ( aCharPropList.back()->mnParagraph != nCurrentPara ) )
         {
             PPTCharPropSet* pCharPropSet = new PPTCharPropSet( *aCharPropList.back(), nCurrentPara );
diff --git a/sd/qa/unit/data/ppt/pass/hang-8.ppt b/sd/qa/unit/data/ppt/pass/hang-8.ppt
new file mode 100644
index 0000000..0f52bd5
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-8.ppt differ
commit 1830b4f2e324090962a993315ce76752d24d4088
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 13:58:48 2015 +0100

    check seek for success
    
    Change-Id: I02420ffb3af009d08ce54a0932e2c7a287703a72

diff --git a/sd/qa/unit/data/ppt/pass/hang-7.ppt b/sd/qa/unit/data/ppt/pass/hang-7.ppt
new file mode 100644
index 0000000..8c05271
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-7.ppt differ
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index f8804fd..86195be4 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -419,7 +419,11 @@ void Section::Read( SotStorageStream *pStrm )
                 if ( nPropSize )
                 {
                     if ( ( nVectorCount - i ) > 1 )
-                        pStrm->Seek( nPropOfs + nSecOfs + nPropSize );
+                    {
+                        nOffset = nPropOfs + nSecOfs + nPropSize;
+                        if (nOffset != pStrm->Seek(nOffset))
+                            break;
+                    }
                 }
                 else
                     break;
commit d417ffb7dd93306be7c89526a75acab53dbd8831
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 13:49:00 2015 +0100

    check SeekToEndOfRecord for success
    
    Change-Id: I7413a4e9e491b65122eaadb38ad574161f1aa943

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 26cf78c..662611e 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2869,7 +2869,9 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
                                                         insertShapeId( nShapeId, pObj );
                                                 }
                                             }
-                                            aShapeHd.SeekToEndOfRecord( rStCtrl );
+                                            bool bSuccess = aShapeHd.SeekToEndOfRecord(rStCtrl);
+                                            if (!bSuccess)
+                                                break;
                                         }
                                     }
                                 }
diff --git a/sd/qa/unit/data/ppt/pass/hang-6.ppt b/sd/qa/unit/data/ppt/pass/hang-6.ppt
new file mode 100644
index 0000000..f5aa247
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-6.ppt differ
commit 90dc4e38928fffc3ed5fcbed40109712eb97e203
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 13:35:37 2015 +0100

    avoid hang in certain ppts
    
    Change-Id: Iedba71b72fc815b274ca5e0da0903a558947cb06

diff --git a/sd/qa/unit/data/ppt/pass/hang-5.ppt b/sd/qa/unit/data/ppt/pass/hang-5.ppt
new file mode 100644
index 0000000..cfaa8f4
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-5.ppt differ
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index abc8fc3..8c2d75d 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2557,7 +2557,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
             DffRecordHeader& rHdClientData = *maShapeRecords.Current();
             while( true )
             {
-                sal_uInt32 nClientDataLen = rHdClientData.GetRecEndFilePos();
+                sal_uInt32 nClientDataLen = SanitizeEndPos(rSt, rHdClientData.GetRecEndFilePos());
                 DffRecordHeader aHd;
                 do
                 {
commit eea399ddd52a0de368321963bb828bc15632dd0b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 13:00:36 2015 +0100

    check for stream status after a read, not after a seek
    
    Change-Id: I984e99c1a1484547aa4d60bf301167f3cbc9f716

diff --git a/sd/qa/unit/data/ppt/pass/hang-4.ppt b/sd/qa/unit/data/ppt/pass/hang-4.ppt
new file mode 100644
index 0000000..f5aa247
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-4.ppt differ
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 2312081..f8804fd 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -306,7 +306,7 @@ bool Section::GetDictionary( Dictionary& rDict )
 
 void Section::Read( SotStorageStream *pStrm )
 {
-    sal_uInt32 i, nSecOfs, nPropType, nPropSize, nCurrent, nVectorCount, nTemp, nStrmSize;
+    sal_uInt32 i, nSecOfs, nPropSize, nStrmSize;
     nSecOfs = pStrm->Tell();
 
     pStrm->Seek( STREAM_SEEK_TO_END );
@@ -316,16 +316,20 @@ void Section::Read( SotStorageStream *pStrm )
     mnTextEnc = RTL_TEXTENCODING_MS_1252;
     sal_uInt32 nSecSize(0), nPropCount(0);
     pStrm->ReadUInt32( nSecSize ).ReadUInt32( nPropCount );
-    while (nPropCount-- && pStrm->good())
+    while (nPropCount--)
     {
         sal_uInt32 nPropId(0), nPropOfs(0);
-        pStrm->ReadUInt32( nPropId ).ReadUInt32( nPropOfs );
-        nCurrent = pStrm->Tell();
-        pStrm->Seek( nPropOfs + nSecOfs );
+        pStrm->ReadUInt32(nPropId).ReadUInt32(nPropOfs);
+        if (!pStrm->good())
+            break;
+        auto nCurrent = pStrm->Tell();
+        sal_uInt64 nOffset = nPropOfs + nSecOfs;
+        if (nOffset != pStrm->Seek(nOffset))
+            break;
         if ( nPropId )                  // do not read dictionary
         {
-
-            pStrm->ReadUInt32( nPropType );
+            sal_uInt32 nPropType(0), nVectorCount(0);
+            pStrm->ReadUInt32(nPropType);
 
             nPropSize = 4;
 
@@ -347,6 +351,7 @@ void Section::Read( SotStorageStream *pStrm )
                     pStrm->ReadUInt32( nPropType );
                     nPropSize += 4;
                 }
+                sal_uInt32 nTemp(0);
                 switch( nPropType )
                 {
                     case VT_UI1 :
@@ -440,11 +445,11 @@ void Section::Read( SotStorageStream *pStrm )
                 PropItem aPropItem;
                 if ( GetProperty( 1, aPropItem ) )
                 {
-                    sal_uInt16 nCodePage;
                     aPropItem.ReadUInt32( nPropType );
                     if ( nPropType == VT_I2 )
                     {
-                        aPropItem.ReadUInt16( nCodePage );
+                        sal_uInt16 nCodePage(0);
+                        aPropItem.ReadUInt16(nCodePage);
 
                         if ( nCodePage == 1200 )
                         {
@@ -486,7 +491,7 @@ void Section::Read( SotStorageStream *pStrm )
             AddProperty( 0xffffffff, pBuf, nSize );
             delete[] pBuf;
         }
-        pStrm->Seek( nCurrent );
+        pStrm->Seek(nCurrent);
     }
     pStrm->Seek( nSecOfs + nSecSize );
 }
commit 3bc69b1d0d8620afd89a993b5f6bc46a2ff5267f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 12:21:37 2015 +0100

    don't write SvxBackgroundColorItem via inherited SvxColorItem::Store
    
    SvxBackgroundColorItem inherits from SvxColorItem and for backwards
    compatibility with the StarOffice 5 binary file format (yes, really)
    writes/reads only rgb and not the transparency value, so copying and pasting
    text from a sidebar comment in writer to itself or another one results in a
    black character background as the default COL_AUTO turns into black
    
    Change-Id: I18b5105dd8e060b9e49dda6026e26d3a0f00d8f5

diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 21cd750..57d0045 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -221,7 +221,6 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
 {
     Color aColor = static_cast<const SvxColorItem*>(GetItem())->GetValue();
     rFont.SetColor( aColor);
-    //fprintf(stderr, "Called SetFont with Color %d\n", aColor.GetColor());
 }
 
 // class EditCharAttribBackgroundColor
@@ -238,14 +237,11 @@ EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
 void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
 {
     Color aColor = static_cast<const SvxBackgroundColorItem*>(GetItem())->GetValue();
-    rFont.SetFillColor( aColor);
     rFont.SetTransparent(false);
-
+    rFont.SetFillColor(aColor);
 }
 
-
 // class EditCharAttribLanguage
-
 EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
     : EditCharAttrib( rAttr, _nStart, _nEnd )
 {
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 028ba85..9c76d7e 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1850,9 +1850,12 @@ SvxBackgroundColorItem::SvxBackgroundColorItem( const Color& rCol,
 {
 }
 
-SvxBackgroundColorItem:: SvxBackgroundColorItem( SvStream& rStrm, const sal_uInt16 Id  ) :
-    SvxColorItem( rStrm, Id )
+SvxBackgroundColorItem::SvxBackgroundColorItem(SvStream& rStrm, const sal_uInt16 nId)
+    : SvxColorItem(nId)
 {
+    Color aColor;
+    aColor.Read(rStrm);
+    SetValue(aColor);
 }
 
 SvxBackgroundColorItem::SvxBackgroundColorItem( const SvxBackgroundColorItem& rCopy ) :
@@ -1862,9 +1865,14 @@ SvxBackgroundColorItem::SvxBackgroundColorItem( const SvxBackgroundColorItem& rC
 
 SfxPoolItem* SvxBackgroundColorItem::Clone( SfxItemPool * ) const
 {
-    return new SvxBackgroundColorItem( *this );
+    return new SvxBackgroundColorItem(*this);
 }
 
+SvStream& SvxBackgroundColorItem::Store(SvStream& rStrm, sal_uInt16) const
+{
+    GetValue().Write(rStrm);
+    return rStrm;
+}
 
 SfxPoolItem* SvxBackgroundColorItem::Create(SvStream& rStrm, sal_uInt16 ) const
 {
@@ -1918,23 +1926,18 @@ bool SvxBackgroundColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId
 }
 
 // class SvxColorItem ----------------------------------------------------
-
 SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
     SfxPoolItem( nId ),
     mColor( COL_BLACK )
 {
 }
 
-
-
 SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) :
     SfxPoolItem( nId ),
     mColor( rCol )
 {
 }
 
-
-
 SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) :
     SfxPoolItem( nId )
 {
@@ -1943,21 +1946,16 @@ SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) :
     mColor = aColor;
 }
 
-
-
 SvxColorItem::SvxColorItem( const SvxColorItem &rCopy ) :
     SfxPoolItem( rCopy ),
     mColor( rCopy.mColor )
 {
 }
 
-
-
 SvxColorItem::~SvxColorItem()
 {
 }
 
-
 sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
 {
     DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
@@ -1967,8 +1965,6 @@ sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const
     return  SOFFICE_FILEFORMAT_50 >= nFFVer ? VERSION_USEAUTOCOLOR : 0;
 }
 
-
-
 bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
 {
     DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
@@ -1976,16 +1972,12 @@ bool SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
     return  mColor == static_cast<const SvxColorItem&>( rAttr ).mColor;
 }
 
-
-
 bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
 {
     rVal <<= (sal_Int32)(mColor.GetColor());
     return true;
 }
 
-
-
 bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
 {
     sal_Int32 nColor = 0;
@@ -1996,15 +1988,11 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
     return true;
 }
 
-
-
 SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
 {
     return new SvxColorItem( *this );
 }
 
-
-
 SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
 {
     if( VERSION_USEAUTOCOLOR == nItemVersion &&
@@ -2015,15 +2003,11 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
     return rStrm;
 }
 
-
-
 SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const
 {
     return new SvxColorItem( rStrm, Which() );
 }
 
-
-
 bool SvxColorItem::GetPresentation
 (
     SfxItemPresentation /*ePres*/,
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index 3ee4c35..106d862 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -82,6 +82,7 @@ class EDITENG_DLLPUBLIC SvxBackgroundColorItem : public SvxColorItem
         SvxBackgroundColorItem(const SvxBackgroundColorItem& rCopy);
 
         virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
+        virtual SvStream& Store(SvStream& rStream, sal_uInt16 nVersion) const SAL_OVERRIDE;
         virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
         virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
         virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) SAL_OVERRIDE;


More information about the Libreoffice-commits mailing list