[Libreoffice-commits] core.git: 2 commits - include/xmloff reportdesign/source sc/source writerfilter/inc writerfilter/source xmloff/inc xmloff/source
Noel Grandin
noel at peralex.com
Thu Feb 25 12:19:23 UTC 2016
include/xmloff/XMLEventExport.hxx | 3 --
include/xmloff/shapeexport.hxx | 6 ++--
include/xmloff/shapeimport.hxx | 2 -
include/xmloff/txtimp.hxx | 2 -
include/xmloff/txtparae.hxx | 6 +---
include/xmloff/xmlaustp.hxx | 3 --
include/xmloff/xmlexp.hxx | 14 +--------
include/xmloff/xmlexppr.hxx | 2 -
include/xmloff/xmlprmap.hxx | 2 -
reportdesign/source/filter/xml/xmlExport.cxx | 16 +++++-----
sc/source/filter/xml/xmlexprt.cxx | 16 +++++-----
writerfilter/inc/ooxml/OOXMLDocument.hxx | 3 --
writerfilter/source/dmapper/StyleSheetTable.cxx | 23 ---------------
writerfilter/source/dmapper/StyleSheetTable.hxx | 3 --
writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 5 +--
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 +++++-----
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 2 -
xmloff/inc/txtflde.hxx | 3 --
xmloff/source/core/xmlexp.cxx | 35 +++++-------------------
xmloff/source/draw/shapeexport.cxx | 10 +++---
xmloff/source/draw/shapeimport.cxx | 4 +-
xmloff/source/forms/propertyexport.cxx | 8 ++---
xmloff/source/forms/propertyexport.hxx | 5 ---
xmloff/source/script/XMLEventExport.cxx | 5 +--
xmloff/source/style/XMLPageExport.cxx | 4 +-
xmloff/source/style/xmlaustp.cxx | 5 +--
xmloff/source/style/xmlexppr.cxx | 4 +-
xmloff/source/style/xmlprmap.cxx | 4 --
xmloff/source/text/txtflde.cxx | 5 +--
xmloff/source/text/txtimp.cxx | 4 +-
xmloff/source/text/txtparae.cxx | 13 +-------
31 files changed, 78 insertions(+), 155 deletions(-)
New commits:
commit 90ddca81ae6fb4543d49193a23b5f6569ac5596a
Author: Noel Grandin <noel at peralex.com>
Date: Thu Feb 25 14:18:27 2016 +0200
loplugin:unuseddefaultparams in writerfilter/
Change-Id: Ib5a2f6f0404e8489a9699eac6b0c50e61f31083f
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 9b2528e..1a5254d 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -241,8 +241,7 @@ public:
static OOXMLStream::Pointer_t
createStream(css::uno::Reference<css::uno::XComponentContext> rContext,
css::uno::Reference<css::io::XInputStream> rStream,
- bool bRepairStorage,
- OOXMLStream::StreamType_t nStreamType = OOXMLStream::DOCUMENT);
+ bool bRepairStorage);
static OOXMLStream::Pointer_t
createStream(OOXMLStream::Pointer_t pStream,
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8bbd00c..8a6aca5 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -139,31 +139,10 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr
m_aStyles[nType] = pProps;
}
-PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack )
+PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask )
{
PropertyMapPtr pProps( new PropertyMap );
- // First get the parent properties
- StyleSheetEntryPtr pEntry = m_pStyleSheet->FindParentStyleSheet( sBaseStyleIdentifier );
-
- if ( pEntry.get( ) )
- {
- if (pStack.get() == nullptr)
- pStack.reset(new StyleSheetEntryDeque());
-
- StyleSheetEntryDeque::const_iterator aIt = find(pStack->begin(), pStack->end(), pEntry);
-
- if (aIt != pStack->end())
- {
- pStack->push_back(pEntry);
-
- TableStyleSheetEntry* pParent = static_cast<TableStyleSheetEntry *>( pEntry.get( ) );
- pProps->InsertProps(pParent->GetProperties(nMask));
-
- pStack->pop_back();
- }
- }
-
// And finally get the mask ones
pProps->InsertProps(GetLocalPropertiesFromMask(nMask));
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 0693f3c..e26e158 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -143,8 +143,7 @@ public:
// + from the parent styles
// @param mask mask describing which properties to return
- // @param pStack already processed StyleSheetEntries
- PropertyMapPtr GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack = StyleSheetEntryDequePtr());
+ PropertyMapPtr GetProperties( sal_Int32 nMask);
TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles );
virtual ~TableStyleSheetEntry( );
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 5b0d341..8ffcb58 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -413,11 +413,10 @@ OOXMLStream::Pointer_t
OOXMLDocumentFactory::createStream
(uno::Reference<uno::XComponentContext> xContext,
uno::Reference<io::XInputStream> rStream,
- bool bRepairStorage,
- OOXMLStream::StreamType_t nStreamType)
+ bool bRepairStorage)
{
OOXMLStreamImpl * pStream = new OOXMLStreamImpl(xContext, rStream,
- nStreamType, bRepairStorage);
+ OOXMLStream::DOCUMENT, bRepairStorage);
return OOXMLStream::Pointer_t(pStream);
}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 251ff6d..32a10a2 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -81,9 +81,9 @@ static void lcl_putNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId, RTFValu
rAttributes.set(nId, pValue, eOverwrite);
}
-static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue, RTFOverwrite eOverwrite = RTFOverwrite::NO_APPEND)
+static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue)
{
- lcl_putNestedAttribute(rSprms, nParent, nId, pValue, eOverwrite, false);
+ lcl_putNestedAttribute(rSprms, nParent, nId, pValue, RTFOverwrite::NO_APPEND, false);
}
static RTFValue::Pointer_t lcl_getNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId)
@@ -379,7 +379,7 @@ void RTFDocumentImpl::checkFirstRun()
// start initial paragraph
m_bFirstRun = false;
assert(!m_bNeedSect);
- setNeedSect(); // first call that succeeds
+ setNeedSect(true); // first call that succeeds
// set the requested default font, if there are none
RTFValue::Pointer_t pFont = lcl_getNestedAttribute(m_aDefaultState.aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts, NS_ooxml::LN_CT_Fonts_ascii);
@@ -1505,7 +1505,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer,
RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
{
- setNeedSect();
+ setNeedSect(true);
checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
RTFSkipDestination aSkip(*this);
// special case \upr: ignore everything except nested \ud
@@ -2079,7 +2079,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
{
- setNeedSect();
+ setNeedSect(true);
if (nKeyword != RTF_HEXCHAR)
checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
else
@@ -2563,7 +2563,7 @@ void RTFDocumentImpl::resetTableRowProperties()
RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
{
- setNeedSect();
+ setNeedSect(true);
checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
RTFSkipDestination aSkip(*this);
int nParam = -1;
@@ -3585,7 +3585,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
- setNeedSect();
+ setNeedSect(true);
checkUnicode(/*bUnicode =*/ nKeyword != RTF_U, /*bHex =*/ true);
RTFSkipDestination aSkip(*this);
int nSprm = 0;
@@ -4811,7 +4811,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam)
{
- setNeedSect();
+ setNeedSect(true);
checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
RTFSkipDestination aSkip(*this);
int nSprm = -1;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 227e940..257f483 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -439,7 +439,7 @@ private:
/// If we have some unicode or hex characters to send.
void checkUnicode(bool bUnicode, bool bHex);
/// If we need a final section break at the end of the document.
- void setNeedSect(bool bNeedSect = true);
+ void setNeedSect(bool bNeedSect);
void resetTableRowProperties();
void backupTableRowProperties();
void restoreTableRowProperties();
commit 535aa95014b4f30ba5f06a563c35db6c98cca9d9
Author: Noel Grandin <noel at peralex.com>
Date: Thu Feb 25 13:59:56 2016 +0200
loplugin:unuseddefaultparams in xmloff/
Change-Id: Ia504a4e96a4ebc8404fe6881e0f77fba29cd00ae
diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx
index 7980fb0..ae3bb90 100644
--- a/include/xmloff/XMLEventExport.hxx
+++ b/include/xmloff/XMLEventExport.hxx
@@ -97,8 +97,7 @@ public:
/// export the events, but write <officeooo:events> element
/// (for new file format additions)
- void ExportExt( css::uno::Reference<css::container::XNameAccess> & xAccess,
- bool bUseWhitespace = true);
+ void ExportExt( css::uno::Reference<css::container::XNameAccess> & xAccess);
/// export a single event (writes <office:events> element)
void ExportSingleEvent(
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index be7d2d2..795d19c 100644
--- a/include/xmloff/shapeexport.hxx
+++ b/include/xmloff/shapeexport.hxx
@@ -235,7 +235,7 @@ private:
SAL_DLLPRIVATE void ImpExportOLE2Shape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr, SvXMLAttributeList* pAttrList = nullptr );
SAL_DLLPRIVATE void ImpExportPageShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
SAL_DLLPRIVATE void ImpExportCaptionShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
- SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
+ SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT );
SAL_DLLPRIVATE void ImpExportFrameShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
SAL_DLLPRIVATE void ImpExportPluginShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
SAL_DLLPRIVATE void ImpExportAppletShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr );
@@ -296,11 +296,11 @@ public:
/// returns the export property mapper for external chaining
static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport );
- void enableLayerExport( bool bEnable = true ) { mbExportLayer = bEnable; }
+ void enableLayerExport() { mbExportLayer = true; }
bool IsLayerExportEnabled() const { return mbExportLayer; }
/** defines if the export should increment the progress bar or not */
- void enableHandleProgressBar( bool bEnable = true ) { mbHandleProgressBar = bEnable; }
+ void enableHandleProgressBar() { mbHandleProgressBar = true; }
bool IsHandleProgressBarEnabled() const { return mbHandleProgressBar; }
void setPresentationStylePrefix( const OUString& rPrefix ) { msPresentationStylePrefix = rPrefix; }
diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx
index 8d59a36..aa4a7b4 100644
--- a/include/xmloff/shapeimport.hxx
+++ b/include/xmloff/shapeimport.hxx
@@ -403,7 +403,7 @@ public:
const css::uno::Reference< css::frame::XModel>& rModel, SvXMLImport& rImport );
/** defines if the import should increment the progress bar or not */
- void enableHandleProgressBar( bool bEnable = true );
+ void enableHandleProgressBar();
bool IsHandleProgressBarEnabled() const;
/** queries the capability of the current model to create presentation shapes */
diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index d91e3d0..92f2bf9 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -707,7 +707,7 @@ public:
// forwards to TextListHelper; these are used in many places
/// push a list context on the list context stack
- void PushListContext(XMLTextListBlockContext *i_pListBlock = nullptr);
+ void PushListContext();
/// pop the list context stack
void PopListContext();
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 257f650..beb70c4 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -435,8 +435,7 @@ public:
void Add(
sal_uInt16 nFamily,
MultiPropertySetHelper& rPropSetHelper,
- const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
- const XMLPropertyState** pAddState = nullptr );
+ const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
void Add(
sal_uInt16 nFamily,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
@@ -501,8 +500,7 @@ public:
// This method exports the given OUString
void exportText(
const OUString& rText,
- bool& rPrevCharWasSpace,
- TextPNS eExtensionNS = TextPNS::ODF);
+ bool& rPrevCharWasSpace);
// This method collects all automatic styles for the given XText
void collectTextAutoStyles(
diff --git a/include/xmloff/xmlaustp.hxx b/include/xmloff/xmlaustp.hxx
index ac03690..f4f0277 100644
--- a/include/xmloff/xmlaustp.hxx
+++ b/include/xmloff/xmlaustp.hxx
@@ -75,10 +75,9 @@ public:
/** register a new family with its appropriate instance of a derivation of XMLPropertySetMapper
for family numbers see families.hxx
- if bAsFamily is sal_False, the family name is used as element name
*/
// TODO: Remove this ugly method as soon as possible
- void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix, bool bAsFamily = true );
+ void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix );
void AddFamily( sal_Int32 nFamily, const OUString& rStrName,
const rtl::Reference< SvXMLExportPropertyMapper >& rMapper,
const OUString& rStrPrefix, bool bAsFamily = true );
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index a6e97f7..599e3dd 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -328,12 +328,10 @@ public:
be added, as well.</p>
@param i_rNamespace the namespace to be declared
- @param i_rPreferredPrefix (opt.) preferred prefix for the namespace
@returns the actual prefix that the namespace is associated with
*/
- OUString EnsureNamespace(OUString const & i_rNamespace,
- OUString const & i_rPreferredPrefix = OUString("gen") );
+ OUString EnsureNamespace(OUString const & i_rNamespace );
// Check if common attribute list is empty.
#ifndef DBG_UTIL
@@ -374,17 +372,9 @@ public:
@param bWriteEmpty
Whether to write empty *:language and *:country attribute
values in case of an empty locale (denoting system).
-
- @param eClass
- default, XML_LANGUAGE: XML_SCRIPT, XML_COUNTRY, XML_RFC_LANGUAGE_TAG
- XML_LANGUAGE_ASIAN: XML_SCRIPT_ASIAN, XML_COUNTRY_ASIAN, XML_RFC_LANGUAGE_TAG_ASIAN
- also switches nPrefix XML_NAMESPACE_FO to XML_NAMESPACE_STYLE
- XML_LANGUAGE_COMPLEX: XML_SCRIPT_COMPLEX, XML_COUNTRY_COMPLEX, XML_RFC_LANGUAGE_TAG_COMPLEX
- also switches nPrefix XML_NAMESPACE_FO to XML_NAMESPACE_STYLE
*/
void AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc,
- const css::lang::Locale& rLocale, bool bWriteEmpty,
- enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_LANGUAGE );
+ const css::lang::Locale& rLocale, bool bWriteEmpty);
/** Same as AddLanguageTagAttributes() but with LanguageTag parameter
instead of Locale.
diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx
index ad990e1..0c2c32f 100644
--- a/include/xmloff/xmlexppr.hxx
+++ b/include/xmloff/xmlexppr.hxx
@@ -124,7 +124,7 @@ public:
* - instead of the property's value, its default value is exported.
*/
std::vector<XMLPropertyState> FilterDefaults(
- const css::uno::Reference<css::beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily = false ) const;
+ const css::uno::Reference<css::beans::XPropertySet>& rPropSet ) const;
/** Compare to arrays of XMLPropertyState */
bool Equals( const ::std::vector< XMLPropertyState >& aProperties1,
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index a0793c8..396aef4 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -66,7 +66,7 @@ public:
sal_uInt32 GetEntryFlags( sal_Int32 nIndex ) const;
/** Returns the type of an entry */
- sal_uInt32 GetEntryType( sal_Int32 nIndex, bool bWithFlags = true ) const;
+ sal_uInt32 GetEntryType( sal_Int32 nIndex ) const;
/** Returns the namespace-key of an entry */
sal_uInt16 GetEntryNameSpace( sal_Int32 nIndex ) const;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index c595a44..29432d7 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -294,14 +294,14 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin
GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily,
m_xParaPropMapper, aPrefix );
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME),
- m_xCellStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME),
- m_xColumnStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME),
- m_xRowStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME),
- m_xTableStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX));
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME,
+ m_xCellStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME,
+ m_xColumnStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME,
+ m_xRowStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME,
+ m_xTableStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX);
}
Reference< XInterface > ORptExport::create(Reference< XComponentContext > const & xContext)
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index bcff585..7bcfcdf 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -391,14 +391,14 @@ ScXMLExport::ScXMLExport(
xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper);
xTableStylesExportPropertySetMapper = new ScXMLTableExportPropertyMapper(xTableStylesPropertySetMapper);
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME),
- xCellStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME),
- xColumnStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME),
- xRowStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX));
- GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME),
- xTableStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX));
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME,
+ xCellStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME,
+ xColumnStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME,
+ xRowStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX);
+ GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME,
+ xTableStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX);
if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 53ddb9e..00f723e 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -268,8 +268,7 @@ protected:
enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
sal_uInt16 nValuePrefix,
const OUString& sValue, /// attribute value
- bool bOmitEmpty = false, /// omit attribute, if value is empty
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ bool bOmitEmpty = false); /// omit attribute, if value is empty
/// export a string attribute, omit if default
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 8ebfcf1..e81167c 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -900,22 +900,22 @@ uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( )
}
OUString
-SvXMLExport::EnsureNamespace(OUString const & i_rNamespace,
- OUString const & i_rPreferredPrefix)
+SvXMLExport::EnsureNamespace(OUString const & i_rNamespace)
{
+ OUString const aPreferredPrefix("gen");
OUString sPrefix;
sal_uInt16 nKey( _GetNamespaceMap().GetKeyByName( i_rNamespace ) );
if( XML_NAMESPACE_UNKNOWN == nKey )
{
// There is no prefix for the namespace, so
// we have to generate one and have to add it.
- sPrefix = i_rPreferredPrefix;
+ sPrefix = aPreferredPrefix;
nKey = _GetNamespaceMap().GetKeyByPrefix( sPrefix );
sal_Int32 n( 0 );
OUStringBuffer buf;
while( nKey != USHRT_MAX )
{
- buf.append( i_rPreferredPrefix );
+ buf.append( aPreferredPrefix );
buf.append( ++n );
sPrefix = buf.makeStringAndClear();
nKey = _GetNamespaceMap().GetKeyByPrefix( sPrefix );
@@ -1007,8 +1007,7 @@ void SvXMLExport::AddAttribute( const OUString& rQName,
}
void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc,
- const css::lang::Locale& rLocale, bool bWriteEmpty,
- enum ::xmloff::token::XMLTokenEnum eClass )
+ const css::lang::Locale& rLocale, bool bWriteEmpty )
{
if (rLocale.Variant.isEmpty())
{
@@ -1017,26 +1016,8 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref
// to convert to LanguageTag first. Also catches the case of empty
// locale denoting system locale.
xmloff::token::XMLTokenEnum eLanguage, eCountry;
- switch (eClass)
- {
- default:
- case XML_LANGUAGE:
- eLanguage = XML_LANGUAGE;
- eCountry = XML_COUNTRY;
- break;
- case XML_LANGUAGE_ASIAN:
- eLanguage = XML_LANGUAGE_ASIAN;
- eCountry = XML_COUNTRY_ASIAN;
- if (nPrefix == XML_NAMESPACE_FO)
- nPrefix = XML_NAMESPACE_STYLE;
- break;
- case XML_LANGUAGE_COMPLEX:
- eLanguage = XML_LANGUAGE_COMPLEX;
- eCountry = XML_COUNTRY_COMPLEX;
- if (nPrefix == XML_NAMESPACE_FO)
- nPrefix = XML_NAMESPACE_STYLE;
- break;
- }
+ eLanguage = XML_LANGUAGE;
+ eCountry = XML_COUNTRY;
if (bWriteEmpty || !rLocale.Language.isEmpty())
AddAttribute( nPrefix, eLanguage, rLocale.Language);
if (bWriteEmpty || !rLocale.Country.isEmpty())
@@ -1045,7 +1026,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref
else
{
LanguageTag aLanguageTag( rLocale);
- AddLanguageTagAttributes( nPrefix, nPrefixRfc, aLanguageTag, bWriteEmpty, eClass);
+ AddLanguageTagAttributes( nPrefix, nPrefixRfc, aLanguageTag, bWriteEmpty);
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index aea7032..81b884e 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -189,14 +189,14 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
mrExport.GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_SD_GRAPHICS_ID,
- OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME),
+ XML_STYLE_FAMILY_SD_GRAPHICS_NAME,
GetPropertySetMapper(),
- OUString(XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX));
+ XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX);
mrExport.GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_SD_PRESENTATION_ID,
- OUString(XML_STYLE_FAMILY_SD_PRESENTATION_NAME),
+ XML_STYLE_FAMILY_SD_PRESENTATION_NAME,
GetPropertySetMapper(),
- OUString(XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX));
+ XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX);
maCurrentInfo = maShapeInfos.end();
@@ -3449,7 +3449,7 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap
void XMLShapeExport::ImpExport3DShape(
const uno::Reference< drawing::XShape >& xShape,
- XmlShapeType eShapeType, XMLShapeExportFlags /* nFeatures = SEF_DEFAULT */, awt::Point* /*pRefPoint = NULL */)
+ XmlShapeType eShapeType, XMLShapeExportFlags /* nFeatures = SEF_DEFAULT */)
{
const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
if(xPropSet.is())
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 80d269e..f75da95 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -1096,9 +1096,9 @@ void XMLShapeImportHelper::endPage( css::uno::Reference< css::drawing::XShapes >
}
/** defines if the import should increment the progress bar or not */
-void XMLShapeImportHelper::enableHandleProgressBar( bool bEnable )
+void XMLShapeImportHelper::enableHandleProgressBar()
{
- mpImpl->mbHandleProgressBar = bEnable;
+ mpImpl->mbHandleProgressBar = true;
}
bool XMLShapeImportHelper::IsHandleProgressBarEnabled() const
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 1f14589..f230863 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -472,10 +472,10 @@ namespace xmloff
}
void OPropertyExport::exportStringSequenceAttribute(const sal_uInt16 _nAttributeNamespaceKey, const sal_Char* _pAttributeName,
- const OUString& _rPropertyName,
- const sal_Unicode _aQuoteCharacter)
+ const OUString& _rPropertyName)
{
const sal_Unicode _aListSeparator = ',';
+ const sal_Unicode _aQuoteCharacter = '"';
DBG_CHECK_PROPERTY( _rPropertyName, Sequence< OUString > );
Sequence< OUString > aItems;
@@ -497,10 +497,8 @@ namespace xmloff
++pItems
)
{
- OSL_ENSURE(!_aQuoteCharacter || (-1 == pItems->indexOf(_aQuoteCharacter)),
+ OSL_ENSURE(-1 == pItems->indexOf(_aQuoteCharacter),
"OPropertyExport::exportStringSequenceAttribute: there is an item which contains the quote character!");
- OSL_ENSURE(_aQuoteCharacter || (-1 == pItems->indexOf(_aListSeparator)),
- "OPropertyExport::exportStringSequenceAttribute: no quote character, but there is an item containing the separator character!");
if (bQuote)
sFinalList += sQuote;
diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx
index 6ebdb32..7db076e 100644
--- a/xmloff/source/forms/propertyexport.hxx
+++ b/xmloff/source/forms/propertyexport.hxx
@@ -296,14 +296,11 @@ namespace xmloff
the name of the attribute to add. Must not contain any namespace (it's added automatically)
@param _pPropertyName
the name of the property to ask the object for
- @param _aQuoteCharacter
- the character to use to quote the sequence elements with. May be 0, in this case no quoting happens
*/
void exportStringSequenceAttribute(
const sal_uInt16 _nAttributeNamespaceKey,
const sal_Char* _pAttributeName,
- const OUString& _rPropertyName,
- const sal_Unicode _aQuoteCharacter = '"');
+ const OUString& _rPropertyName);
/** determines whether the given property is to be exported
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index f2b9122..5d7cdee 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -159,13 +159,12 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess,
}
}
-void XMLEventExport::ExportExt( Reference<XNameAccess> & rAccess,
- bool bWhitespace )
+void XMLEventExport::ExportExt( Reference<XNameAccess> & rAccess )
{
// set bExtNamespace flag to use XML_NAMESPACE_OFFICE_EXT namespace
// for events element (not for child elements)
bExtNamespace = true;
- Export(rAccess, bWhitespace);
+ Export(rAccess);
bExtNamespace = false; // reset for future Export calls
}
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 7713b66..5463fc1 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -162,8 +162,8 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
xPageMasterExportPropMapper = new XMLPageMasterExportPropMapper(
xPageMasterPropSetMapper, rExp);
- rExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_PAGE_MASTER, OUString( XML_STYLE_FAMILY_PAGE_MASTER_NAME ),
- xPageMasterExportPropMapper, OUString( XML_STYLE_FAMILY_PAGE_MASTER_PREFIX ), false );
+ rExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_PAGE_MASTER, XML_STYLE_FAMILY_PAGE_MASTER_NAME,
+ xPageMasterExportPropMapper, XML_STYLE_FAMILY_PAGE_MASTER_PREFIX, false );
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(),
UNO_QUERY );
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index 4e7d1ad..fecc47a 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -280,11 +280,10 @@ void SvXMLAutoStylePoolP::AddFamily(
sal_Int32 nFamily,
const OUString& rStrName,
SvXMLExportPropertyMapper* pMapper,
- const OUString& aStrPrefix,
- bool bAsFamily )
+ const OUString& aStrPrefix )
{
rtl::Reference <SvXMLExportPropertyMapper> xTmp = pMapper;
- AddFamily( nFamily, rStrName, xTmp, aStrPrefix, bAsFamily );
+ AddFamily( nFamily, rStrName, xTmp, aStrPrefix );
}
void SvXMLAutoStylePoolP::AddFamily(
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index a204b3e..870e19c 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -576,9 +576,9 @@ std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter(
}
std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults(
- const uno::Reference<beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily ) const
+ const uno::Reference<beans::XPropertySet>& rPropSet ) const
{
- return _Filter(rPropSet, true, bEnableFoFontFamily);
+ return _Filter(rPropSet, true, false/*bEnableFoFontFamily*/);
}
vector<XMLPropertyState> SvXMLExportPropertyMapper::_Filter(
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 7c3cdaf..94208eb 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -184,12 +184,10 @@ sal_uInt32 XMLPropertySetMapper::GetEntryFlags( sal_Int32 nIndex ) const
return mpImpl->maMapEntries[nIndex].nType & ~MID_FLAG_MASK;
}
-sal_uInt32 XMLPropertySetMapper::GetEntryType( sal_Int32 nIndex, bool bWithFlags ) const
+sal_uInt32 XMLPropertySetMapper::GetEntryType( sal_Int32 nIndex ) const
{
assert((0 <= nIndex) && (nIndex < static_cast<sal_Int32>(mpImpl->maMapEntries.size())));
sal_uInt32 nType = mpImpl->maMapEntries[nIndex].nType;
- if( !bWithFlags )
- nType = nType & MID_FLAG_MASK;
return nType;
}
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index a7a78eb..d0bb1d2 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2484,12 +2484,11 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
sal_uInt16 nValuePrefix,
const OUString& sValue,
- bool bOmitEmpty,
- sal_uInt16 nPrefix)
+ bool bOmitEmpty)
{
OUString sQValue =
GetExport().GetNamespaceMap().GetQNameByKey( nValuePrefix, sValue, false );
- ProcessString( eName, sQValue, bOmitEmpty, nPrefix );
+ ProcessString( eName, sQValue, bOmitEmpty );
}
/// export a string attribute
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 542147d..4b8ff82 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2434,9 +2434,9 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster(
}
-void XMLTextImportHelper::PushListContext(XMLTextListBlockContext *i_pListBlock)
+void XMLTextImportHelper::PushListContext()
{
- GetTextListHelper().PushListContext(i_pListBlock);
+ GetTextListHelper().PushListContext(static_cast<XMLTextListBlockContext*>(nullptr));
}
void XMLTextImportHelper::PopListContext()
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 89ca196..7758c14 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -586,8 +586,7 @@ static bool lcl_validPropState( const XMLPropertyState& rState )
void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
MultiPropertySetHelper& rPropSetHelper,
- const Reference < XPropertySet > & rPropSet,
- const XMLPropertyState** ppAddStates)
+ const Reference < XPropertySet > & rPropSet)
{
rtl::Reference < SvXMLExportPropertyMapper > xPropMapper;
switch( nFamily )
@@ -599,14 +598,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
DBG_ASSERT( xPropMapper.is(), "There is the property mapper?" );
vector< XMLPropertyState > xPropStates(xPropMapper->Filter( rPropSet ));
- if( ppAddStates )
- {
- while( *ppAddStates )
- {
- xPropStates.push_back( **ppAddStates );
- ++ppAddStates;
- }
- }
if( rPropSetHelper.hasProperty( NUMBERING_RULES_AUTO ) )
{
@@ -3394,7 +3385,7 @@ void XMLTextParagraphExport::exportTextRange(
}
void XMLTextParagraphExport::exportText( const OUString& rText,
- bool& rPrevCharIsSpace, TextPNS /*eExtensionNS*/ )
+ bool& rPrevCharIsSpace )
{
sal_Int32 nExpStartPos = 0;
sal_Int32 nEndPos = rText.getLength();
More information about the Libreoffice-commits
mailing list