[Libreoffice-commits] core.git: 2 commits - forms/source include/svx include/tools svl/source svx/source sw/source tools/source unotools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 06:52:41 UTC 2018


 forms/source/component/imgprod.cxx         |    6 +++---
 include/svx/svdograf.hxx                   |    9 ++++-----
 include/tools/stream.hxx                   |    4 +---
 svl/source/items/lckbitem.cxx              |    2 +-
 svx/source/svdraw/svdedtv2.cxx             |    2 +-
 svx/source/svdraw/svdograf.cxx             |    2 +-
 sw/source/uibase/app/docsh2.cxx            |    4 ++--
 tools/source/stream/stream.cxx             |    4 ++--
 unotools/source/streaming/streamhelper.cxx |    2 +-
 unotools/source/ucbhelper/ucblockbytes.cxx |    4 ++--
 unotools/source/ucbhelper/ucblockbytes.hxx |    2 +-
 11 files changed, 19 insertions(+), 22 deletions(-)

New commits:
commit 307b746cd41fa5bf971573dd7665108def4e298b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 10:16:05 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:52:29 2018 +0100

    remove unused SdrGrafObjTransformsAttrs enum value
    
    Change-Id: I6b6808362ff08c5af3b0d294a80cfe79505a9710
    Reviewed-on: https://gerrit.libreoffice.org/64563
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index c3e2ae0c1874..4b50d122b256 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -47,14 +47,13 @@ namespace sdr
 enum class SdrGrafObjTransformsAttrs
 {
     NONE       = 0x00,
-    COLOR      = 0x01,
-    MIRROR     = 0x02,
-    ROTATE     = 0x04,
-    ALL        = 0x07,
+    MIRROR     = 0x01,
+    ROTATE     = 0x02,
+    ALL        = 0x03,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<SdrGrafObjTransformsAttrs> : is_typed_flags<SdrGrafObjTransformsAttrs, 7> {};
+    template<> struct typed_flags<SdrGrafObjTransformsAttrs> : is_typed_flags<SdrGrafObjTransformsAttrs, 0x03> {};
 }
 
 class SdrGrafObjGeoData : public SdrTextObjGeoData
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 732bd1ce63f8..441ea9ba4bda 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1999,7 +1999,7 @@ namespace
     GDIMetaFile GetMetaFile(SdrGrafObj const * pGraf)
     {
         if (pGraf->HasGDIMetaFile())
-            return pGraf->GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
+            return pGraf->GetTransformedGraphic(SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
         assert(pGraf->isEmbeddedVectorGraphicData());
         return pGraf->getMetafileFromEmbeddedVectorGraphicData();
     }
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index bcc4f1098a51..1bf7cbfbbfa2 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -880,7 +880,7 @@ GDIMetaFile SdrGrafObj::GetMetaFile(GraphicType &rGraphicType) const
     }
     else if (GraphicType::GdiMetafile == rGraphicType)
     {
-        return GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
+        return GetTransformedGraphic(SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
     }
     return GDIMetaFile();
 }
commit 36b21429c2c423271786e29c6a480b4b689a8ab8
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 09:49:13 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:52:16 2018 +0100

    remove unused SvLockBytesStatFlag enum
    
    Change-Id: I90b82f1bbf4b51fc76cde10ec55448053345018c
    Reviewed-on: https://gerrit.libreoffice.org/64561
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index dc51b5ef47e2..c4ae8ee9e008 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -48,7 +48,7 @@ public:
     virtual ErrCode     WriteAt( sal_uInt64 nPos, const void* pBuffer, std::size_t nCount, std::size_t * pWritten ) override;
     virtual ErrCode     Flush() const override;
     virtual ErrCode     SetSize( sal_uInt64 nSize ) override;
-    virtual ErrCode     Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const override;
+    virtual ErrCode     Stat( SvLockBytesStat* ) const override;
 };
 
 
@@ -144,10 +144,10 @@ ErrCode ImgProdLockBytes::SetSize(sal_uInt64 const nSize)
 }
 
 
-ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFlag ) const
+ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat ) const
 {
     if( GetStream() )
-        return SvLockBytes::Stat( pStat, eFlag );
+        return SvLockBytes::Stat( pStat );
     else
     {
         DBG_ASSERT( xStmRef.is(), "ImgProdLockBytes::Stat: xInputStream has no reference..." );
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 42f4231addd7..ea3e53d21ff9 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -94,8 +94,6 @@ struct SvLockBytesStat
     SvLockBytesStat() : nSize(0) {}
 };
 
-enum SvLockBytesStatFlag { SVSTATFLAG_DEFAULT };
-
 class TOOLS_DLLPUBLIC SvLockBytes: public virtual SvRefBase
 {
     SvStream * m_pStream;
@@ -128,7 +126,7 @@ public:
 
     virtual ErrCode SetSize(sal_uInt64 nSize);
 
-    virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
+    virtual ErrCode Stat(SvLockBytesStat * pStat) const;
 };
 
 typedef tools::SvRef<SvLockBytes> SvLockBytesRef;
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index 737db2750da4..5c2efba1e9b1 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -130,7 +130,7 @@ bool SfxLockBytesItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
         sal_uInt32 nLen;
         SvLockBytesStat aStat;
 
-        if ( _xVal->Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
+        if ( _xVal->Stat( &aStat ) == ERRCODE_NONE )
             nLen = aStat.nSize;
         else
             return false;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index a13930dba1b3..ef501c1d0e56 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -801,7 +801,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         // Transfer ownership of stream to a lockbytes object
                         SvLockBytes aLockBytes( pStrm, true );
                         SvLockBytesStat aStat;
-                        if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
+                        if ( aLockBytes.Stat( &aStat ) == ERRCODE_NONE )
                         {
                             sal_uInt32 nLen = aStat.nSize;
                             std::size_t nRead = 0;
@@ -866,7 +866,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         // Transfer ownership of stream to a lockbytes object
                         SvLockBytes aLockBytes( pStrm, true );
                         SvLockBytesStat aStat;
-                        if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
+                        if ( aLockBytes.Stat( &aStat ) == ERRCODE_NONE )
                         {
                             sal_uInt32 nLen = aStat.nSize;
                             std::size_t nRead = 0;
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 4fd9890a865b..7eaef59e5883 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -241,7 +241,7 @@ ErrCode SvLockBytes::SetSize(sal_uInt64 const nSize)
     return m_pStream->GetErrorCode();
 }
 
-ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
+ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat) const
 {
     if (!m_pStream)
     {
@@ -294,7 +294,7 @@ sal_uInt64 SvStream::SeekPos(sal_uInt64 const nPos)
     {
         DBG_ASSERT( m_xLockBytes.is(), "pure virtual function" );
         SvLockBytesStat aStat;
-        m_xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
+        m_xLockBytes->Stat( &aStat );
         m_nActPos = aStat.nSize;
     }
     else
diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx
index 893384ff7525..1b639fb04825 100644
--- a/unotools/source/streaming/streamhelper.cxx
+++ b/unotools/source/streaming/streamhelper.cxx
@@ -71,7 +71,7 @@ sal_Int64 SAL_CALL OInputStreamHelper::getLength(  )
 
     ::osl::MutexGuard aGuard( m_aMutex );
     SvLockBytesStat aStat;
-    m_xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
+    m_xLockBytes->Stat( &aStat );
     return aStat.nSize;
 }
 
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index c2dcf90f3a8c..c851a408b736 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1220,7 +1220,7 @@ ErrCode UcbLockBytes::Flush() const
 ErrCode UcbLockBytes::SetSize (sal_uInt64 const nNewSize)
 {
     SvLockBytesStat aStat;
-    Stat( &aStat, SvLockBytesStatFlag(0) );
+    Stat( &aStat );
     std::size_t nSize = aStat.nSize;
 
     if ( nSize > nNewSize )
@@ -1249,7 +1249,7 @@ ErrCode UcbLockBytes::SetSize (sal_uInt64 const nNewSize)
     return ERRCODE_NONE;
 }
 
-ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
+ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat ) const
 {
     if ( IsSynchronMode() )
     {
diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
index 164c551d8dbf..5f0783f73338 100644
--- a/unotools/source/ucbhelper/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -106,7 +106,7 @@ public:
     virtual ErrCode         WriteAt(sal_uInt64, const void*, std::size_t, std::size_t *pWritten) override;
     virtual ErrCode         Flush() const override;
     virtual ErrCode         SetSize(sal_uInt64) override;
-    virtual ErrCode         Stat ( SvLockBytesStat *pStat, SvLockBytesStatFlag) const override;
+    virtual ErrCode         Stat ( SvLockBytesStat *pStat ) const override;
 
     void                    SetError( ErrCode nError )
                             { m_nError = nError; }


More information about the Libreoffice-commits mailing list