summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-02-20 08:13:50 +0100
committerJustin Luth <jluth@mail.com>2023-05-19 03:23:04 +0200
commitea16ea036fa9847ca65a951f483f3e25dfc9ec49 (patch)
tree732ca4ec0950d8efcb3cccd0d8e5308f7b2f3ef9 /writerfilter
parentdc3d0f58f1dfff8082e4faf0916103b6557f4079 (diff)
writerfilter: prefix members of DomainMapper_Impl, EmbeddedFontHandler, ...
... GraphicImport_Impl and StyleSheetEntry See tdf#94879 for motivation. This cherry-picked cleanly from master except for writerfilter/source/dmapper/GraphicImport.cxx which had a couple of mstahl commits already merged. So, the question is whether I go ahead with this full cherry-pick, or do I just attempt to limit it to StyleSheetTable and its dependencies. If I do this, then any 7.6 commit BEFORE Mon Feb 20 08:13:50 2023 that still needs to be backported will run into trouble, while now any commit AFTER that date will run into trouble. Well, Collabora has made most of the changes to these files in the past few months, so I assume most of those have already been backported. A few made by allotropia have also already been backported. So, I think the best is to just go ahead and backport this full commit. I need at least DomainMapper_Impl and StyleSheetTable for my own purposes, so that already counts for about half of it. Change-Id: I83639c40fb8c32c1d205a9b53d24409f9a5a5a15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147307 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151967 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx10
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx76
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx4
-rw-r--r--writerfilter/source/dmapper/FontTable.cxx22
-rw-r--r--writerfilter/source/dmapper/FontTable.hxx10
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx643
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx12
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx232
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx30
10 files changed, 522 insertions, 519 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 28e3df63ca3c..ca6a3026f19c 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1788,7 +1788,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
if ( IsStyleSheetImport() )
{
const StyleSheetEntryPtr pCurrStyle = GetStyleSheetTable()->GetCurrentEntry();
- if ( pCurrStyle && pCurrStyle->nStyleTypeCode == STYLE_TYPE_CHAR )
+ if ( pCurrStyle && pCurrStyle->m_nStyleTypeCode == STYLE_TYPE_CHAR )
break;
}
@@ -2512,7 +2512,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
// First check if the style exists in the document.
StyleSheetEntryPtr pEntry = m_pImpl->GetStyleSheetTable( )->FindStyleSheetByConvertedStyleName( sConvertedName );
- bool bExists = pEntry && ( pEntry->nStyleTypeCode == STYLE_TYPE_CHAR );
+ bool bExists = pEntry && ( pEntry->m_nStyleTypeCode == STYLE_TYPE_CHAR );
// Add the property if the style exists, but do not add it elements in TOC:
// they will receive later another style references from TOC
if ( bExists && m_pImpl->GetTopContext() && !m_pImpl->IsInTOC())
@@ -3206,9 +3206,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
if( !sStyleName.isEmpty() && GetStyleSheetTable() )
pStyle = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( sStyleName );
- if( pStyle && pStyle->pProperties
- && pStyle->pProperties->isSet(PROP_BREAK_TYPE)
- && pStyle->pProperties->getProperty(PROP_BREAK_TYPE)->second == aBreakType )
+ if( pStyle && pStyle->m_pProperties
+ && pStyle->m_pProperties->isSet(PROP_BREAK_TYPE)
+ && pStyle->m_pProperties->getProperty(PROP_BREAK_TYPE)->second == aBreakType )
{
pParagraphProps->Insert(PROP_BREAK_TYPE, aBreakType);
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 26893126ff72..5f83bed4c58f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -135,7 +135,7 @@ static void lcl_linenumberingHeaderFooter( const uno::Reference<container::XName
const StyleSheetEntryPtr pEntry = dmapper->GetStyleSheetTable()->FindStyleSheetByISTD( rname );
if (!pEntry)
return;
- const StyleSheetPropertyMap* pStyleSheetProperties = pEntry->pProperties.get();
+ const StyleSheetPropertyMap* pStyleSheetProperties = pEntry->m_pProperties.get();
if ( !pStyleSheetProperties )
return;
sal_Int32 nListId = pStyleSheetProperties->props().GetListId();
@@ -201,13 +201,13 @@ static uno::Any lcl_GetPropertyFromParaStyleSheetNoNum(PropertyIds eId, StyleShe
{
while (pEntry)
{
- if (pEntry->pProperties)
+ if (pEntry->m_pProperties)
{
std::optional<PropertyMap::Property> aProperty =
- pEntry->pProperties->getProperty(eId);
+ pEntry->m_pProperties->getProperty(eId);
if (aProperty)
{
- if (pEntry->pProperties->props().GetListId())
+ if (pEntry->m_pProperties->props().GetListId())
// It is a paragraph style with list. Paragraph list styles are not taken into account
return uno::Any();
else
@@ -216,8 +216,8 @@ static uno::Any lcl_GetPropertyFromParaStyleSheetNoNum(PropertyIds eId, StyleShe
}
//search until the property is set or no parent is available
StyleSheetEntryPtr pNewEntry;
- if (!pEntry->sBaseStyleIdentifier.isEmpty())
- pNewEntry = rStyleSheet->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
+ if (!pEntry->m_sBaseStyleIdentifier.isEmpty())
+ pNewEntry = rStyleSheet->FindStyleSheetByISTD(pEntry->m_sBaseStyleIdentifier);
SAL_WARN_IF(pEntry == pNewEntry, "writerfilter.dmapper", "circular loop in style hierarchy?");
@@ -1143,7 +1143,7 @@ void DomainMapper_Impl::PopProperties(ContextType eId)
m_pLastCharacterContext = m_aPropertyStacks[eId].top();
// Sadly an assert about deferredCharacterProperties being empty is not possible
// here, because appendTextPortion() may not be called for every character section.
- deferredCharacterProperties.clear();
+ m_deferredCharacterProperties.clear();
}
if (!IsInFootOrEndnote() && IsInCustomFootnote() && !m_aPropertyStacks[eId].empty())
@@ -1264,11 +1264,11 @@ OUString DomainMapper_Impl::GetDefaultParaStyleName()
if ( m_sDefaultParaStyleName.isEmpty() )
{
const StyleSheetEntryPtr pEntry = GetStyleSheetTable()->FindDefaultParaStyle();
- if ( pEntry && !pEntry->sConvertedStyleName.isEmpty() )
+ if ( pEntry && !pEntry->m_sConvertedStyleName.isEmpty() )
{
if ( !m_bInStyleSheetImport )
- m_sDefaultParaStyleName = pEntry->sConvertedStyleName;
- return pEntry->sConvertedStyleName;
+ m_sDefaultParaStyleName = pEntry->m_sConvertedStyleName;
+ return pEntry->m_sConvertedStyleName;
}
else
return "Standard";
@@ -1280,22 +1280,22 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId, StyleShee
{
while(pEntry)
{
- if(pEntry->pProperties)
+ if(pEntry->m_pProperties)
{
std::optional<PropertyMap::Property> aProperty =
- pEntry->pProperties->getProperty(eId);
+ pEntry->m_pProperties->getProperty(eId);
if( aProperty )
{
if (pIsDocDefault)
- *pIsDocDefault = pEntry->pProperties->isDocDefault(eId);
+ *pIsDocDefault = pEntry->m_pProperties->isDocDefault(eId);
return aProperty->second;
}
}
//search until the property is set or no parent is available
StyleSheetEntryPtr pNewEntry;
- if ( !pEntry->sBaseStyleIdentifier.isEmpty() )
- pNewEntry = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
+ if ( !pEntry->m_sBaseStyleIdentifier.isEmpty() )
+ pNewEntry = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->m_sBaseStyleIdentifier);
SAL_WARN_IF( pEntry == pNewEntry, "writerfilter.dmapper", "circular loop in style hierarchy?");
@@ -1591,7 +1591,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
if ( pParaStyle )
{
- const StyleSheetPropertyMap* pStyleProperties = pParaStyle->pProperties.get();
+ const StyleSheetPropertyMap* pStyleProperties = pParaStyle->m_pProperties.get();
if (!pStyleProperties)
return;
sal_Int32 nWidth =
@@ -1817,7 +1817,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
/// Check if the style or its parent has a list id, recursively.
static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleSheetTablePtr& rStyleTable, bool & rNumberingFromBaseStyle)
{
- const StyleSheetPropertyMap* pEntryProperties = rEntry->pProperties.get();
+ const StyleSheetPropertyMap* pEntryProperties = rEntry->m_pProperties.get();
if (!pEntryProperties)
return -1;
@@ -1827,10 +1827,10 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleShee
return nListId;
// The style has no parent.
- if (rEntry->sBaseStyleIdentifier.isEmpty())
+ if (rEntry->m_sBaseStyleIdentifier.isEmpty())
return -1;
- const StyleSheetEntryPtr pParent = rStyleTable->FindStyleSheetByISTD(rEntry->sBaseStyleIdentifier);
+ const StyleSheetEntryPtr pParent = rStyleTable->FindStyleSheetByISTD(rEntry->m_sBaseStyleIdentifier);
// No such parent style or loop in the style hierarchy.
if (!pParent || pParent == rEntry)
return -1;
@@ -1862,7 +1862,7 @@ sal_Int16 DomainMapper_Impl::GetListLevel(const StyleSheetEntryPtr& pEntry,
if (!pEntry)
return -1;
- const StyleSheetPropertyMap* pEntryProperties = pEntry->pProperties.get();
+ const StyleSheetPropertyMap* pEntryProperties = pEntry->m_pProperties.get();
if (!pEntryProperties)
return -1;
@@ -1872,10 +1872,10 @@ sal_Int16 DomainMapper_Impl::GetListLevel(const StyleSheetEntryPtr& pEntry,
return nListLevel;
// The style has no parent.
- if (pEntry->sBaseStyleIdentifier.isEmpty())
+ if (pEntry->m_sBaseStyleIdentifier.isEmpty())
return -1;
- const StyleSheetEntryPtr pParent = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
+ const StyleSheetEntryPtr pParent = GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->m_sBaseStyleIdentifier);
// No such parent style or loop in the style hierarchy.
if (!pParent || pParent == pEntry)
return -1;
@@ -1917,7 +1917,7 @@ void DomainMapper_Impl::ValidateListLevel(const OUString& sStyleIdentifierD)
{
// This level is already used by another style, so prevent numbering via this style
// by setting to body level (9).
- pMyStyle->pProperties->SetListLevel(WW_OUTLINE_MAX);
+ pMyStyle->m_pProperties->SetListLevel(WW_OUTLINE_MAX);
// WARNING: PROP_NUMBERING_LEVEL is now out of sync with GetListLevel()
}
}
@@ -1968,13 +1968,13 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
const StyleSheetEntryPtr pEntry = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( GetCurrentParaStyleName() );
SAL_WARN_IF(!pEntry, "writerfilter.dmapper", "no style sheet found");
- const StyleSheetPropertyMap* pStyleSheetProperties = pEntry ? pEntry->pProperties.get() : nullptr;
+ const StyleSheetPropertyMap* pStyleSheetProperties = pEntry ? pEntry->m_pProperties.get() : nullptr;
sal_Int32 nListId = pParaContext ? pParaContext->props().GetListId() : -1;
bool isNumberingViaStyle(false);
bool isNumberingViaRule = nListId > -1;
if ( !bRemove && pStyleSheetProperties && pParaContext )
{
- if (!pEntry || pEntry->nStyleTypeCode != StyleType::STYLE_TYPE_PARA) {
+ if (!pEntry || pEntry->m_nStyleTypeCode != StyleType::STYLE_TYPE_PARA) {
// We could not resolve paragraph style or it is not a paragraph style
// Remove this style reference, otherwise it will cause exceptions during further
// processing and not all paragraph styles will be initialized.
@@ -2031,9 +2031,9 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
// the numbering indents now have the priority.
// So now import must also copy the para-style indents directly onto the paragraph to compensate.
std::optional<PropertyMap::Property> oProperty;
- const StyleSheetEntryPtr pParent = (!pEntry->sBaseStyleIdentifier.isEmpty()) ? GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier) : nullptr;
- const StyleSheetPropertyMap* pParentProperties = pParent ? pParent->pProperties.get() : nullptr;
- if (!pEntry->sBaseStyleIdentifier.isEmpty())
+ const StyleSheetEntryPtr pParent = (!pEntry->m_sBaseStyleIdentifier.isEmpty()) ? GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->m_sBaseStyleIdentifier) : nullptr;
+ const StyleSheetPropertyMap* pParentProperties = pParent ? pParent->m_pProperties.get() : nullptr;
+ if (!pEntry->m_sBaseStyleIdentifier.isEmpty())
{
oProperty = pStyleSheetProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT);
if ( oProperty
@@ -2299,7 +2299,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
else
{
uno::Reference<text::XTextCursor> xCursor;
- if (m_bParaHadField && !m_bIsInComments && !xTOCMarkerCursor.is())
+ if (m_bParaHadField && !m_bIsInComments && !m_xTOCMarkerCursor.is())
{
// Workaround to make sure char props of the field are not lost.
// Not relevant for editeng-based comments.
@@ -2723,7 +2723,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper
return;
// Before placing call to processDeferredCharacterProperties(), TopContextType should be CONTEXT_CHARACTER
// processDeferredCharacterProperties() invokes only if character inserted
- if( pPropertyMap == m_pTopContext && !deferredCharacterProperties.empty() && (GetTopContextType() == CONTEXT_CHARACTER) )
+ if( pPropertyMap == m_pTopContext && !m_deferredCharacterProperties.empty() && (GetTopContextType() == CONTEXT_CHARACTER) )
processDeferredCharacterProperties();
uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend;
if (!xTextAppend.is() || !hasTableManager() || getTableManager().isIgnore())
@@ -6223,13 +6223,13 @@ OUString DomainMapper_Impl::ConvertTOCStyleName(OUString const& rTOCStyleName)
assert(!rTOCStyleName.isEmpty());
if (auto const pStyle = GetStyleSheetTable()->FindStyleSheetByISTD(rTOCStyleName))
{ // theoretical case: what OOXML says
- return pStyle->sStyleName;
+ return pStyle->m_sStyleName;
}
auto const pStyle = GetStyleSheetTable()->FindStyleSheetByISTD(FilterChars(rTOCStyleName));
if (pStyle && m_bIsNewDoc)
{ // practical case: Word wrote i18n name to TOC field, but it doesn't
// exist in styles.xml; tdf#153083 clone it for best roundtrip
- SAL_INFO("writerfilter.dmapper", "cloning TOC paragraph style (presumed built-in) " << rTOCStyleName << " from " << pStyle->sStyleName);
+ SAL_INFO("writerfilter.dmapper", "cloning TOC paragraph style (presumed built-in) " << rTOCStyleName << " from " << pStyle->m_sStyleName);
return GetStyleSheetTable()->CloneTOCStyle(GetFontTable(), pStyle, rTOCStyleName);
}
else
@@ -6373,7 +6373,7 @@ void DomainMapper_Impl::handleToc
const auto xTextCursor = xTextAppend->getText()->createTextCursor();
if (xTextCursor)
xTextCursor->gotoEnd(false);
- xTOCMarkerCursor = xTextCursor;
+ m_xTOCMarkerCursor = xTextCursor;
}
else
{
@@ -6384,7 +6384,7 @@ void DomainMapper_Impl::handleToc
// init [xTOCMarkerCursor]
uno::Reference< text::XText > xText = xTextAppend->getText();
uno::Reference< text::XTextCursor > xCrsr = xText->createTextCursor();
- xTOCMarkerCursor = xCrsr;
+ m_xTOCMarkerCursor = xCrsr;
// create header of the TOC with the TOC title inside
createSectionForRange(m_xSdtEntryStart, xTextRangeEndOfTocHeader, "com.sun.star.text.IndexHeaderSection", true);
@@ -8816,16 +8816,16 @@ SectionPropertyMap * DomainMapper_Impl::GetSectionContext()
void DomainMapper_Impl::deferCharacterProperty(sal_Int32 id, const css::uno::Any& value)
{
- deferredCharacterProperties[ id ] = value;
+ m_deferredCharacterProperties[ id ] = value;
}
void DomainMapper_Impl::processDeferredCharacterProperties()
{
// Actually process in DomainMapper, so that it's the same source file like normal processing.
- if( !deferredCharacterProperties.empty())
+ if( !m_deferredCharacterProperties.empty())
{
- m_rDMapper.processDeferredCharacterProperties( deferredCharacterProperties );
- deferredCharacterProperties.clear();
+ m_rDMapper.processDeferredCharacterProperties( m_deferredCharacterProperties );
+ m_deferredCharacterProperties.clear();
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index d91a2b5c1a6f..f4fd01ddccc5 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -613,7 +613,7 @@ private:
/// This is a continuation of already finished paragraph - e.g., first in an index section
bool m_bRemoveThisParagraph = false;
- css::uno::Reference< css::text::XTextCursor > xTOCMarkerCursor;
+ css::uno::Reference< css::text::XTextCursor > m_xTOCMarkerCursor;
//annotation import
css::uno::Reference< css::beans::XPropertySet > m_xAnnotationField;
@@ -628,7 +628,7 @@ private:
css::uno::Reference<css::beans::XPropertySet> FindOrCreateFieldMaster(const char* pFieldMasterService, const OUString& rFieldMasterName);
css::uno::Reference<css::beans::XPropertySet> const & GetDocumentSettings();
- std::map<sal_Int32, css::uno::Any> deferredCharacterProperties;
+ std::map<sal_Int32, css::uno::Any> m_deferredCharacterProperties;
SmartTagHandler m_aSmartTagHandler;
css::uno::Reference<css::text::XTextRange> m_xGlossaryEntryStart;
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index ca12ac67b2c3..d7c6b4fe3f5b 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -236,18 +236,18 @@ void FontTable::addEmbeddedFont(const css::uno::Reference<css::io::XInputStream>
EmbeddedFontHandler::EmbeddedFontHandler(FontTable& rFontTable, OUString _fontName, const char* _style )
: LoggedProperties("EmbeddedFontHandler")
-, fontTable( rFontTable )
-, fontName(std::move( _fontName ))
-, style( _style )
+, m_fontTable( rFontTable )
+, m_fontName(std::move( _fontName ))
+, m_style( _style )
{
}
EmbeddedFontHandler::~EmbeddedFontHandler()
{
- if( !inputStream.is())
+ if( !m_inputStream.is())
return;
std::vector< unsigned char > key( 32 );
- if( !fontKey.isEmpty())
+ if( !m_fontKey.isEmpty())
{ // key for unobfuscating
// 1 3 5 7 10 2 5 7 20 2 5 7 9 1 3 5
// {62E79491-959F-41E9-B76B-6B32631DEA5C}
@@ -256,8 +256,8 @@ EmbeddedFontHandler::~EmbeddedFontHandler()
i < 16;
++i )
{
- int v1 = fontKey[ pos[ i ]];
- int v2 = fontKey[ pos[ i ] + 1 ];
+ int v1 = m_fontKey[ pos[ i ]];
+ int v2 = m_fontKey[ pos[ i ] + 1 ];
assert(( v1 >= '0' && v1 <= '9' ) || ( v1 >= 'A' && v1 <= 'F' ));
assert(( v2 >= '0' && v2 <= '9' ) || ( v2 >= 'A' && v2 <= 'F' ));
int val = ( v1 - ( v1 <= '9' ? '0' : 'A' - 10 )) * 16 + v2 - ( v2 <= '9' ? '0' : 'A' - 10 );
@@ -265,8 +265,8 @@ EmbeddedFontHandler::~EmbeddedFontHandler()
key[ i + 16 ] = val;
}
}
- fontTable.addEmbeddedFont( inputStream, fontName, style, key );
- inputStream->closeInput();
+ m_fontTable.addEmbeddedFont( m_inputStream, m_fontName, m_style, key );
+ m_inputStream->closeInput();
}
void EmbeddedFontHandler::lcl_attribute( Id name, Value& val )
@@ -275,7 +275,7 @@ void EmbeddedFontHandler::lcl_attribute( Id name, Value& val )
switch( name )
{
case NS_ooxml::LN_CT_FontRel_fontKey:
- fontKey = sValue;
+ m_fontKey = sValue;
break;
case NS_ooxml::LN_CT_Rel_id:
break;
@@ -283,7 +283,7 @@ void EmbeddedFontHandler::lcl_attribute( Id name, Value& val )
break; // TODO? Let's just ignore this for now and hope
// it doesn't break anything.
case NS_ooxml::LN_inputstream: // the actual font data as stream
- val.getAny() >>= inputStream;
+ val.getAny() >>= m_inputStream;
break;
default:
break;
diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx
index e1aad48238f9..ba1d2387a39b 100644
--- a/writerfilter/source/dmapper/FontTable.hxx
+++ b/writerfilter/source/dmapper/FontTable.hxx
@@ -93,11 +93,11 @@ public:
private:
virtual void lcl_attribute( Id name, Value& val ) override;
virtual void lcl_sprm( Sprm& rSprm ) override;
- FontTable& fontTable;
- OUString fontName;
- const char* const style;
- OUString fontKey;
- css::uno::Reference<css::io::XInputStream> inputStream;
+ FontTable& m_fontTable;
+ OUString m_fontName;
+ const char* const m_style;
+ OUString m_fontKey;
+ css::uno::Reference<css::io::XInputStream> m_inputStream;
};
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index b5a5e8bf743c..2351100f06bb 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -198,119 +198,122 @@ struct GraphicBorderLine
class GraphicImport_Impl
{
private:
- sal_Int32 nXSize;
- bool bXSizeValid;
- sal_Int32 nYSize;
- bool bYSizeValid;
+ sal_Int32 m_nXSize;
+ bool m_bXSizeValid;
+ sal_Int32 m_nYSize;
+ bool m_bYSizeValid;
public:
GraphicImportType & m_rGraphicImportType;
- DomainMapper& rDomainMapper;
-
- sal_Int32 nLeftPosition;
- sal_Int32 nTopPosition;
-
- bool bUseSimplePos;
- sal_Int32 zOrder;
-
- sal_Int16 nHoriOrient;
- sal_Int16 nHoriRelation;
- bool bPageToggle = false;
- sal_Int16 nVertOrient;
- sal_Int16 nVertRelation;
- text::WrapTextMode nWrap;
- bool bLayoutInCell;
- bool bCompatForcedLayoutInCell;
- bool bAllowOverlap = true;
- bool bOpaque;
- bool bBehindDoc;
- bool bContour;
- bool bContourOutside;
+ DomainMapper& m_rDomainMapper;
+
+ sal_Int32 m_nLeftPosition;
+ sal_Int32 m_nTopPosition;
+
+ bool m_bUseSimplePos;
+ sal_Int32 m_zOrder;
+
+ sal_Int16 m_nHoriOrient;
+ sal_Int16 m_nHoriRelation;
+ bool m_bPageToggle = false;
+ sal_Int16 m_nVertOrient;
+ sal_Int16 m_nVertRelation;
+ text::WrapTextMode m_nWrap;
+ bool m_bLayoutInCell;
+ bool m_bCompatForcedLayoutInCell;
+ bool m_bAllowOverlap = true;
+ bool m_bOpaque;
+ bool m_bBehindDoc;
+ bool m_bContour;
+ bool m_bContourOutside;
WrapPolygon::Pointer_t mpWrapPolygon;
- sal_Int32 nLeftMargin;
- sal_Int32 nLeftMarginOrig = 0;
- sal_Int32 nRightMargin;
- sal_Int32 nTopMargin;
- sal_Int32 nBottomMargin;
+ sal_Int32 m_nLeftMargin;
+ sal_Int32 m_nLeftMarginOrig = 0;
+ sal_Int32 m_nRightMargin;
+ sal_Int32 m_nTopMargin;
+ sal_Int32 m_nBottomMargin;
- bool bShadow;
- sal_Int32 nShadowXDistance;
- sal_Int32 nShadowYDistance;
- sal_Int32 nShadowColor;
- sal_Int32 nShadowTransparence;
+ bool m_bShadow;
+ sal_Int32 m_nShadowXDistance;
+ sal_Int32 m_nShadowYDistance;
+ sal_Int32 m_nShadowColor;
+ sal_Int32 m_nShadowTransparence;
- sal_Int32 nContrast;
- sal_Int32 nBrightness;
+ sal_Int32 m_nContrast;
+ sal_Int32 m_nBrightness;
static constexpr sal_Int32 nFillColor = 0xffffffff;
- drawing::ColorMode eColorMode;
+ drawing::ColorMode m_eColorMode;
- GraphicBorderLine aBorders[4];
+ GraphicBorderLine m_aBorders[4];
- bool bIsGraphic;
+ bool m_bIsGraphic;
- bool bSizeProtected;
- bool bPositionProtected;
- bool bHidden;
- bool bDecorative = false;
+ bool m_bSizeProtected;
+ bool m_bPositionProtected;
+ bool m_bHidden;
+ bool m_bDecorative = false;
- sal_Int32 nShapeOptionType;
+ sal_Int32 m_nShapeOptionType;
- OUString sName;
- OUString sAlternativeText;
- OUString title;
- OUString sHyperlinkURL;
+ OUString m_sName;
+ OUString m_sAlternativeText;
+ OUString m_title;
+ OUString m_sHyperlinkURL;
std::pair<OUString, OUString>& m_rPositionOffsets;
std::pair<OUString, OUString>& m_rAligns;
std::queue<OUString>& m_rPositivePercentages;
- OUString sAnchorId;
+ OUString m_sAnchorId;
comphelper::SequenceAsHashMap m_aInteropGrabBag;
std::optional<sal_Int32> m_oEffectExtentLeft;
std::optional<sal_Int32> m_oEffectExtentTop;
std::optional<sal_Int32> m_oEffectExtentRight;
std::optional<sal_Int32> m_oEffectExtentBottom;
- GraphicImport_Impl(GraphicImportType & rImportType, DomainMapper& rDMapper, std::pair<OUString, OUString>& rPositionOffsets, std::pair<OUString, OUString>& rAligns, std::queue<OUString>& rPositivePercentages)
- : nXSize(0)
- ,bXSizeValid(false)
- ,nYSize(0)
- ,bYSizeValid(false)
+ GraphicImport_Impl(GraphicImportType & rImportType, DomainMapper& rDMapper,
+ std::pair<OUString, OUString>& rPositionOffsets,
+ std::pair<OUString, OUString>& rAligns,
+ std::queue<OUString>& rPositivePercentages)
+ : m_nXSize(0)
+ ,m_bXSizeValid(false)
+ ,m_nYSize(0)
+ ,m_bYSizeValid(false)
,m_rGraphicImportType(rImportType)
- ,rDomainMapper( rDMapper )
- ,nLeftPosition(0)
- ,nTopPosition(0)
- ,bUseSimplePos(false)
- ,zOrder(-1)
- ,nHoriOrient( text::HoriOrientation::NONE )
- ,nHoriRelation( text::RelOrientation::FRAME )
- ,nVertOrient( text::VertOrientation::NONE )
- ,nVertRelation( text::RelOrientation::FRAME )
- ,nWrap(text::WrapTextMode_NONE)
- ,bLayoutInCell(true)
- ,bCompatForcedLayoutInCell(false)
- ,bOpaque( !rDMapper.IsInHeaderFooter() )
- ,bBehindDoc(false)
- ,bContour(false)
- ,bContourOutside(true)
- ,nLeftMargin(319)
- ,nRightMargin(319)
- ,nTopMargin(0)
- ,nBottomMargin(0)
- ,bShadow(false)
- ,nShadowXDistance(0)
- ,nShadowYDistance(0)
- ,nShadowColor(0)
- ,nShadowTransparence(0)
- ,nContrast(0)
- ,nBrightness(0)
- ,eColorMode( drawing::ColorMode_STANDARD )
- ,bIsGraphic(false)
- ,bSizeProtected(false)
- ,bPositionProtected(false)
- ,bHidden(false)
- ,nShapeOptionType(0)
+ ,m_rDomainMapper( rDMapper )
+ ,m_nLeftPosition(0)
+ ,m_nTopPosition(0)
+ ,m_bUseSimplePos(false)
+ ,m_zOrder(-1)
+ ,m_nHoriOrient( text::HoriOrientation::NONE )
+ ,m_nHoriRelation( text::RelOrientation::FRAME )
+ ,m_nVertOrient( text::VertOrientation::NONE )
+ ,m_nVertRelation( text::RelOrientation::FRAME )
+ ,m_nWrap(text::WrapTextMode_NONE)
+ ,m_bLayoutInCell(true)
+ ,m_bCompatForcedLayoutInCell(false)
+ ,m_bOpaque( !rDMapper.IsInHeaderFooter() )
+ ,m_bBehindDoc(false)
+ ,m_bContour(false)
+ ,m_bContourOutside(true)
+ ,m_nLeftMargin(319)
+ ,m_nRightMargin(319)
+ ,m_nTopMargin(0)
+ ,m_nBottomMargin(0)
+ ,m_bShadow(false)
+ ,m_nShadowXDistance(0)
+ ,m_nShadowYDistance(0)
+ ,m_nShadowColor(0)
+ ,m_nShadowTransparence(0)
+ ,m_nContrast(0)
+ ,m_nBrightness(0)
+ ,m_eColorMode( drawing::ColorMode_STANDARD )
+ ,m_bIsGraphic(false)
+ ,m_bSizeProtected(false)
+ ,m_bPositionProtected(false)
+ ,m_bHidden(false)
+ ,m_nShapeOptionType(0)
,m_rPositionOffsets(rPositionOffsets)
,m_rAligns(rAligns)
,m_rPositivePercentages(rPositivePercentages)
@@ -319,82 +322,82 @@ public:
void setXSize(sal_Int32 _nXSize)
{
- nXSize = _nXSize;
- bXSizeValid = true;
+ m_nXSize = _nXSize;
+ m_bXSizeValid = true;
}
sal_uInt32 getXSize() const
{
- return nXSize;
+ return m_nXSize;
}
bool isXSizeValid() const
{
- return bXSizeValid;
+ return m_bXSizeValid;
}
void setYSize(sal_Int32 _nYSize)
{
- nYSize = _nYSize;
- bYSizeValid = true;
+ m_nYSize = _nYSize;
+ m_bYSizeValid = true;
}
sal_uInt32 getYSize() const
{
- return nYSize;
+ return m_nYSize;
}
bool isYSizeValid() const
{
- return bYSizeValid;
+ return m_bYSizeValid;
}
void applyMargins(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties) const
{
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_LEFT_MARGIN ), uno::Any(nLeftMargin));
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::Any(nRightMargin));
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TOP_MARGIN ), uno::Any(nTopMargin));
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::Any(nBottomMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_LEFT_MARGIN ), uno::Any(m_nLeftMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::Any(m_nRightMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TOP_MARGIN ), uno::Any(m_nTopMargin));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::Any(m_nBottomMargin));
}
void applyPosition(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties) const
{
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT ),
- uno::Any(nHoriOrient));
+ uno::Any(m_nHoriOrient));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT ),
- uno::Any(nVertOrient));
+ uno::Any(m_nVertOrient));
}
void applyRelativePosition(const uno::Reference< beans::XPropertySet >& xGraphicObjectProperties, bool bRelativeOnly = false) const
{
if (!bRelativeOnly)
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_POSITION),
- uno::Any(nLeftPosition));
+ uno::Any(m_nLeftPosition));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HORI_ORIENT_RELATION ),
- uno::Any(nHoriRelation));
+ uno::Any(m_nHoriRelation));
xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_PAGE_TOGGLE),
- uno::Any(bPageToggle));
+ uno::Any(m_bPageToggle));
if (!bRelativeOnly)
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT_POSITION),
- uno::Any(nTopPosition));
+ uno::Any(m_nTopPosition));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_VERT_ORIENT_RELATION ),
- uno::Any(nVertRelation));
+ uno::Any(m_nVertRelation));
}
void applyZOrder(uno::Reference<beans::XPropertySet> const & xGraphicObjectProperties) const
{
- sal_Int32 nZOrder = zOrder;
+ sal_Int32 nZOrder = m_zOrder;
if (m_rGraphicImportType == GraphicImportType::IMPORT_AS_DETECTED_INLINE
- && !rDomainMapper.IsInShape())
+ && !m_rDomainMapper.IsInShape())
{
nZOrder = 0;
}
if (nZOrder >= 0)
{
// tdf#120760 Send objects with behinddoc=true to the back.
- if (bBehindDoc && rDomainMapper.IsInHeaderFooter())
+ if (m_bBehindDoc && m_rDomainMapper.IsInHeaderFooter())
nZOrder -= SAL_MAX_INT32;
- GraphicZOrderHelper* pZOrderHelper = rDomainMapper.graphicZOrderHelper();
+ GraphicZOrderHelper* pZOrderHelper = m_rDomainMapper.graphicZOrderHelper();
bool const bOldStyle(m_rGraphicImportType == GraphicImportType::IMPORT_AS_DETECTED_INLINE);
xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_Z_ORDER),
uno::Any(pZOrderHelper->findZOrder(nZOrder, bOldStyle)));
@@ -406,17 +409,17 @@ public:
{
try
{
- if (!sName.isEmpty())
+ if (!m_sName.isEmpty())
{
uno::Reference<container::XNamed> const xNamed(xGraphicObjectProperties, uno::UNO_QUERY_THROW);
- xNamed->setName(sName);
+ xNamed->setName(m_sName);
}
// else: name is automatically generated by SwDoc::MakeFlySection_()
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_DESCRIPTION ),
- uno::Any( sAlternativeText ));
+ uno::Any( m_sAlternativeText ));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TITLE ),
- uno::Any( title ));
+ uno::Any( m_title ));
}
catch( const uno::Exception& )
{
@@ -428,10 +431,10 @@ public:
{
// Graphic objects have a different hyperlink prop than shapes
auto aHyperlinkProp = bIsShape ? PROP_HYPERLINK : PROP_HYPER_LINK_U_R_L;
- if (!sHyperlinkURL.isEmpty())
+ if (!m_sHyperlinkURL.isEmpty())
{
xShapeProps->setPropertyValue(
- getPropertyName(aHyperlinkProp), uno::Any(sHyperlinkURL));
+ getPropertyName(aHyperlinkProp), uno::Any(m_sHyperlinkURL));
}
}
@@ -475,12 +478,12 @@ GraphicImport::~GraphicImport()
com::sun::star::awt::Point GraphicImport::GetGraphicObjectPosition() const
{
- return (com::sun::star::awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition));
+ return (com::sun::star::awt::Point(m_pImpl->m_nLeftPosition, m_pImpl->m_nTopPosition));
}
bool GraphicImport::GetLayoutInCell() const
{
- return m_pImpl->bLayoutInCell;
+ return m_pImpl->m_bLayoutInCell;
}
void GraphicImport::handleWrapTextValue(sal_uInt32 nVal)
@@ -488,16 +491,16 @@ void GraphicImport::handleWrapTextValue(sal_uInt32 nVal)
switch (nVal)
{
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920;
- m_pImpl->nWrap = text::WrapTextMode_PARALLEL;
+ m_pImpl->m_nWrap = text::WrapTextMode_PARALLEL;
break;
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left: // 90921;
- m_pImpl->nWrap = text::WrapTextMode_LEFT;
+ m_pImpl->m_nWrap = text::WrapTextMode_LEFT;
break;
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right: // 90922;
- m_pImpl->nWrap = text::WrapTextMode_RIGHT;
+ m_pImpl->m_nWrap = text::WrapTextMode_RIGHT;
break;
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest: // 90923;
- m_pImpl->nWrap = text::WrapTextMode_DYNAMIC;
+ m_pImpl->m_nWrap = text::WrapTextMode_DYNAMIC;
break;
default:;
}
@@ -629,10 +632,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
switch( nName )
{
case NS_ooxml::LN_OfficeArtExtension_Decorative_val:
- m_pImpl->bDecorative = true;
+ m_pImpl->m_bDecorative = true;
break;
case NS_ooxml::LN_CT_Hyperlink_URL://90682;
- m_pImpl->sHyperlinkURL = rValue.getString();
+ m_pImpl->m_sHyperlinkURL = rValue.getString();
break;
case NS_ooxml::LN_blip: //the binary graphic data in a shape
{
@@ -653,7 +656,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
//border properties
case NS_ooxml::LN_CT_Border_sz:
- m_pImpl->aBorders[BORDER_TOP].nLineWidth = nIntValue;
+ m_pImpl->m_aBorders[BORDER_TOP].nLineWidth = nIntValue;
break;
case NS_ooxml::LN_CT_Border_val:
//graphic borders don't support different line types
@@ -661,7 +664,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
case NS_ooxml::LN_CT_Border_space:
break;
case NS_ooxml::LN_CT_Border_shadow:
- m_pImpl->aBorders[BORDER_TOP].bHasShadow = nIntValue != 0;
+ m_pImpl->m_aBorders[BORDER_TOP].bHasShadow = nIntValue != 0;
break;
case NS_ooxml::LN_CT_Border_frame:
break;
@@ -698,63 +701,63 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
break;
case NS_ooxml::LN_CT_NonVisualDrawingProps_name:// 90651;
//name of the object
- m_pImpl->sName = rValue.getString();
+ m_pImpl->m_sName = rValue.getString();
break;
case NS_ooxml::LN_CT_NonVisualDrawingProps_descr:// 90652;
//alternative text
- m_pImpl->sAlternativeText = rValue.getString();
+ m_pImpl->m_sAlternativeText = rValue.getString();
break;
case NS_ooxml::LN_CT_NonVisualDrawingProps_title:
//alternative text
- m_pImpl->title = rValue.getString();
+ m_pImpl->m_title = rValue.getString();
break;
case NS_ooxml::LN_CT_NonVisualDrawingProps_hidden:
- m_pImpl->bHidden = (nIntValue == 1);
+ m_pImpl->m_bHidden = (nIntValue == 1);
break;
case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noChangeAspect://90644;
//disallow aspect ratio change - ignored
break;
case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noMove:// 90645;
- m_pImpl->bPositionProtected = true;
+ m_pImpl->m_bPositionProtected = true;
break;
case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noResize: // 90646;
- m_pImpl->bSizeProtected = true;
+ m_pImpl->m_bSizeProtected = true;
break;
case NS_ooxml::LN_CT_Anchor_distT: // 90983;
case NS_ooxml::LN_CT_Anchor_distB: // 90984;
case NS_ooxml::LN_CT_Anchor_distL: // 90985;
case NS_ooxml::LN_CT_Anchor_distR: // 90986;
{
- m_pImpl->nShapeOptionType = nName;
+ m_pImpl->m_nShapeOptionType = nName;
ProcessShapeOptions(rValue);
}
break;
case NS_ooxml::LN_CT_Anchor_simplePos_attr: // 90987;
- m_pImpl->bUseSimplePos = nIntValue > 0;
+ m_pImpl->m_bUseSimplePos = nIntValue > 0;
break;
case NS_ooxml::LN_CT_Anchor_relativeHeight: // 90988;
- m_pImpl->zOrder = nIntValue;
+ m_pImpl->m_zOrder = nIntValue;
break;
case NS_ooxml::LN_CT_Anchor_behindDoc: // 90989; - in background
if (nIntValue > 0)
{
- m_pImpl->bOpaque = false;
- m_pImpl->bBehindDoc = true;
+ m_pImpl->m_bOpaque = false;
+ m_pImpl->m_bBehindDoc = true;
}
break;
case NS_ooxml::LN_CT_Anchor_locked: // 90990; - ignored
break;
case NS_ooxml::LN_CT_Anchor_layoutInCell: // 90991; - ignored
// Starting in MSO 2013, anchors are ALWAYS considered to be laid out in table cell.
- m_pImpl->bCompatForcedLayoutInCell = !nIntValue
- && m_pImpl->rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14
- && m_pImpl->rDomainMapper.IsInTable();
- m_pImpl->bLayoutInCell = m_pImpl->bCompatForcedLayoutInCell || nIntValue;
+ m_pImpl->m_bCompatForcedLayoutInCell = !nIntValue
+ && m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14
+ && m_pImpl->m_rDomainMapper.IsInTable();
+ m_pImpl->m_bLayoutInCell = m_pImpl->m_bCompatForcedLayoutInCell || nIntValue;
break;
case NS_ooxml::LN_CT_Anchor_hidden: // 90992; - ignored
break;
case NS_ooxml::LN_CT_Anchor_allowOverlap:
- m_pImpl->bAllowOverlap = nIntValue != 0;
+ m_pImpl->m_bAllowOverlap = nIntValue != 0;
break;
case NS_ooxml::LN_CT_Anchor_wp14_anchorId:
case NS_ooxml::LN_CT_Inline_wp14_anchorId:
@@ -763,29 +766,29 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
OUStringBuffer aString;
comphelper::string::padToLength(aString, 8 - aBuffer.getLength(), '0');
aString.append(aBuffer.getStr());
- m_pImpl->sAnchorId = aString.makeStringAndClear().toAsciiUpperCase();
+ m_pImpl->m_sAnchorId = aString.makeStringAndClear().toAsciiUpperCase();
}
break;
case NS_ooxml::LN_CT_Point2D_x: // 90405;
- m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue);
- m_pImpl->nHoriRelation = text::RelOrientation::PAGE_FRAME;
- m_pImpl->nHoriOrient = text::HoriOrientation::NONE;
+ m_pImpl->m_nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue);
+ m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_FRAME;
+ m_pImpl->m_nHoriOrient = text::HoriOrientation::NONE;
break;
case NS_ooxml::LN_CT_Point2D_y: // 90406;
- m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue);
- m_pImpl->nVertRelation = text::RelOrientation::PAGE_FRAME;
- m_pImpl->nVertOrient = text::VertOrientation::NONE;
+ m_pImpl->m_nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue);
+ m_pImpl->m_nVertRelation = text::RelOrientation::PAGE_FRAME;
+ m_pImpl->m_nVertOrient = text::VertOrientation::NONE;
break;
case NS_ooxml::LN_CT_WrapTight_wrapText: // 90934;
- m_pImpl->bContour = true;
- m_pImpl->bContourOutside = true;
+ m_pImpl->m_bContour = true;
+ m_pImpl->m_bContourOutside = true;
handleWrapTextValue(rValue.getInt());
break;
case NS_ooxml::LN_CT_WrapThrough_wrapText:
- m_pImpl->bContour = true;
- m_pImpl->bContourOutside = false;
+ m_pImpl->m_bContour = true;
+ m_pImpl->m_bContourOutside = false;
handleWrapTextValue(rValue.getInt());
@@ -822,18 +825,18 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
|| rProp.Name == "ArtisticEffectProperties";
});
- xShapeProps->getPropertyValue("Shadow") >>= m_pImpl->bShadow;
- if (m_pImpl->bShadow)
+ xShapeProps->getPropertyValue("Shadow") >>= m_pImpl->m_bShadow;
+ if (m_pImpl->m_bShadow)
{
- xShapeProps->getPropertyValue("ShadowXDistance") >>= m_pImpl->nShadowXDistance;
- xShapeProps->getPropertyValue("ShadowYDistance") >>= m_pImpl->nShadowYDistance;
- xShapeProps->getPropertyValue("ShadowColor") >>= m_pImpl->nShadowColor;
- xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->nShadowTransparence;
+ xShapeProps->getPropertyValue("ShadowXDistance") >>= m_pImpl->m_nShadowXDistance;
+ xShapeProps->getPropertyValue("ShadowYDistance") >>= m_pImpl->m_nShadowYDistance;
+ xShapeProps->getPropertyValue("ShadowColor") >>= m_pImpl->m_nShadowColor;
+ xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->m_nShadowTransparence;
}
- xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->eColorMode;
- xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->nBrightness;
- xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->nContrast;
+ xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->m_eColorMode;
+ xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->m_nBrightness;
+ xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->m_nContrast;
// fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation
if ( nRotation == 0 && !bContainsEffects )
@@ -900,7 +903,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
xShapeProps->setPropertyValue
(getPropertyName(PROP_TEXT_RANGE),
uno::Any
- (m_pImpl->rDomainMapper.GetCurrentTextRange()));
+ (m_pImpl->m_rDomainMapper.GetCurrentTextRange()));
}
awt::Size aSize(m_xShape->getSize());
@@ -959,11 +962,11 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
xShapeProps->setPropertyValue("RotateAngle", uno::Any(nRotation.get()));
}
- m_pImpl->bIsGraphic = true;
+ m_pImpl->m_bIsGraphic = true;
- if (!m_pImpl->sAnchorId.isEmpty())
+ if (!m_pImpl->m_sAnchorId.isEmpty())
{
- putPropertyToFrameGrabBag("AnchorId", uno::Any(m_pImpl->sAnchorId));
+ putPropertyToFrameGrabBag("AnchorId", uno::Any(m_pImpl->m_sAnchorId));
}
// Calculate mso unrotated rectangle and its center, needed below
@@ -987,15 +990,15 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
if(pShape && pShape->IsGroupObject())
{
tools::Rectangle aSnapRect = pShape->GetSnapRect(); // Twips
- m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(aSnapRect.Left());
- m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(aSnapRect.Top());
+ m_pImpl->m_nLeftPosition = ConversionHelper::convertTwipToMM100(aSnapRect.Left());
+ m_pImpl->m_nTopPosition = ConversionHelper::convertTwipToMM100(aSnapRect.Top());
aLOSize.Width = ConversionHelper::convertTwipToMM100(aSnapRect.getOpenWidth());
aLOSize.Height = ConversionHelper::convertTwipToMM100(aSnapRect.getOpenHeight());
}
else
{
- m_pImpl->nLeftPosition = fCentrumX - aLOSize.Width / 2.0;
- m_pImpl->nTopPosition = fCentrumY - aLOSize.Height / 2.0;
+ m_pImpl->m_nLeftPosition = fCentrumX - aLOSize.Width / 2.0;
+ m_pImpl->m_nTopPosition = fCentrumY - aLOSize.Height / 2.0;
}
m_xShape->setPosition(GetGraphicObjectPosition());
}
@@ -1008,7 +1011,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// tdf#143475: Word 2007 (vers 12) calculates effectExtent for rotated images
// based on the unrotated image without width-height-swap. We correct this to
// those values, which would be calculated if width-height-swap was used.
- if (m_pImpl->rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() < 14
+ if (m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() < 14
&& xServiceInfo->supportsService("com.sun.star.drawing.GraphicObjectShape")
&& nOOXAngle != 0)
{
@@ -1024,16 +1027,16 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
sal_Int32 nEffectExtent = (m_pImpl->m_oEffectExtentLeft)
? oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentLeft)
: 0;
- m_pImpl->nLeftMargin += nEffectExtent;
+ m_pImpl->m_nLeftMargin += nEffectExtent;
nEffectExtent = (m_pImpl->m_oEffectExtentRight)
? oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentRight) : 0;
- m_pImpl->nRightMargin += nEffectExtent;
+ m_pImpl->m_nRightMargin += nEffectExtent;
nEffectExtent = (m_pImpl->m_oEffectExtentTop)
? oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentTop) : 0;
- m_pImpl->nTopMargin += nEffectExtent;
+ m_pImpl->m_nTopMargin += nEffectExtent;
nEffectExtent = (m_pImpl->m_oEffectExtentBottom)
? oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentBottom) : 0;
- m_pImpl->nBottomMargin += nEffectExtent;
+ m_pImpl->m_nBottomMargin += nEffectExtent;
}
else
{
@@ -1048,8 +1051,8 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// Get LO SnapRect from SdrObject if possible
awt::Rectangle aLOSnapRect;
// For case we have no SdrObject, initialize with values from m_pImpl
- aLOSnapRect.X = m_pImpl->nLeftPosition;
- aLOSnapRect.Y = m_pImpl->nTopPosition;
+ aLOSnapRect.X = m_pImpl->m_nLeftPosition;
+ aLOSnapRect.Y = m_pImpl->m_nTopPosition;
aLOSnapRect.Width = aLOSize.Width;
aLOSnapRect.Height = aLOSize.Height;
if (pShape)
@@ -1061,21 +1064,21 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
aLOSnapRect.Height = ConversionHelper::convertTwipToMM100(aSnapRect.getOpenHeight());
}
- m_pImpl->nLeftMargin += aLOSnapRect.X - aMSOBaseLeftTop.X;
- m_pImpl->nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
+ m_pImpl->m_nLeftMargin += aLOSnapRect.X - aMSOBaseLeftTop.X;
+ m_pImpl->m_nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
- (aLOSnapRect.X + aLOSnapRect.Width);
- m_pImpl->nTopMargin += aLOSnapRect.Y - aMSOBaseLeftTop.Y;
- m_pImpl->nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
+ m_pImpl->m_nTopMargin += aLOSnapRect.Y - aMSOBaseLeftTop.Y;
+ m_pImpl->m_nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
- (aLOSnapRect.Y + aLOSnapRect.Height);
// tdf#141880 LibreOffice cannot handle negative vertical margins.
// Those cases are caught below at common place.
}
} // end IMPORT_AS_DETECTED_INLINE
- else if ((m_pImpl->nWrap == text::WrapTextMode_PARALLEL
- || m_pImpl->nWrap == text::WrapTextMode_DYNAMIC
- || m_pImpl->nWrap == text::WrapTextMode_LEFT
- || m_pImpl->nWrap == text::WrapTextMode_RIGHT
- || m_pImpl->nWrap == text::WrapTextMode_NONE)
+ else if ((m_pImpl->m_nWrap == text::WrapTextMode_PARALLEL
+ || m_pImpl->m_nWrap == text::WrapTextMode_DYNAMIC
+ || m_pImpl->m_nWrap == text::WrapTextMode_LEFT
+ || m_pImpl->m_nWrap == text::WrapTextMode_RIGHT
+ || m_pImpl->m_nWrap == text::WrapTextMode_NONE)
&& !(m_pImpl->mpWrapPolygon) && !bIsDiagram)
{
// For wrap "Square" an area is defined around which the text wraps. MSO
@@ -1090,8 +1093,8 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// Get LO bound rectangle from SdrObject if possible
awt::Rectangle aLOBoundRect;
// For case we have no SdrObject, initialize with values from m_pImpl
- aLOBoundRect.X = m_pImpl->nLeftPosition;
- aLOBoundRect.Y = m_pImpl->nTopPosition;
+ aLOBoundRect.X = m_pImpl->m_nLeftPosition;
+ aLOBoundRect.Y = m_pImpl->m_nTopPosition;
aLOBoundRect.Width = aLOSize.Width;
aLOBoundRect.Height = aLOSize.Height;
if (pShape)
@@ -1103,11 +1106,11 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
aLOBoundRect.Height = ConversionHelper::convertTwipToMM100(aBoundRect.getOpenHeight());
}
- m_pImpl->nLeftMargin += aLOBoundRect.X - aMSOBaseLeftTop.X;
- m_pImpl->nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
+ m_pImpl->m_nLeftMargin += aLOBoundRect.X - aMSOBaseLeftTop.X;
+ m_pImpl->m_nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
- (aLOBoundRect.X + aLOBoundRect.Width);
- m_pImpl->nTopMargin += aLOBoundRect.Y - aMSOBaseLeftTop.Y;
- m_pImpl->nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
+ m_pImpl->m_nTopMargin += aLOBoundRect.Y - aMSOBaseLeftTop.Y;
+ m_pImpl->m_nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
- (aLOBoundRect.Y + aLOBoundRect.Height);
}
else if (m_pImpl->mpWrapPolygon && !bIsDiagram)
@@ -1172,22 +1175,22 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
comphelper::SequenceAsHashMap aAnchorDistDiff;
const double fTopDiff = aShapeRange.getMinY() - aB2DWrapRange.getMinY();
- m_pImpl->nTopMargin += basegfx::fround(fTopDiff);
+ m_pImpl->m_nTopMargin += basegfx::fround(fTopDiff);
aAnchorDistDiff["distTDiff"] <<= basegfx::fround(
o3tl::convert(fTopDiff, o3tl::Length::mm100, o3tl::Length::twip));
const double fBottomDiff = aB2DWrapRange.getMaxY() - aShapeRange.getMaxY();
- m_pImpl->nBottomMargin += basegfx::fround(fBottomDiff);
+ m_pImpl->m_nBottomMargin += basegfx::fround(fBottomDiff);
aAnchorDistDiff["distBDiff"] <<= basegfx::fround(
o3tl::convert(fBottomDiff, o3tl::Length::mm100, o3tl::Length::twip));
const double fLeftDiff = aShapeRange.getMinX() - aB2DWrapRange.getMinX();
- m_pImpl->nLeftMargin += basegfx::fround(fLeftDiff);
+ m_pImpl->m_nLeftMargin += basegfx::fround(fLeftDiff);
aAnchorDistDiff["distLDiff"] <<= basegfx::fround(
o3tl::convert(fLeftDiff, o3tl::Length::mm100, o3tl::Length::twip));
const double fRightDiff = aB2DWrapRange.getMaxX() - aShapeRange.getMaxX();
- m_pImpl->nRightMargin += basegfx::fround(fRightDiff);
+ m_pImpl->m_nRightMargin += basegfx::fround(fRightDiff);
aAnchorDistDiff["distRDiff"] <<= basegfx::fround(
o3tl::convert(fRightDiff, o3tl::Length::mm100, o3tl::Length::twip));
@@ -1195,10 +1198,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
<<= aAnchorDistDiff.getAsConstPropertyValueList();
// FixMe: tdf#141880. LibreOffice cannot handle negative horizontal margin in contour wrap
- if (m_pImpl->nLeftMargin < 0)
- m_pImpl->nLeftMargin = 0;
- if (m_pImpl->nRightMargin < 0)
- m_pImpl->nRightMargin = 0;
+ if (m_pImpl->m_nLeftMargin < 0)
+ m_pImpl->m_nLeftMargin = 0;
+ if (m_pImpl->m_nRightMargin < 0)
+ m_pImpl->m_nRightMargin = 0;
}
else if (!bIsDiagram) // text::WrapTextMode_THROUGH
{
@@ -1207,32 +1210,32 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// Word's rendering.
if (m_pImpl->m_oEffectExtentLeft)
{
- m_pImpl->nLeftMargin
+ m_pImpl->m_nLeftMargin
+= oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentLeft);
}
if (m_pImpl->m_oEffectExtentTop)
{
- m_pImpl->nTopMargin
+ m_pImpl->m_nTopMargin
+= oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentTop);
}
if (m_pImpl->m_oEffectExtentRight)
{
- m_pImpl->nRightMargin
+ m_pImpl->m_nRightMargin
+= oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentRight);
}
if (m_pImpl->m_oEffectExtentBottom)
{
- m_pImpl->nBottomMargin
+ m_pImpl->m_nBottomMargin
+= oox::drawingml::convertEmuToHmm(*m_pImpl->m_oEffectExtentBottom);
}
}
// FixMe: tdf#141880 LibreOffice cannot handle negative vertical margins
// although they are allowed in ODF.
- if (m_pImpl->nTopMargin < 0)
- m_pImpl->nTopMargin = 0;
- if (m_pImpl->nBottomMargin < 0)
- m_pImpl->nBottomMargin = 0;
+ if (m_pImpl->m_nTopMargin < 0)
+ m_pImpl->m_nTopMargin = 0;
+ if (m_pImpl->m_nBottomMargin < 0)
+ m_pImpl->m_nBottomMargin = 0;
}
if (bUseShape && m_pImpl->m_rGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
@@ -1241,17 +1244,17 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// But they aren't Writer pictures, either (which are already handled above).
uno::Reference< beans::XPropertySet > xShapeProps(m_xShape, uno::UNO_QUERY_THROW);
- if (m_pImpl->nWrap == text::WrapTextMode_THROUGH && m_pImpl->nHoriRelation == text::RelOrientation::FRAME)
+ if (m_pImpl->m_nWrap == text::WrapTextMode_THROUGH && m_pImpl->m_nHoriRelation == text::RelOrientation::FRAME)
{
// text::RelOrientation::FRAME is OOXML's "column", which behaves as if
// layout-in-cell would be always off.
- m_pImpl->bLayoutInCell = false;
+ m_pImpl->m_bLayoutInCell = false;
}
// Anchored: Word only supports at-char in that case.
text::TextContentAnchorType eAnchorType = text::TextContentAnchorType_AT_CHARACTER;
- if (m_pImpl->bHidden)
+ if (m_pImpl->m_bHidden)
{
xShapeProps->setPropertyValue("Visible", uno::Any(false));
xShapeProps->setPropertyValue("Printable", uno::Any(false));
@@ -1266,12 +1269,12 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// positions the frame and not the text currently.
// tdf#135943: Instead of half-fixing and making a complete mess,
// just avoid until layout's repositioning is sync'd to the text frame.
- if (m_pImpl->bLayoutInCell && bTextBox)
- m_pImpl->bLayoutInCell = !m_pImpl->bCompatForcedLayoutInCell;
+ if (m_pImpl->m_bLayoutInCell && bTextBox)
+ m_pImpl->m_bLayoutInCell = !m_pImpl->m_bCompatForcedLayoutInCell;
xShapeProps->setPropertyValue("AnchorType", uno::Any(eAnchorType));
- if (m_pImpl->nVertRelation == text::RelOrientation::TEXT_LINE)
+ if (m_pImpl->m_nVertRelation == text::RelOrientation::TEXT_LINE)
{
// Word's "line" is "below the bottom of the line", our TEXT_LINE is
// "towards top, from the bottom of the line", so invert the vertical
@@ -1281,12 +1284,12 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
xShape->setPosition(aPoint);
}
- if (m_pImpl->bLayoutInCell && bTextBox && m_pImpl->rDomainMapper.IsInTable()
- && m_pImpl->nHoriRelation == text::RelOrientation::PAGE_FRAME)
- m_pImpl->nHoriRelation = text::RelOrientation::FRAME;
- if(m_pImpl->rDomainMapper.IsInTable())
+ if (m_pImpl->m_bLayoutInCell && bTextBox && m_pImpl->m_rDomainMapper.IsInTable()
+ && m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME)
+ m_pImpl->m_nHoriRelation = text::RelOrientation::FRAME;
+ if(m_pImpl->m_rDomainMapper.IsInTable())
xShapeProps->setPropertyValue(getPropertyName(PROP_FOLLOW_TEXT_FLOW),
- uno::Any(m_pImpl->bLayoutInCell));
+ uno::Any(m_pImpl->m_bLayoutInCell));
//only the position orientation is handled in applyPosition()
m_pImpl->applyPosition(xShapeProps);
@@ -1314,10 +1317,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
// absolute page position as a start.
// fdo#80555: also set position for graphic shapes here
if (!isTopGroupObj(m_xShape)
- || m_pImpl->nHoriRelation != text::RelOrientation::PAGE_FRAME
- || m_pImpl->nVertRelation != text::RelOrientation::PAGE_FRAME)
+ || m_pImpl->m_nHoriRelation != text::RelOrientation::PAGE_FRAME
+ || m_pImpl->m_nVertRelation != text::RelOrientation::PAGE_FRAME)
m_xShape->setPosition(
- awt::Point(m_pImpl->nLeftPosition, m_pImpl->nTopPosition));
+ awt::Point(m_pImpl->m_nLeftPosition, m_pImpl->m_nTopPosition));
if (nRotation)
xShapeProps->setPropertyValue("RotateAngle", uno::Any(nRotation));
@@ -1326,16 +1329,16 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
m_pImpl->applyRelativePosition(xShapeProps, /*bRelativeOnly=*/true);
- xShapeProps->setPropertyValue("SurroundContour", uno::Any(m_pImpl->bContour));
- xShapeProps->setPropertyValue("ContourOutside", uno::Any(m_pImpl->bContourOutside));
+ xShapeProps->setPropertyValue("SurroundContour", uno::Any(m_pImpl->m_bContour));
+ xShapeProps->setPropertyValue("ContourOutside", uno::Any(m_pImpl->m_bContourOutside));
m_pImpl->applyMargins(xShapeProps);
- xShapeProps->setPropertyValue("Opaque", uno::Any(m_pImpl->bOpaque));
- xShapeProps->setPropertyValue("Surround", uno::Any(static_cast<sal_Int32>(m_pImpl->nWrap)));
+ xShapeProps->setPropertyValue("Opaque", uno::Any(m_pImpl->m_bOpaque));
+ xShapeProps->setPropertyValue("Surround", uno::Any(static_cast<sal_Int32>(m_pImpl->m_nWrap)));
m_pImpl->applyZOrder(xShapeProps);
m_pImpl->applyName(xShapeProps);
m_pImpl->applyHyperlink(xShapeProps, bUseShape);
xShapeProps->setPropertyValue("AllowOverlap",
- uno::Any(m_pImpl->bAllowOverlap));
+ uno::Any(m_pImpl->m_bAllowOverlap));
// Get the grab-bag set by oox, merge with our one and then put it back.
comphelper::SequenceAsHashMap aInteropGrabBag(xShapeProps->getPropertyValue("InteropGrabBag"));
@@ -1356,16 +1359,16 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
}
break;
case NS_ooxml::LN_CT_Inline_distT:
- m_pImpl->nTopMargin = 0;
+ m_pImpl->m_nTopMargin = 0;
break;
case NS_ooxml::LN_CT_Inline_distB:
- m_pImpl->nBottomMargin = 0;
+ m_pImpl->m_nBottomMargin = 0;
break;
case NS_ooxml::LN_CT_Inline_distL:
- m_pImpl->nLeftMargin = 0;
+ m_pImpl->m_nLeftMargin = 0;
break;
case NS_ooxml::LN_CT_Inline_distR:
- m_pImpl->nRightMargin = 0;
+ m_pImpl->m_nRightMargin = 0;
break;
case NS_ooxml::LN_CT_GraphicalObjectData_uri:
rValue.getString();
@@ -1479,23 +1482,23 @@ uno::Reference<text::XTextContent> GraphicImport::GetGraphicObject()
void GraphicImport::ProcessShapeOptions(Value const & rValue)
{
sal_Int32 nIntValue = rValue.getInt();
- switch( m_pImpl->nShapeOptionType )
+ switch( m_pImpl->m_nShapeOptionType )
{
case NS_ooxml::LN_CT_Anchor_distL:
- m_pImpl->nLeftMargin = nIntValue / 360;
- m_pImpl->nLeftMarginOrig = m_pImpl->nLeftMargin;
+ m_pImpl->m_nLeftMargin = nIntValue / 360;
+ m_pImpl->m_nLeftMarginOrig = m_pImpl->m_nLeftMargin;
break;
case NS_ooxml::LN_CT_Anchor_distT:
//todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustULWrapForWordMargins()
- m_pImpl->nTopMargin = nIntValue / 360;
+ m_pImpl->m_nTopMargin = nIntValue / 360;
break;
case NS_ooxml::LN_CT_Anchor_distR:
//todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustLRWrapForWordMargins()
- m_pImpl->nRightMargin = nIntValue / 360;
+ m_pImpl->m_nRightMargin = nIntValue / 360;
break;
case NS_ooxml::LN_CT_Anchor_distB:
//todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustULWrapForWordMargins()
- m_pImpl->nBottomMargin = nIntValue / 360;
+ m_pImpl->m_nBottomMargin = nIntValue / 360;
break;
default:
OSL_FAIL( "shape option unsupported?");
@@ -1557,8 +1560,8 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
case NS_ooxml::LN_EG_WrapType_wrapTight:
{
// tdf#137850: Word >= 2013 seems to ignore bBehindDoc except for wrapNone, but older versions honour it.
- if (m_pImpl->bBehindDoc && m_pImpl->rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
- m_pImpl->bOpaque = true;
+ if (m_pImpl->m_bBehindDoc && m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
+ m_pImpl->m_bOpaque = true;
}
break;
}
@@ -1586,20 +1589,20 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
if( pProperties )
{
pProperties->resolve( *pHandler );
- if( !m_pImpl->bUseSimplePos )
+ if( !m_pImpl->m_bUseSimplePos )
{
- m_pImpl->nHoriRelation = pHandler->relation();
- m_pImpl->bPageToggle = pHandler->GetPageToggle();
- m_pImpl->nHoriOrient = pHandler->orientation();
- m_pImpl->nLeftPosition = pHandler->position();
+ m_pImpl->m_nHoriRelation = pHandler->relation();
+ m_pImpl->m_bPageToggle = pHandler->GetPageToggle();
+ m_pImpl->m_nHoriOrient = pHandler->orientation();
+ m_pImpl->m_nLeftPosition = pHandler->position();
// Left adjustments: if horizontally aligned to left of margin, then remove the
// left wrapping.
- if (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT)
+ if (m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT)
{
- if (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA)
+ if (m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA)
{
- m_pImpl->nLeftMargin = 0;
+ m_pImpl->m_nLeftMargin = 0;
}
}
}
@@ -1614,11 +1617,11 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
if( pProperties )
{
pProperties->resolve( *pHandler );
- if( !m_pImpl->bUseSimplePos )
+ if( !m_pImpl->m_bUseSimplePos )
{
- m_pImpl->nVertRelation = pHandler->relation();
- m_pImpl->nVertOrient = pHandler->orientation();
- m_pImpl->nTopPosition = pHandler->position();
+ m_pImpl->m_nVertRelation = pHandler->relation();
+ m_pImpl->m_nVertOrient = pHandler->orientation();
+ m_pImpl->m_nTopPosition = pHandler->position();
}
}
}
@@ -1664,24 +1667,24 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
break;
case NS_ooxml::LN_EG_WrapType_wrapNone: // 90944; - doesn't contain attributes
//depending on the behindDoc attribute text wraps through behind or in front of the object
- m_pImpl->nWrap = text::WrapTextMode_THROUGH;
+ m_pImpl->m_nWrap = text::WrapTextMode_THROUGH;
// Wrap though means the margins defined earlier should not be
// respected.
- m_pImpl->nLeftMargin = 0;
- m_pImpl->nTopMargin = 0;
- m_pImpl->nRightMargin = 0;
- m_pImpl->nBottomMargin = 0;
+ m_pImpl->m_nLeftMargin = 0;
+ m_pImpl->m_nTopMargin = 0;
+ m_pImpl->m_nRightMargin = 0;
+ m_pImpl->m_nBottomMargin = 0;
break;
case NS_ooxml::LN_EG_WrapType_wrapTopAndBottom: // 90948;
// tdf#137850: Word >= 2013 seems to ignore bBehindDoc except for wrapNone, but older versions honour it.
- if (m_pImpl->bBehindDoc && m_pImpl->rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
- m_pImpl->bOpaque = true;
- m_pImpl->nWrap = text::WrapTextMode_NONE;
+ if (m_pImpl->m_bBehindDoc && m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
+ m_pImpl->m_bOpaque = true;
+ m_pImpl->m_nWrap = text::WrapTextMode_NONE;
break;
case NS_ooxml::LN_CT_GraphicalObject_graphicData:// 90660;
{
- m_pImpl->bIsGraphic = true;
+ m_pImpl->m_bIsGraphic = true;
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties )
@@ -1725,7 +1728,7 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer
//shapes have only one border
table::BorderLine2 aBorderLine;
- GraphicBorderLine& rBorderLine = m_pImpl->aBorders[0];
+ GraphicBorderLine& rBorderLine = m_pImpl->m_aBorders[0];
if (rBorderLine.isEmpty() && xShapeProps.is() && xShapeProps->getPropertyValue("LineStyle").get<drawing::LineStyle>() != drawing::LineStyle_NONE)
{
// In case we got no border tokens and we have the
@@ -1753,29 +1756,29 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer
xGraphicObjectProperties->setPropertyValue(getPropertyName(rBorderProp), uno::Any(aBorderLine));
// setting graphic object shadow properties
- if (m_pImpl->bShadow)
+ if (m_pImpl->m_bShadow)
{
// Shadow width is approximated by average of X and Y
table::ShadowFormat aShadow;
- sal_uInt32 nShadowColor = m_pImpl->nShadowColor & 0x00FFFFFF; // The shadow color we get is RGB only.
- sal_Int32 nShadowWidth = (abs(m_pImpl->nShadowXDistance)
- + abs(m_pImpl->nShadowYDistance)) / 2;
+ sal_uInt32 nShadowColor = m_pImpl->m_nShadowColor & 0x00FFFFFF; // The shadow color we get is RGB only.
+ sal_Int32 nShadowWidth = (abs(m_pImpl->m_nShadowXDistance)
+ + abs(m_pImpl->m_nShadowYDistance)) / 2;
aShadow.ShadowWidth = nShadowWidth;
- sal_uInt8 nShadowTransparence = float(m_pImpl->nShadowTransparence) * 2.55;
+ sal_uInt8 nShadowTransparence = float(m_pImpl->m_nShadowTransparence) * 2.55;
nShadowColor |= (nShadowTransparence << 24); // Add transparence to the color.
aShadow.Color = nShadowColor;
// Distances -ve for top and right, +ve for bottom and left
- if (m_pImpl->nShadowXDistance > 0)
+ if (m_pImpl->m_nShadowXDistance > 0)
{
- if (m_pImpl->nShadowYDistance > 0)
+ if (m_pImpl->m_nShadowYDistance > 0)
aShadow.Location = table::ShadowLocation_BOTTOM_RIGHT;
else
aShadow.Location = table::ShadowLocation_TOP_RIGHT;
}
else
{
- if (m_pImpl->nShadowYDistance > 0)
+ if (m_pImpl->m_nShadowYDistance > 0)
aShadow.Location = table::ShadowLocation_BOTTOM_LEFT;
else
aShadow.Location = table::ShadowLocation_TOP_LEFT;
@@ -1785,87 +1788,87 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer
}
// setting properties for all types
- if( m_pImpl->bPositionProtected )
+ if( m_pImpl->m_bPositionProtected )
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_POSITION_PROTECTED ),
uno::Any(true));
- if( m_pImpl->bSizeProtected )
+ if( m_pImpl->m_bSizeProtected )
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SIZE_PROTECTED ),
uno::Any(true));
- xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_DECORATIVE), uno::Any(m_pImpl->bDecorative));
- sal_Int32 nWidth = - m_pImpl->nLeftPosition;
+ xGraphicObjectProperties->setPropertyValue(getPropertyName(PROP_DECORATIVE), uno::Any(m_pImpl->m_bDecorative));
+ sal_Int32 nWidth = - m_pImpl->m_nLeftPosition;
if (m_pImpl->m_rGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
{
//adjust margins
- if( (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT &&
- (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
- m_pImpl->nHoriRelation == text::RelOrientation::FRAME) ) ||
- (m_pImpl->nHoriOrient == text::HoriOrientation::INSIDE &&
- m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
- m_pImpl->nLeftMargin = 0;
- if((m_pImpl->nHoriOrient == text::HoriOrientation::RIGHT &&
- (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
- m_pImpl->nHoriRelation == text::RelOrientation::FRAME) ) ||
- (m_pImpl->nHoriOrient == text::HoriOrientation::INSIDE &&
- m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
- m_pImpl->nRightMargin = 0;
+ if( (m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT &&
+ (m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
+ m_pImpl->m_nHoriRelation == text::RelOrientation::FRAME) ) ||
+ (m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
+ m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
+ m_pImpl->m_nLeftMargin = 0;
+ if((m_pImpl->m_nHoriOrient == text::HoriOrientation::RIGHT &&
+ (m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
+ m_pImpl->m_nHoriRelation == text::RelOrientation::FRAME) ) ||
+ (m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
+ m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
+ m_pImpl->m_nRightMargin = 0;
// adjust top/bottom margins
- if( m_pImpl->nVertOrient == text::VertOrientation::TOP &&
- ( m_pImpl->nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
- m_pImpl->nVertRelation == text::RelOrientation::PAGE_FRAME))
- m_pImpl->nTopMargin = 0;
- if( m_pImpl->nVertOrient == text::VertOrientation::BOTTOM &&
- ( m_pImpl->nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
- m_pImpl->nVertRelation == text::RelOrientation::PAGE_FRAME))
- m_pImpl->nBottomMargin = 0;
- if( m_pImpl->nVertOrient == text::VertOrientation::BOTTOM &&
- m_pImpl->nVertRelation == text::RelOrientation::PAGE_PRINT_AREA )
- m_pImpl->nBottomMargin = 0;
+ if( m_pImpl->m_nVertOrient == text::VertOrientation::TOP &&
+ ( m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
+ m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_FRAME))
+ m_pImpl->m_nTopMargin = 0;
+ if( m_pImpl->m_nVertOrient == text::VertOrientation::BOTTOM &&
+ ( m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
+ m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_FRAME))
+ m_pImpl->m_nBottomMargin = 0;
+ if( m_pImpl->m_nVertOrient == text::VertOrientation::BOTTOM &&
+ m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA )
+ m_pImpl->m_nBottomMargin = 0;
//adjust alignment
- if( m_pImpl->nHoriOrient == text::HoriOrientation::INSIDE &&
- m_pImpl->nHoriRelation == text::RelOrientation::PAGE_FRAME )
+ if( m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
+ m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME )
{
// convert 'left to page' to 'from left -<width> to page text area'
- m_pImpl->nHoriOrient = text::HoriOrientation::NONE;
- m_pImpl->nHoriRelation = text::RelOrientation::PAGE_PRINT_AREA;
- m_pImpl->nLeftPosition = - nWidth;
+ m_pImpl->m_nHoriOrient = text::HoriOrientation::NONE;
+ m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_PRINT_AREA;
+ m_pImpl->m_nLeftPosition = - nWidth;
}
- else if( m_pImpl->nHoriOrient == text::HoriOrientation::OUTSIDE &&
- m_pImpl->nHoriRelation == text::RelOrientation::PAGE_FRAME )
+ else if( m_pImpl->m_nHoriOrient == text::HoriOrientation::OUTSIDE &&
+ m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME )
{
// convert 'right to page' to 'from left 0 to right page border'
- m_pImpl->nHoriOrient = text::HoriOrientation::NONE;
- m_pImpl->nHoriRelation = text::RelOrientation::PAGE_RIGHT;
- m_pImpl->nLeftPosition = 0;
+ m_pImpl->m_nHoriOrient = text::HoriOrientation::NONE;
+ m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_RIGHT;
+ m_pImpl->m_nLeftPosition = 0;
}
m_pImpl->applyPosition(xGraphicObjectProperties);
m_pImpl->applyRelativePosition(xGraphicObjectProperties);
- if( !m_pImpl->bOpaque )
+ if( !m_pImpl->m_bOpaque )
{
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::Any(m_pImpl->bOpaque));
+ xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::Any(m_pImpl->m_bOpaque));
}
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND ),
- uno::Any(static_cast<sal_Int32>(m_pImpl->nWrap)));
- if( m_pImpl->rDomainMapper.IsInTable())
+ uno::Any(static_cast<sal_Int32>(m_pImpl->m_nWrap)));
+ if( m_pImpl->m_rDomainMapper.IsInTable())
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_FOLLOW_TEXT_FLOW ),
- uno::Any(m_pImpl->bLayoutInCell));
+ uno::Any(m_pImpl->m_bLayoutInCell));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND_CONTOUR ),
- uno::Any(m_pImpl->bContour));
+ uno::Any(m_pImpl->m_bContour));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_CONTOUR_OUTSIDE ),
- uno::Any(m_pImpl->bContourOutside));
+ uno::Any(m_pImpl->m_bContourOutside));
m_pImpl->applyMargins(xGraphicObjectProperties);
}
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_ADJUST_CONTRAST ),
- uno::Any(static_cast<sal_Int16>(m_pImpl->nContrast)));
+ uno::Any(static_cast<sal_Int16>(m_pImpl->m_nContrast)));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_ADJUST_LUMINANCE ),
- uno::Any(static_cast<sal_Int16>(m_pImpl->nBrightness)));
- if(m_pImpl->eColorMode != drawing::ColorMode_STANDARD)
+ uno::Any(static_cast<sal_Int16>(m_pImpl->m_nBrightness)));
+ if(m_pImpl->m_eColorMode != drawing::ColorMode_STANDARD)
{
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_GRAPHIC_COLOR_MODE ),
- uno::Any(m_pImpl->eColorMode));
+ uno::Any(m_pImpl->m_eColorMode));
}
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_BACK_COLOR ),
@@ -2025,12 +2028,12 @@ void GraphicImport::lcl_endShape( )
bool GraphicImport::IsGraphic() const
{
- return m_pImpl->bIsGraphic;
+ return m_pImpl->m_bIsGraphic;
}
sal_Int32 GraphicImport::GetLeftMarginOrig() const
{
- return m_pImpl->nLeftMarginOrig;
+ return m_pImpl->m_nLeftMarginOrig;
}
}
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 6be6e7310686..ea4fb36ec4a2 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -287,7 +287,7 @@ void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props
if( hasFirstLineIndent && hasIndentAt )
return; // has them all, nothing to add
- const uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->pProperties->GetPropertyValues( );
+ const uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->m_pProperties->GetPropertyValues( );
// ParaFirstLineIndent -> FirstLineIndent
// ParaLeftMargin -> IndentAt
@@ -498,7 +498,7 @@ sal_uInt16 ListDef::GetChapterNumberingWeight() const
const StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle();
if (!pParaStyle)
continue;
- const StyleSheetPropertyMap& rProps = *pParaStyle->pProperties;
+ const StyleSheetPropertyMap& rProps = *pParaStyle->m_pProperties;
// In LO, the level's paraStyle outlineLevel always matches this listLevel.
// An undefined listLevel is treated as the first level.
sal_Int8 nListLevel = std::clamp<sal_Int8>(rProps.GetListLevel(), 0, 9);
@@ -510,7 +510,7 @@ sal_uInt16 ListDef::GetChapterNumberingWeight() const
// Arbitrarily chosen weighting factors - trying to round-trip LO choices if possible.
// LibreOffice always saves Outline rule (usually containing heading styles) as numId 1.
sal_uInt16 nWeightingFactor = GetId() == 1 ? 8 : 1;
- if (pParaStyle->sStyleIdentifierD.startsWith("Heading") )
+ if (pParaStyle->m_sStyleIdentifierD.startsWith("Heading") )
++nWeightingFactor;
nWeight += nWeightingFactor;
}
@@ -605,8 +605,8 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
xOutlines->getChapterNumberingRules( );
StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle( );
- pParaStyle->bAssignedAsChapterNumbering = true;
- aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEADING_STYLE_NAME), pParaStyle->sConvertedStyleName));
+ pParaStyle->m_bAssignedAsChapterNumbering = true;
+ aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEADING_STYLE_NAME), pParaStyle->m_sConvertedStyleName));
xOutlineRules->replaceByIndex(nLevel, uno::Any(comphelper::containerToSequence(aLvlProps)));
}
@@ -1130,7 +1130,7 @@ AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId )
pStylesTable->FindStyleSheetByISTD(listDef->GetNumStyleLink() );
const StyleSheetPropertyMap* pStyleSheetProperties =
- pStyleSheetEntry ? pStyleSheetEntry->pProperties.get() : nullptr;
+ pStyleSheetEntry ? pStyleSheetEntry->m_pProperties.get() : nullptr;
if( pStyleSheetProperties && pStyleSheetProperties->props().GetListId() >= 0 )
{
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 3d4fc8ea76ad..00b1b2948dd6 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1647,7 +1647,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( u"Standard" );
if ( pEntry )
{
- std::optional< PropertyMap::Property > pPropHeight = pEntry->pProperties->getProperty( PROP_CHAR_HEIGHT_ASIAN );
+ std::optional< PropertyMap::Property > pPropHeight = pEntry->m_pProperties->getProperty( PROP_CHAR_HEIGHT_ASIAN );
if ( pPropHeight )
{
double fHeight = 0;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 1b7874e1c5fc..1e10d4966dbf 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -59,13 +59,13 @@ namespace writerfilter::dmapper
{
StyleSheetEntry::StyleSheetEntry() :
- bIsDefaultStyle(false)
- ,bAssignedAsChapterNumbering(false)
- ,bInvalidHeight(false)
- ,bHasUPE(false)
- ,nStyleTypeCode(STYLE_TYPE_UNKNOWN)
- ,pProperties(new StyleSheetPropertyMap)
- ,bAutoRedefine(false)
+ m_bIsDefaultStyle(false)
+ ,m_bAssignedAsChapterNumbering(false)
+ ,m_bInvalidHeight(false)
+ ,m_bHasUPE(false)
+ ,m_nStyleTypeCode(STYLE_TYPE_UNKNOWN)
+ ,m_pProperties(new StyleSheetPropertyMap)
+ ,m_bAutoRedefine(false)
{
}
@@ -75,15 +75,15 @@ StyleSheetEntry::~StyleSheetEntry()
TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry const & rEntry )
{
- bIsDefaultStyle = rEntry.bIsDefaultStyle;
- bInvalidHeight = rEntry.bInvalidHeight;
- bHasUPE = rEntry.bHasUPE;
- nStyleTypeCode = STYLE_TYPE_TABLE;
- sBaseStyleIdentifier = rEntry.sBaseStyleIdentifier;
- sNextStyleIdentifier = rEntry.sNextStyleIdentifier;
- sLinkStyleIdentifier = rEntry.sLinkStyleIdentifier;
- sStyleName = rEntry.sStyleName;
- sStyleIdentifierD = rEntry.sStyleIdentifierD;
+ m_bIsDefaultStyle = rEntry.m_bIsDefaultStyle;
+ m_bInvalidHeight = rEntry.m_bInvalidHeight;
+ m_bHasUPE = rEntry.m_bHasUPE;
+ m_nStyleTypeCode = STYLE_TYPE_TABLE;
+ m_sBaseStyleIdentifier = rEntry.m_sBaseStyleIdentifier;
+ m_sNextStyleIdentifier = rEntry.m_sNextStyleIdentifier;
+ m_sLinkStyleIdentifier = rEntry.m_sLinkStyleIdentifier;
+ m_sStyleName = rEntry.m_sStyleName;
+ m_sStyleIdentifierD = rEntry.m_sStyleIdentifierD;
}
TableStyleSheetEntry::~TableStyleSheetEntry( )
@@ -151,7 +151,7 @@ beans::PropertyValues StyleSheetEntry::GetInteropGrabBagSeq() const
beans::PropertyValue StyleSheetEntry::GetInteropGrabBag()
{
beans::PropertyValue aRet;
- aRet.Name = sStyleIdentifierD;
+ aRet.Name = m_sStyleIdentifierD;
beans::PropertyValues aSeq = GetInteropGrabBagSeq();
aRet.Value <<= aSeq;
@@ -166,9 +166,9 @@ void StyleSheetEntry::AppendInteropGrabBag(const beans::PropertyValue& rValue)
PropertyMapPtr StyleSheetEntry::GetMergedInheritedProperties(const StyleSheetTablePtr& pStyleSheetTable)
{
PropertyMapPtr pRet;
- if ( pStyleSheetTable && !sBaseStyleIdentifier.isEmpty() && sBaseStyleIdentifier != sStyleIdentifierD )
+ if ( pStyleSheetTable && !m_sBaseStyleIdentifier.isEmpty() && m_sBaseStyleIdentifier != m_sStyleIdentifierD )
{
- const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD(sBaseStyleIdentifier);
+ const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD(m_sBaseStyleIdentifier);
if ( pParentStyleSheet )
pRet = pParentStyleSheet->GetMergedInheritedProperties(pStyleSheetTable);
}
@@ -176,7 +176,7 @@ PropertyMapPtr StyleSheetEntry::GetMergedInheritedProperties(const StyleSheetTab
if ( !pRet )
pRet = new PropertyMap;
- pRet->InsertProps(pProperties.get());
+ pRet->InsertProps(m_pProperties.get());
return pRet;
}
@@ -350,7 +350,7 @@ void StyleSheetTable_Impl::AppendLatentStyleProperty(const OUString& aName, Valu
beans::PropertyValue aValue;
aValue.Name = aName;
aValue.Value <<= rValue.getString();
- m_pCurrentEntry->aLatentStyles.push_back(aValue);
+ m_pCurrentEntry->m_aLatentStyles.push_back(aValue);
}
void StyleSheetTable_Impl::SetPropertiesToDefault(const uno::Reference<style::XStyle>& xStyle)
@@ -422,16 +422,16 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
// The default type is paragraph, and it needs to be processed first,
// because the NS_ooxml::LN_CT_Style_type handling may set m_pImpl->m_pCurrentEntry
// to point to a different object.
- if( m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_UNKNOWN )
+ if( m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_UNKNOWN )
{
if( Name != NS_ooxml::LN_CT_Style_type )
- m_pImpl->m_pCurrentEntry->nStyleTypeCode = STYLE_TYPE_PARA;
+ m_pImpl->m_pCurrentEntry->m_nStyleTypeCode = STYLE_TYPE_PARA;
}
switch(Name)
{
case NS_ooxml::LN_CT_Style_type:
{
- SAL_WARN_IF( m_pImpl->m_pCurrentEntry->nStyleTypeCode != STYLE_TYPE_UNKNOWN,
+ SAL_WARN_IF( m_pImpl->m_pCurrentEntry->m_nStyleTypeCode != STYLE_TYPE_UNKNOWN,
"writerfilter", "Style type needs to be processed first" );
StyleType nType(STYLE_TYPE_UNKNOWN);
switch (nIntValue)
@@ -462,30 +462,30 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
m_pImpl->m_pCurrentEntry = pTableEntry.get();
}
else
- m_pImpl->m_pCurrentEntry->nStyleTypeCode = nType;
+ m_pImpl->m_pCurrentEntry->m_nStyleTypeCode = nType;
}
break;
case NS_ooxml::LN_CT_Style_default:
- m_pImpl->m_pCurrentEntry->bIsDefaultStyle = (nIntValue != 0);
+ m_pImpl->m_pCurrentEntry->m_bIsDefaultStyle = (nIntValue != 0);
- if (m_pImpl->m_pCurrentEntry->nStyleTypeCode != STYLE_TYPE_UNKNOWN)
+ if (m_pImpl->m_pCurrentEntry->m_nStyleTypeCode != STYLE_TYPE_UNKNOWN)
{
// "If this attribute is specified by multiple styles, then the last instance shall be used."
- if (m_pImpl->m_pCurrentEntry->bIsDefaultStyle
- && m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_PARA
- && !m_pImpl->m_pCurrentEntry->sStyleIdentifierD.isEmpty())
+ if (m_pImpl->m_pCurrentEntry->m_bIsDefaultStyle
+ && m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_PARA
+ && !m_pImpl->m_pCurrentEntry->m_sStyleIdentifierD.isEmpty())
{
- m_pImpl->m_sDefaultParaStyleName = m_pImpl->m_pCurrentEntry->sStyleIdentifierD;
+ m_pImpl->m_sDefaultParaStyleName = m_pImpl->m_pCurrentEntry->m_sStyleIdentifierD;
}
beans::PropertyValue aValue;
aValue.Name = "default";
- aValue.Value <<= m_pImpl->m_pCurrentEntry->bIsDefaultStyle;
+ aValue.Value <<= m_pImpl->m_pCurrentEntry->m_bIsDefaultStyle;
m_pImpl->m_pCurrentEntry->AppendInteropGrabBag(aValue);
}
break;
case NS_ooxml::LN_CT_Style_customStyle:
- if (m_pImpl->m_pCurrentEntry->nStyleTypeCode != STYLE_TYPE_UNKNOWN)
+ if (m_pImpl->m_pCurrentEntry->m_nStyleTypeCode != STYLE_TYPE_UNKNOWN)
{
beans::PropertyValue aValue;
aValue.Name = "customStyle";
@@ -494,8 +494,8 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
}
break;
case NS_ooxml::LN_CT_Style_styleId:
- m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue;
- if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ m_pImpl->m_pCurrentEntry->m_sStyleIdentifierD = sValue;
+ if(m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
@@ -548,8 +548,8 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
{
case NS_ooxml::LN_CT_Style_name:
//this is only a UI name!
- m_pImpl->m_pCurrentEntry->sStyleName = sStringValue;
- if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ m_pImpl->m_pCurrentEntry->m_sStyleName = sStringValue;
+ if(m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
@@ -559,8 +559,8 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
}
break;
case NS_ooxml::LN_CT_Style_basedOn:
- m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier = sStringValue;
- if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ m_pImpl->m_pCurrentEntry->m_sBaseStyleIdentifier = sStringValue;
+ if(m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
@@ -570,10 +570,10 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
}
break;
case NS_ooxml::LN_CT_Style_link:
- m_pImpl->m_pCurrentEntry->sLinkStyleIdentifier = sStringValue;
+ m_pImpl->m_pCurrentEntry->m_sLinkStyleIdentifier = sStringValue;
break;
case NS_ooxml::LN_CT_Style_next:
- m_pImpl->m_pCurrentEntry->sNextStyleIdentifier = sStringValue;
+ m_pImpl->m_pCurrentEntry->m_sNextStyleIdentifier = sStringValue;
break;
case NS_ooxml::LN_CT_Style_aliases:
case NS_ooxml::LN_CT_Style_hidden:
@@ -582,12 +582,12 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_Style_personalReply:
break;
case NS_ooxml::LN_CT_Style_autoRedefine:
- m_pImpl->m_pCurrentEntry->bAutoRedefine = nIntValue;
+ m_pImpl->m_pCurrentEntry->m_bAutoRedefine = nIntValue;
break;
case NS_ooxml::LN_CT_Style_tcPr:
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
- if( pProperties && m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ if( pProperties && m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
auto pTblStylePrHandler = std::make_shared<TblStylePrHandler>(m_pImpl->m_rDMapper);
pProperties->resolve(*pTblStylePrHandler);
@@ -596,7 +596,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
rTableEntry.AppendInteropGrabBag(pTblStylePrHandler->getInteropGrabBag("tcPr"));
// This is a <w:tcPr> directly under <w:style>, so it affects the whole table.
- rTableEntry.pProperties->InsertProps(pTblStylePrHandler->getProperties());
+ rTableEntry.m_pProperties->InsertProps(pTblStylePrHandler->getProperties());
}
}
break;
@@ -608,7 +608,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_Style_unhideWhenUsed:
case NS_ooxml::LN_CT_Style_uiPriority:
case NS_ooxml::LN_CT_Style_locked:
- if (m_pImpl->m_pCurrentEntry->nStyleTypeCode != STYLE_TYPE_UNKNOWN)
+ if (m_pImpl->m_pCurrentEntry->m_nStyleTypeCode != STYLE_TYPE_UNKNOWN)
{
StyleSheetEntryPtr pEntry = m_pImpl->m_pCurrentEntry;
beans::PropertyValue aValue;
@@ -667,7 +667,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
TableStyleSheetEntry * pTableEntry = dynamic_cast<TableStyleSheetEntry*>( pEntry );
if (nType == TBL_STYLE_UNKNOWN)
{
- pEntry->pProperties->InsertProps(pProps);
+ pEntry->m_pProperties->InsertProps(pProps);
}
else
{
@@ -720,7 +720,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
m_pImpl->m_rDMapper.SetDocDefaultsImport(false);
break;
case NS_ooxml::LN_CT_TblPrBase_jc: //table alignment - row properties!
- m_pImpl->m_pCurrentEntry->pProperties->Insert( PROP_HORI_ORIENT,
+ m_pImpl->m_pCurrentEntry->m_pProperties->Insert( PROP_HORI_ORIENT,
uno::Any( ConversionHelper::convertTableJustification( nIntValue )));
break;
case NS_ooxml::LN_CT_TrPrBase_jc: //table alignment - row properties!
@@ -732,7 +732,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
{
auto pBorderHandler = std::make_shared<BorderHandler>(m_pImpl->m_rDMapper.IsOOXMLImport());
pProperties->resolve(*pBorderHandler);
- m_pImpl->m_pCurrentEntry->pProperties->InsertProps(
+ m_pImpl->m_pCurrentEntry->m_pProperties->InsertProps(
pBorderHandler->getProperties());
}
}
@@ -753,7 +753,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
beans::PropertyValue aValue;
aValue.Name = "lsdException";
aValue.Value <<= comphelper::containerToSequence(pLatentStyleHandler->getAttributes());
- m_pImpl->m_pCurrentEntry->aLsdExceptions.push_back(aValue);
+ m_pImpl->m_pCurrentEntry->m_aLsdExceptions.push_back(aValue);
}
}
break;
@@ -767,13 +767,13 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
break;
tools::SvRef<TablePropertiesHandler> pTblHandler(new TablePropertiesHandler());
- pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties.get() );
+ pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->m_pProperties.get() );
if ( !pTblHandler->sprm( rSprm ) )
{
- m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties.get() );
+ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->m_pProperties.get() );
PropertyMapPtr pProps(new PropertyMap());
- if (m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ if (m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
if (nSprmId == NS_ooxml::LN_CT_Style_pPr)
m_pImpl->m_rDMapper.enableInteropGrabBag("pPr");
@@ -781,7 +781,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
m_pImpl->m_rDMapper.enableInteropGrabBag("rPr");
}
m_pImpl->m_rDMapper.sprmWithProps( rSprm, pProps );
- if (m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ if (m_pImpl->m_pCurrentEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
if (nSprmId == NS_ooxml::LN_CT_Style_pPr || nSprmId == NS_ooxml::LN_CT_Style_rPr)
{
@@ -790,7 +790,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
}
}
- m_pImpl->m_pCurrentEntry->pProperties->InsertProps(pProps);
+ m_pImpl->m_pCurrentEntry->m_pProperties->InsertProps(pProps);
m_pImpl->m_rDMapper.PopStyleSheetProperties( );
}
@@ -806,29 +806,29 @@ void StyleSheetTable::lcl_entry(writerfilter::Reference<Properties>::Pointer_t r
OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL here");
StyleSheetEntryPtr pNewEntry( new StyleSheetEntry );
m_pImpl->m_pCurrentEntry = pNewEntry;
- m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties.get() );
+ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->m_pProperties.get() );
ref->resolve(*this);
//append it to the table
m_pImpl->m_rDMapper.PopStyleSheetProperties();
- if( !m_pImpl->m_rDMapper.IsOOXMLImport() || !m_pImpl->m_pCurrentEntry->sStyleName.isEmpty())
+ if( !m_pImpl->m_rDMapper.IsOOXMLImport() || !m_pImpl->m_pCurrentEntry->m_sStyleName.isEmpty())
{
- m_pImpl->m_pCurrentEntry->sConvertedStyleName = ConvertStyleName( m_pImpl->m_pCurrentEntry->sStyleName );
+ m_pImpl->m_pCurrentEntry->m_sConvertedStyleName = ConvertStyleName( m_pImpl->m_pCurrentEntry->m_sStyleName );
m_pImpl->m_aStyleSheetEntries.push_back( m_pImpl->m_pCurrentEntry );
- m_pImpl->m_aStyleSheetEntriesMap.emplace( m_pImpl->m_pCurrentEntry->sStyleIdentifierD, m_pImpl->m_pCurrentEntry );
+ m_pImpl->m_aStyleSheetEntriesMap.emplace( m_pImpl->m_pCurrentEntry->m_sStyleIdentifierD, m_pImpl->m_pCurrentEntry );
}
else
{
//TODO: this entry contains the default settings - they have to be added to the settings
}
- if (!m_pImpl->m_pCurrentEntry->aLatentStyles.empty())
+ if (!m_pImpl->m_pCurrentEntry->m_aLatentStyles.empty())
{
// We have latent styles for this entry, then process them.
- std::vector<beans::PropertyValue>& rLatentStyles = m_pImpl->m_pCurrentEntry->aLatentStyles;
+ std::vector<beans::PropertyValue>& rLatentStyles = m_pImpl->m_pCurrentEntry->m_aLatentStyles;
- if (!m_pImpl->m_pCurrentEntry->aLsdExceptions.empty())
+ if (!m_pImpl->m_pCurrentEntry->m_aLsdExceptions.empty())
{
- std::vector<beans::PropertyValue>& rLsdExceptions = m_pImpl->m_pCurrentEntry->aLsdExceptions;
+ std::vector<beans::PropertyValue>& rLsdExceptions = m_pImpl->m_pCurrentEntry->m_aLsdExceptions;
beans::PropertyValue aValue;
aValue.Name = "lsdExceptions";
aValue.Value <<= comphelper::containerToSequence(rLsdExceptions);
@@ -913,13 +913,13 @@ void StyleSheetTable::ApplyNumberingStyleNameToParaStyles()
for ( const auto& pEntry : m_pImpl->m_aStyleSheetEntries )
{
StyleSheetPropertyMap* pStyleSheetProperties = nullptr;
- if ( pEntry->nStyleTypeCode == STYLE_TYPE_PARA && (pStyleSheetProperties = pEntry->pProperties.get()) )
+ if ( pEntry->m_nStyleTypeCode == STYLE_TYPE_PARA && (pStyleSheetProperties = pEntry->m_pProperties.get()) )
{
// ListId 0 means turn off numbering - to cancel inheritance - so make sure that can be set.
if (pStyleSheetProperties->props().GetListId() > -1)
{
uno::Reference< style::XStyle > xStyle;
- xParaStyles->getByName( ConvertStyleName(pEntry->sStyleName) ) >>= xStyle;
+ xParaStyles->getByName( ConvertStyleName(pEntry->m_sStyleName) ) >>= xStyle;
if ( !xStyle.is() )
break;
@@ -934,7 +934,7 @@ void StyleSheetTable::ApplyNumberingStyleNameToParaStyles()
// does something rather strange. It does not allow two paragraph styles
// to share the same listLevel on a numbering rule.
// Consider this style to just be body level if already used previously.
- m_pImpl->m_rDMapper.ValidateListLevel(pEntry->sStyleIdentifierD);
+ m_pImpl->m_rDMapper.ValidateListLevel(pEntry->m_sStyleIdentifierD);
}
}
}
@@ -966,25 +966,25 @@ void StyleSheetTable::ReApplyInheritedOutlineLevelFromChapterNumbering()
for (const auto& pEntry : m_pImpl->m_aStyleSheetEntries)
{
- if (pEntry->nStyleTypeCode != STYLE_TYPE_PARA || pEntry->sBaseStyleIdentifier.isEmpty())
+ if (pEntry->m_nStyleTypeCode != STYLE_TYPE_PARA || pEntry->m_sBaseStyleIdentifier.isEmpty())
continue;
- sal_Int16 nOutlineLevel = pEntry->pProperties->GetOutlineLevel();
+ sal_Int16 nOutlineLevel = pEntry->m_pProperties->GetOutlineLevel();
if (nOutlineLevel != -1)
continue;
- StyleSheetEntryPtr pParent = FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
- if (!pParent || !pParent->bAssignedAsChapterNumbering)
+ StyleSheetEntryPtr pParent = FindStyleSheetByISTD(pEntry->m_sBaseStyleIdentifier);
+ if (!pParent || !pParent->m_bAssignedAsChapterNumbering)
continue;
- nOutlineLevel = pParent->pProperties->GetOutlineLevel();
+ nOutlineLevel = pParent->m_pProperties->GetOutlineLevel();
assert(nOutlineLevel >= WW_OUTLINE_MIN && nOutlineLevel < WW_OUTLINE_MAX);
// convert MS level to LO equivalent outline level
++nOutlineLevel;
uno::Reference< style::XStyle > xStyle;
- xParaStyles->getByName(pEntry->sConvertedStyleName) >>= xStyle;
+ xParaStyles->getByName(pEntry->m_sConvertedStyleName) >>= xStyle;
if ( !xStyle.is() )
break;
@@ -1065,16 +1065,16 @@ void StyleSheetTable::ApplyClonedTOCStyles()
OUString StyleSheetTable::CloneTOCStyle(FontTablePtr const& rFontTable, StyleSheetEntryPtr const pStyle, OUString const& rNewName)
{
StyleSheetEntryPtr const pClone(new StyleSheetEntry(*pStyle));
- pClone->sStyleIdentifierD = rNewName;
- pClone->sStyleName = rNewName;
- pClone->sConvertedStyleName = ConvertStyleName(rNewName);
+ pClone->m_sStyleIdentifierD = rNewName;
+ pClone->m_sStyleName = rNewName;
+ pClone->m_sConvertedStyleName = ConvertStyleName(rNewName);
m_pImpl->m_aStyleSheetEntries.push_back(pClone);
// add it so it will be found if referenced from another TOC
m_pImpl->m_aStyleSheetEntriesMap.emplace(rNewName, pClone);
- m_pImpl->m_ClonedTOCStylesMap.emplace(pStyle->sStyleName, pClone->sConvertedStyleName);
+ m_pImpl->m_ClonedTOCStylesMap.emplace(pStyle->m_sStyleName, pClone->m_sConvertedStyleName);
std::vector<StyleSheetEntryPtr> const styles{ pClone };
ApplyStyleSheetsImpl(rFontTable, styles);
- return pClone->sConvertedStyleName;
+ return pClone->m_sConvertedStyleName;
}
void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
@@ -1104,18 +1104,18 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
std::vector<beans::PropertyValue> aTableStylesVec;
for (auto& pEntry : rEntries)
{
- if( pEntry->nStyleTypeCode == STYLE_TYPE_UNKNOWN && !pEntry->sStyleName.isEmpty() )
- pEntry->nStyleTypeCode = STYLE_TYPE_PARA; // unspecified style types are considered paragraph styles
+ if( pEntry->m_nStyleTypeCode == STYLE_TYPE_UNKNOWN && !pEntry->m_sStyleName.isEmpty() )
+ pEntry->m_nStyleTypeCode = STYLE_TYPE_PARA; // unspecified style types are considered paragraph styles
- if( pEntry->nStyleTypeCode == STYLE_TYPE_CHAR || pEntry->nStyleTypeCode == STYLE_TYPE_PARA || pEntry->nStyleTypeCode == STYLE_TYPE_LIST )
+ if( pEntry->m_nStyleTypeCode == STYLE_TYPE_CHAR || pEntry->m_nStyleTypeCode == STYLE_TYPE_PARA || pEntry->m_nStyleTypeCode == STYLE_TYPE_LIST )
{
- bool bParaStyle = pEntry->nStyleTypeCode == STYLE_TYPE_PARA;
- bool bCharStyle = pEntry->nStyleTypeCode == STYLE_TYPE_CHAR;
- bool bListStyle = pEntry->nStyleTypeCode == STYLE_TYPE_LIST;
+ bool bParaStyle = pEntry->m_nStyleTypeCode == STYLE_TYPE_PARA;
+ bool bCharStyle = pEntry->m_nStyleTypeCode == STYLE_TYPE_CHAR;
+ bool bListStyle = pEntry->m_nStyleTypeCode == STYLE_TYPE_LIST;
bool bInsert = false;
uno::Reference< container::XNameContainer > xStyles = bParaStyle ? xParaStyles : (bListStyle ? xNumberingStyles : xCharStyles);
uno::Reference< style::XStyle > xStyle;
- const OUString sConvertedStyleName = ConvertStyleName( pEntry->sStyleName );
+ const OUString sConvertedStyleName = ConvertStyleName( pEntry->m_sStyleName );
if(xStyles->hasByName( sConvertedStyleName ))
{
@@ -1131,7 +1131,7 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
// resolve import conflicts with built-in styles (only if defaults have been defined)
if ( m_pImpl->m_bHasImportedDefaultParaProps
- && pEntry->sBaseStyleIdentifier.isEmpty() //imported style has no inheritance
+ && pEntry->m_sBaseStyleIdentifier.isEmpty() //imported style has no inheritance
&& !xStyle->getParentStyle().isEmpty() ) //built-in style has a default inheritance
{
xStyle->setParentStyle( "" );
@@ -1153,7 +1153,7 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
xStyles->insertByName( sConvertedStyleName, uno::Any( xStyle ) );
xStyle.set(xStyles->getByName(sConvertedStyleName), uno::UNO_QUERY_THROW);
- StyleSheetPropertyMap* pPropertyMap = pEntry->pProperties.get();
+ StyleSheetPropertyMap* pPropertyMap = pEntry->m_pProperties.get();
if (pPropertyMap && pPropertyMap->props().GetListId() == -1)
{
// No properties? Word default is 'none', Writer one is 'arabic', handle this.
@@ -1173,16 +1173,16 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
}
}
}
- if( !pEntry->sBaseStyleIdentifier.isEmpty() )
+ if( !pEntry->m_sBaseStyleIdentifier.isEmpty() )
{
try
{
//TODO: Handle cases where a paragraph <> character style relation is needed
- StyleSheetEntryPtr pParent = FindStyleSheetByISTD( pEntry->sBaseStyleIdentifier );
+ StyleSheetEntryPtr pParent = FindStyleSheetByISTD( pEntry->m_sBaseStyleIdentifier );
// Writer core doesn't support numbering styles having a parent style, it seems
if (pParent && !bListStyle)
{
- const OUString sParentStyleName = ConvertStyleName( pParent->sStyleName );
+ const OUString sParentStyleName = ConvertStyleName( pParent->m_sStyleName );
if ( !sParentStyleName.isEmpty() && !xStyles->hasByName( sParentStyleName ) )
aMissingParent.emplace_back( sParentStyleName, xStyle );
else
@@ -1197,7 +1197,7 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
else if( bParaStyle )
{
// Paragraph styles that don't inherit from some parent need to apply the DocDefaults
- pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bOverwrite=*/false );
+ pEntry->m_pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bOverwrite=*/false );
//now it's time to set the default parameters - for paragraph styles
//Fonts: Western first entry in font table
@@ -1210,39 +1210,39 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
uno::Any aTwoHundredFortyTwip(12.);
// font size to 240 twip (12 pts) for all if not set
- pEntry->pProperties->Insert(PROP_CHAR_HEIGHT, aTwoHundredFortyTwip, false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_HEIGHT, aTwoHundredFortyTwip, false);
// western font not already set -> apply first font
const FontEntry::Pointer_t pWesternFontEntry(rFontTable->getFontEntry( 0 ));
OUString sWesternFontName = pWesternFontEntry->sFontName;
- pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME, uno::Any( sWesternFontName ), false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_FONT_NAME, uno::Any( sWesternFontName ), false);
// CJK ... apply second font
const FontEntry::Pointer_t pCJKFontEntry(rFontTable->getFontEntry( 2 ));
- pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME_ASIAN, uno::Any( pCJKFontEntry->sFontName ), false);
- pEntry->pProperties->Insert(PROP_CHAR_HEIGHT_ASIAN, aTwoHundredFortyTwip, false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_FONT_NAME_ASIAN, uno::Any( pCJKFontEntry->sFontName ), false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_HEIGHT_ASIAN, aTwoHundredFortyTwip, false);
// CTL ... apply third font, if available
if( nFontCount > 3 )
{
const FontEntry::Pointer_t pCTLFontEntry(rFontTable->getFontEntry( 3 ));
- pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME_COMPLEX, uno::Any( pCTLFontEntry->sFontName ), false);
- pEntry->pProperties->Insert(PROP_CHAR_HEIGHT_COMPLEX, aTwoHundredFortyTwip, false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_FONT_NAME_COMPLEX, uno::Any( pCTLFontEntry->sFontName ), false);
+ pEntry->m_pProperties->Insert(PROP_CHAR_HEIGHT_COMPLEX, aTwoHundredFortyTwip, false);
}
}
}
- auto aPropValues = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(pEntry->pProperties->GetPropertyValues());
+ auto aPropValues = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(pEntry->m_pProperties->GetPropertyValues());
if (bParaStyle || bCharStyle)
{
// delay adding LinkStyle property: all styles need to be created first
- if (!pEntry->sLinkStyleIdentifier.isEmpty())
+ if (!pEntry->m_sLinkStyleIdentifier.isEmpty())
{
StyleSheetEntryPtr pLinkStyle
- = FindStyleSheetByISTD(pEntry->sLinkStyleIdentifier);
- if (pLinkStyle && !pLinkStyle->sStyleName.isEmpty())
- aMissingLink.emplace_back(ConvertStyleName(pLinkStyle->sStyleName),
+ = FindStyleSheetByISTD(pEntry->m_sLinkStyleIdentifier);
+ if (pLinkStyle && !pLinkStyle->m_sStyleName.isEmpty())
+ aMissingLink.emplace_back(ConvertStyleName(pLinkStyle->m_sStyleName),
xStyle);
}
}
@@ -1250,15 +1250,15 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
if( bParaStyle )
{
// delay adding FollowStyle property: all styles need to be created first
- if ( !pEntry->sNextStyleIdentifier.isEmpty() )
+ if ( !pEntry->m_sNextStyleIdentifier.isEmpty() )
{
- StyleSheetEntryPtr pFollowStyle = FindStyleSheetByISTD( pEntry->sNextStyleIdentifier );
- if ( pFollowStyle && !pFollowStyle->sStyleName.isEmpty() )
- aMissingFollow.emplace_back( ConvertStyleName( pFollowStyle->sStyleName ), xStyle );
+ StyleSheetEntryPtr pFollowStyle = FindStyleSheetByISTD( pEntry->m_sNextStyleIdentifier );
+ if ( pFollowStyle && !pFollowStyle->m_sStyleName.isEmpty() )
+ aMissingFollow.emplace_back( ConvertStyleName( pFollowStyle->m_sStyleName ), xStyle );
}
// Set the outline levels
- StyleSheetPropertyMap* pStyleSheetProperties = pEntry ? pEntry->pProperties.get() : nullptr;
+ StyleSheetPropertyMap* pStyleSheetProperties = pEntry ? pEntry->m_pProperties.get() : nullptr;
if ( pStyleSheetProperties )
{
@@ -1349,11 +1349,11 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
}
}
// Duplicate MSWord's single footnote reference into Footnote Characters and Footnote anchor
- if( pEntry->sStyleName.equalsIgnoreAsciiCase("footnote reference")
- || pEntry->sStyleName.equalsIgnoreAsciiCase("endnote reference") )
+ if( pEntry->m_sStyleName.equalsIgnoreAsciiCase("footnote reference")
+ || pEntry->m_sStyleName.equalsIgnoreAsciiCase("endnote reference") )
{
uno::Reference< style::XStyle > xCopyStyle;
- if( pEntry->sStyleName.equalsIgnoreAsciiCase("footnote reference") )
+ if( pEntry->m_sStyleName.equalsIgnoreAsciiCase("footnote reference") )
xStyles->getByName( "Footnote anchor" ) >>= xCopyStyle;
else
xStyles->getByName( "Endnote anchor" ) >>= xCopyStyle;
@@ -1399,18 +1399,18 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const FontTablePtr& rFontTable, std::
}
// Only paragraph styles support automatic updates.
- if (pEntry->bAutoRedefine && bParaStyle)
+ if (pEntry->m_bAutoRedefine && bParaStyle)
xPropertySet->setPropertyValue("IsAutoUpdate", uno::Any(true));
}
- else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ else if(pEntry->m_nStyleTypeCode == STYLE_TYPE_TABLE)
{
// If this is a table style, save its contents as-is for roundtrip purposes.
TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(pEntry.get());
aTableStylesVec.push_back(pTableEntry->GetInteropGrabBag());
// if DocDefaults exist, MS Word includes these in the table style definition.
- pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultCharProps, /*bOverwrite=*/false );
- pEntry->pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bOverwrite=*/false );
+ pEntry->m_pProperties->InsertProps( m_pImpl->m_pDefaultCharProps, /*bOverwrite=*/false );
+ pEntry->m_pProperties->InsertProps( m_pImpl->m_pDefaultParaProps, /*bOverwrite=*/false );
}
}
@@ -1482,7 +1482,7 @@ StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(std::u16s
StyleSheetEntryPtr pRet;
for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries)
{
- if( rpEntry->sConvertedStyleName == sIndex)
+ if( rpEntry->m_sConvertedStyleName == sIndex)
{
pRet = rpEntry;
break;
@@ -1511,9 +1511,9 @@ OUString StyleSheetTable::ConvertStyleName( const OUString& rWWName, bool bExten
auto findIt = m_pImpl->m_aStyleSheetEntriesMap.find(rWWName);
if (findIt != m_pImpl->m_aStyleSheetEntriesMap.end())
{
- if (!findIt->second->sConvertedStyleName.isEmpty())
- return findIt->second->sConvertedStyleName;
- sRet = findIt->second->sStyleName;
+ if (!findIt->second->m_sConvertedStyleName.isEmpty())
+ return findIt->second->m_sConvertedStyleName;
+ sRet = findIt->second->m_sStyleName;
}
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 0ee33b8d8056..5cffd7d9d2a5 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -50,21 +50,21 @@ class StyleSheetEntry : public virtual SvRefBase
{
std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
public:
- OUString sStyleIdentifierD; // WW8 name
- bool bIsDefaultStyle;
- bool bAssignedAsChapterNumbering;
- bool bInvalidHeight;
- bool bHasUPE; //universal property expansion
- StyleType nStyleTypeCode; //sgc
- OUString sBaseStyleIdentifier;
- OUString sNextStyleIdentifier;
- OUString sLinkStyleIdentifier;
- OUString sStyleName;
- const tools::SvRef<StyleSheetPropertyMap> pProperties;
- OUString sConvertedStyleName;
- std::vector<css::beans::PropertyValue> aLatentStyles; ///< Attributes of latentStyles
- std::vector<css::beans::PropertyValue> aLsdExceptions; ///< List of lsdException attribute lists
- bool bAutoRedefine; ///< Writer calls this auto-update.
+ OUString m_sStyleIdentifierD; // WW8 name
+ bool m_bIsDefaultStyle;
+ bool m_bAssignedAsChapterNumbering;
+ bool m_bInvalidHeight;
+ bool m_bHasUPE; //universal property expansion
+ StyleType m_nStyleTypeCode; //sgc
+ OUString m_sBaseStyleIdentifier;
+ OUString m_sNextStyleIdentifier;
+ OUString m_sLinkStyleIdentifier;
+ OUString m_sStyleName;
+ const tools::SvRef<StyleSheetPropertyMap> m_pProperties;
+ OUString m_sConvertedStyleName;
+ std::vector<css::beans::PropertyValue> m_aLatentStyles; ///< Attributes of latentStyles
+ std::vector<css::beans::PropertyValue> m_aLsdExceptions; ///< List of lsdException attribute lists
+ bool m_bAutoRedefine; ///< Writer calls this auto-update.
void AppendInteropGrabBag(const css::beans::PropertyValue& rValue);
css::beans::PropertyValue GetInteropGrabBag(); ///< Used for table styles, has a name.