summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/xml/xmlexp.cxx22
-rw-r--r--sw/source/filter/xml/xmlexp.hxx8
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx11
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx8
-rw-r--r--sw/source/filter/xml/xmlimp.cxx49
-rw-r--r--sw/source/filter/xml/xmlimp.hxx14
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx219
-rw-r--r--sw/source/filter/xml/xmltble.cxx12
-rw-r--r--sw/source/filter/xml/xmltbli.cxx12
-rw-r--r--sw/source/filter/xml/xmltext.cxx10
-rw-r--r--sw/source/filter/xml/xmltexte.hxx6
11 files changed, 267 insertions, 104 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 3b2de960809f..dae548cf30eb 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -221,9 +221,9 @@ SwXMLExport::SwXMLExport( const Reference< XModel >& rModel, SwPaM& rPaM,
_InitItemExport();
- if( bShowProgress )
- ::StartProgress( STR_STATSTR_W4WWRITE, 0, pDoc->GetNodes().Count(),
- pDoc->GetDocShell() );
+// if( bShowProgress )
+// ::StartProgress( STR_STATSTR_W4WWRITE, 0, pDoc->GetNodes().Count(),
+// pDoc->GetDocShell() );
SfxObjectShell* pObjSh = pDoc->GetDocShell();
if( pObjSh )
@@ -242,8 +242,8 @@ XMLShapeExport* SwXMLExport::CreateShapeExport()
__EXPORT SwXMLExport::~SwXMLExport()
{
- if( bShowProgress )
- ::EndProgress( pDoc->GetDocShell() );
+// if( bShowProgress )
+// ::EndProgress( pDoc->GetDocShell() );
#ifdef XML_CORE_API
if( pCurPaM )
@@ -292,8 +292,8 @@ void SwXMLExport::_ExportContent()
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
- GetTextParagraphExport()->exportFramesBoundToPage();
- GetTextParagraphExport()->exportText( xText );
+ GetTextParagraphExport()->exportFramesBoundToPage( bShowProgress );
+ GetTextParagraphExport()->exportText( xText, bShowProgress );
#endif
}
@@ -343,8 +343,8 @@ void SwXMLExport::ExportCurPaM( sal_Bool bExportWholePaM )
pCurPaM->GetPoint()->nNode++; // next node
sal_uInt32 nPos = pCurPaM->GetPoint()->nNode.GetIndex();
- if( bShowProgress )
- ::SetProgressState( nPos, pDoc->GetDocShell() );
+// if( bShowProgress )
+// ::SetProgressState( nPos, pDoc->GetDocShell() );
// if not everything should be exported, the WriteAll flag must be
// set for all but the first and last node anyway.
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 8953f230d865..381df6a1aade 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -150,7 +150,7 @@ class SwXMLExport : public SvXMLExport
void ExportTableLines( const SwTableLines& rLines,
sal_Bool bHeadline=sal_False );
-// virtual void _ExportMeta();
+ virtual void _ExportMeta();
virtual void _ExportFontDecls();
virtual void _ExportStyles( sal_Bool bUsed );
virtual void _ExportAutoStyles();
@@ -195,6 +195,8 @@ public:
}
SwDoc& GetDoc() { return *pDoc; }
+
+ sal_Bool IsShowProgress() const { return bShowProgress; }
};
inline const SvXMLUnitConverter& SwXMLExport::GetTwipUnitConverter() const
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 2c66db0e39d9..829bacdcda3c 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlfmt.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1071,6 +1071,8 @@ SvXMLImportContext *SwXMLImport::CreateStylesContext(
else
xStyles = pContext;
+ ShowProgress( bAuto ? 10 : 5 );
+
return pContext;
}
@@ -1081,6 +1083,10 @@ SvXMLImportContext *SwXMLImport::CreateMasterStylesContext(
SvXMLImportContext *pContext =
new SwXMLMasterStylesContext_Impl( *this, XML_NAMESPACE_OFFICE, rLocalName,
xAttrList );
+
+ ShowProgress( 15 );
+ GetTextImport()->SetProgressValue( nProgress );
+
return pContext;
}
@@ -1096,6 +1102,7 @@ void SwXMLImport::InsertStyles( sal_Bool bAuto )
GetTextImport()->SetAutoStyles( (SwXMLStylesContext_Impl *)&xAutoStyles );
GetShapeImport()->SetAutoStylesContext( (SwXMLStylesContext_Impl *)&xAutoStyles );
}
+
}
void SwXMLImport::FinishStyles()
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index e22ae0346190..5fd91330f0d6 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlfmte.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -447,8 +447,8 @@ void SwXMLExport::_ExportAutoStyles()
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
- GetTextParagraphExport()->collectFrameBoundToPageAutoStyles();
- GetTextParagraphExport()->collectTextAutoStyles( xText );
+ GetTextParagraphExport()->collectFrameBoundToPageAutoStyles( bShowProgress );
+ GetTextParagraphExport()->collectTextAutoStyles( xText, bShowProgress );
GetPageExport()->collectAutoStyles( sal_False );
GetTextParagraphExport()->exportTextAutoStyles();
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d5dcdf8b1739..afeb540ad16b 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimp.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,9 @@
#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX_
#include <xmloff/XMLFontStylesContext.hxx>
#endif
+#ifndef _XMLOFF_PROGRESSBARHELPER_HXX
+#include <xmloff/ProgressBarHelper.hxx>
+#endif
#ifndef _DOC_HXX
#include <doc.hxx>
@@ -269,7 +272,10 @@ SwXMLImport::SwXMLImport(
pDocElemTokenMap( 0 ),
pTableElemTokenMap( 0 ),
pTableItemMapper( 0 ),
- pSttNdIdx( 0 )
+ pSttNdIdx( 0 ),
+ bProgressValid( sal_False ),
+ bShowProgress( sal_True ),
+ nProgress( 0 )
{
_InitItemImport();
@@ -480,3 +486,40 @@ XMLShapeImportHelper* SwXMLImport::CreateShapeImport()
{
return new XMLTextShapeImportHelper( *this );
}
+
+void SwXMLImport::SetProgressRef( sal_Int32 nParagraphs )
+{
+ if( bShowProgress && !bProgressValid )
+ {
+ if( !nParagraphs )
+ nParagraphs = 250; // We assume 250 paragarphs here
+
+ // We assume that
+ // - 5% are taken reading meta information and fonts
+ // - 5% are taken reading styles
+ // - 5% are taken reading automatic styles
+ // - 85% are taken reading the rest of the document
+ // The 85% correspond exactly to the number of paragarphs
+ // contained in the document
+ nProgressRef = (nParagraphs *100) / 85;
+ ProgressBarHelper *pProgress = GetProgressBarHelper();
+ if( pProgress )
+ pProgress->SetReference( nProgressRef );
+ bProgressValid = sal_True;
+ }
+}
+
+void SwXMLImport::ShowProgress( sal_Int32 nPercent )
+{
+ if( bShowProgress)
+ {
+ if( !bProgressValid )
+ SetProgressRef( 0 );
+
+ nProgress = nPercent * nProgressRef / 100;
+ ProgressBarHelper *pProgress = GetProgressBarHelper();
+ if( pProgress )
+ pProgress->SetValue( nProgress );
+ }
+}
+
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 307f6788d4d0..b7443158b76d 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimp.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,17 +101,23 @@ class SwXMLImport: public SvXMLImport
SvXMLImportContextRef xAutoStyles;
sal_uInt16 nStyleFamilyMask;// Mask of styles to load
+ sal_Int32 nProgress;
+ sal_Int32 nProgressRef;
sal_Bool bLoadDoc : 1; // Load doc or styles only
sal_Bool bInsert : 1; // Insert mode. If styles are
// loaded only sal_False means that
// existing styles will be
// overwritten.
sal_Bool bAutoStylesValid : 1;
-
+ sal_Bool bProgressValid : 1;
+ sal_Bool bShowProgress : 1;
void _InitItemImport();
void _FinitItemImport();
+ void ShowProgress( sal_Int32 nPercent );
+ void SetProgressRef( sal_Int32 nParagraphs );
+
protected:
// This method is called after the namespace map has been updated, but
@@ -167,6 +173,8 @@ public:
const ::rtl::OUString& rName,
const SfxItemSet **ppItemSet=0,
::rtl::OUString *pParent=0 ) const;
+
+ virtual void SetStatisticAttributes(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttribs);
};
inline const SvXMLUnitConverter& SwXMLImport::GetTwipUnitConverter() const
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 9ea50332e4f9..ca5750d4411d 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlmeta.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:15:00 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,28 +85,47 @@
#ifndef _XMLOFF_XMLMETAE_HXX
#include <xmloff/xmlmetae.hxx>
#endif
-
#ifndef _SVX_LANGITEM_HXX
#include <svx/langitem.hxx>
#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include <xmloff/xmluconv.hxx>
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include <xmloff/nmspmap.hxx>
+#endif
+#ifndef _DOCSTAT_HXX
+#include "docstat.hxx"
+#endif
#ifndef _SWDOCSH_HXX
#include "docsh.hxx"
#endif
#ifndef _DOC_HXX //autogen wg. SwDoc
#include <doc.hxx>
#endif
+#ifndef _UNOOBJ_HXX
+#include <unoobj.hxx>
+#endif
#ifndef _XMLIMP_HXX
#include "xmlimp.hxx"
#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmloff/xmlkywd.hxx>
+#endif
+#ifndef _XMLOFF_PROGRESSBARHELPER_HXX
+#include <xmloff/ProgressBarHelper.hxx>
+#endif
#ifndef _XMLEXP_HXX
#include "xmlexp.hxx"
#endif
+
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
// ---------------------------------------------------------------------
@@ -143,19 +162,6 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext(
pContext = new SfxXMLMetaContext( *this,
XML_NAMESPACE_OFFICE, rLocalName,
GetModel() );
-#if 0
- SfxObjectShell* pObjSh = pDoc->GetDocShell();
- if( pObjSh )
- {
- Reference< frame::XModel > xModel = pObjSh->GetBaseModel();
- Reference< document::XDocumentInfoSupplier > xSupp( xModel,
- UNO_QUERY );
- if( xSupp.is() )
- pContext = new SwXMLMetaContext_Impl( *this,
- XML_NAMESPACE_OFFICE, rLocalName,
- xSupp->getDocumentInfo() );
- }
-#endif
}
if( !pContext )
@@ -167,61 +173,148 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext(
// ---------------------------------------------------------------------
-#if 0
-void SwXMLExport::_ExportMeta()
+enum SvXMLTokenMapAttrs
{
- SfxObjectShell* pObjSh = pDoc->GetDocShell();
- if( pObjSh )
- {
- pObjSh->UpdateDocInfoForSave(); // update information
-
- LanguageType eDocLang = ((const SvxLanguageItem&)
- pDoc->GetDefault(RES_CHRATR_LANGUAGE)).GetLanguage();
+ XML_TOK_META_STAT_TABLE = 1,
+ XML_TOK_META_STAT_IMAGE = 2,
+ XML_TOK_META_STAT_OLE = 4,
+ XML_TOK_META_STAT_PAGE = 8,
+ XML_TOK_META_STAT_PARA = 16,
+ XML_TOK_META_STAT_WORD = 32,
+ XML_TOK_META_STAT_CHAR = 64,
+ XML_TOK_META_STAT_END=XML_TOK_UNKNOWN
+};
- Reference< frame::XModel > xModel = pObjSh->GetBaseModel();
- Reference< document::XDocumentInfoSupplier > xSupp( xModel,
- UNO_QUERY );
- if( xSupp.is() )
+static __FAR_DATA SvXMLTokenMapEntry aMetaStatAttrTokenMap[] =
+{
+ { XML_NAMESPACE_META, sXML_table_count, XML_TOK_META_STAT_TABLE },
+ { XML_NAMESPACE_META, sXML_image_count, XML_TOK_META_STAT_IMAGE },
+ { XML_NAMESPACE_META, sXML_object_count, XML_TOK_META_STAT_OLE },
+ { XML_NAMESPACE_META, sXML_paragraph_count, XML_TOK_META_STAT_PARA },
+ { XML_NAMESPACE_META, sXML_page_count, XML_TOK_META_STAT_PAGE },
+ { XML_NAMESPACE_META, sXML_word_count, XML_TOK_META_STAT_WORD },
+ { XML_NAMESPACE_META, sXML_character_count, XML_TOK_META_STAT_CHAR },
+ XML_TOKEN_MAP_END
+};
+void SwXMLImport::SetStatisticAttributes(
+ const Reference< xml::sax::XAttributeList > & xAttrList)
+{
+ if( IsStylesOnlyMode() || IsInsertMode() )
+ return;
+
+ Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(),
+ UNO_QUERY);
+ ASSERT( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
+ SwXTextCursor *pTxtCrsr = (SwXTextCursor*)xCrsrTunnel->getSomething(
+ SwXTextCursor::getUnoTunnelId() );
+ ASSERT( pTxtCrsr, "SwXTextCursor missing" );
+ SwDoc *pDoc = pTxtCrsr->GetDoc();
+ SwDocStat aDocStat( pDoc->GetDocStat() );
+
+ SvXMLTokenMap aTokenMap( aMetaStatAttrTokenMap );
+
+ sal_uInt32 nTokens = 0;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+ sal_Int32 nValue;
+ if( !GetMM100UnitConverter().convertNumber( nValue, rValue ) )
+ continue;
+
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
+
+ sal_uInt32 nToken = aTokenMap.Get( nPrefix, aLocalName );
+ switch( nToken )
{
- SfxXMLMetaExport aMeta( GetDocHandler(), xSupp->getDocumentInfo(),
- eDocLang );
- aMeta.Export( GetNamespaceMap() );
+ case XML_TOK_META_STAT_TABLE:
+ aDocStat.nTbl = (sal_uInt16)nValue;
+ break;
+ case XML_TOK_META_STAT_IMAGE:
+ aDocStat.nGrf = (sal_uInt16)nValue;
+ break;
+ case XML_TOK_META_STAT_OLE:
+ aDocStat.nOLE = (sal_uInt16)nValue;
+ break;
+ case XML_TOK_META_STAT_PAGE:
+ aDocStat.nPage = (sal_uInt32)nValue;
+ break;
+ case XML_TOK_META_STAT_PARA:
+ aDocStat.nPara = (sal_uInt32)nValue;
+ break;
+ case XML_TOK_META_STAT_WORD:
+ aDocStat.nWord = (sal_uInt32)nValue;
+ break;
+ case XML_TOK_META_STAT_CHAR:
+ aDocStat.nChar = (sal_uInt32)nValue;
+ break;
+ default:
+ nToken = 0;
}
+ nTokens |= nToken;
}
-}
-#endif
-
-
-/*************************************************************************
-
- Source Code Control chaos::System - Header
-
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/xml/xmlmeta.cxx,v 1.1.1.1 2000-09-18 17:15:00 hr Exp $
-
- Source Code Control chaos::System - Update
-
- $Log: not supported by cvs2svn $
- Revision 1.7 2000/09/18 16:05:07 willem.vandorp
- OpenOffice header added.
-
- Revision 1.6 2000/08/02 14:52:39 mib
- text export continued
-
- Revision 1.5 2000/06/08 09:45:54 aw
- changed to use functionality from xmloff project now
- Revision 1.4 2000/05/03 12:08:05 mib
- unicode
-
- Revision 1.3 2000/03/13 14:33:44 mib
- UNO3
+ if( 127 == nTokens )
+ aDocStat.bModified = sal_False;
+ if( nTokens )
+ pDoc->SetDocStat( aDocStat );
+ if( nTokens & XML_TOK_META_STAT_PARA )
+ SetProgressRef( (sal_Int32)aDocStat.nPara );
+ else if ( nTokens & XML_TOK_META_STAT_PAGE )
+ SetProgressRef( (sal_Int32)aDocStat.nPage * 10 );
+}
- Revision 1.2 2000/02/11 14:42:04 hr
- #70473# changes for unicode ( patched by automated patchtool )
+// ---------------------------------------------------------------------
- Revision 1.1 2000/01/06 15:03:49 mib
- #70271#:separation of text/layout, cond. styles, adaptions to wd-xlink-19991229
+void SwXMLExport::_ExportMeta()
+{
+ SvXMLExport::_ExportMeta();
+ SwDocStat aDocStat( GetDoc().GetDocStat() );
+ if( aDocStat.bModified )
+ GetDoc().UpdateDocStat( aDocStat
+#if SUPD < 614
+ ,0
+#endif
+ );
-*************************************************************************/
+ if( bShowProgress )
+ {
+ ProgressBarHelper *pProgress = GetProgressBarHelper();
+ pProgress->SetReference( 20 + 2*aDocStat.nPara );
+ pProgress->SetValue( 20 );
+ }
+ OUStringBuffer aOut(16);
+
+ aOut.append( (sal_Int32)aDocStat.nTbl );
+ AddAttribute( XML_NAMESPACE_META, sXML_table_count,
+ aOut.makeStringAndClear() );
+ aOut.append( (sal_Int32)aDocStat.nGrf );
+ AddAttribute( XML_NAMESPACE_META, sXML_image_count,
+ aOut.makeStringAndClear() );
+ aOut.append( (sal_Int32)aDocStat.nOLE );
+ AddAttribute( XML_NAMESPACE_META, sXML_object_count,
+ aOut.makeStringAndClear() );
+ if( aDocStat.nPage )
+ {
+ aOut.append( (sal_Int32)aDocStat.nPage );
+ AddAttribute( XML_NAMESPACE_META, sXML_page_count,
+ aOut.makeStringAndClear() );
+ }
+ aOut.append( (sal_Int32)aDocStat.nPara );
+ AddAttribute( XML_NAMESPACE_META, sXML_paragraph_count,
+ aOut.makeStringAndClear() );
+ aOut.append( (sal_Int32)aDocStat.nWord );
+ AddAttribute( XML_NAMESPACE_META, sXML_word_count,
+ aOut.makeStringAndClear() );
+ aOut.append( (sal_Int32)aDocStat.nChar );
+ AddAttribute( XML_NAMESPACE_META, sXML_character_count,
+ aOut.makeStringAndClear() );
+ SvXMLElementExport aElem( *this, XML_NAMESPACE_META,
+ sXML_document_statistic,
+ sal_True, sal_True );
+}
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 571c1d77ddcb..141796ee5cc1 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltble.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -846,7 +846,8 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, sal_uInt16 nColSpan )
sXML_table_cell, sal_True, sal_True );
// export cell content
- GetTextParagraphExport()->exportText( xRange->getText() );
+ GetTextParagraphExport()->exportText( xRange->getText(),
+ bShowProgress );
}
else
{
@@ -1053,8 +1054,11 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd )
void SwXMLTextParagraphExport::exportTable(
const Reference < XTextContent > & rTextContent,
- sal_Bool bAutoStyles )
+ sal_Bool bAutoStyles, sal_Bool bProgress )
{
+ ASSERT( ((SwXMLExport&)GetExport()).IsShowProgress() == bProgress,
+ "inconsistent progress flags" );
+
// Reference < XPropertySet > xPropSet( rTextContent, UNO_QUERY );
// Any aAny = xPropSet->getPropertyValue( sTextTable );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 76ec5917f663..2af5f2164a1c 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltbli.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dvo $ $Date: 2000-11-16 11:21:54 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2157,7 +2157,7 @@ protected:
public:
SwXMLTextImportHelper(
const Reference < XModel>& rModel,
- sal_Bool bInsertM, sal_Bool bStylesOnlyM );
+ sal_Bool bInsertM, sal_Bool bStylesOnlyM, sal_Bool bProgress );
~SwXMLTextImportHelper();
virtual sal_Bool IsInHeaderFooter() const;
@@ -2165,8 +2165,8 @@ public:
SwXMLTextImportHelper::SwXMLTextImportHelper(
const Reference < XModel>& rModel,
- sal_Bool bInsertM, sal_Bool bStylesOnlyM ) :
- XMLTextImportHelper( rModel, bInsertM, bStylesOnlyM )
+ sal_Bool bInsertM, sal_Bool bStylesOnlyM, sal_Bool bProgress ) :
+ XMLTextImportHelper( rModel, bInsertM, bStylesOnlyM, bProgress )
{
}
@@ -2200,5 +2200,5 @@ sal_Bool SwXMLTextImportHelper::IsInHeaderFooter() const
XMLTextImportHelper* SwXMLImport::CreateTextImport()
{
return new SwXMLTextImportHelper( GetModel(), IsInsertMode(),
- IsStylesOnlyMode() );
+ IsStylesOnlyMode(), bShowProgress );
}
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index 5d2706fa59e6..16d622f8ad2c 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -139,5 +139,11 @@ SvXMLImportContext *SwXMLImport::CreateBodyContext(
pContext = new SvXMLImportContext( *this, XML_NAMESPACE_OFFICE,
rLocalName );
+ if( !bProgressValid )
+ {
+ ShowProgress( 15 );
+ GetTextImport()->SetProgressValue( nProgress );
+ }
+
return pContext;
}
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index 9c81b42166de..cf12d0dddacc 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltexte.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-21 14:38:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,7 +86,7 @@ protected:
virtual void exportTable(
const ::com::sun::star::uno::Reference <
::com::sun::star::text::XTextContent > & rTextContent,
- sal_Bool bAutoStyles );
+ sal_Bool bAutoStyles, sal_Bool bProgress );
public:
SwXMLTextParagraphExport(