diff options
author | Steve Yin <steve_y@apache.org> | 2014-01-27 10:52:11 +0000 |
---|---|---|
committer | Steve Yin <steve_y@apache.org> | 2014-01-27 10:52:11 +0000 |
commit | c5e03eac50d6c20e41aa4e60cf46c898653329d1 (patch) | |
tree | 69ad37be1de2c9d41f5a6875433fb65ebf952411 /sw | |
parent | 5a6328c974bbb02db8b0f1dc9c1579469eb8afad (diff) |
Bug 123745 - [IA2] Eventual crash in Writer documents containing cross-references
Removed some unused lines and comments
Notes
Notes:
merged as: ca59c9f3ec5a5e4a68cba6d0393908953891f851
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/accpara.cxx | 73 |
1 files changed, 6 insertions, 67 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index cc8d55d6ed03..54c27d6d23e1 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1898,11 +1898,11 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes( { 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::_getSupplementalAttributesImpl( 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::getHyperLinkCount() 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 > SAL_CALL 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::getHyperLinkIndex( sal_Int32 nCharInde 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::getAccessibleRole (void) throw (::com: } } -// 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::GetRealHeadingLevel() ::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); |