void GraphicImport::lcl_attribute()

in main/writerfilter/source/dmapper/GraphicImport.cxx [392:1165]


void GraphicImport::lcl_attribute(Id nName, Value & val)
{
    sal_Int32 nIntValue = val.getInt();
    /* WRITERFILTERSTATUS: table: PICFattribute */
    switch( nName )
    {
        case NS_rtf::LN_LCB: break;//byte count
        case NS_rtf::LN_CBHEADER: break;//ignored
        case NS_rtf::LN_MFP: //MetafilePict
        case NS_rtf::LN_DffRecord: //dff record - expands to an sprm which expands to ...
        case NS_rtf::LN_shpopt: //shape options
        case NS_rtf::LN_shpfbse: //BLIP store entry
        case NS_rtf::LN_BRCTOP: //top border
        case NS_rtf::LN_BRCLEFT: //left border
        case NS_rtf::LN_BRCBOTTOM: //bottom border
        case NS_rtf::LN_BRCRIGHT: //right border
        case NS_rtf::LN_shape: //shape
        case NS_rtf::LN_blip: //the binary graphic data in a shape
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            {
                switch(nName)
                {
                    case NS_rtf::LN_BRCTOP: //top border
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->nCurrentBorderLine = BORDER_TOP;
                    break;
                    case NS_rtf::LN_BRCLEFT: //left border
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->nCurrentBorderLine = BORDER_LEFT;
                    break;
                    case NS_rtf::LN_BRCBOTTOM: //bottom border
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->nCurrentBorderLine = BORDER_BOTTOM;
                    break;
                    case NS_rtf::LN_BRCRIGHT: //right border
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->nCurrentBorderLine = BORDER_RIGHT;
                    break;
                    case NS_rtf::LN_shpopt:
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->bInShapeOptionMode = true;
                    break;
                    default:;
                }
            writerfilter::Reference<Properties>::Pointer_t pProperties = val.getProperties();
            if( pProperties.get())
            {
                pProperties->resolve(*this);
            }
                switch(nName)
                {
                    case NS_rtf::LN_shpopt:
                        /* WRITERFILTERSTATUS: */
                        m_pImpl->bInShapeOptionMode = false;
                    break;
                    default:;
                }
        }
        break;
        case NS_rtf::LN_payload :
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
        {
            writerfilter::Reference<BinaryObj>::Pointer_t pPictureData = val.getBinary();
            if( pPictureData.get())
                pPictureData->resolve(*this);
        }
        break;
        case NS_rtf::LN_BM_RCWINMF: //windows bitmap structure - if it's a bitmap
            /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
        break;
        case NS_rtf::LN_DXAGOAL: //x-size in twip
        case NS_rtf::LN_DYAGOAL: //y-size in twip
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_MX: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nHoriScaling = nIntValue; 
            break;// hori scaling in 0.001%
        case NS_rtf::LN_MY: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nVertScaling = nIntValue; 
            break;// vert scaling in 0.001%
        case NS_rtf::LN_DXACROPLEFT:    
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nLeftCrop  = ConversionHelper::convertTwipToMM100(nIntValue); 
            break;// left crop in twips
        case NS_rtf::LN_DYACROPTOP:     
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nTopCrop   = ConversionHelper::convertTwipToMM100(nIntValue); 
            break;// top crop in twips
        case NS_rtf::LN_DXACROPRIGHT:   
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nRightCrop = ConversionHelper::convertTwipToMM100(nIntValue); 
            break;// right crop in twips
        case NS_rtf::LN_DYACROPBOTTOM:  
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nBottomCrop = ConversionHelper::convertTwipToMM100(nIntValue); 
            break;// bottom crop in twips
        case NS_rtf::LN_BRCL:           
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;//border type - legacy -
        case NS_rtf::LN_FFRAMEEMPTY:    
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// picture consists of a single frame
        case NS_rtf::LN_FBITMAP:
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            m_pImpl->bIsBitmap = nIntValue > 0 ? true : false;
        break;//1 if it's a bitmap ???
        case NS_rtf::LN_FDRAWHATCH:     
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;//1 if it's an active OLE object
        case NS_rtf::LN_FERROR:         
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// 1 if picture is an error message
        case NS_rtf::LN_BPP: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nBitsPerPixel = nIntValue; 
            break;//bits per pixel 0 - unknown, 1- mono, 4 - VGA

        case NS_rtf::LN_DXAORIGIN: //horizontal offset of hand annotation origin
        case NS_rtf::LN_DYAORIGIN: //vertical offset of hand annotation origin
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        break;
        case NS_rtf::LN_CPROPS:break;// unknown - ignored
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
        //metafilepict
        case NS_rtf::LN_MM:
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
//      according to the documentation 99 or 98 are provided - but they are not!
//            m_pImpl->bIsBitmap = 99 == nIntValue ? true : false;
//            m_pImpl->bIsTiff = 98 == nIntValue ? true : false;

        break; //mapmode
        case NS_rtf::LN_XEXT: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->setXSize(nIntValue);
            break; // x-size
        case NS_rtf::LN_YEXT: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->setYSize(nIntValue);
            break; // y-size
        case NS_rtf::LN_HMF: break; //identifier - ignored
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */

        //sprm 0xf004 and 0xf008, 0xf00b
        case NS_rtf::LN_dfftype://
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            m_pImpl->nDffType = nIntValue;
        break;
        case NS_rtf::LN_dffinstance:
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            //todo: does this still work for PICF?
            //in case of LN_dfftype == 0xf01f the instance contains the bitmap type:
            if(m_pImpl->nDffType == 0xf01f)
                switch( nIntValue )
                {
                    case 0x216 :            // Metafile header then compressed WMF

                    case 0x3D4 :           // Metafile header then compressed EMF

                    case 0x542 :            // Metafile hd. then compressed PICT

                    {

//                        rBLIPStream.SeekRel( nSkip + 20 );
//                        // read in size of metafile in EMUS
//                        rBLIPStream >> aMtfSize100.Width() >> aMtfSize100.Height();
//                        // scale to 1/100mm
//                        aMtfSize100.Width() /= 360, aMtfSize100.Height() /= 360;
//                        if ( pVisArea )     // seem that we currently are skipping the visarea position
//                            *pVisArea = Rectangle( Point(), aMtfSize100 );
//                        // skip rest of header
//                        nSkip = 6;
//                        bMtfBLIP = bZCodecCompression = TRUE;
                    }

                    break;

                    case 0x46A :            break;// One byte tag then JPEG (= JFIF) data

                    case 0x6E0 :            break;// One byte tag then PNG data

                    case 0x7A8 : m_pImpl->bIsBitmap = true;
//                        nSkip += 1;         // One byte tag then DIB data
                    break;

                }
        break;
        case NS_rtf::LN_dffversion://  ignored
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        break;

        //sprm 0xf008
        case NS_rtf::LN_shptype:        
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpid:          
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpfGroup:
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// This shape is a group shape
        case NS_rtf::LN_shpfChild:      
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Not a top-level shape
        case NS_rtf::LN_shpfPatriarch:  
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// This is the topmost group shape. Exactly one of these per drawing.
        case NS_rtf::LN_shpfDeleted:    
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// The shape has been deleted
        case NS_rtf::LN_shpfOleShape:   
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// The shape is an OLE object
        case NS_rtf::LN_shpfHaveMaster: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Shape has a hspMaster property
        case NS_rtf::LN_shpfFlipH:       // Shape is flipped horizontally
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->bHoriFlip = nIntValue ? true : false;
        break;
        case NS_rtf::LN_shpfFlipV:       // Shape is flipped vertically
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->bVertFlip = nIntValue ? true : false;
        break;
        case NS_rtf::LN_shpfConnector:   
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Connector type of shape
        case NS_rtf::LN_shpfHaveAnchor:  
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Shape has an anchor of some kind
        case NS_rtf::LN_shpfBackground:  
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Background shape
        case NS_rtf::LN_shpfHaveSpt:     
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// Shape has a shape type property
        case NS_rtf::LN_shptypename: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;// shape type name
        case NS_rtf::LN_shppid:     
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nShapeOptionType = nIntValue; 
            break; //type of shape option
        case NS_rtf::LN_shpfBid:    
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            break; //ignored
        case NS_rtf::LN_shpfComplex:
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpop:
            /* WRITERFILTERSTATUS: done: 50, planned: 10, spent: 5 */
        {
            if(NS_dff::LN_shpwzDescription != sal::static_int_cast<Id>(m_pImpl->nShapeOptionType) )
                ProcessShapeOptions( val );
        }
        break;
        case NS_rtf::LN_shpname:    
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpvalue:
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        {
            if( NS_dff::LN_shpwzDescription == sal::static_int_cast<Id>(m_pImpl->nShapeOptionType) )
                ProcessShapeOptions( val );
        }
        break;

        //BLIP store entry
        case NS_rtf::LN_shpbtWin32: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpbtMacOS: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shprgbUid:  
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shptag:     
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpsize:    
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpcRef:    
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpfoDelay: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpusage:   
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpcbName:  
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpunused2: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_shpunused3: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;

        //border properties
        case NS_rtf::LN_shpblipbname : 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        break;

        case NS_rtf::LN_DPTLINEWIDTH:  // 0x1759
        /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */
            m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineWidth = nIntValue;
        break;
        case NS_rtf::LN_BRCTYPE:   // 0x175a
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            //graphic borders don't support different line types
            //m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineType = nIntValue;
        break;
        case NS_rtf::LN_ICO:   // 0x175b
        /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */
            m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineColor = ConversionHelper::ConvertColor( nIntValue );
        break;
        case NS_rtf::LN_DPTSPACE:  // 0x175c
        /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */
            m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineDistance = nIntValue;
        break;
        case NS_rtf::LN_FSHADOW:   // 0x175d
        /* WRITERFILTERSTATUS: done: 0, planned: 1, spent: 0 */
            m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue ? true : false;
        break;
        case NS_rtf::LN_FFRAME:            // ignored
        /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
        case NS_rtf::LN_UNUSED2_15: // ignored
        /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            break;

        case NS_rtf::LN_SPID: 
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            break;
        case NS_rtf::LN_XALEFT: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue); 
            break; //left position
        case NS_rtf::LN_YATOP:  
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue); 
            break; //top position
        case NS_rtf::LN_XARIGHT:  
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nRightPosition = ConversionHelper::convertTwipToMM100(nIntValue); 
            break; //right position
        case NS_rtf::LN_YABOTTOM: 
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            m_pImpl->nBottomPosition = ConversionHelper::convertTwipToMM100(nIntValue); 
            break;//bottom position
        case NS_rtf::LN_FHDR:
        case NS_rtf::LN_XAlign:
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
/*
        static const SwHoriOrient aHoriOriTab[ nCntXAlign ] =
        {
            HORI_NONE,     // From left position
            HORI_LEFT,     // left
            HORI_CENTER,   // centered
            HORI_RIGHT,    // right
            // --> OD 2004-12-06 #i36649#
            // - inside -> HORI_LEFT and outside -> HORI_RIGHT
            HORI_LEFT,   // inside
            HORI_RIGHT   // outside
*/
            if( nIntValue < 6 && nIntValue > 0 )
            {
                static const sal_Int16 aHoriOrientTab[ 6 ] =
                {
                    text::HoriOrientation::NONE,
                    text::HoriOrientation::LEFT,
                    text::HoriOrientation::CENTER,
                    text::HoriOrientation::RIGHT,
                    text::HoriOrientation::INSIDE,
                    text::HoriOrientation::OUTSIDE
                };
                m_pImpl->nHoriOrient = aHoriOrientTab[nIntValue];
                m_pImpl->bPageToggle = nIntValue > 3;
            }
        break;
        case NS_rtf::LN_YAlign:
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
/*
        static const SwVertOrient aVertOriTab[ nCntYAlign ] =
        {
            VERT_NONE,         // From Top position
            VERT_TOP,          // top
            VERT_CENTER,       // centered
            VERT_BOTTOM,       // bottom
            VERT_LINE_TOP,     // inside (obscure)
            VERT_LINE_BOTTOM   // outside (obscure)
        };
        // CMC,OD 24.11.2003 #i22673# - to-line vertical alignment
        static const SwVertOrient aToLineVertOriTab[ nCntYAlign ] =
        {
            VERT_NONE,         // below
            VERT_LINE_BOTTOM,  // top
            VERT_LINE_CENTER,  // centered
            VERT_LINE_TOP,     // bottom
            VERT_LINE_BOTTOM,  // inside (obscure)
            VERT_LINE_TOP      // outside (obscure)
        };
        if ( eVertRel == REL_VERT_LINE ) //m_pImpl->nVertRelation == text::RelOrientation::TEXT_LINE
        {
            eVertOri = aToLineVertOriTab[ nYAlign ];
        }
        else
        {
            eVertOri = aVertOriTab[ nYAlign ];
        }

*/
            if( nIntValue < 6 && nIntValue > 0)
            {
                static const sal_Int16 aVertOrientTab[ 6 ] =
                {
                    text::VertOrientation::NONE,         // From Top position
                    text::VertOrientation::TOP,          // top
                    text::VertOrientation::CENTER,       // centered
                    text::VertOrientation::BOTTOM,       // bottom
                    text::VertOrientation::LINE_TOP,     // inside (obscure)
                    text::VertOrientation::LINE_BOTTOM   // outside (obscure)
                };
                static const sal_Int16 aToLineVertOrientTab[ 6 ] =
                {
                    text::VertOrientation::NONE,         // below
                    text::VertOrientation::LINE_BOTTOM,  // top
                    text::VertOrientation::LINE_CENTER,  // centered
                    text::VertOrientation::LINE_TOP,     // bottom
                    text::VertOrientation::LINE_BOTTOM,  // inside (obscure)
                    text::VertOrientation::LINE_TOP      // outside (obscure)
                };
                m_pImpl->nVertOrient = m_pImpl->nVertRelation == text::RelOrientation::TEXT_LINE ?
                    aToLineVertOrientTab[nIntValue] : aVertOrientTab[nIntValue];
            }
        break;
        case NS_rtf::LN_LayoutInTableCell: break; //currently unknown
        case NS_rtf::LN_XRelTo:
        case NS_rtf::LN_BX: //hori orient relation
            switch( nIntValue )
            {
                case  0: m_pImpl->nHoriRelation = text::RelOrientation::PAGE_PRINT_AREA; break;
                case  1: m_pImpl->nHoriRelation = text::RelOrientation::PAGE_FRAME; break;
                case  2: m_pImpl->nHoriRelation = text::RelOrientation::FRAME; break;
                //case  :
                default:m_pImpl->nHoriRelation = text::RelOrientation::CHAR;
            }
        break;
        case NS_rtf::LN_YRelTo:
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        case NS_rtf::LN_BY: //vert orient relation
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            switch( nIntValue )
            {
                case  0: m_pImpl->nVertRelation = text::RelOrientation::PAGE_PRINT_AREA; break;
                case  1: m_pImpl->nVertRelation = text::RelOrientation::PAGE_FRAME; break;
                case  2: m_pImpl->nVertRelation = text::RelOrientation::FRAME; break;
                //case  :
                default:m_pImpl->nVertRelation = text::RelOrientation::TEXT_LINE;
            }

        break;
        case NS_rtf::LN_WR: //wrapping
        /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            switch( nIntValue )
            {
                case 0: //0 like 2, but doesn't require absolute object
                    m_pImpl->bIgnoreWRK = false;
                case 2: //2 wrap around absolute object
                    m_pImpl->nWrap = text::WrapTextMode_PARALLEL;
                    break;
                case 1: //1 no text next to shape
                    m_pImpl->nWrap = text::WrapTextMode_NONE;
                    break;
                case 3: //3 wrap as if no object present
                    m_pImpl->nWrap = text::WrapTextMode_THROUGHT;
                    break;
                case 4: //4 wrap tightly around object
                    m_pImpl->bIgnoreWRK = false;
                case 5: //5 wrap tightly, but allow holes
                    m_pImpl->nWrap = text::WrapTextMode_PARALLEL;
                    m_pImpl->bContour = true;
                break;
                default:;
            }
        break;
        case NS_rtf::LN_WRK:
        /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
            if( !m_pImpl->bIgnoreWRK )
                switch( nIntValue )
                {
                    case 0: //0 like 2, but doesn't require absolute object
                    case 2: //2 wrap around absolute object
                        m_pImpl->nWrap = text::WrapTextMode_PARALLEL;
                        break;
                    case 1: //1 no text next to shape
                        m_pImpl->nWrap = text::WrapTextMode_NONE;
                        break;
                    case 3: //3 wrap as if no object present
                        m_pImpl->nWrap = text::WrapTextMode_THROUGHT;
                        break;
                    case 4: //4 wrap tightly around object
                    case 5: //5 wrap tightly, but allow holes
                        m_pImpl->nWrap = text::WrapTextMode_PARALLEL;
                        m_pImpl->bContour = true;
                    break;
                    default:;
                }
        break;
        case NS_rtf::LN_FRCASIMPLE:
        case NS_rtf::LN_FBELOWTEXT:
        case NS_rtf::LN_FANCHORLOCK:
        case NS_rtf::LN_CTXBX:
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
//        {
//            sal_Int32 nValue1 = val.getInt();
//            nValue1++;
//        }
        break;
        case NS_rtf::LN_shptxt:
        /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            //todo: text content
        break;
    /*    case NS_rtf::LN_CH = 10421;
        case NS_rtf::LN_UNUSED0_5 = 10422;
        case NS_rtf::LN_FLT = 10423;
        case NS_rtf::LN_shpLeft = 10424;
        case NS_rtf::LN_shpTop = 10425;
            break;*/
        case NS_rtf::LN_dffheader: break;
        case NS_ooxml::LN_CT_PositiveSize2D_cx:// 90407;
        case NS_ooxml::LN_CT_PositiveSize2D_cy:// 90408;
            /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
        {
            sal_Int32 nDim = ConversionHelper::convertEMUToMM100( nIntValue );
            if( nName == NS_ooxml::LN_CT_PositiveSize2D_cx )
                m_pImpl->setXSize(nDim);
            else
                m_pImpl->setYSize(nDim);
        }        
        break;
        case NS_ooxml::LN_CT_EffectExtent_l:// 90907;
        case NS_ooxml::LN_CT_EffectExtent_t:// 90908;
        case NS_ooxml::LN_CT_EffectExtent_r:// 90909;
        case NS_ooxml::LN_CT_EffectExtent_b:// 90910;
            /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
            //todo: extends the wrapping size of the object, e.g. if shadow is added
        break;
        case NS_ooxml::LN_CT_NonVisualDrawingProps_id:// 90650;
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            //id of the object - ignored
        break;
        case NS_ooxml::LN_CT_NonVisualDrawingProps_name:// 90651;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            //name of the object
            m_pImpl->sName = val.getString();
        break;
        case NS_ooxml::LN_CT_NonVisualDrawingProps_descr:// 90652;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            //alternative text
            m_pImpl->sAlternativeText = val.getString();
        break;
        case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noChangeAspect://90644;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            //disallow aspect ratio change - ignored
        break;
        case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noMove:// 90645;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            m_pImpl->bPositionProtected = true;
        break;
        case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noResize: // 90646;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            m_pImpl->bSizeProtected = true;
        break;
        case NS_ooxml::LN_CT_Anchor_distT: // 90983;
        case NS_ooxml::LN_CT_Anchor_distB: // 90984;
        case NS_ooxml::LN_CT_Anchor_distL: // 90985;
        case NS_ooxml::LN_CT_Anchor_distR: // 90986;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
        {
            //redirect to shape option processing
            switch( nName )
            {
                case NS_ooxml::LN_CT_Anchor_distT: // 90983;
                    /* WRITERFILTERSTATUS: */
                    m_pImpl->nShapeOptionType = NS_dff::LN_shpdyWrapDistTop;
                break;
                case NS_ooxml::LN_CT_Anchor_distB: // 90984;
                    /* WRITERFILTERSTATUS: */
                    m_pImpl->nShapeOptionType = NS_dff::LN_shpdyWrapDistBottom;
                break;
                case NS_ooxml::LN_CT_Anchor_distL: // 90985;
                    /* WRITERFILTERSTATUS: */
                    m_pImpl->nShapeOptionType = NS_dff::LN_shpdxWrapDistLeft;
                break;
                case NS_ooxml::LN_CT_Anchor_distR: // 90986;
                    /* WRITERFILTERSTATUS: */
                    m_pImpl->nShapeOptionType = NS_dff::LN_shpdxWrapDistRight;
                break;
                //m_pImpl->nShapeOptionType = NS_dff::LN_shpcropFromTop
                default: ;
            }
            ProcessShapeOptions(val);
        }        
        break;
        case NS_ooxml::LN_CT_Anchor_simplePos_attr: // 90987;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            m_pImpl->bUseSimplePos = nIntValue > 0;
        break;
        case NS_ooxml::LN_CT_Anchor_relativeHeight: // 90988;
            /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
            //z-order
        break;
        case NS_ooxml::LN_CT_Anchor_behindDoc: // 90989; - in background
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            if( nIntValue > 0 )
                    m_pImpl->bOpaque = false;
        break;
        case NS_ooxml::LN_CT_Anchor_locked: // 90990; - ignored
        case NS_ooxml::LN_CT_Anchor_layoutInCell: // 90991; - ignored
        case NS_ooxml::LN_CT_Anchor_hidden: // 90992; - ignored
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
        break;
        case NS_ooxml::LN_CT_Anchor_allowOverlap: // 90993;
            /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
            //enable overlapping - ignored
        break;
        case NS_ooxml::LN_CT_Point2D_x: // 90405;
        case NS_ooxml::LN_CT_Point2D_y: // 90406;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            if( m_pImpl->bUseSimplePos )
            {
                //todo: absolute positioning
                NS_ooxml::LN_CT_Point2D_x == nName ? m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue) : 
                                                        m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue);
                
            }    
        break;
        case NS_ooxml::LN_CT_WrapTight_wrapText: // 90934;         
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            m_pImpl->bContour = true;
            m_pImpl->bContourOutside = true;

            handleWrapTextValue(val.getInt());
            
            break;
        case NS_ooxml::LN_CT_WrapThrough_wrapText:
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            m_pImpl->bContour = true;
            m_pImpl->bContourOutside = false;

            handleWrapTextValue(val.getInt());
            
            break;
        case NS_ooxml::LN_CT_WrapSquare_wrapText: //90928;
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            
            handleWrapTextValue(val.getInt());
            break;
        case NS_ooxml::LN_shape:
            /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
            {
                uno::Reference< drawing::XShape> xShape;
                val.getAny( ) >>= xShape;

                if ( xShape.is( ) )
                {                
                    // Is it a graphic image
                    bool bUseShape = true;
                    try
                    {
                        uno::Reference< beans::XPropertySet > xShapeProps
                            ( xShape, uno::UNO_QUERY_THROW );
    
                        rtl::OUString sUrl;
                        xShapeProps->getPropertyValue( rtl::OUString::createFromAscii( "GraphicURL" ) ) >>= sUrl;
    
                        ::com::sun::star::beans::PropertyValues aMediaProperties( 1 );
                        aMediaProperties[0].Name = rtl::OUString::createFromAscii( "URL" );
                        aMediaProperties[0].Value <<= sUrl;
    
                        m_xGraphicObject = createGraphicObject( aMediaProperties );
    
                        bUseShape = !m_xGraphicObject.is( );

                        if ( !bUseShape )
                        {
                            // Define the object size
                            uno::Reference< beans::XPropertySet > xGraphProps( m_xGraphicObject, 
                                    uno::UNO_QUERY );
                            awt::Size aSize = xShape->getSize( );
                            xGraphProps->setPropertyValue( rtl::OUString::createFromAscii( "Height" ),
                                   uno::makeAny( aSize.Height ) );
                            xGraphProps->setPropertyValue( rtl::OUString::createFromAscii( "Width" ),
                                   uno::makeAny( aSize.Width ) );

                            {
                                text::GraphicCrop aGraphicCrop( 0, 0, 0, 0 );
                                uno::Reference< beans::XPropertySet > xSourceGraphProps( xShape, uno::UNO_QUERY );
                                uno::Any aAny = xSourceGraphProps->getPropertyValue( rtl::OUString::createFromAscii("GraphicCrop"));
                                if ( aAny >>= aGraphicCrop )
                                {
                                    xGraphProps->setPropertyValue(
                                        rtl::OUString::createFromAscii("GraphicCrop"),
                                        uno::makeAny( aGraphicCrop ) );
                                }
                            }
                        }
                    }
                    catch( const beans::UnknownPropertyException e )
                    {
                        (void) e;
                        // It isn't a graphic image
                    }
    
                    if ( bUseShape )
                        m_xShape = xShape;

                   
                    if ( m_xShape.is( ) )
                    { 
                        uno::Reference< beans::XPropertySet > xShapeProps
                            (m_xShape, uno::UNO_QUERY_THROW);
                     
    
                        PropertyNameSupplier& rPropNameSupplier = 
                            PropertyNameSupplier::GetPropertyNameSupplier();
                        xShapeProps->setPropertyValue
                            (rPropNameSupplier.GetName(PROP_ANCHOR_TYPE),
                             uno::makeAny
                             (text::TextContentAnchorType_AS_CHARACTER));
                        xShapeProps->setPropertyValue
                            (rPropNameSupplier.GetName(PROP_TEXT_RANGE),
                             uno::makeAny
                             (m_pImpl->rDomainMapper.GetCurrentTextRange()));
    
                        awt::Point aPoint(m_xShape->getPosition());
                        awt::Size aSize(m_xShape->getSize());
    
                        if (m_pImpl->isXSizeValid())
                            aSize.Width = m_pImpl->getXSize();
                        if (m_pImpl->isYSizeValis())
                            aSize.Height = m_pImpl->getYSize();
    
                        m_xShape->setSize(aSize);
    
                        m_pImpl->bIsGraphic = true;
                    }
                }
            }
        break;
        case NS_ooxml::LN_CT_Inline_distT:
        case NS_ooxml::LN_CT_Inline_distB:
        case NS_ooxml::LN_CT_Inline_distL:
        case NS_ooxml::LN_CT_Inline_distR:
            /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
            //TODO: need to be handled
        break;
        case NS_ooxml::LN_CT_GraphicalObjectData_uri:
            /* WRITERFILTERSTATUS: done: 50, planned: 0.5, spent: 0 */
            val.getString();
            //TODO: does it need to be handled?
        break;
        default:
#ifdef DEBUG_DOMAINMAPPER
            dmapper_logger->element("GraphicImport.unhandled");
#endif               
            ;
    }
}