writerfilter/source/dmapper/GraphicImport.cxx |   39 --------------------------
 1 file changed, 39 deletions(-)

New commits:
commit 4efc9e9007bf8f7447111dbecb7fe48fd8116d3f
Author: Michael Stahl <mst...@redhat.com>
Date:   Fri Jul 4 13:51:30 2014 +0200

    writerfilter: remove GraphicImport_Impl::nTopCrop etc.
    
    These members were only initialized by the doctok, from
    NS_rtf::LN_DYACROPTOP etc.
    
    Change-Id: I933c1c4b8f2bb808dd04b82bc8efe5028a2a153d

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 038d974..da20fa0 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -196,10 +196,6 @@ public:
     sal_Int32 nTopPosition;
     sal_Int32 nRightPosition;
     sal_Int32 nBottomPosition;
-    sal_Int32 nLeftCrop;
-    sal_Int32 nTopCrop;
-    sal_Int32 nRightCrop;
-    sal_Int32 nBottomCrop;
 
     bool      bUseSimplePos;
     sal_Int32 zOrder;
@@ -271,10 +267,6 @@ public:
         ,nTopPosition(0)
         ,nRightPosition(0)
         ,nBottomPosition(0)
-        ,nLeftCrop(0)
-        ,nTopCrop (0)
-        ,nRightCrop (0)
-        ,nBottomCrop(0)
         ,bUseSimplePos(false)
         ,zOrder(-1)
         ,nHoriOrient(   text::HoriOrientation::NONE )
@@ -1076,15 +1068,6 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
 void GraphicImport::lcl_entry(int /*pos*/, 
writerfilter::Reference<Properties>::Pointer_t /*ref*/)
 {
 }
-/*-------------------------------------------------------------------------
-    crop is stored as "fixed float" as 16.16 fraction value
-    related to width/or height
-  -----------------------------------------------------------------------*/
-void lcl_CalcCrop( sal_Int32& nCrop, sal_Int32 nRef )
-{
-    nCrop = ((nCrop >> 16   ) * nRef )
-       + (((nCrop & 0xffff) * nRef ) >> 16);
-}
 
 uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const 
beans::PropertyValues& aMediaProperties )
 {
@@ -1291,28 +1274,6 @@ uno::Reference< text::XTextContent > 
GraphicImport::createGraphicObject( const b
 
                 
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( 
PROP_CONTOUR_POLY_POLYGON),
                                                            
aContourPolyPolygon);
-
-                if( aGraphicSize.Width && aGraphicSize.Height )
-                {
-                    //todo: i71651 graphic size is not provided by the 
GraphicDescriptor
-                    lcl_CalcCrop( m_pImpl->nTopCrop, aGraphicSize.Height );
-                    lcl_CalcCrop( m_pImpl->nBottomCrop, aGraphicSize.Height );
-                    lcl_CalcCrop( m_pImpl->nLeftCrop, aGraphicSize.Width );
-                    lcl_CalcCrop( m_pImpl->nRightCrop, aGraphicSize.Width );
-
-
-                    // We need a separate try-catch here, otherwise a bad crop 
setting will also nuke the size settings as well.
-                    try
-                    {
-                        
xGraphicProperties->setPropertyValue(rPropNameSupplier.GetName( 
PROP_GRAPHIC_CROP ),
-                                
uno::makeAny(text::GraphicCrop(m_pImpl->nTopCrop, m_pImpl->nBottomCrop, 
m_pImpl->nLeftCrop, m_pImpl->nRightCrop)));
-                    }
-                    catch (const uno::Exception& e)
-                    {
-                        SAL_WARN("writerfilter", "failed. Message :" << 
e.Message);
-                    }
-                }
-
             }
 
             if(m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_INLINE || 
m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to