summaryrefslogtreecommitdiffstats
path: root/xmloff/source/text
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text')
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx2
-rw-r--r--xmloff/source/text/txtfldi.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx18
-rw-r--r--xmloff/source/text/txtparai.cxx14
6 files changed, 22 insertions, 22 deletions
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 0054d6e04d71..e674dacaec41 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -268,7 +268,7 @@ void XMLIndexTOCContext::EndElement()
// get rid of last paragraph (unless it's the only paragraph)
rHelper->GetCursor()->goRight(1, sal_False);
if( xBodyContextRef.Is() &&
- ((XMLIndexBodyContext*)&xBodyContextRef)->HasContent() )
+ static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
{
rHelper->GetCursor()->goLeft(1, sal_True);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
@@ -301,7 +301,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext(
pContext = new XMLIndexBodyContext(GetImport(), nPrefix,
rLocalName);
if ( !xBodyContextRef.Is() ||
- !((XMLIndexBodyContext*)&xBodyContextRef)->HasContent() )
+ !static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
{
xBodyContextRef = pContext;
}
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index ec0c91872198..25bab0ec5b9f 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -75,7 +75,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
if( mxParentListBlock.Is() )
{
XMLTextListBlockContext *pParent =
- (XMLTextListBlockContext *)&mxParentListBlock;
+ static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
msListStyleName = pParent->GetListStyleName();
sParentListStyleName = msListStyleName;
mxNumRules = pParent->GetNumRules();
@@ -240,7 +240,7 @@ void XMLTextListBlockContext::EndElement()
// Numbering has not to be restarted if it has been restarted within
// a child list.
XMLTextListBlockContext *pParent =
- (XMLTextListBlockContext *)&mxParentListBlock;
+ static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
if( pParent )
{
pParent->mbRestartNumbering = mbRestartNumbering;
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 4e29e07d6d2b..a59f200c2d68 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -224,7 +224,7 @@ void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite )
{
// set event suppplier and release reference to context
Reference<XEventsSupplier> xEventsSupplier(xStyle, UNO_QUERY);
- ((XMLEventsImportContext *)&xEventContext)->SetEvents(xEventsSupplier);
+ static_cast<XMLEventsImportContext *>(&xEventContext)->SetEvents(xEventsSupplier);
xEventContext = 0;
}
}
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index dbf3f0942d63..913613591016 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2760,7 +2760,7 @@ void XMLMacroFieldImportContext::PrepareField(
{
// get event sequence
XMLEventsImportContext* pEvents =
- (XMLEventsImportContext*)&xEventContext;
+ static_cast<XMLEventsImportContext*>(&xEventContext);
Sequence<PropertyValue> aValues;
pEvents->GetEventSequence( sOnClick, aValues );
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 527566712000..8c954064e399 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1221,7 +1221,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, rStyleName,
true );
pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
@@ -1233,7 +1233,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
if( nCount )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)
->GetImportPropertyMapper(nFamily);
if( xImpPrMap.is() )
{
@@ -1431,7 +1431,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if (!sStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, sStyleName, true );
pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
}
@@ -2117,7 +2117,7 @@ void XMLTextImportHelper::SetRuby(
if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY,
rStyleName, true );
pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pTempStyle));
@@ -2351,7 +2351,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
bool* pIsSystemLanguage )
{
const SvXMLStyleContext* pStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,
sStyleName, true );
@@ -2387,7 +2387,7 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName,
true );
pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle);
@@ -2402,7 +2402,7 @@ XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rN
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName,
true );
pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext ,pTempStyle));
@@ -2418,7 +2418,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle(
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext(
XML_STYLE_FAMILY_TEXT_SECTION,
rName, true );
@@ -2435,7 +2435,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster(
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext(
XML_STYLE_FAMILY_PAGE_MASTER,
rName, true );
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index a7b94e46a7dc..3aefc7827e68 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -256,7 +256,7 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
{
XMLHint_Impl *pHint = &rHints[nPos];
if ( pHint->IsReference() &&
- sName.equals( ((XMLReferenceHint_Impl *)pHint)->GetRefName()) )
+ sName.equals( static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName()) )
{
// set end and stop searching
pHint->SetEnd(GetImport().GetTextImport()->
@@ -1127,7 +1127,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
XMLHint_Impl *pHint = &rHints[nPos];
if ( pHint->IsIndexMark() &&
sID.equals(
- ((XMLIndexMarkHint_Impl *)pHint)->GetID()) )
+ static_cast<XMLIndexMarkHint_Impl *>(pHint)->GetID()) )
{
// set end and stop searching
pHint->SetEnd(xPos);
@@ -2086,7 +2086,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_STYLE:
{
const OUString& rStyleName =
- ((XMLStyleHint_Impl *)pHint)->GetStyleName();
+ static_cast<XMLStyleHint_Impl *>(pHint)->GetStyleName();
if( !rStyleName.isEmpty() )
xTxtImport->SetStyleAndAttrs( GetImport(),
xAttrCursor, rStyleName,
@@ -2096,7 +2096,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_REFERENCE:
{
const OUString& rRefName =
- ((XMLReferenceHint_Impl *)pHint)->GetRefName();
+ static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName();
if( !rRefName.isEmpty() )
{
if( !pHint->GetEnd().is() )
@@ -2115,7 +2115,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_HYPERLINK:
{
const XMLHyperlinkHint_Impl *pHHint =
- (const XMLHyperlinkHint_Impl *)pHint;
+ static_cast<const XMLHyperlinkHint_Impl *>(pHint);
xTxtImport->SetHyperlink( GetImport(),
xAttrCursor,
pHHint->GetHRef(),
@@ -2129,7 +2129,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_INDEX_MARK:
{
Reference<beans::XPropertySet> xMark(
- ((const XMLIndexMarkHint_Impl *)pHint)->GetMark());
+ static_cast<const XMLIndexMarkHint_Impl *>(pHint)->GetMark());
Reference<XTextContent> xContent(xMark, UNO_QUERY);
xTxtImport->GetText()->insertTextContent(
xAttrCursor, xContent, sal_True );
@@ -2138,7 +2138,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_TEXT_FRAME:
{
const XMLTextFrameHint_Impl *pFHint =
- (const XMLTextFrameHint_Impl *)pHint;
+ static_cast<const XMLTextFrameHint_Impl *>(pHint);
// Check for text content (#i33242#)
Reference < XTextContent > xTextContent =
pFHint->GetTextContent();