[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - svtools/source svx/source vcl/source

Caolán McNamara caolanm at redhat.com
Thu Jan 28 07:58:14 PST 2016


 svtools/source/graphic/grfcache.cxx |    2 +-
 svx/source/xoutdev/_xoutbmp.cxx     |    2 +-
 vcl/source/filter/graphicfilter.cxx |    4 ++--
 vcl/source/gdi/impgraph.cxx         |    8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 6d15196a2a8aea48dd50591abb06017a04f5122f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 28 13:30:07 2016 +0000

    Resolves: tdf#96580 Sequence::get doesn't return the start of the data
    
    it returns the start of the underlying uno_Sequence
    
    commit 78c83032b266fbb6fc20ddca86df80affaff7c24
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Wed Sep 30 09:40:16 2015 +0100
    
        maSvgDataArray only populates a uno::Sequence, so use that instead
    
        Change-Id: I335d5ee70e95e1a3b204d34f6df4cb62f3fb3cad
    
    (cherry picked from commit ab60f6cb0f46cb71172e4248ed40e212f6ebb4da)
    
    Change-Id: I8d2c07fec039e58d3644e4ab5eb074ee215f075e

diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index fd30407..e8fdfe1 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -79,7 +79,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
                 mnID1 |= rSvgDataPtr->getSvgDataArrayLength();
                 mnID2 = basegfx::fround(rRange.getWidth());
                 mnID3 = basegfx::fround(rRange.getHeight());
-                mnID4 = vcl_get_checksum(0, rSvgDataPtr->getSvgDataArray().get(), rSvgDataPtr->getSvgDataArrayLength());
+                mnID4 = vcl_get_checksum(0, rSvgDataPtr->getSvgDataArray().getConstArray(), rSvgDataPtr->getSvgDataArrayLength());
             }
             else if( rGraphic.IsAnimated() )
             {
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index e445b09..74c1f5b 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -161,7 +161,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
 
             if(pOStm)
             {
-                pOStm->Write(aSvgDataPtr->getSvgDataArray().get(), aSvgDataPtr->getSvgDataArrayLength());
+                pOStm->Write(aSvgDataPtr->getSvgDataArray().getConstArray(), aSvgDataPtr->getSvgDataArrayLength());
                 aMedium.Commit();
 
                 if(!aMedium.GetError())
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index c86d070..00bcb10 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -2050,9 +2050,9 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
                 // do we have a native SVG RenderGraphic, whose data can be written directly?
                 const SvgDataPtr aSvgDataPtr(rGraphic.getSvgData());
 
-                if(aSvgDataPtr.get() && aSvgDataPtr->getSvgDataArrayLength())
+                if (aSvgDataPtr.get() && aSvgDataPtr->getSvgDataArrayLength())
                 {
-                    rOStm.Write(aSvgDataPtr->getSvgDataArray().get(), aSvgDataPtr->getSvgDataArrayLength());
+                    rOStm.Write(aSvgDataPtr->getSvgDataArray().getConstArray(), aSvgDataPtr->getSvgDataArrayLength());
 
                     if( rOStm.GetError() )
                     {
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 9e4c78a..21d2119 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -290,8 +290,8 @@ bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
                         if(maSvgData->getSvgDataArrayLength() == rImpGraphic.maSvgData->getSvgDataArrayLength())
                         {
                             if(0 == memcmp(
-                                maSvgData->getSvgDataArray().get(),
-                                rImpGraphic.maSvgData->getSvgDataArray().get(),
+                                maSvgData->getSvgDataArray().getConstArray(),
+                                rImpGraphic.maSvgData->getSvgDataArray().getConstArray(),
                                 maSvgData->getSvgDataArrayLength()))
                             {
                                 bRet = true;
@@ -1545,7 +1545,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
                             {
                                 SvgDataArray aNewData(nSvgDataArrayLength);
 
-                                rIStm.Read(aNewData.begin(), nSvgDataArrayLength);
+                                rIStm.Read(aNewData.getArray(), nSvgDataArrayLength);
                                 OUString aPath = rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet());
 
                                 if (!rIStm.GetError())
@@ -1616,7 +1616,7 @@ SvStream& WriteImpGraphic( SvStream& rOStm, const ImpGraphic& rImpGraphic )
 
                             rOStm.WriteUInt32( nSvgMagic );
                             rOStm.WriteUInt32( rImpGraphic.getSvgData()->getSvgDataArrayLength() );
-                            rOStm.Write(rImpGraphic.getSvgData()->getSvgDataArray().get(), rImpGraphic.getSvgData()->getSvgDataArrayLength());
+                            rOStm.Write(rImpGraphic.getSvgData()->getSvgDataArray().getConstArray(), rImpGraphic.getSvgData()->getSvgDataArrayLength());
                             rOStm.WriteUniOrByteString(rImpGraphic.getSvgData()->getPath(),
                                                        rOStm.GetStreamCharSet());
                         }


More information about the Libreoffice-commits mailing list