diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-11-08 18:19:04 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-11-09 19:45:16 +0100 |
commit | c41346f96f201c4e8b6c15d5b3fe65aa2590e86a (patch) | |
tree | 253e11abf884b355d47dc828fd160d195b86df92 /sw/source | |
parent | bb00a0097900ae054401f7758a915047cfde4065 (diff) |
fix constness of SwFmtsBase::GetFmt()
And covariant return type while I'm at it.
Change-Id: Iab8459e73fa6743eae17094d9826c83b0f53c3f5
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentStylePoolManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/textboxhelper.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/docnode/nodedump.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 1 |
6 files changed, 9 insertions, 5 deletions
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index abc11490fb60..de9496de27a1 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -2118,7 +2118,7 @@ bool DocumentStylePoolManager::IsPoolTxtCollUsed( sal_uInt16 nId ) const /// Check if this AutoCollection is already/still in use bool DocumentStylePoolManager::IsPoolFmtUsed( sal_uInt16 nId ) const { - SwFmt *pNewFmt = 0; + const SwFmt *pNewFmt = 0; const SwFmtsBase* pArray[ 2 ]; sal_uInt16 nArrCnt = 1; bool bFnd = true; diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 6a497248dece..e106ddbf59ae 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -28,6 +28,7 @@ #include <sortedobjs.hxx> #include <anchoredobject.hxx> #include <cntfrm.hxx> +#include <docary.hxx> #include <editeng/unoprnms.hxx> #include <editeng/charrotateitem.hxx> diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 5ccf26b3c12d..812c881d1dec 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -674,7 +674,7 @@ void SwFrmFmts::dumpAsXml(xmlTextWriterPtr w, const char* pName) const writer.startElement(pName); for (size_t i = 0; i < size(); ++i) { - SwFrmFmt* pFmt = static_cast<SwFrmFmt*>(GetFmt(i)); + const SwFrmFmt* pFmt = GetFmt(i); writer.startElement("swfrmfmt"); OString aName = OUStringToOString(pFmt->GetName(), RTL_TEXTENCODING_UTF8); writer.writeFormatAttribute("ptr", "%p", pFmt); @@ -709,7 +709,7 @@ void SwCharFmts::dumpAsXml(xmlTextWriterPtr w) const writer.startElement("swcharfmts"); for (size_t i = 0; i < size(); ++i) { - SwCharFmt* pFmt = static_cast<SwCharFmt*>(GetFmt(i)); + const SwCharFmt* pFmt = GetFmt(i); writer.startElement("swcharfmt"); OString aName = OUStringToOString(pFmt->GetName(), RTL_TEXTENCODING_UTF8); writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr())); @@ -729,7 +729,7 @@ void SwSectionFmts::dumpAsXml(xmlTextWriterPtr w) const writer.startElement("swsectionfmts"); for (size_t i = 0; i < size(); ++i) { - SwSectionFmt* pFmt = static_cast<SwSectionFmt*>(GetFmt(i)); + const SwSectionFmt* pFmt = GetFmt(i); writer.startElement("swsectionfmt"); lcl_dumpSfxItemSet(writer, &pFmt->GetAttrSet()); writer.endElement(); @@ -746,7 +746,7 @@ void SwTxtFmtColls::dumpAsXml(xmlTextWriterPtr w) const writer.startElement("swtxtfmtcolls"); for (size_t i = 0; i < size(); ++i) { - SwTxtFmtColl* pColl = static_cast<SwTxtFmtColl*>(GetFmt(i)); + const SwTxtFmtColl* pColl = GetFmt(i); writer.startElement("swtxtfmtcoll"); OString aName = OUStringToOString(pColl->GetName(), RTL_TEXTENCODING_UTF8); writer.writeFormatAttribute("name", "%s", BAD_CAST(aName.getStr())); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 2ebfe735a023..aa57f73657f2 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -32,6 +32,7 @@ #include <wrtsh.hxx> #include <view.hxx> #include <edtwin.hxx> +#include <docary.hxx> #include "viewimp.hxx" #include "pagefrm.hxx" diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 628ba094d650..cbf90520ec43 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -54,6 +54,7 @@ #include <layouter.hxx> #include <switerator.hxx> #include <DocumentSettingManager.hxx> +#include <docary.hxx> using namespace ::com::sun::star; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 42ab1e0c7e2f..c95fd50f4fbb 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -48,6 +48,7 @@ #include <svtools/rtfkeywd.hxx> #include <filter/msfilter/rtfutil.hxx> #include <unotools/docinfohelper.hxx> +#include <docary.hxx> #if OSL_DEBUG_LEVEL > 1 #include <iostream> #endif |