Kaydet (Commit) 4ab979fc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Document::retrieveDefaultAttributesImpl did nothing

...ever since dac3b388 "INTEGRATION: CWS
a11ysep"

Change-Id: I1bba12e9f6ab69cf561a7eda010cefba91c47a49
üst a4a1467b
...@@ -407,15 +407,6 @@ public: ...@@ -407,15 +407,6 @@ public:
Paragraph const * pParagraph, ::sal_Int32 nIndex, Paragraph const * pParagraph, ::sal_Int32 nIndex,
const css::uno::Sequence< OUString >& aRequestedAttributes); const css::uno::Sequence< OUString >& aRequestedAttributes);
// Must be called only after init has been called.
// To make it possible for this method to be (indirectly) called from
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
// still zero), pass a "Paragraph const &" instead of a
// "::rtl::Reference< Paragraph > const &".
css::uno::Sequence< css::beans::PropertyValue > retrieveDefaultAttributes(
Paragraph const * pParagraph,
const css::uno::Sequence< OUString >& RequestedAttributes);
// Must be called only after init has been called. // Must be called only after init has been called.
// To make it possible for this method to be (indirectly) called from // To make it possible for this method to be (indirectly) called from
// within Paragraph's constructor (i.e., when the Paragraph's ref count is // within Paragraph's constructor (i.e., when the Paragraph's ref count is
...@@ -563,11 +554,6 @@ private: ...@@ -563,11 +554,6 @@ private:
static ::FontWeight mapFontWeight(css::uno::Any const & rWeight); static ::FontWeight mapFontWeight(css::uno::Any const & rWeight);
static void retrieveDefaultAttributesImpl(
Paragraph const * pParagraph,
const css::uno::Sequence< OUString >& RequestedAttributes,
tPropValMap& rDefAttrSeq);
void retrieveRunAttributesImpl( void retrieveRunAttributesImpl(
Paragraph const * pParagraph, ::sal_Int32 Index, Paragraph const * pParagraph, ::sal_Int32 Index,
const css::uno::Sequence< OUString >& RequestedAttributes, const css::uno::Sequence< OUString >& RequestedAttributes,
......
...@@ -489,10 +489,10 @@ sal_Bool SAL_CALL Paragraph::setText(OUString const & rText) ...@@ -489,10 +489,10 @@ sal_Bool SAL_CALL Paragraph::setText(OUString const & rText)
// virtual // virtual
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
Paragraph::getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes) Paragraph::getDefaultAttributes(const css::uno::Sequence< OUString >&)
{ {
checkDisposed(); checkDisposed();
return m_xDocument->retrieveDefaultAttributes( this, RequestedAttributes ); return {}; // default attributes are not supported by text engine
} }
// virtual // virtual
...@@ -1017,21 +1017,10 @@ Document::retrieveCharacterAttributes( ...@@ -1017,21 +1017,10 @@ Document::retrieveCharacterAttributes(
" Document::retrieveCharacterAttributes", " Document::retrieveCharacterAttributes",
static_cast< css::uno::XWeak * >(this)); static_cast< css::uno::XWeak * >(this));
// retrieve default attributes
tPropValMap aCharAttrSeq;
retrieveDefaultAttributesImpl( pParagraph, aRequestedAttributes, aCharAttrSeq );
// retrieve run attributes // retrieve run attributes
tPropValMap aRunAttrSeq; tPropValMap aCharAttrSeq;
retrieveRunAttributesImpl( pParagraph, nIndex, aRequestedAttributes, aRunAttrSeq ); retrieveRunAttributesImpl( pParagraph, nIndex, aRequestedAttributes, aCharAttrSeq );
// merge default and run attributes
for ( tPropValMap::const_iterator aRunIter = aRunAttrSeq.begin();
aRunIter != aRunAttrSeq.end();
++aRunIter )
{
aCharAttrSeq[ aRunIter->first ] = aRunIter->second;
}
css::beans::PropertyValue* pValues = aAttribs.getArray(); css::beans::PropertyValue* pValues = aAttribs.getArray();
for (i = 0; i < AttributeCount; i++,pValues++) for (i = 0; i < AttributeCount; i++,pValues++)
...@@ -1059,30 +1048,6 @@ Document::retrieveCharacterAttributes( ...@@ -1059,30 +1048,6 @@ Document::retrieveCharacterAttributes(
return aNewValues; return aNewValues;
} }
void Document::retrieveDefaultAttributesImpl(
Paragraph const * pParagraph,
const css::uno::Sequence< OUString >& RequestedAttributes,
tPropValMap& rDefAttrSeq)
{
// default attributes are not supported by text engine
(void) pParagraph;
(void) RequestedAttributes;
(void) rDefAttrSeq;
}
css::uno::Sequence< css::beans::PropertyValue >
Document::retrieveDefaultAttributes(
Paragraph const * pParagraph,
const css::uno::Sequence< OUString >& RequestedAttributes)
{
SolarMutexGuard aGuard;
::osl::MutexGuard aInternalGuard( GetMutex() );
tPropValMap aDefAttrSeq;
retrieveDefaultAttributesImpl( pParagraph, RequestedAttributes, aDefAttrSeq );
return comphelper::mapValuesToSequence( aDefAttrSeq );
}
void Document::retrieveRunAttributesImpl( void Document::retrieveRunAttributesImpl(
Paragraph const * pParagraph, ::sal_Int32 Index, Paragraph const * pParagraph, ::sal_Int32 Index,
const css::uno::Sequence< OUString >& RequestedAttributes, const css::uno::Sequence< OUString >& RequestedAttributes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment