Author: steve_y
Date: Mon Jan 27 10:52:11 2014
New Revision: 1561632

URL: http://svn.apache.org/r1561632
Log:
Bug 123745 - [IA2] Eventual crash in Writer documents containing 
cross-references

Removed some unused lines and comments

Modified:
    openoffice/trunk/main/sw/source/core/access/accpara.cxx

Modified: openoffice/trunk/main/sw/source/core/access/accpara.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/access/accpara.cxx?rev=1561632&r1=1561631&r2=1561632&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/access/accpara.cxx (original)
+++ openoffice/trunk/main/sw/source/core/access/accpara.cxx Mon Jan 27 10:52:11 
2014
@@ -1898,11 +1898,11 @@ uno::Sequence<PropertyValue> SwAccessibl
                {               
                        aValues.realloc( aValues.getLength() + 1 );
                        pValues = aValues.getArray();
-                       rValue = pValues[aValues.getLength() - 1];
-                       rValue.Name = OUString::createFromAscii("FieldType");
-                       rValue.Value <<= 
rtl::OUString(strTypeName.ToLowerAscii());
-                       rValue.Handle = -1;
-                       rValue.State = PropertyState_DIRECT_VALUE;
+                       PropertyValue& rValueFT = pValues[aValues.getLength() - 
1];
+                       rValueFT.Name = OUString::createFromAscii("FieldType");
+                       rValueFT.Value <<= 
rtl::OUString(strTypeName.ToLowerAscii());
+                       rValueFT.Handle = -1;
+                       rValueFT.State = PropertyState_DIRECT_VALUE;
                }
 
                //sort property values
@@ -2368,9 +2368,6 @@ void SwAccessibleParagraph::_getSuppleme
 
        tAccParaPropValMap aSupplementalAttrSeq;
     {
-//        const SfxItemPropertySet& rPropSet =
-//                    aSwMapProvider.GetPropertyMap( 
PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE );
-//        const SfxItemPropertyMap* pPropMap( rPropSet.getPropertyMap() );
         const SfxItemPropertyMapEntry* pPropMap( 
                 aSwMapProvider.GetPropertyMapEntries( 
PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
         while ( pPropMap->pName )
@@ -3415,14 +3412,6 @@ sal_Int32 SAL_CALL SwAccessibleParagraph
                        nCount++;
        }
 
-       /* Can't fin the function "GetTOCFirstWordEndIndex" declaration in 
sym2.0 (Added by yanjun)
-       if( GetTOXSortTabBase()  )
-       {
-               SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());        
-               if(pNode && pNode->GetTOCFirstWordEndIndex() > 0)
-                       nCount++; 
-       }
-       */
        return nCount;
 }
 
@@ -3451,8 +3440,6 @@ uno::Reference< XAccessibleHyperlink > S
                pNode = const_cast<SwTxtNode*>(GetTxtNode());
        }
        nTOCEndIndex = -1;
-       //if(pNode)
-       //      nTOCEndIndex = pNode->GetTOCFirstWordEndIndex();
        SwTxtAttr* pHt = (SwTxtAttr*)(aHIter.next());
        while( (nLinkIndex < getHyperLinkCount()) && nTIndex < nLinkIndex)
        {
@@ -3670,14 +3657,6 @@ sal_Int32 SAL_CALL SwAccessibleParagraph
                if( pHt )
                        nRet = nPos;
        }
-       /* Added by yanjun for acc miagration
-       if( nRet == -1 && GetTOXSortTabBase() )
-       {
-               SwTxtNode* pNode = const_cast<SwTxtNode*>(GetTxtNode());        
-               if( nCharIndex >= 0 && nCharIndex < 
pNode->GetTOCFirstWordEndIndex())
-                       nRet = 0;
-       }
-       */
 
        if (nRet == -1)
                throw lang::IndexOutOfBoundsException();
@@ -4250,45 +4229,6 @@ sal_Int16 SAL_CALL SwAccessibleParagraph
        }
 }
 
-// End Add
-
-
-/* This funcion is already defined in accpara.cxx(Added by yanjun)
-sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground() 
-               throw (::com::sun::star::uno::RuntimeException)
-{
-// Test Code
-//     Sequence<OUString> seNames(1);
-//     OUString* pStrings = seNames.getArray();
-//     pStrings[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("ParaBackColor"));
-// 
-//     Sequence<Any> aAnys(1);
-//     Reference<XMultiPropertySet> xPortion = CreateUnoPortion( 0, 0 );
-//     aAnys = xPortion->getPropertyValues( seNames );
-//     const Any* pAnys = aAnys.getConstArray();
-// 
-//     sal_uInt32 crColorT=0;
-//     pAnys[0] >>= crColorT;
-// End Test Code
-
-       const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
-       sal_uInt32 crBack = rBack.GetColor().GetColor();
-       
-       if (COL_AUTO == crBack)
-       {
-               Reference<XAccessible> xAccDoc = getAccessibleParent();
-               if (xAccDoc.is())
-               {
-                       Reference<XAccessibleComponent> 
xCompoentDoc(xAccDoc,UNO_QUERY);
-                       if (xCompoentDoc.is())
-                       {
-                               crBack = 
(sal_uInt32)xCompoentDoc->getBackground();
-                       }
-               }
-       }
-       return crBack;
-}
-*/
 
 //Get the real heading level, Heading1 ~ Heading10
 sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
@@ -4299,8 +4239,7 @@ sal_Int32 SwAccessibleParagraph::GetReal
     ::rtl::OUString sValue;
        if (styleAny >>= sValue)
        {
-               //Modified by yanjun for acc migration
-               sal_Int32 length = sValue.getLength/*GetCharCount*/();
+               sal_Int32 length = sValue.getLength();
                if (length == 9 || length == 10)
                {
             ::rtl::OUString headStr = sValue.copy(0, 7);


Reply via email to