update emoji autocorrect entries from po-files
[LibreOffice.git] / sc / source / filter / rtf / rtfimp.cxx
blobbca3af1bbff6769a28abbc41777a394b6fb30c33
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "global.hxx"
21 #include "document.hxx"
22 #include "filter.hxx"
23 #include "editutil.hxx"
24 #include "rtfimp.hxx"
25 #include "rtfparse.hxx"
26 #include "ftools.hxx"
28 FltError ScFormatFilterPluginImpl::ScImportRTF( SvStream &rStream, const OUString& rBaseURL, ScDocument *pDoc, ScRange& rRange )
30 ScRTFImport aImp( pDoc, rRange );
31 FltError nErr = (FltError) aImp.Read( rStream, rBaseURL );
32 ScRange aR = aImp.GetRange();
33 rRange.aEnd = aR.aEnd;
34 aImp.WriteToDocument();
35 return nErr;
38 ScEEAbsImport *ScFormatFilterPluginImpl::CreateRTFImport( ScDocument* pDoc, const ScRange& rRange )
40 return new ScRTFImport( pDoc, rRange );
43 ScRTFImport::ScRTFImport( ScDocument* pDocP, const ScRange& rRange ) :
44 ScEEImport( pDocP, rRange )
46 mpParser = new ScRTFParser( mpEngine );
49 ScRTFImport::~ScRTFImport()
51 // ordering is important; get error in some other Dtor otherwise!
52 // Is correct, as ScEEImport is Base Class
53 delete static_cast<ScRTFParser*>(mpParser); // before EditEngine!
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */