[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - 2 commits - sw/inc sw/qa sw/source writerfilter/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 13 08:59:29 UTC 2020
sw/inc/unosett.hxx | 2
sw/qa/extras/ooxmlexport/data/tdf94628.docx |binary
sw/qa/extras/ooxmlexport/data/tdf95189.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 24
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 32
sw/source/core/unocore/unosett.cxx | 895 +++++++++------------
sw/source/uibase/config/StoredChapterNumbering.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 3
writerfilter/source/dmapper/NumberingManager.cxx | 28
10 files changed, 467 insertions(+), 529 deletions(-)
New commits:
commit ae0e4a6ba9be2fa99ac2be8e20157806e36209b2
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu May 7 21:28:12 2020 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed May 13 10:59:12 2020 +0200
tdf#94628: sw: allow setting for bullet for outline paragraphs
Paragraphs in outline (having style "Header XXX") can also be
a part of list and have custom bullets.
Simplified code of SwXNumberingRules::SetPropertiesToNumFormat():
do not check for properties special for outline/chapters and removed
redundant data shuffle with local maps.
Change-Id: I1fa7f8f5359acee1d5aa62d9700641490bb91b6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93672
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94032
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index f8b9f4265d6d..ac7e7b8d9690 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -217,7 +217,7 @@ public:
OUString *const pBulletFontName,
OUString *const pHeadingStyleName,
OUString *const pParagraphStyleName,
- SwDoc *const pDoc, SwDocShell *const pDocShell,
+ SwDoc *const pDoc,
css::uno::Sequence<css::beans::PropertyValue> const& rProperties);
};
diff --git a/sw/qa/extras/ooxmlexport/data/tdf94628.docx b/sw/qa/extras/ooxmlexport/data/tdf94628.docx
new file mode 100644
index 000000000000..aa1d226841fd
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf94628.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index f51804eebd1c..ad7297a6db5b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -937,6 +937,30 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122563, "tdf122563.docx")
"width:255.75pt;height:63.75pt");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf94628, "tdf94628.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(
+ xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ for (int i = 0; i < aProps.getLength(); ++i)
+ {
+ const beans::PropertyValue& rProp = aProps[i];
+ if (rProp.Name == "BulletChar")
+ {
+ // Check for 'BLACK UPPER RIGHT TRIANGLE' (U+25E5) as a bullet
+ CPPUNIT_ASSERT_EQUAL(OUString(u"\u25E5"), rProp.Value.get<OUString>());
+ return;
+ }
+ }
+
+ // Shouldn't reach here
+ CPPUNIT_FAIL("Did not find bullet with level 0");
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
{
// test import/export of ActiveTable (visible sheet) of embedded XLSX OLE objects
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 2b3b08e59b9e..8f0d95005a2a 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1476,18 +1476,6 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
return ::comphelper::containerToSequence(aPropertyValues);
}
-static PropertyValue const* lcl_FindProperty(
- const char* cName, std::vector<PropertyValue const*> const& rPropertyValues)
-{
- const OUString sCmp = OUString::createFromAscii(cName);
- for(const PropertyValue* pTemp : rPropertyValues)
- {
- if (sCmp == pTemp->Name)
- return pTemp;
- }
- return nullptr;
-}
-
void SwXNumberingRules::SetNumberingRuleByIndex(
SwNumRule& rNumRule,
const uno::Sequence<beans::PropertyValue>& rProperties, sal_Int32 nIndex)
@@ -1503,7 +1491,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SetPropertiesToNumFormat(aFormat, m_sNewCharStyleNames[nIndex],
&m_sNewBulletFontNames[nIndex],
&sHeadingStyleName, &sParagraphStyleName,
- m_pDoc, m_pDocShell, rProperties);
+ m_pDoc, rProperties);
if (m_pDoc && !sParagraphStyleName.isEmpty())
@@ -1549,547 +1537,436 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
OUString & rCharStyleName, OUString *const pBulletFontName,
OUString *const pHeadingStyleName,
OUString *const pParagraphStyleName,
- SwDoc *const pDoc, SwDocShell *const pDocShell,
+ SwDoc *const pDoc,
const uno::Sequence<beans::PropertyValue>& rProperties)
{
- // the order of the names is important!
- static const char* aNumPropertyNames[] =
- {
- UNO_NAME_ADJUST, // 0
- UNO_NAME_PARENT_NUMBERING, // 1
- UNO_NAME_PREFIX, // 2
- UNO_NAME_SUFFIX, // 3
- UNO_NAME_CHAR_STYLE_NAME, // 4
- UNO_NAME_START_WITH, // 5
- UNO_NAME_LEFT_MARGIN, // 6
- UNO_NAME_SYMBOL_TEXT_DISTANCE, // 7
- UNO_NAME_FIRST_LINE_OFFSET, // 8
- UNO_NAME_POSITION_AND_SPACE_MODE, // 9
- UNO_NAME_LABEL_FOLLOWED_BY, // 10
- UNO_NAME_LISTTAB_STOP_POSITION, // 11
- UNO_NAME_FIRST_LINE_INDENT, // 12
- UNO_NAME_INDENT_AT, // 13
- UNO_NAME_NUMBERING_TYPE, // 14
- UNO_NAME_PARAGRAPH_STYLE_NAME, // 15
- // these are not in chapter numbering
- UNO_NAME_BULLET_ID, // 16
- UNO_NAME_BULLET_FONT, // 17
- UNO_NAME_BULLET_FONT_NAME, // 18
- UNO_NAME_BULLET_CHAR, // 19
- UNO_NAME_GRAPHIC, // 20
- UNO_NAME_GRAPHIC_BITMAP, // 21
- UNO_NAME_GRAPHIC_SIZE, // 22
- UNO_NAME_VERT_ORIENT, // 23
- // these are only in chapter numbering
- UNO_NAME_HEADING_STYLE_NAME, // 24
- // these two are accepted but ignored for some reason
- UNO_NAME_BULLET_REL_SIZE, // 25
- UNO_NAME_BULLET_COLOR, // 26
- UNO_NAME_GRAPHIC_URL, // 27
-
- UNO_NAME_LIST_FORMAT // 28
- };
-
- enum {
- NotInChapterFirst = 16,
- NotInChapterLast = 23,
- InChapterFirst = 24,
- InChapterLast = 24
- };
+ bool bWrongArg = false;
+ std::unique_ptr<SvxBrushItem> pSetBrush;
+ std::unique_ptr<Size> pSetSize;
+ std::unique_ptr<SwFormatVertOrient> pSetVOrient;
+ bool bCharStyleNameSet = false;
- std::vector<PropertyValue const*> aPropertyValues;
- bool bExcept = false;
- for(const beans::PropertyValue& rProp : rProperties)
+ for (const beans::PropertyValue& rProp : rProperties)
{
- bExcept = true;
- for(size_t j = 0; j < SAL_N_ELEMENTS( aNumPropertyNames ); j++)
+ if (rProp.Name == UNO_NAME_ADJUST)
{
- if (pDocShell &&
- j >= static_cast<size_t>(NotInChapterFirst) &&
- j <= static_cast<size_t>(NotInChapterLast))
- continue;
- if (!pDocShell &&
- j >= static_cast<size_t>(InChapterFirst) &&
- j <= static_cast<size_t>(InChapterLast))
- continue;
- if (rProp.Name.equalsAscii(aNumPropertyNames[j]))
+ sal_Int16 nValue = text::HoriOrientation::NONE;
+ rProp.Value >>= nValue;
+ if (nValue > text::HoriOrientation::NONE &&
+ nValue <= text::HoriOrientation::LEFT &&
+ USHRT_MAX != aUnoToSvxAdjust[nValue])
{
- bExcept = false;
- break;
+ aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
}
+ else
+ bWrongArg = true;
}
- SAL_WARN_IF( bExcept, "sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing" );
- aPropertyValues.push_back(& rProp);
- if(bExcept)
- break;
- }
-
- bool bWrongArg = false;
- if(!bExcept)
- {
- std::unique_ptr<SvxBrushItem> pSetBrush;
- std::unique_ptr<Size> pSetSize;
- std::unique_ptr<SwFormatVertOrient> pSetVOrient;
- bool bCharStyleNameSet = false;
-
- for (size_t i = 0; i < SAL_N_ELEMENTS(aNumPropertyNames) && !bWrongArg; ++i)
+ else if (rProp.Name == UNO_NAME_PARENT_NUMBERING)
{
- PropertyValue const*const pProp(
- lcl_FindProperty(aNumPropertyNames[i], aPropertyValues));
- if (!pProp)
- continue;
- switch(i)
+ sal_Int16 nSet = 0;
+ rProp.Value >>= nSet;
+ if(nSet >= 0 && MAXLEVEL >= nSet)
+ aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
+ }
+ else if (rProp.Name == UNO_NAME_PREFIX)
+ {
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ aFormat.SetPrefix(uTmp);
+ }
+ else if (rProp.Name == UNO_NAME_SUFFIX)
+ {
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ aFormat.SetSuffix(uTmp);
+ }
+ else if (rProp.Name == UNO_NAME_CHAR_STYLE_NAME)
+ {
+ bCharStyleNameSet = true;
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ OUString sCharFormatName;
+ SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, SwGetPoolIdFromName::ChrFmt );
+ if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
{
- case 0: //"Adjust"
- {
- sal_Int16 nValue = text::HoriOrientation::NONE;
- pProp->Value >>= nValue;
- if (nValue > text::HoriOrientation::NONE &&
- nValue <= text::HoriOrientation::LEFT &&
- USHRT_MAX != aUnoToSvxAdjust[nValue])
- {
- aFormat.SetNumAdjust(static_cast<SvxAdjust>(aUnoToSvxAdjust[nValue]));
- }
- else
- bWrongArg = true;
- }
- break;
- case 1: //"ParentNumbering",
- {
- sal_Int16 nSet = 0;
- pProp->Value >>= nSet;
- if(nSet >= 0 && MAXLEVEL >= nSet)
- aFormat.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
- }
- break;
- case 2: //"Prefix",
- {
- OUString uTmp;
- pProp->Value >>= uTmp;
- aFormat.SetPrefix(uTmp);
- }
- break;
- case 3: //"Suffix",
- {
- OUString uTmp;
- pProp->Value >>= uTmp;
- aFormat.SetSuffix(uTmp);
- }
- break;
- case 4: //"CharStyleName",
+ rCharStyleName = aInvalidStyle;
+ aFormat.SetCharFormat(nullptr);
+ }
+ else if(pDoc)
+ {
+ const SwCharFormats* pFormats = pDoc->GetCharFormats();
+ const size_t nChCount = pFormats->size();
+
+ SwCharFormat* pCharFormat = nullptr;
+ if (!sCharFormatName.isEmpty())
{
- bCharStyleNameSet = true;
- OUString uTmp;
- pProp->Value >>= uTmp;
- OUString sCharFormatName;
- SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, SwGetPoolIdFromName::ChrFmt );
- if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
+ for(size_t j = 0; j< nChCount; ++j)
{
- rCharStyleName = aInvalidStyle;
- aFormat.SetCharFormat(nullptr);
- }
- else if(pDocShell || pDoc)
- {
- SwDoc* pLocalDoc = pDoc ? pDoc : pDocShell->GetDoc();
- const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
- const size_t nChCount = pFormats->size();
-
- SwCharFormat* pCharFormat = nullptr;
- if (!sCharFormatName.isEmpty())
+ SwCharFormat* pTmp = (*pFormats)[j];
+ if(pTmp->GetName() == sCharFormatName)
{
- for(size_t j = 0; j< nChCount; ++j)
- {
- SwCharFormat* pTmp = (*pFormats)[j];
- if(pTmp->GetName() == sCharFormatName)
- {
- pCharFormat = pTmp;
- break;
- }
- }
- if(!pCharFormat)
- {
-
- SfxStyleSheetBase* pBase;
- SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
- pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
- if(!pBase)
- pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
- pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
- }
+ pCharFormat = pTmp;
+ break;
}
- aFormat.SetCharFormat( pCharFormat );
- // #i51842#
- // If the character format has been found its name should not be in the
- // char style names array
- rCharStyleName.clear();
- }
- else
- rCharStyleName = sCharFormatName;
- }
- break;
- case 5: //"StartWith",
- {
- sal_Int16 nVal = 0;
- pProp->Value >>= nVal;
- aFormat.SetStart(nVal);
- }
- break;
- case 6: //UNO_NAME_LEFT_MARGIN,
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- // #i23727# nValue can be negative
- aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
- }
- break;
- case 7: //UNO_NAME_SYMBOL_TEXT_DISTANCE,
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- if(nValue >= 0)
- aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
- else
- bWrongArg = true;
- }
- break;
- case 8: //UNO_NAME_FIRST_LINE_OFFSET,
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- // #i23727# nValue can be positive
- nValue = convertMm100ToTwip(nValue);
- aFormat.SetFirstLineOffset(nValue);
- }
- break;
- case 9: // UNO_NAME_POSITION_AND_SPACE_MODE
- {
- sal_Int16 nValue = 0;
- pProp->Value >>= nValue;
- if ( nValue == 0 )
- {
- aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
}
- else if ( nValue == 1 )
+ if(!pCharFormat)
{
- aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_ALIGNMENT );
- }
- else
- {
- bWrongArg = true;
- }
- }
- break;
- case 10: // UNO_NAME_LABEL_FOLLOWED_BY
- {
- sal_Int16 nValue = 0;
- pProp->Value >>= nValue;
- if ( nValue == LabelFollow::LISTTAB )
- {
- aFormat.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
- }
- else if ( nValue == LabelFollow::SPACE )
- {
- aFormat.SetLabelFollowedBy( SvxNumberFormat::SPACE );
- }
- else if ( nValue == LabelFollow::NOTHING )
- {
- aFormat.SetLabelFollowedBy( SvxNumberFormat::NOTHING );
- }
- else if ( nValue == LabelFollow::NEWLINE )
- {
- aFormat.SetLabelFollowedBy( SvxNumberFormat::NEWLINE );
- }
- else
- {
- bWrongArg = true;
- }
- }
- break;
- case 11: // UNO_NAME_LISTTAB_STOP_POSITION
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- nValue = convertMm100ToTwip(nValue);
- if ( nValue >= 0 )
- {
- aFormat.SetListtabPos( nValue );
- }
- else
- {
- bWrongArg = true;
- }
- }
- break;
- case 12: // UNO_NAME_FIRST_LINE_INDENT
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- nValue = convertMm100ToTwip(nValue);
- aFormat.SetFirstLineIndent( nValue );
- }
- break;
- case 13: // UNO_NAME_INDENT_AT
- {
- sal_Int32 nValue = 0;
- pProp->Value >>= nValue;
- nValue = convertMm100ToTwip(nValue);
- aFormat.SetIndentAt( nValue );
- }
- break;
- case 14: //"NumberingType"
- {
- sal_Int16 nSet = 0;
- pProp->Value >>= nSet;
- if(nSet >= 0)
- aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
- else
- bWrongArg = true;
- }
- break;
- case 15: //"ParagraphStyleName"
- {
- if (pParagraphStyleName)
- {
- OUString uTmp;
- pProp->Value >>= uTmp;
- OUString sStyleName;
- SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl );
- *pParagraphStyleName = sStyleName;
+
+ SfxStyleSheetBase* pBase;
+ SfxStyleSheetBasePool* pPool = pDoc->GetDocShell()->GetStyleSheetPool();
+ pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
+ if(!pBase)
+ pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
+ pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat();
}
}
- break;
- case 16: //"BulletId",
- {
- assert( !pDocShell );
- sal_Int16 nSet = 0;
- if( pProp->Value >>= nSet )
- aFormat.SetBulletChar(nSet);
- else
- bWrongArg = true;
- }
- break;
- case 17: //UNO_NAME_BULLET_FONT,
- {
- assert( !pDocShell );
- awt::FontDescriptor desc;
- if (pProp->Value >>= desc)
- {
- // #i93725#
- // do not accept "empty" font
- if (!desc.Name.isEmpty())
- {
- vcl::Font aFont;
- SvxUnoFontDescriptor::ConvertToFont(desc, aFont);
- aFormat.SetBulletFont(&aFont);
- }
- }
- else
- bWrongArg = true;
+ aFormat.SetCharFormat( pCharFormat );
+ // #i51842#
+ // If the character format has been found its name should not be in the
+ // char style names array
+ rCharStyleName.clear();
}
- break;
- case 18: //"BulletFontName",
+ else
+ rCharStyleName = sCharFormatName;
+ }
+ else if (rProp.Name == UNO_NAME_START_WITH)
+ {
+ sal_Int16 nVal = 0;
+ rProp.Value >>= nVal;
+ aFormat.SetStart(nVal);
+ }
+ else if (rProp.Name == UNO_NAME_LEFT_MARGIN)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ // #i23727# nValue can be negative
+ aFormat.SetAbsLSpace(convertMm100ToTwip(nValue));
+ }
+ else if (rProp.Name == UNO_NAME_SYMBOL_TEXT_DISTANCE)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ if (nValue >= 0)
+ aFormat.SetCharTextDistance(static_cast<short>(convertMm100ToTwip(nValue)));
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_FIRST_LINE_OFFSET)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ // #i23727# nValue can be positive
+ nValue = convertMm100ToTwip(nValue);
+ aFormat.SetFirstLineOffset(nValue);
+ }
+ else if (rProp.Name == UNO_NAME_POSITION_AND_SPACE_MODE)
+ {
+ sal_Int16 nValue = 0;
+ rProp.Value >>= nValue;
+ if ( nValue == 0 )
+ {
+ aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
+ }
+ else if ( nValue == 1 )
+ {
+ aFormat.SetPositionAndSpaceMode( SvxNumberFormat::LABEL_ALIGNMENT );
+ }
+ else
+ {
+ bWrongArg = true;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_LABEL_FOLLOWED_BY)
+ {
+ sal_Int16 nValue = 0;
+ rProp.Value >>= nValue;
+ if ( nValue == LabelFollow::LISTTAB )
+ {
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
+ }
+ else if ( nValue == LabelFollow::SPACE )
+ {
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::SPACE );
+ }
+ else if ( nValue == LabelFollow::NOTHING )
+ {
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::NOTHING );
+ }
+ else if ( nValue == LabelFollow::NEWLINE )
+ {
+ aFormat.SetLabelFollowedBy( SvxNumberFormat::NEWLINE );
+ }
+ else
+ {
+ bWrongArg = true;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_LISTTAB_STOP_POSITION)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ nValue = convertMm100ToTwip(nValue);
+ if ( nValue >= 0 )
+ {
+ aFormat.SetListtabPos( nValue );
+ }
+ else
+ {
+ bWrongArg = true;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_FIRST_LINE_INDENT)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ nValue = convertMm100ToTwip(nValue);
+ aFormat.SetFirstLineIndent( nValue );
+ }
+ else if (rProp.Name == UNO_NAME_INDENT_AT)
+ {
+ sal_Int32 nValue = 0;
+ rProp.Value >>= nValue;
+ nValue = convertMm100ToTwip(nValue);
+ aFormat.SetIndentAt( nValue );
+ }
+ else if (rProp.Name == UNO_NAME_NUMBERING_TYPE)
+ {
+ sal_Int16 nSet = 0;
+ rProp.Value >>= nSet;
+ if(nSet >= 0)
+ aFormat.SetNumberingType(static_cast<SvxNumType>(nSet));
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_PARAGRAPH_STYLE_NAME)
+ {
+ if (pParagraphStyleName)
+ {
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ OUString sStyleName;
+ SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl );
+ *pParagraphStyleName = sStyleName;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_ID)
+ {
+ sal_Int16 nSet = 0;
+ if( rProp.Value >>= nSet )
+ aFormat.SetBulletChar(nSet);
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_FONT)
+ {
+ awt::FontDescriptor desc;
+ if (rProp.Value >>= desc)
+ {
+ // #i93725#
+ // do not accept "empty" font
+ if (!desc.Name.isEmpty())
{
- assert( !pDocShell );
- OUString sBulletFontName;
- pProp->Value >>= sBulletFontName;
- SwDocShell* pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
- if( !sBulletFontName.isEmpty() && pLclDocShell )
- {
- const SvxFontListItem* pFontListItem =
- static_cast<const SvxFontListItem* >(pLclDocShell
- ->GetItem( SID_ATTR_CHAR_FONTLIST ));
- const FontList* pList = pFontListItem->GetFontList();
- FontMetric aFontMetric = pList->Get(
- sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
- vcl::Font aFont(aFontMetric);
- aFormat.SetBulletFont(&aFont);
- }
- else if (pBulletFontName)
- *pBulletFontName = sBulletFontName;
+ vcl::Font aFont;
+ SvxUnoFontDescriptor::ConvertToFont(desc, aFont);
+ aFormat.SetBulletFont(&aFont);
}
- break;
- case 19: //"BulletChar",
+ }
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_FONT_NAME)
+ {
+ OUString sBulletFontName;
+ rProp.Value >>= sBulletFontName;
+ SwDocShell* pLclDocShell = pDoc->GetDocShell();
+ if( !sBulletFontName.isEmpty() && pLclDocShell )
+ {
+ const SvxFontListItem* pFontListItem =
+ static_cast<const SvxFontListItem* >(pLclDocShell
+ ->GetItem( SID_ATTR_CHAR_FONTLIST ));
+ const FontList* pList = pFontListItem->GetFontList();
+ FontMetric aFontMetric = pList->Get(
+ sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE);
+ vcl::Font aFont(aFontMetric);
+ aFormat.SetBulletFont(&aFont);
+ }
+ else if (pBulletFontName)
+ *pBulletFontName = sBulletFontName;
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_CHAR)
+ {
+ OUString aChar;
+ rProp.Value >>= aChar;
+ if(aChar.getLength() == 1)
+ {
+ aFormat.SetBulletChar(aChar.toChar());
+ }
+ else if(aChar.isEmpty())
+ {
+ // If w:lvlText's value is null - set bullet char to zero
+ aFormat.SetBulletChar(u'\0');
+ }
+ else
+ {
+ bWrongArg = true;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_GRAPHIC)
+ {
+ uno::Reference<graphic::XGraphic> xGraphic;
+ if (rProp.Value >>= xGraphic)
+ {
+ if (!pSetBrush)
{
- assert( !pDocShell );
- OUString aChar;
- pProp->Value >>= aChar;
- if(aChar.getLength() == 1)
- {
- aFormat.SetBulletChar(aChar.toChar());
- }
- else if(aChar.isEmpty())
- {
- // If w:lvlText's value is null - set bullet char to zero
- aFormat.SetBulletChar(u'\0');
- }
+ const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
+ if(pOrigBrush)
+ pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
else
- {
- bWrongArg = true;
- }
+ pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
}
- break;
- case 20: //UNO_NAME_GRAPHIC,
+ Graphic aGraphic(xGraphic);
+ pSetBrush->SetGraphic(aGraphic);
+ }
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_GRAPHIC_BITMAP)
+ {
+ uno::Reference<awt::XBitmap> xBitmap;
+ if (rProp.Value >>= xBitmap)
+ {
+ if(!pSetBrush)
{
- assert( !pDocShell );
- uno::Reference<graphic::XGraphic> xGraphic;
- if (pProp->Value >>= xGraphic)
- {
- if (!pSetBrush)
- {
- const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
- if(pOrigBrush)
- pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
- else
- pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
- }
- Graphic aGraphic(xGraphic);
- pSetBrush->SetGraphic(aGraphic);
- }
+ const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
+ if(pOrigBrush)
+ pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
else
- bWrongArg = true;
+ pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
}
- break;
- case 21: //UNO_NAME_GRAPHIC_BITMAP,
- {
- assert( !pDocShell );
- uno::Reference<awt::XBitmap> xBitmap;
- if (pProp->Value >>= xBitmap)
- {
- if(!pSetBrush)
- {
- const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
- if(pOrigBrush)
- pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
- else
- pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
- }
- uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
- Graphic aGraphic(xGraphic);
- pSetBrush->SetGraphic(aGraphic);
- }
- else
- bWrongArg = true;
- }
- break;
- case 22: //UNO_NAME_GRAPHIC_SIZE,
+ uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ Graphic aGraphic(xGraphic);
+ pSetBrush->SetGraphic(aGraphic);
+ }
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_GRAPHIC_SIZE)
+ {
+ if(!pSetSize)
+ pSetSize.reset(new Size);
+ awt::Size size;
+ if (rProp.Value >>= size)
+ {
+ size.Width = convertMm100ToTwip(size.Width);
+ size.Height = convertMm100ToTwip(size.Height);
+ pSetSize->setWidth( size.Width );
+ pSetSize->setHeight( size.Height );
+ }
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_VERT_ORIENT)
+ {
+ if(!pSetVOrient)
+ {
+ if(aFormat.GetGraphicOrientation())
+ pSetVOrient.reset( static_cast<SwFormatVertOrient*>(aFormat.GetGraphicOrientation()->Clone()) );
+ else
+ pSetVOrient.reset(new SwFormatVertOrient);
+ }
+ pSetVOrient->PutValue(rProp.Value, MID_VERTORIENT_ORIENT);
+ }
+ else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME)
+ {
+ if (pHeadingStyleName)
+ {
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ OUString sStyleName;
+ SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl );
+ *pHeadingStyleName = sStyleName;
+ }
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_REL_SIZE)
+ {
+ // BulletRelSize - unsupported - only available in Impress
+ }
+ else if (rProp.Name == UNO_NAME_BULLET_COLOR)
+ {
+ // BulletColor - ignored too
+ }
+ else if (rProp.Name == UNO_NAME_GRAPHIC_URL)
+ {
+ OUString aURL;
+ if (rProp.Value >>= aURL)
+ {
+ if(!pSetBrush)
{
- assert( !pDocShell );
- if(!pSetSize)
- pSetSize.reset(new Size);
- awt::Size size;
- if (pProp->Value >>= size)
- {
- size.Width = convertMm100ToTwip(size.Width);
- size.Height = convertMm100ToTwip(size.Height);
- pSetSize->setWidth( size.Width );
- pSetSize->setHeight( size.Height );
- }
+ const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
+ if(pOrigBrush)
+ pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
else
- bWrongArg = true;
- }
- break;
- case 23: //VertOrient
- {
- assert( !pDocShell );
- if(!pSetVOrient)
- {
- if(aFormat.GetGraphicOrientation())
- pSetVOrient.reset( static_cast<SwFormatVertOrient*>(aFormat.GetGraphicOrientation()->Clone()) );
- else
- pSetVOrient.reset(new SwFormatVertOrient);
- }
- pSetVOrient->PutValue(pProp->Value, MID_VERTORIENT_ORIENT);
+ pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
}
- break;
- case 24: //"HeadingStyleName"
- {
- if (pHeadingStyleName)
- {
- OUString uTmp;
- pProp->Value >>= uTmp;
- OUString sStyleName;
- SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl );
- *pHeadingStyleName = sStyleName;
- }
- }
- break;
- case 25: // BulletRelSize - unsupported - only available in Impress
- break;
- case 26: // BulletColor - ignored too
- break;
- case 27: // UNO_NAME_GRAPHIC_URL
- {
- assert( !pDocShell );
- OUString aURL;
- if (pProp->Value >>= aURL)
- {
- if(!pSetBrush)
- {
- const SvxBrushItem* pOrigBrush = aFormat.GetBrush();
- if(pOrigBrush)
- pSetBrush.reset(new SvxBrushItem(*pOrigBrush));
- else
- pSetBrush.reset(new SvxBrushItem(OUString(), OUString(), GPOS_AREA, RES_BACKGROUND));
- }
- Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
- if (!aGraphic.IsNone())
- pSetBrush->SetGraphic(aGraphic);
- }
- else
- bWrongArg = true;
- }
- break;
- case 28: //"ListFormat",
- {
- OUString uTmp;
- pProp->Value >>= uTmp;
- aFormat.SetListFormat(uTmp);
- }
- break;
+ Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
+ if (!aGraphic.IsNone())
+ pSetBrush->SetGraphic(aGraphic);
}
+ else
+ bWrongArg = true;
+ }
+ else if (rProp.Name == UNO_NAME_LIST_FORMAT)
+ {
+ OUString uTmp;
+ rProp.Value >>= uTmp;
+ aFormat.SetListFormat(uTmp);
}
- if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
+ else
{
- if(!pSetBrush && aFormat.GetBrush())
- pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
+ // Invalid property name
+ SAL_WARN("sw.uno", "Unknown/incorrect property " << rProp.Name << ", failing");
+ throw uno::RuntimeException("Unknown/incorrect property " + rProp.Name);
+ }
+ }
+ if(!bWrongArg && (pSetBrush || pSetSize || pSetVOrient))
+ {
+ if(!pSetBrush && aFormat.GetBrush())
+ pSetBrush.reset(new SvxBrushItem(*aFormat.GetBrush()));
- if(pSetBrush)
- {
- if(!pSetVOrient && aFormat.GetGraphicOrientation())
- pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
+ if(pSetBrush)
+ {
+ if(!pSetVOrient && aFormat.GetGraphicOrientation())
+ pSetVOrient.reset( new SwFormatVertOrient(*aFormat.GetGraphicOrientation()) );
- if(!pSetSize)
+ if(!pSetSize)
+ {
+ pSetSize.reset(new Size(aFormat.GetGraphicSize()));
+ if(!pSetSize->Width() || !pSetSize->Height())
{
- pSetSize.reset(new Size(aFormat.GetGraphicSize()));
- if(!pSetSize->Width() || !pSetSize->Height())
- {
- const Graphic* pGraphic = pSetBrush->GetGraphic();
- if(pGraphic)
- *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
- }
+ const Graphic* pGraphic = pSetBrush->GetGraphic();
+ if(pGraphic)
+ *pSetSize = ::GetGraphicSizeTwip(*pGraphic, nullptr);
}
- sal_Int16 eOrient = pSetVOrient ?
- pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
- aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
}
+ sal_Int16 eOrient = pSetVOrient ?
+ pSetVOrient->GetVertOrient() : text::VertOrientation::NONE;
+ aFormat.SetGraphicBrush( pSetBrush.get(), pSetSize.get(), text::VertOrientation::NONE == eOrient ? nullptr : &eOrient );
}
- if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
- && aFormat.GetNumberingType() == NumberingType::BITMAP
- && !aFormat.GetCharFormat()
- && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
- {
- OUString tmp;
- SwStyleNameMapper::FillProgName(RES_POOLCHR_BUL_LEVEL, tmp);
- rCharStyleName = tmp;
- }
+ }
+ if ((!bCharStyleNameSet || rCharStyleName.isEmpty())
+ && aFormat.GetNumberingType() == NumberingType::BITMAP
+ && !aFormat.GetCharFormat()
+ && !SwXNumberingRules::isInvalidStyle(rCharStyleName))
+ {
+ OUString tmp;
+ SwStyleNameMapper::FillProgName(RES_POOLCHR_BUL_LEVEL, tmp);
+ rCharStyleName = tmp;
}
if(bWrongArg)
throw lang::IllegalArgumentException();
- else if(bExcept)
- throw uno::RuntimeException();
}
uno::Reference< XPropertySetInfo > SwXNumberingRules::getPropertySetInfo()
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index eea0c260bbf5..5c94fc56110b 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -152,7 +152,7 @@ public:
SwXNumberingRules::SetPropertiesToNumFormat(
aNumberFormat,
charStyleName,
- nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
props);
SwNumRulesWithName *const pRules(GetOrCreateRules());
pRules->SetNumFormat(nIndex, aNumberFormat, charStyleName);
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index eab1ac81ecc7..764fe2a387a7 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -202,28 +202,24 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults
aNumberingProperties.push_back(lcl_makePropVal(PROP_NUMBERING_TYPE, nNumberFormat));
}
-
- if( !isOutlineNumbering())
+ // todo: this is not the bullet char
+ if( nNumberFormat == style::NumberingType::CHAR_SPECIAL )
{
- // todo: this is not the bullet char
- if( nNumberFormat == style::NumberingType::CHAR_SPECIAL )
+ if (!m_sBulletChar.isEmpty())
{
- if (!m_sBulletChar.isEmpty())
- {
- aNumberingProperties.push_back(lcl_makePropVal(PROP_BULLET_CHAR, m_sBulletChar.copy(0, 1)));
- }
- else
- {
- // If w:lvlText's value is null - set bullet char to zero.
- aNumberingProperties.push_back(lcl_makePropVal<sal_Unicode>(PROP_BULLET_CHAR, 0));
- }
+ aNumberingProperties.push_back(lcl_makePropVal(PROP_BULLET_CHAR, m_sBulletChar.copy(0, 1)));
}
- if (m_xGraphicBitmap.is())
+ else
{
- aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_BITMAP, m_xGraphicBitmap));
- aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_SIZE, m_aGraphicSize));
+ // If w:lvlText's value is null - set bullet char to zero.
+ aNumberingProperties.push_back(lcl_makePropVal<sal_Unicode>(PROP_BULLET_CHAR, 0));
}
}
+ if (m_xGraphicBitmap.is())
+ {
+ aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_BITMAP, m_xGraphicBitmap));
+ aNumberingProperties.push_back(lcl_makePropVal(PROP_GRAPHIC_SIZE, m_aGraphicSize));
+ }
if (bDefaults || m_nTabstop != 0)
aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, m_nTabstop));
commit 8ccb18b7e35a4b8f733ecd2b6d12e075410d0468
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Sat May 9 22:31:48 2020 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed May 13 10:58:58 2020 +0200
tdf#95189: docx import: apply list ovverride only once
List overrides should be applied only once on first list with
override appearance in document. Next reference to this list
should not override again and reset list numbering.
Change-Id: I7a24398d5980ca97a74fa8ad09d91ac9adff15ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93894
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94031
diff --git a/sw/qa/extras/ooxmlexport/data/tdf95189.docx b/sw/qa/extras/ooxmlexport/data/tdf95189.docx
new file mode 100644
index 000000000000..456276b20d0c
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf95189.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 375c6d874021..37248db1500c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -258,6 +258,38 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124367, "tdf124367.docx")
.Position);
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf95189, "tdf95189.docx")
+{
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+ {
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(7), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(xPara, "ListLabelString"));
+ }
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128820, "tdf128820.fodt")
{
// Import of exported DOCX failed because of wrong namespase used for wsp element
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 658c99c9a5e1..a59e9cc6d1d2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1677,11 +1677,17 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
if (pList->GetCurrentLevel())
{
sal_Int16 nOverrideLevel = pList->GetCurrentLevel()->GetStartOverride();
- if (nOverrideLevel != -1)
+ if (nOverrideLevel != -1 && m_aListOverrideApplied.find(nListId) == m_aListOverrideApplied.end())
{
- // Restart list, it is overriden
+ // Apply override: we have override instruction for this level
+ // And this was not done for this list before: we can do this only once on first occurrence
+ // of list with override
+ // TODO: Not tested variant with differen levels override in diffent lists.
+ // Probably m_aListOverrideApplied as a set of overriden listids is not sufficient
+ // and we need to register level overrides separately.
m_xPreviousParagraph->setPropertyValue("ParaIsNumberingRestart", uno::makeAny(true));
m_xPreviousParagraph->setPropertyValue("NumberingStartValue", uno::makeAny(nOverrideLevel));
+ m_aListOverrideApplied.insert(nListId);
}
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 483f8f92715c..cce1178214bc 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -30,6 +30,7 @@
#include <queue>
#include <stack>
#include <tuple>
+#include <set>
#include <unordered_map>
#include <vector>
#include <boost/optional.hpp>
@@ -486,6 +487,8 @@ private:
// TableManagers are stacked: one for each stream to avoid any confusion
std::stack< tools::SvRef< DomainMapperTableManager > > m_aTableManagers;
tools::SvRef<DomainMapperTableHandler> m_pTableHandler;
+ // List of document lists overrides. They are applied only once on first occurrence in document
+ std::set<sal_Int32> m_aListOverrideApplied;
//each context needs a stack of currently used attributes
std::stack<PropertyMapPtr> m_aPropertyStacks[NUMBER_OF_CONTEXTS];
More information about the Libreoffice-commits
mailing list