Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / imoptdlg.hxx
blob26b506b5ecf46d3329ffe4d60f3d6f9279da42ea
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 #ifndef SC_IMOPTDLG_HXX
21 #define SC_IMOPTDLG_HXX
23 #include <vcl/dialog.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/combobox.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/button.hxx>
28 #include <svx/txencbox.hxx>
29 #include "scdllapi.h"
30 #include "global.hxx"
32 //===================================================================
34 class SC_DLLPUBLIC ScImportOptions
36 public:
37 ScImportOptions()
38 : nFieldSepCode(0), nTextSepCode(0),
39 eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false),
40 bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false)
42 ScImportOptions( const OUString& rStr );
44 ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const OUString& rStr )
45 : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr),
46 bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false)
47 { eCharSet = ScGlobal::GetCharsetValue(aStrFont); }
49 ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
50 : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
51 bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false)
52 { SetTextEncoding( nEnc ); }
54 ScImportOptions( const ScImportOptions& rCpy )
55 : nFieldSepCode (rCpy.nFieldSepCode),
56 nTextSepCode (rCpy.nTextSepCode),
57 aStrFont (rCpy.aStrFont),
58 eCharSet (rCpy.eCharSet),
59 bFixedWidth (rCpy.bFixedWidth),
60 bSaveAsShown (rCpy.bSaveAsShown),
61 bQuoteAllText (rCpy.bQuoteAllText),
62 bSaveFormulas (rCpy.bSaveFormulas)
65 ScImportOptions& operator=( const ScImportOptions& rCpy )
67 nFieldSepCode = rCpy.nFieldSepCode;
68 nTextSepCode = rCpy.nTextSepCode;
69 aStrFont = rCpy.aStrFont;
70 eCharSet = rCpy.eCharSet;
71 bFixedWidth = rCpy.bFixedWidth;
72 bSaveAsShown = rCpy.bSaveAsShown;
73 bQuoteAllText = rCpy.bQuoteAllText;
74 bSaveFormulas = rCpy.bSaveFormulas;
75 return *this;
78 sal_Bool operator==( const ScImportOptions& rCmp )
80 return
81 nFieldSepCode == rCmp.nFieldSepCode
82 && nTextSepCode == rCmp.nTextSepCode
83 && eCharSet == rCmp.eCharSet
84 && aStrFont == rCmp.aStrFont
85 && bFixedWidth == rCmp.bFixedWidth
86 && bSaveAsShown == rCmp.bSaveAsShown
87 && bQuoteAllText == rCmp.bQuoteAllText
88 && bSaveFormulas == rCmp.bSaveFormulas;
90 OUString BuildString() const;
92 void SetTextEncoding( rtl_TextEncoding nEnc );
94 sal_Unicode nFieldSepCode;
95 sal_Unicode nTextSepCode;
96 OUString aStrFont;
97 rtl_TextEncoding eCharSet;
98 sal_Bool bFixedWidth;
99 sal_Bool bSaveAsShown;
100 sal_Bool bQuoteAllText;
101 sal_Bool bSaveFormulas;
105 #endif // SC_IMOPTDLG_HXX
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */