Anonymous avatar Anonymous committed 3b6f53c

#i102247# re-introduce export of outline

Comments (0)

Files changed (4)

sw/source/filter/ww8/rtfexport.cxx

 
 class SwRTFWriter : public Writer
 {
-       public:
+    bool        m_bOutOutlineOnly;
+    public:
                SwRTFWriter( const String& rFilterName, const String& rBaseURL );
                virtual ~SwRTFWriter();
                virtual ULONG WriteStream();
 };
 
-SwRTFWriter::SwRTFWriter( const String& /*rFltName*/, const String & rBaseURL )
+SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
 {
     OSL_TRACE("%s", OSL_THIS_FUNC);
     SetBaseURL( rBaseURL );
+	// export outline nodes, only (send outline to clipboard/presentation)
+	m_bOutOutlineOnly = 'O' == rFltName.GetChar( 0 );
 }
 
 SwRTFWriter::~SwRTFWriter()
 {
     OSL_TRACE("%s", OSL_THIS_FUNC);
     RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this );
+    aExport.mbOutOutlineOnly =  m_bOutOutlineOnly;
     aExport.ExportDocument( true );
     return 0;
 }

sw/source/filter/ww8/wrtw8nds.cxx

     switch ( rNode.GetNodeType() )
     {
         case ND_TEXTNODE:
-            OutputTextNode( *rNode.GetTxtNode() );
-            break;
+        {
+            const SwTxtNode& rTextNode = *rNode.GetTxtNode();
+            if( !mbOutOutlineOnly || rTextNode.IsOutline() )
+                OutputTextNode( rTextNode );
+        }
+        break;
         case ND_GRFNODE:
             OutputGrfNode( *rNode.GetGrfNode() );
             break;

sw/source/filter/ww8/wrtww8.cxx

     pStyles( NULL ),
     bHasHdr(false), bHasFtr(false), bSubstituteBullets(true),
     mbExportModeRTF( false ),
+    mbOutOutlineOnly( false ),
     pDoc( pDocument ),
     pCurPam( pCurrentPam ),
     pOrigPam( pOriginalPam )

sw/source/filter/ww8/wrtww8.hxx

     BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called
     
     bool mbExportModeRTF;
+    bool mbOutOutlineOnly;   // export outline nodes, only (send outline to clipboard/presentation)
 
     SwDoc *pDoc;
     SwPaM *pCurPam, *pOrigPam;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.