summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx13
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx4
3 files changed, 7 insertions, 18 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 6b0663ad5d07..b1c26144ba90 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -660,19 +660,17 @@ const OUString DomainMapper_Impl::GetCurrentParaStyleName()
}
/*-------------------------------------------------------------------------
- returns a the value from the current paragraph style - if available
- TODO: What about parent styles?
+ returns the value from the current paragraph style - if available
-----------------------------------------------------------------------*/
uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
{
StyleSheetEntryPtr pEntry;
if( m_bInStyleSheetImport )
- pEntry = GetStyleSheetTable()->FindParentStyleSheet(OUString());
+ pEntry = GetStyleSheetTable()->GetCurrentEntry();
else
pEntry = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(GetCurrentParaStyleName());
while(pEntry.get( ) )
{
- //is there a tab stop set?
if(pEntry->pProperties)
{
boost::optional<PropertyMap::Property> aProperty =
@@ -683,7 +681,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
}
}
//search until the property is set or no parent is available
- StyleSheetEntryPtr pNewEntry = GetStyleSheetTable()->FindParentStyleSheet(pEntry->sBaseStyleIdentifier);
+ StyleSheetEntryPtr pNewEntry = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
SAL_WARN_IF( pEntry == pNewEntry, "writerfilter.dmapper", "circular loop in style hierarchy?");
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 188359b4b38a..ad1aa6e148b5 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1280,18 +1280,9 @@ const StyleSheetEntryPtr StyleSheetTable::FindDefaultParaStyle()
return pRet;
}
-const StyleSheetEntryPtr StyleSheetTable::FindParentStyleSheet(const OUString& _sBaseStyle)
+const StyleSheetEntryPtr StyleSheetTable::GetCurrentEntry()
{
- if( _sBaseStyle.isEmpty() )
- {
- StyleSheetEntryPtr pEmptyPtr;
- return pEmptyPtr;
- }
- OUString sBaseStyle = _sBaseStyle;
- if( m_pImpl->m_pCurrentEntry)
- sBaseStyle = m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier;
-
- return FindStyleSheetByISTD( sBaseStyle );
+ return m_pImpl->m_pCurrentEntry;
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 8f045b65102e..1d461401055e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -92,8 +92,6 @@ public:
const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
const StyleSheetEntryPtr FindDefaultParaStyle();
- // returns the parent of the one with the given name - if empty the parent of the current style sheet is returned
- const StyleSheetEntryPtr FindParentStyleSheet(const OUString& sBaseStyle);
OUString ConvertStyleName( const OUString& rWWName, bool bExtendedSearch = false );
@@ -102,6 +100,8 @@ public:
/// Returns the default character properties.
PropertyMapPtr const & GetDefaultCharProps();
+ const StyleSheetEntryPtr GetCurrentEntry();
+
private:
// Properties
virtual void lcl_attribute(Id Name, Value & val) override;