[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source
Steve Yin
steve_y at apache.org
Mon Jan 27 04:07:54 PST 2014
sw/source/core/access/accpara.cxx | 73 +++-----------------------------------
1 file changed, 6 insertions(+), 67 deletions(-)
New commits:
commit c5e03eac50d6c20e41aa4e60cf46c898653329d1
Author: Steve Yin <steve_y at apache.org>
Date: Mon Jan 27 10:52:11 2014 +0000
Bug 123745 - [IA2] Eventual crash in Writer documents containing cross-references
Removed some unused lines and comments
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index cc8d55d..54c27d6 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);
More information about the Libreoffice-commits
mailing list