diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-11-16 01:48:40 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-11-16 23:59:47 +0900 |
commit | 91a92b94531cb8997ba204016cd2171f7c118f51 (patch) | |
tree | ba0f2342767e2fa28be7527add22caa1952082e8 | |
parent | 73d3c9504a479e62126d1e7a1766173370603aa1 (diff) |
removed dead code
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 134 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.hxx | 21 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 36 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.hxx | 13 |
4 files changed, 0 insertions, 204 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index f03a7b339495..4f7ae5496d10 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -90,58 +90,13 @@ using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::xforms; using namespace ::xmloff::token; -#ifdef XML_CORE_API -void SwXMLExport::SetCurPaM( SwPaM& rPaM, sal_Bool bWhole, sal_Bool bTabOnly ) -{ - if( !pCurPaM ) - { - pCurPaM = new SwPaM( *rPaM.End(), *rPaM.Start() ); - } - else - { - *pCurPaM->GetPoint() = *rPaM.Start(); - *pCurPaM->GetMark() = *rPaM.End(); - } - - // Set PaM to table/section start node if whole doc should be exported - if( bWhole ) - { - SwTableNode *pTblNd = pCurPaM->GetNode()->FindTableNode(); - if( pTblNd ) - { - pCurPaM->GetPoint()->nNode = *pTblNd; - - if( bTabOnly ) - pCurPaM->GetMark()->nNode = *pTblNd->EndOfSectionNode(); - } - - SwSectionNode * pSectNd = pCurPaM->GetNode()->FindSectionNode(); - while( pSectNd ) - { - pCurPaM->GetPoint()->nNode = *pSectNd; - - // SwSectionNode::FindSectionNode() returns the section node itself - pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode(); - } - } -} -#endif - SwXMLExport::SwXMLExport( const uno::Reference< lang::XMultiServiceFactory > xServiceFactory, sal_uInt16 nExportFlags) : SvXMLExport( util::MeasureUnit::INCH, xServiceFactory, XML_TEXT, nExportFlags ), -#ifdef XML_CORE_API - pCurPaM( 0 ), - pOrigPaM( &rPaM ), -#endif pTableItemMapper( 0 ), pTableLines( 0 ), -#ifdef XML_CORE_API - bExportWholeDoc( bExpWholeDoc ), - bExportFirstTableOnly( bExpFirstTableOnly ), -#endif bBlock( sal_False ), bShowProgress( sal_True ), sNumberFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")), @@ -151,34 +106,6 @@ SwXMLExport::SwXMLExport( _InitItemExport(); } -#ifdef XML_CORE_API - -SwXMLExport::SwXMLExport( - const uno::Reference< lang::XMultiServiceFactory > xServiceFactory, - const Reference< XModel >& rModel, - SwPaM& rPaM, - const OUString& rFileName, - const Reference< XDocumentHandler > & rHandler, - const Reference< XGraphicObjectResolver > & rEmbeddedGrfObjs, - sal_Bool bExpWholeDoc, sal_Bool bExpFirstTableOnly, - sal_Bool bShowProg ) -: SvXMLExport( xServiceFactory, rFileName, rHandler, rModel, rEmbeddedGrfObjs, - SW_MOD()->GetMetric( rPaM.GetDoc()->get(IDocumentSettingAccess::HTML_MODE) ) ), - pCurPaM( 0 ), - pOrigPaM( &rPaM ), - pTableItemMapper( 0 ), - pTableLines( 0 ), - bExportWholeDoc( bExpWholeDoc ), - bExportFirstTableOnly( bExpFirstTableOnly ), - bShowProgress( bShowProg ), - sNumberFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")), - sIsProtected(RTL_CONSTASCII_USTRINGPARAM("IsProtected")), - sCell(RTL_CONSTASCII_USTRINGPARAM("Cell")) -{ - _InitItemExport(); -} -#endif - void SwXMLExport::setBlockMode() { bBlock = sal_True; @@ -923,65 +850,4 @@ OUString SAL_CALL SwXMLExport::getImplementationName() } } - -#ifdef XML_CORE_API -void SwXMLExport::ExportCurPaM( sal_Bool bExportWholePaM ) -{ - sal_Bool bFirstNode = sal_True; - sal_Bool bExportWholeNode = bExportWholePaM; - - SwXMLNumRuleInfo aPrevNumInfo; - SwXMLNumRuleInfo aNextNumInfo; - - while( pCurPaM->GetPoint()->nNode.GetIndex() < - pCurPaM->GetMark()->nNode.GetIndex() || - ( pCurPaM->GetPoint()->nNode.GetIndex() == - pCurPaM->GetMark()->nNode.GetIndex() && - pCurPaM->GetPoint()->nContent.GetIndex() <= - pCurPaM->GetMark()->nContent.GetIndex() ) ) - { - SwNode *pNd = pCurPaM->GetNode(); - - aNextNumInfo.Set( *pNd ); - ExportListChange( aPrevNumInfo, aNextNumInfo ); - - OSL_ENSURE( !(pNd->IsGrfNode() || pNd->IsOLENode()), - "SwXMLExport::exportCurPaM: grf or OLE node unexpected" ); - if( pNd->IsTxtNode() ) - { - SwTxtNode* pTxtNd = pNd->GetTxtNode(); - - if( !bFirstNode ) - pCurPaM->GetPoint()->nContent.Assign( pTxtNd, 0 ); - - ExportTxtNode( *pTxtNd, 0, STRING_LEN, bExportWholeNode ); - } - else if( pNd->IsTableNode() ) - { - ExportTable( *pNd->GetTableNode() ); - } - else if( pNd->IsSectionNode() ) - { - ExportSection( *pNd->GetSectionNode() ); - } - else if( pNd == &pDoc->GetNodes().GetEndOfContent() ) - break; - - pCurPaM->GetPoint()->nNode++; // next node - - sal_uInt32 nPos = pCurPaM->GetPoint()->nNode.GetIndex(); - - // if not everything should be exported, the WriteAll flag must be - // set for all but the first and last node anyway. - bExportWholeNode = bExportWholePaM || - nPos != pCurPaM->GetMark()->nNode.GetIndex(); - bFirstNode = sal_False; - - aPrevNumInfo = aNextNumInfo; - } - aNextNumInfo.Reset(); - ExportListChange( aPrevNumInfo, aNextNumInfo ); -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index 779cdbfbf602..425755acfe35 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -59,11 +59,6 @@ class SwXMLExport : public SvXMLExport { friend class SwXMLExpContext; -#ifdef XML_CORE_API - SwPaM *pCurPaM; // the current PaM - SwPaM *pOrigPaM; // the original PaM -#endif - SvXMLUnitConverter* pTwipUnitConv; SvXMLExportItemMapper* pTableItemMapper; SwXMLTableLinesCache_Impl* pTableLines; @@ -116,10 +111,6 @@ class SwXMLExport : public SvXMLExport virtual void GetConfigurationSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps); virtual sal_Int32 GetDocumentSpecificSettings( ::std::list< SettingsGroup >& _out_rSettings ); -#ifdef XML_CORE_API - void SetCurPaM( SwPaM& rPaM, sal_Bool bWhole, sal_Bool bTabOnly ); -#endif - // string constants for table cell export const ::rtl::OUString sNumberFormat; const ::rtl::OUString sIsProtected; @@ -141,18 +132,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, sal_uInt16 nExportFlags = EXPORT_ALL); -#ifdef XML_CORE_API - SwXMLExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel, - SwPaM& rPaM, - const ::rtl::OUString& rFileName, - const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler, - const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > &, - sal_Bool bExpWholeDoc, - sal_Bool bExpFirstTableOnly, - sal_Bool bShowProgr ); -#endif virtual ~SwXMLExport(); virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 5ba8ba973b61..1552f6f75634 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -456,42 +456,6 @@ SwXMLImport::SwXMLImport( } -#ifdef XML_CORE_API - -SwXMLImport::SwXMLImport( - const uno::Reference< lang::XMultiServiceFactory > xServiceFactory, - SwDoc& rDoc, - const SwPaM& rPaM, - sal_Bool bLDoc, - sal_Bool bInsertMode, - sal_uInt16 nStyleFamMask, - const uno::Reference< frame::XModel > & rModel, - const uno::Reference< document::XGraphicObjectResolver > & rEGO, - SvStorage *pPkg ) -: SvXMLImport( xServiceFactory, rModel, rEGO ), - bLoadDoc( bLDoc ), - bInsert( bInsertMode ), - nStyleFamilyMask( nStyleFamMask ), - pDocElemTokenMap( 0 ), - pTableElemTokenMap( 0 ), - pTableCellAttrTokenMap( 0 ), - pTableItemMapper( 0 ), - pSttNdIdx( 0 ), - bShowProgress( sal_True ), - bPreserveRedlineMode( sal_True ), - xPackage( pPkg ) -{ - _InitItemImport(); - - Reference < XTextRange > xTextRange = - SwXTextRange::CreateTextRangeFromPosition( &rDoc, *rPaM.GetPoint(), 0 ); - Reference < XText > xText = xTextRange->getText(); - Reference < XTextCursor > xTextCursor = - xText->createTextCursorByRange( xTextRange ); - GetTextImport()->SetCursor( xTextCursor ); -} -#endif - SwXMLImport::~SwXMLImport() throw () { delete pDocElemTokenMap; diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx index ef9bc9320f57..0252d8a4e98d 100644 --- a/sw/source/filter/xml/xmlimp.hxx +++ b/sw/source/filter/xml/xmlimp.hxx @@ -121,19 +121,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, sal_uInt16 nImportFlags = IMPORT_ALL); -#ifdef XML_CORE_API - SwXMLImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - SwDoc& rDoc, - const SwPaM& rPaM, - sal_Bool bLoadDoc, - sal_Bool bInsertMode, - sal_uInt16 nStyleFamMask, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel, - const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > &, - SvStorage *pPkg ); -#endif - ~SwXMLImport() throw(); // ::com::sun::star::xml::sax::XDocumentHandler |