Kaydet (Commit) deb9dd06 authored tarafından Caolán McNamara's avatar Caolán McNamara

remove original and unused word for windows 1 filter

move fltshell.cxx into basflt and fire up the chainsaw for the rest

This filter has never, as far as I know, had a route to actually execute it
since day 0 of OpenOffice.org.

Change-Id: I35a92e2dee60bdc5d2d4e7181074bc4a3635b54c
üst e8204fe4
......@@ -497,6 +497,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/filter/ascii/wrtasc \
sw/source/filter/basflt/docfact \
sw/source/filter/basflt/fltini \
sw/source/filter/basflt/fltshell \
sw/source/filter/basflt/iodetect \
sw/source/filter/basflt/shellio \
sw/source/filter/html/SwAppletImpl \
......@@ -531,11 +532,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/filter/writer/writer \
sw/source/filter/writer/wrt_fn \
sw/source/filter/writer/wrtswtbl \
sw/source/filter/ww1/fltshell \
sw/source/filter/ww1/w1class \
sw/source/filter/ww1/w1filter \
sw/source/filter/ww1/w1par \
sw/source/filter/ww1/w1sprm \
sw/source/filter/xml/XMLRedlineImportHelper \
sw/source/filter/xml/swxml \
sw/source/filter/xml/wrtxml \
......
......@@ -37,7 +37,6 @@
#define FILTER_XMLV "CXMLV" ///< XML filter
#define FILTER_XMLVW "CXMLVWEB" ///< XML filter
#define sHTML "HTML"
#define sWW1 "WW1"
#define sWW5 "WW6"
#define sWW6 "CWW6"
......@@ -66,7 +65,6 @@ enum ReaderWriterEnum {
READER_WRITER_WW8,
READER_WRITER_RTF_WH,
READER_WRITER_HTML,
READER_WRITER_WW1,
READER_WRITER_WW5,
READER_WRITER_XML,
READER_WRITER_TEXT_DLG,
......
......@@ -77,7 +77,6 @@ SwReaderWriterEntry aReaderWriter[] =
SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, true ),
SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, true ),
SwReaderWriterEntry( 0, &::GetHTMLWriter, true ),
SwReaderWriterEntry( 0, 0, true ),
SwReaderWriterEntry( &::GetWW8Reader, 0, true ),
SwReaderWriterEntry( 0, &::GetXMLWriter, true ),
SwReaderWriterEntry( 0, &::GetASCWriter, false ),
......@@ -130,7 +129,6 @@ Filters::Filters()
{
_SetFltPtr( READER_WRITER_BAS, (ReadAscii = new AsciiReader) );
_SetFltPtr( READER_WRITER_HTML, (ReadHTML = new HTMLReader) );
_SetFltPtr( READER_WRITER_WW1, new WW1Reader );
_SetFltPtr( READER_WRITER_XML, (ReadXML = new XMLReader) );
_SetFltPtr( READER_WRITER_TEXT_DLG, ReadAscii );
_SetFltPtr( READER_WRITER_TEXT, ReadAscii );
......
......@@ -41,7 +41,6 @@ SwIoDetect aFilterDetect[] =
SwIoDetect( FILTER_WW8 ),
SwIoDetect( sRtfWH ),
SwIoDetect( sHTML ),
SwIoDetect( sWW1 ),
SwIoDetect( sWW5 ),
SwIoDetect( FILTER_XML ),
SwIoDetect( FILTER_TEXT_DLG ),
......
......@@ -39,11 +39,6 @@ public:
HTMLReader();
};
class WW1Reader : public Reader
{
virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) SAL_OVERRIDE;
};
class XMLReader : public Reader
{
virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) SAL_OVERRIDE;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <pam.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
#include <fltini.hxx>
#include <w1par.hxx>
#include <swfltopt.hxx>
#include <mdiexp.hxx>
#include <swerror.h>
#include <statstr.hrc>
// Initializing the field FilterFlags
static sal_uLong WW1_Read_FieldIniFlags()
{
// sal_uInt16 i;
static const sal_Char* aNames[ 1 ] = { "WinWord/WW1F" };
sal_uInt32 aVal[ 1 ];
SwFilterOptions aOpt( 1, aNames, aVal );
sal_uLong nFieldFlags = aVal[ 0 ];
if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO ) )
{
SwFltSetFlag( nFieldFlags, SwFltControlStack::BOOK_TO_VAR_REF );
SwFltSetFlag( nFieldFlags, SwFltControlStack::TAGS_DO_ID );
SwFltSetFlag( nFieldFlags, SwFltControlStack::TAGS_IN_TEXT );
SwFltSetFlag( nFieldFlags, SwFltControlStack::ALLOW_FLD_CR );
}
return nFieldFlags;
}
// StarWriter-Interface
// One method returns the call interface for the Writer.
// Read() reads a file. For this, two objects get created. The Shell,
// which collects all information, and the manager, which reads it
// from the file.
sal_uLong WW1Reader::Read(SwDoc& rDoc, const OUString& rBaseURL, SwPaM& rPam, const OUString& /*cName*/)
{
sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE(pStrm!=NULL, "W1-Read without Stream");
if (pStrm != NULL)
{
bool bNew = !bInsertMode; // New Doc ( no insert )
sal_uLong nFieldFlags = WW1_Read_FieldIniFlags();
Ww1Shell* pRdr = new Ww1Shell( rDoc, rPam, rBaseURL, bNew, nFieldFlags );
if( pRdr )
{
Ww1Manager* pMan = new Ww1Manager( *pStrm, nFieldFlags );
if( pMan )
{
if( !pMan->GetError() )
{
::StartProgress( STR_STATSTR_W4WREAD, 0, 100,
rDoc.GetDocShell() );
::SetProgressState( 0, rDoc.GetDocShell() );
// just push everything over now
*pRdr << *pMan;
if( !pMan->GetError() )
// signal absence of errors
nRet = 0; // would be better: WARN_SWG_FEATURES_LOST;
::EndProgress( rDoc.GetDocShell() );
}
else
{
if( pMan->GetFib().GetFIB().fComplexGet() )
nRet = ERR_WW6_FASTSAVE_ERR;
}
}
delete pMan;
}
delete pRdr;
}
Ww1Sprm::DeinitTab();
return nRet;
}
// The shell is the interface from filter to Writer. It is derived
// from SwFltShell and contains all relevant extensions for ww1.
// SwFltShell is used in common with ww-filter. Information read from
// the file gets 'piped' into the shell, like would be done for a
// stream.
Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const OUString& rBaseURL, bool bNew, sal_uLong nFieldFlags)
: SwFltShell(&rD, rPam, rBaseURL, bNew, nFieldFlags)
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SW_SOURCE_FILTER_WW1_W1PAR_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW1_W1PAR_HXX
#include <fltshell.hxx>
#include <w1class.hxx>
class Ww1Shell : public SwFltShell
{
public:
Ww1Shell(SwDoc&, SwPaM&, const OUString& rBaseURL, bool bNew, sal_uLong nFieldFlags);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
This diff is collapsed.
......@@ -422,8 +422,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
if( pOldFilter &&
( pOldFilter->GetUserData() == FILTER_WW8 ||
pOldFilter->GetUserData() == "CWW6" ||
pOldFilter->GetUserData() == "WW6" ||
pOldFilter->GetUserData() == "WW1" ) )
pOldFilter->GetUserData() == "WW6" ) )
{
// when saving it in our own fileformat, then remove the template
// name from the docinfo.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment