[Libreoffice-commits] core.git: include/svx sc/source sd/source svx/source

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


 include/svx/svdmodel.hxx           |   15 ---------------
 sc/source/ui/app/drwtrans.cxx      |   11 -----------
 sd/source/filter/sdpptwrp.cxx      |    2 --
 sd/source/ui/app/sdxfer.cxx        |   16 ----------------
 sd/source/ui/docshell/docshel3.cxx |    4 ----
 sd/source/ui/docshell/docshel4.cxx |    6 ------
 svx/source/svdraw/svdmodel.cxx     |    1 -
 7 files changed, 55 deletions(-)

New commits:
commit a04e615e1f9371401946c7c89d7ec439ce92cfec
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 10:47:21 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:52:42 2018 +0100

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

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 8cb3c6c25a2c..5cddb416791f 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -97,18 +97,6 @@ namespace sfx2
 }
 
 
-enum class SdrSwapGraphicsMode
-{
-    TEMP       = 0x0001,
-    PURGE      = 0x0100,
-    DEFAULT    = TEMP | PURGE,
-};
-namespace o3tl
-{
-    template<> struct typed_flags<SdrSwapGraphicsMode> : is_typed_flags<SdrSwapGraphicsMode, 0x0101> {};
-}
-
-
 enum class SdrHintKind
 {
     LayerChange,          // changed layer definition
@@ -231,7 +219,6 @@ protected:
 
 public:
     std::shared_ptr<SvxForbiddenCharactersTable> mpForbiddenCharactersTable;
-    SdrSwapGraphicsMode nSwapGraphicsMode;
 
     std::unique_ptr<SdrOutlinerCache> mpOutlinerCache;
     //get a vector of all the SdrOutliner belonging to the model
@@ -446,8 +433,6 @@ public:
     // Default=FALSE. Flag is not persistent.
     bool            IsSwapGraphics() const { return bSwapGraphics; }
     void            SetSwapGraphics();
-    void            SetSwapGraphicsMode(SdrSwapGraphicsMode nMode) { nSwapGraphicsMode = nMode; }
-    SdrSwapGraphicsMode GetSwapGraphicsMode() const { return nSwapGraphicsMode; }
 
     // Text frames without filling can be select with a mouse click by default (sal_False).
     // With this flag set to true you can hit them only in the area in which text is to be
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index a73b474ad477..59cb1ac4454f 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -362,19 +362,8 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c
 
         if( m_aOleData.GetTransferable().is() && m_aOleData.HasFormat( rFlavor ) )
         {
-            SdrSwapGraphicsMode nOldSwapMode(SdrSwapGraphicsMode::DEFAULT);
-
-            if( m_pModel )
-            {
-                nOldSwapMode = m_pModel->GetSwapGraphicsMode();
-                m_pModel->SetSwapGraphicsMode( SdrSwapGraphicsMode::PURGE );
-            }
-
             bOK = SetAny( m_aOleData.GetAny(rFlavor, rDestDoc) );
 
-            if( m_pModel )
-                m_pModel->SetSwapGraphicsMode( nOldSwapMode );
-
             return bOK;
         }
     }
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 0eaf9934a22b..e2966aab3e8b 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -148,8 +148,6 @@ bool SdPPTFilter::Export()
             if ( rFilterOptions.IsEnablePPTPreview() )
                 nCnvrtFlags |= 0x8000;
 
-            mrDocument.SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
-
             CreateStatusIndicator();
 
             //OUString sBaseURI( "BaseURI");
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 2c873604aa30..560f5f0bee7d 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -457,22 +457,11 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
     }
     else if( mpOLEDataHelper && mpOLEDataHelper->HasFormat( rFlavor ) )
     {
-        SdrSwapGraphicsMode nOldSwapMode(SdrSwapGraphicsMode::DEFAULT);
-
-        if( mpSdDrawDocumentIntern )
-        {
-            nOldSwapMode = mpSdDrawDocumentIntern->GetSwapGraphicsMode();
-            mpSdDrawDocumentIntern->SetSwapGraphicsMode( SdrSwapGraphicsMode::PURGE );
-        }
-
         // TODO/LATER: support all the graphical formats, the embedded object scenario should not have separated handling
         if( nFormat == SotClipboardFormatId::GDIMETAFILE && mpGraphic )
             bOK = SetGDIMetaFile( mpGraphic->GetGDIMetaFile() );
         else
             bOK = SetAny( mpOLEDataHelper->GetAny(rFlavor, rDestDoc) );
-
-        if( mpSdDrawDocumentIntern )
-            mpSdDrawDocumentIntern->SetSwapGraphicsMode( nOldSwapMode );
     }
     else if( HasFormat( nFormat ) )
     {
@@ -551,9 +540,6 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
         {
             if( mpSdDrawDocumentIntern )
             {
-                SdrSwapGraphicsMode nOldSwapMode = mpSdDrawDocumentIntern->GetSwapGraphicsMode();
-                mpSdDrawDocumentIntern->SetSwapGraphicsMode( SdrSwapGraphicsMode::PURGE );
-
                 if( !maDocShellRef.is() )
                 {
                     maDocShellRef = new ::sd::DrawDocShell(
@@ -567,8 +553,6 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
 
                 maDocShellRef->SetVisArea( maVisArea );
                 bOK = SetObject( maDocShellRef.get(), SDTRANSFER_OBJECTTYPE_DRAWOLE, rFlavor );
-
-                mpSdDrawDocumentIntern->SetSwapGraphicsMode( nOldSwapMode );
             }
         }
     }
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index a9925bf5f13b..deb709850f45 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -231,11 +231,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
 
         case SID_VERSION:
         {
-            const SdrSwapGraphicsMode nOldSwapMode = mpDoc->GetSwapGraphicsMode();
-
-            mpDoc->SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
             ExecuteSlot( rReq, SfxObjectShell::GetStaticInterface() );
-            mpDoc->SetSwapGraphicsMode( nOldSwapMode );
         }
         break;
 
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 5b72517cec98..15c76777a9b6 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -635,10 +635,6 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
 
         if (xFilter)
         {
-            const SdrSwapGraphicsMode nOldSwapMode = mpDoc->GetSwapGraphicsMode();
-
-            mpDoc->SetSwapGraphicsMode( SdrSwapGraphicsMode::TEMP );
-
             if ( mpViewShell )
             {
                 ::sd::View* pView = mpViewShell->GetView();
@@ -647,8 +643,6 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
             }
 
             bRet = xFilter->Export();
-            if( !bRet )
-                mpDoc->SetSwapGraphicsMode( nOldSwapMode );
         }
     }
 
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index be9cc533a2d0..462e7e173173 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -133,7 +133,6 @@ void SdrModel::ImpCtor(
     bMPgNumsDirty=false;
     bTransportContainer = false;
     bSwapGraphics=false;
-    nSwapGraphicsMode=SdrSwapGraphicsMode::DEFAULT;
     bPasteResize=false;
     bReadOnly=false;
     nDefaultTabulator=0;


More information about the Libreoffice-commits mailing list