summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-26 13:01:42 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2016-09-26 13:25:01 +0000
commitda870b35dd0cf8b7a987530e896b3e044f444908 (patch)
tree9b5ca8b09a2fda7eebdfa670cc3d5c43e194281e /sw/source/filter
parent56cda453daf71a368f316cb559e3e1f529e1c4fa (diff)
remove unused ICoreParagraphStyle
which was introduced in commit aef1e2dde5e53ba8416a393bbe155ef0c18511a7 Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Date: Mon Dec 21 03:55:14 2015 +0100 move SwXStyle entirely into compilation unit but Bjoern can't remember why he introduced it: "Likely best to rip it out now and implement it properly when there is a good testcase for this XML filter scenario ..." Change-Id: Iaef19131d804369436097ab445d6c192587f9d9f Reviewed-on: https://gerrit.libreoffice.org/29297 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx50
-rw-r--r--sw/source/filter/xml/xmltexte.cxx87
-rw-r--r--sw/source/filter/xml/xmltexte.hxx3
3 files changed, 0 insertions, 140 deletions
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 7b963963ae6a..64c87c62a1c2 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -207,10 +207,6 @@ public:
bool IsValid() const { return 0 != nCondition; }
-
- sal_uInt32 GetCondition() const { return nCondition; }
- sal_uInt32 GetSubCondition() const { return nSubCondition; }
- const OUString& GetApplyStyle() const { return sApplyStyle; }
};
SwXMLConditionContext_Impl::SwXMLConditionContext_Impl(
@@ -279,8 +275,6 @@ public:
sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
-
- virtual void Finish( bool bOverwrite ) override;
};
@@ -346,50 +340,6 @@ SvXMLImportContext *SwXMLTextStyleContext_Impl::CreateChildContext(
return pContext;
}
-void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite )
-{
- XMLTextStyleContext::Finish( bOverwrite );
- if(!pConditions || XML_STYLE_FAMILY_TEXT_PARAGRAPH != GetFamily())
- return;
- uno::Reference<style::XStyle> xStyle = GetStyle();
- if(!xStyle.is())
- return;
- uno::Reference<lang::XUnoTunnel> xStyleTunnel(xStyle, uno::UNO_QUERY);
- if(!xStyleTunnel.is())
- return;
- sw::ICoreParagraphStyle* pCoreParagraphStyle(reinterpret_cast<sw::ICoreParagraphStyle*>(
- xStyleTunnel->getSomething(sw::ICoreParagraphStyle::getUnoTunnelId())));
- if(!pCoreParagraphStyle)
- return;
- SwTextFormatColl* pColl = const_cast<SwTextFormatColl*>(pCoreParagraphStyle->GetFormatColl());
- OSL_ENSURE( pColl, "Text collection not found" );
- if( !pColl || RES_CONDTXTFMTCOLL != pColl->Which() )
- return;
- SwDoc *pDoc = SwImport::GetDocFromXMLImport(GetImport());
- const size_t nCount = pConditions->size();
- OUString sName;
- for( size_t i = 0; i < nCount; i++ )
- {
- const SwXMLConditionContext_Impl *pCond = (*pConditions)[i].get();
- const OUString aDisplayName(
- GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_PARAGRAPH,
- pCond->GetApplyStyle() ) );
- SwStyleNameMapper::FillUIName(aDisplayName,
- sName,
- nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
- true);
- SwTextFormatColl* pCondColl = pDoc->FindTextFormatCollByName( sName );
- OSL_ENSURE( pCondColl,
- "SwXMLItemSetStyleContext_Impl::ConnectConditions: cond coll missing" );
- if( pCondColl )
- {
- SwCollCondition aCond( pCondColl, pCond->GetCondition(),
- pCond->GetSubCondition() );
- static_cast<SwConditionTextFormatColl*>(pColl)->InsertCondition( aCond );
- }
- }
-}
-
class SwXMLItemSetStyleContext_Impl : public SvXMLStyleContext
{
OUString sMasterPageName;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 823397e628b6..f652a32b176d 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -79,93 +79,6 @@ SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode(
return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode();
}
-void SwXMLTextParagraphExport::exportStyleContent(
- const Reference< XStyle > & rStyle )
-{
-
- Reference<XUnoTunnel> xStyleTunnel(rStyle, UNO_QUERY);
- Reference<lang::XServiceInfo> xServiceInfo(rStyle, UNO_QUERY);
- if(!xStyleTunnel.is() || !xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.style.ParagraphStyle"))
- return;
- sw::ICoreParagraphStyle* pCoreParagraphStyle(reinterpret_cast<sw::ICoreParagraphStyle*>(
- xStyleTunnel->getSomething(sw::ICoreParagraphStyle::getUnoTunnelId())));
- if(!pCoreParagraphStyle)
- return;
- const SwTextFormatColl* pColl(pCoreParagraphStyle->GetFormatColl());
- OSL_ENSURE( pColl, "There is the text collection?" );
- if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
- {
- const SwFormatCollConditions& rConditions =
- static_cast<const SwConditionTextFormatColl *>(pColl)->GetCondColls();
- for( size_t i=0; i < rConditions.size(); ++i )
- {
- const SwCollCondition& rCond = *rConditions[i];
-
- enum XMLTokenEnum eFunc = XML_TOKEN_INVALID;
- OUString sVal;
- switch( rCond.GetCondition() )
- {
- case PARA_IN_LIST:
- eFunc = XML_LIST_LEVEL;
- sVal = OUString::number(rCond.GetSubCondition()+1);
- break;
- case PARA_IN_OUTLINE:
- eFunc = XML_OUTLINE_LEVEL;
- sVal = OUString::number(rCond.GetSubCondition()+1);
- break;
- case PARA_IN_FRAME:
- eFunc = XML_TEXT_BOX;
- break;
- case PARA_IN_TABLEHEAD:
- eFunc = XML_TABLE_HEADER;
- break;
- case PARA_IN_TABLEBODY:
- eFunc = XML_TABLE;
- break;
- case PARA_IN_SECTION:
- eFunc = XML_SECTION;
- break;
- case PARA_IN_FOOTENOTE:
- eFunc = XML_FOOTNOTE;
- break;
- case PARA_IN_FOOTER:
- eFunc = XML_FOOTER;
- break;
- case PARA_IN_HEADER:
- eFunc = XML_HEADER;
- break;
- case PARA_IN_ENDNOTE:
- eFunc = XML_ENDNOTE;
- break;
- }
- OSL_ENSURE( eFunc != XML_TOKEN_INVALID,
- "SwXMLExport::ExportFormat: unknown condition" );
- if( eFunc != XML_TOKEN_INVALID )
- {
- OUString sCond = GetXMLToken(eFunc) + "()";
- if( !sVal.isEmpty() )
- {
- sCond += "=" + sVal;
- }
-
- GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- XML_CONDITION, sCond );
- OUString aString;
- SwStyleNameMapper::FillProgName(
- rCond.GetTextFormatColl()->GetName(),
- aString,
- nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,
- true);
- aString = GetExport().EncodeStyleName( aString );
- GetExport().AddAttribute( XML_NAMESPACE_STYLE,
- XML_APPLY_STYLE_NAME, aString );
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
- XML_MAP, true, true );
- }
- }
- }
-}
-
SwXMLTextParagraphExport::SwXMLTextParagraphExport(
SwXMLExport& rExp,
SvXMLAutoStylePoolP& _rAutoStylePool ) :
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index 9f4ab283574e..9ff9581d5070 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -43,9 +43,6 @@ class SwXMLTextParagraphExport : public XMLTextParagraphExport
const css::uno::Reference < css::beans::XPropertySet >& rPropSet );
protected:
- virtual void exportStyleContent(
- const css::uno::Reference< css::style::XStyle > & rStyle ) override;
-
virtual void _collectTextEmbeddedAutoStyles(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet ) override;
virtual void _exportTextEmbedded(