summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-26 10:14:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-26 10:41:14 +0100
commitaaad3500b3d558836a776b162184cb0556850940 (patch)
treee5b672b7ccfeb937ea933f6d1bac5e0e7dcbc34e /sw/source/filter
parentab86777f93754f1f40d8a7ed584422ddc05b9eb7 (diff)
remove some unused enum values in xmloff
(*) also make it more obvious what XMLShapeExportFlags::SIZE represents Change-Id: Ie63edf0f2827f171542037b819ebe7d55e090275 Reviewed-on: https://gerrit.libreoffice.org/63948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx33
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx4
2 files changed, 9 insertions, 28 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 70172d3c6bf3..862066b8c0c5 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -66,7 +66,6 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
const SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- SvXmlExportFlags nFlags,
std::vector<sal_uInt16> *pIndexArray ) const
{
const sal_uInt16 nCount = mrMapEntries->getCount();
@@ -79,8 +78,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
// we have a valid map entry here, so lets use it...
if( 0 == (rEntry.nMemberId & MID_SW_FLAG_NO_ITEM_EXPORT) )
{
- const SfxPoolItem* pItem = GetItem( rSet, rEntry.nWhichId,
- nFlags );
+ const SfxPoolItem* pItem = GetItem( rSet, rEntry.nWhichId );
// do we have an item?
if(pItem)
{
@@ -232,7 +230,7 @@ void SvXMLExportItemMapper::exportElementItems(
OSL_ENSURE( 0 != (rEntry.nMemberId & MID_SW_FLAG_ELEMENT_ITEM_EXPORT),
"wrong mid flag!" );
- const SfxPoolItem* pItem = GetItem( rSet, rEntry.nWhichId, nFlags );
+ const SfxPoolItem* pItem = GetItem( rSet, rEntry.nWhichId );
// do we have an item?
if(pItem)
{
@@ -248,30 +246,19 @@ void SvXMLExportItemMapper::exportElementItems(
}
/** returns the item with the given WhichId from the given ItemSet if its
- set or its default item if it's not set and the SvXmlExportFlags::DEEP
- is set in the flags
+ set
*/
const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet,
- sal_uInt16 nWhichId,
- SvXmlExportFlags nFlags )
+ sal_uInt16 nWhichId)
{
// first get item from itemset
const SfxPoolItem* pItem;
- SfxItemState eState =
- rSet.GetItemState( nWhichId,
- bool( nFlags & SvXmlExportFlags::DEEP ),
- &pItem );
+ SfxItemState eState = rSet.GetItemState( nWhichId, false, &pItem );
if( SfxItemState::SET == eState )
{
return pItem;
}
- else if( (nFlags & SvXmlExportFlags::DEFAULTS) &&
- SfxItemPool::IsWhich(nWhichId))
- {
- // if it's not set, try the pool if we export defaults
- return &rSet.GetPool()->GetDefaultItem(nWhichId);
- }
else
{
return nullptr;
@@ -293,22 +280,18 @@ void SvXMLExportItemMapper::exportXML( SvXMLExport& rExport,
XMLTokenEnum ePropToken ) const
{
std::vector<sal_uInt16> aIndexArray;
- const SvXmlExportFlags nFlags = SvXmlExportFlags::IGN_WS;
exportXML( rExport, rExport.GetAttrList(), rSet, rUnitConverter,
- rExport.GetNamespaceMap(), nFlags, &aIndexArray );
+ rExport.GetNamespaceMap(), &aIndexArray );
if( rExport.GetAttrList().getLength() > 0 || !aIndexArray.empty() )
{
- if( nFlags & SvXmlExportFlags::IGN_WS )
- {
- rExport.IgnorableWhitespace();
- }
+ rExport.IgnorableWhitespace();
SvXMLElementExport aElem( rExport, XML_NAMESPACE_STYLE, ePropToken,
false, false );
exportElementItems( rExport, rUnitConverter,
- rSet, nFlags, aIndexArray );
+ rSet, SvXmlExportFlags::IGN_WS, aIndexArray );
}
}
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index 21be616c0145..a7d290a2d640 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -43,7 +43,6 @@ protected:
const SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- SvXmlExportFlags nFlags,
std::vector<sal_uInt16> *pIndexArray ) const;
void exportXML( const SvXMLExport& rExport,
@@ -61,8 +60,7 @@ protected:
const std::vector<sal_uInt16> &rIndexArray ) const;
static const SfxPoolItem* GetItem( const SfxItemSet &rSet,
- sal_uInt16 nWhichId,
- SvXmlExportFlags nFlags );
+ sal_uInt16 nWhichId );
public:
explicit SvXMLExportItemMapper( SvXMLItemMapEntriesRef rMapEntries );