replace TabName -> TableName in sw

Change-Id: Ic3e3c8cc8921405cc79abc6e02678426e49e7d7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184224
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-04-15 19:25:47 +02:00
parent 8cbe2653fe
commit e4bfed12f0
7 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ enum class SwGetPoolIdFromName : sal_uInt16
FrmFmt = 0x04,
PageDesc = 0x08,
NumRule = 0x10,
TabStyle = 0x20,
TableStyle = 0x20,
CellStyle = 0x40
};
+4 -4
View File
@@ -232,7 +232,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
return TablePair<GetPageMap>::getMap(bProgName);
case SwGetPoolIdFromName::NumRule:
return TablePair<GetNumRuleMap>::getMap(bProgName);
case SwGetPoolIdFromName::TabStyle:
case SwGetPoolIdFromName::TableStyle:
return TablePair<GetTableStyleMap>::getMap(bProgName);
case SwGetPoolIdFromName::CellStyle:
return TablePair<GetCellStyleMap>::getMap(bProgName);
@@ -272,7 +272,7 @@ void SwStyleNameMapper::FillProgName(
rFillName = ProgName(rName);
if (nId == USHRT_MAX )
{
if (eFlags != SwGetPoolIdFromName::TabStyle)
if (eFlags != SwGetPoolIdFromName::TableStyle)
{
// check if it has a " (user)" suffix, if so remove it
lcl_CheckSuffixAndDelete(rFillName);
@@ -314,8 +314,8 @@ void SwStyleNameMapper::FillUIName(
if ( nId == USHRT_MAX )
{
rFillName = aName.toString();
// TabStyle: unfortunately ODF documents with UIName table styles exist
if (eFlags == SwGetPoolIdFromName::TabStyle || // see testTdf129568ui
// TableStyle: unfortunately ODF documents with UIName table styles exist
if (eFlags == SwGetPoolIdFromName::TableStyle || // see testTdf129568ui
GetPoolIdFromUIName(aName.toString(), eFlags) == USHRT_MAX)
{
// aName isn't in our Prog name table...check if it has a " (user)" suffix, if so remove it
+10 -10
View File
@@ -364,7 +364,7 @@ sal_Int32 StyleFamilyEntry::GetCountOrName<SfxStyleFamily::Cell>(const SwDoc& rD
const sal_Int32 nBoxFormat = rTableTemplateMap[nIndex % rTableTemplateMap.size()];
const SwTableAutoFormat& rTableFormat = rAutoFormats[nAutoFormat];
ProgName aProgName;
SwStyleNameMapper::FillProgName(rTableFormat.GetName(), aProgName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(rTableFormat.GetName(), aProgName, SwGetPoolIdFromName::TableStyle);
*pString = aProgName.toString() + rTableFormat.GetTableTemplateCellSubName(rTableFormat.GetBoxFormat(nBoxFormat));
}
else
@@ -435,7 +435,7 @@ static const std::vector<StyleFamilyEntry>& lcl_GetStyleFamilyEntries()
StyleFamilyEntry::Create<SfxStyleFamily::Page> (PROPERTY_MAP_PAGE_STYLE, SwGetPoolIdFromName::PageDesc, u"PageStyles"_ustr, STR_STYLE_FAMILY_PAGE),
StyleFamilyEntry::Create<SfxStyleFamily::Frame> (PROPERTY_MAP_FRAME_STYLE, SwGetPoolIdFromName::FrmFmt, u"FrameStyles"_ustr, STR_STYLE_FAMILY_FRAME),
StyleFamilyEntry::Create<SfxStyleFamily::Pseudo>(PROPERTY_MAP_NUM_STYLE, SwGetPoolIdFromName::NumRule, u"NumberingStyles"_ustr, STR_STYLE_FAMILY_NUMBERING),
StyleFamilyEntry::Create<SfxStyleFamily::Table> (PROPERTY_MAP_TABLE_STYLE, SwGetPoolIdFromName::TabStyle, u"TableStyles"_ustr, STR_STYLE_FAMILY_TABLE),
StyleFamilyEntry::Create<SfxStyleFamily::Table> (PROPERTY_MAP_TABLE_STYLE, SwGetPoolIdFromName::TableStyle, u"TableStyles"_ustr, STR_STYLE_FAMILY_TABLE),
StyleFamilyEntry::Create<SfxStyleFamily::Cell> (PROPERTY_MAP_CELL_STYLE, SwGetPoolIdFromName::CellStyle, u"CellStyles"_ustr, STR_STYLE_FAMILY_CELL),
};
return our_pStyleFamilyEntries;
@@ -1067,7 +1067,7 @@ void SwXStyleFamily::insertByName(const OUString& rProgName, const uno::Any& rEl
m_pDocShell->GetDoc()->GetCellStyles().AddBoxFormat(*pNewStyle->GetBoxFormat(), sStyleName);
pNewStyle->SetPhysical();
}
else if (SwGetPoolIdFromName::TabStyle == m_rEntry.poolId())
else if (SwGetPoolIdFromName::TableStyle == m_rEntry.poolId())
{
// handle table style
uno::Reference<style::XStyle> xStyle = rElement.get<uno::Reference<style::XStyle>>();
@@ -1134,7 +1134,7 @@ void SwXStyleFamily::replaceByName(const OUString& rProgName, const uno::Any& rE
pStyleToReplaceWith->SetPhysical();
}
}
else if (SwGetPoolIdFromName::TabStyle == m_rEntry.poolId())
else if (SwGetPoolIdFromName::TableStyle == m_rEntry.poolId())
{
// handle table styles
SwTableAutoFormat* pTableAutoFormat = SwXTextTableStyle::GetTableAutoFormat(m_pDocShell, sStyleName);
@@ -1182,7 +1182,7 @@ void SwXStyleFamily::removeByName(const OUString& rProgName)
// handle cell style
m_pDocShell->GetDoc()->GetCellStyles().RemoveBoxFormat(rProgName);
}
else if (SwGetPoolIdFromName::TabStyle == m_rEntry.poolId())
else if (SwGetPoolIdFromName::TableStyle == m_rEntry.poolId())
{
// handle table style
m_pDocShell->GetDoc()->GetTableStyles().EraseAutoFormat(sName);
@@ -4595,7 +4595,7 @@ OUString SAL_CALL SwXTextTableStyle::getName()
{
SolarMutexGuard aGuard;
ProgName sProgName;
SwStyleNameMapper::FillProgName(m_pTableAutoFormat->GetName(), sProgName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(m_pTableAutoFormat->GetName(), sProgName, SwGetPoolIdFromName::TableStyle);
return sProgName.toString();
}
@@ -4603,7 +4603,7 @@ void SAL_CALL SwXTextTableStyle::setName(const OUString& rProgName)
{
SolarMutexGuard aGuard;
OUString sUIName;
SwStyleNameMapper::FillUIName(ProgName(rProgName), sUIName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillUIName(ProgName(rProgName), sUIName, SwGetPoolIdFromName::TableStyle);
m_pTableAutoFormat->SetName(sUIName);
}
@@ -4835,7 +4835,7 @@ SwBoxAutoFormat* SwXTextCellStyle::GetBoxAutoFormat(SwDocShell* pDocShell, std::
return nullptr;
OUString sParentUIName;
SwStyleNameMapper::FillUIName(ProgName(sParentProgName), sParentUIName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillUIName(ProgName(sParentProgName), sParentUIName, SwGetPoolIdFromName::TableStyle);
SwTableAutoFormat* pTableAutoFormat = pDocShell->GetDoc()->GetTableStyles().FindAutoFormat(sParentUIName);
if (!pTableAutoFormat)
return nullptr;
@@ -4907,7 +4907,7 @@ sal_Bool SAL_CALL SwXTextCellStyle::isInUse()
return false;
ProgName sParentStyle;
SwStyleNameMapper::FillProgName(m_sTableStyleUIName, sParentStyle, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(m_sTableStyleUIName, sParentStyle, SwGetPoolIdFromName::TableStyle);
uno::Reference<style::XStyle> xStyle;
xTableStyles->getByName(sParentStyle.toString()) >>= xStyle;
if (!xStyle.is())
@@ -4946,7 +4946,7 @@ OUString SAL_CALL SwXTextCellStyle::getName()
else
{
ProgName sParentStyle;
SwStyleNameMapper::FillProgName(m_sTableStyleUIName, sParentStyle, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(m_sTableStyleUIName, sParentStyle, SwGetPoolIdFromName::TableStyle);
sName = sParentStyle.toString() + pTableFormat->GetTableTemplateCellSubName(*m_pBoxAutoFormat);
}
}
+2 -2
View File
@@ -2707,7 +2707,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
if (!(aValue >>= sProgName))
break;
OUString sName;
SwStyleNameMapper::FillUIName(ProgName(sProgName), sName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillUIName(ProgName(sProgName), sName, SwGetPoolIdFromName::TableStyle);
pTable->SetTableStyleName(sName);
SwDoc* pDoc = pFormat->GetDoc();
if (SwFEShell* pFEShell = pDoc->GetDocShell()->GetFEShell())
@@ -2952,7 +2952,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
{
SwTable* pTable = SwTable::FindTable(pFormat);
ProgName sName;
SwStyleNameMapper::FillProgName(pTable->GetTableStyleName(), sName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(pTable->GetTableStyleName(), sName, SwGetPoolIdFromName::TableStyle);
aRet <<= sName.toString();
}
break;
+1 -1
View File
@@ -1131,7 +1131,7 @@ void SwXMLExport::ExportTable( const SwTableNode& rTableNd )
if (!rTable.GetTableStyleName().isEmpty())
{
ProgName sStyleName;
SwStyleNameMapper::FillProgName(rTable.GetTableStyleName(), sStyleName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(rTable.GetTableStyleName(), sStyleName, SwGetPoolIdFromName::TableStyle);
AddAttribute(XML_NAMESPACE_TABLE, XML_TEMPLATE_NAME, sStyleName.toString());
}
+1 -1
View File
@@ -2506,7 +2506,7 @@ void SwXMLTableContext::MakeTable()
sal_uInt8 nPercentWidth = 0U;
OUString sStyleName;
SwStyleNameMapper::FillUIName( ProgName(m_aTemplateName), sStyleName, SwGetPoolIdFromName::TabStyle );
SwStyleNameMapper::FillUIName( ProgName(m_aTemplateName), sStyleName, SwGetPoolIdFromName::TableStyle );
m_pTableNode->GetTable().SetTableStyleName( sStyleName );
m_pTableNode->GetTable().SetRowsToRepeat( m_nHeaderRows );
m_pTableNode->GetTable().SetTableModel( !m_bHasSubTables );
+2 -2
View File
@@ -502,7 +502,7 @@ static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view
const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex);
ProgName sBoxFormatProgName;
SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatProgName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatProgName, SwGetPoolIdFromName::TableStyle);
OUString sBoxFormatName = sBoxFormatProgName.toString() + rTableStyle.GetTableTemplateCellSubName(rBoxFormat);
if (rName == sBoxFormatName)
pFormat = &rBoxFormat;
@@ -3263,7 +3263,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex);
ProgName sBoxFormatProgName;
SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatProgName, SwGetPoolIdFromName::TabStyle);
SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatProgName, SwGetPoolIdFromName::TableStyle);
OUString sBoxFormatName = sBoxFormatProgName.toString() + rTableStyle.GetTableTemplateCellSubName(rBoxFormat);
m_aLst.Append( SfxStyleFamily::Cell, sBoxFormatName );
}