1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_IMOPTDLG_HXX 25cdf0e10cSrcweir #define SC_IMOPTDLG_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/dialog.hxx> 28cdf0e10cSrcweir #include <vcl/fixed.hxx> 29cdf0e10cSrcweir #include <vcl/combobox.hxx> 30cdf0e10cSrcweir #include <vcl/lstbox.hxx> 31cdf0e10cSrcweir #include <vcl/button.hxx> 32cdf0e10cSrcweir #include <svx/txencbox.hxx> 33cdf0e10cSrcweir #include "scdllapi.h" 34cdf0e10cSrcweir #include "global.hxx" 35cdf0e10cSrcweir 36cdf0e10cSrcweir //=================================================================== 37cdf0e10cSrcweir 38cdf0e10cSrcweir class SC_DLLPUBLIC ScImportOptions 39cdf0e10cSrcweir { 40cdf0e10cSrcweir public: ScImportOptions()41cdf0e10cSrcweir ScImportOptions() 42cdf0e10cSrcweir : nFieldSepCode(0), nTextSepCode(0), 43cdf0e10cSrcweir eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(sal_False), 44cdf0e10cSrcweir bSaveAsShown(sal_False), bQuoteAllText(sal_False) 45cdf0e10cSrcweir {} 46cdf0e10cSrcweir ScImportOptions( const String& rStr ); 47cdf0e10cSrcweir ScImportOptions(sal_Unicode nFieldSep,sal_Unicode nTextSep,const String & rStr)48cdf0e10cSrcweir ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr ) 49cdf0e10cSrcweir : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr), 50cdf0e10cSrcweir bFixedWidth(sal_False), bSaveAsShown(sal_False), bQuoteAllText(sal_False) 51cdf0e10cSrcweir { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } 52cdf0e10cSrcweir ScImportOptions(sal_Unicode nFieldSep,sal_Unicode nTextSep,rtl_TextEncoding nEnc)53cdf0e10cSrcweir ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) 54cdf0e10cSrcweir : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), 55cdf0e10cSrcweir bFixedWidth(sal_False), bSaveAsShown(sal_False), bQuoteAllText(sal_False) 56cdf0e10cSrcweir { SetTextEncoding( nEnc ); } 57cdf0e10cSrcweir ScImportOptions(const ScImportOptions & rCpy)58cdf0e10cSrcweir ScImportOptions( const ScImportOptions& rCpy ) 59cdf0e10cSrcweir : nFieldSepCode (rCpy.nFieldSepCode), 60cdf0e10cSrcweir nTextSepCode (rCpy.nTextSepCode), 61cdf0e10cSrcweir aStrFont (rCpy.aStrFont), 62cdf0e10cSrcweir eCharSet (rCpy.eCharSet), 63cdf0e10cSrcweir bFixedWidth (rCpy.bFixedWidth), 64cdf0e10cSrcweir bSaveAsShown (rCpy.bSaveAsShown), 65cdf0e10cSrcweir bQuoteAllText (rCpy.bQuoteAllText) 66cdf0e10cSrcweir {} 67cdf0e10cSrcweir operator =(const ScImportOptions & rCpy)68cdf0e10cSrcweir ScImportOptions& operator=( const ScImportOptions& rCpy ) 69cdf0e10cSrcweir { 70cdf0e10cSrcweir nFieldSepCode = rCpy.nFieldSepCode; 71cdf0e10cSrcweir nTextSepCode = rCpy.nTextSepCode; 72cdf0e10cSrcweir aStrFont = rCpy.aStrFont; 73cdf0e10cSrcweir eCharSet = rCpy.eCharSet; 74cdf0e10cSrcweir bFixedWidth = rCpy.bFixedWidth; 75cdf0e10cSrcweir bSaveAsShown = rCpy.bSaveAsShown; 76cdf0e10cSrcweir bQuoteAllText = rCpy.bQuoteAllText; 77cdf0e10cSrcweir return *this; 78cdf0e10cSrcweir } 79cdf0e10cSrcweir operator ==(const ScImportOptions & rCmp)80cdf0e10cSrcweir sal_Bool operator==( const ScImportOptions& rCmp ) 81cdf0e10cSrcweir { 82cdf0e10cSrcweir return 83cdf0e10cSrcweir nFieldSepCode == rCmp.nFieldSepCode 84cdf0e10cSrcweir && nTextSepCode == rCmp.nTextSepCode 85cdf0e10cSrcweir && eCharSet == rCmp.eCharSet 86cdf0e10cSrcweir && aStrFont == rCmp.aStrFont 87cdf0e10cSrcweir && bFixedWidth == rCmp.bFixedWidth 88cdf0e10cSrcweir && bSaveAsShown == rCmp.bSaveAsShown 89cdf0e10cSrcweir && bQuoteAllText == rCmp.bQuoteAllText; 90cdf0e10cSrcweir } 91cdf0e10cSrcweir String BuildString() const; 92cdf0e10cSrcweir 93cdf0e10cSrcweir void SetTextEncoding( rtl_TextEncoding nEnc ); 94cdf0e10cSrcweir 95cdf0e10cSrcweir sal_Unicode nFieldSepCode; 96cdf0e10cSrcweir sal_Unicode nTextSepCode; 97cdf0e10cSrcweir String aStrFont; 98cdf0e10cSrcweir CharSet eCharSet; 99cdf0e10cSrcweir sal_Bool bFixedWidth; 100cdf0e10cSrcweir sal_Bool bSaveAsShown; 101cdf0e10cSrcweir sal_Bool bQuoteAllText; 102cdf0e10cSrcweir }; 103cdf0e10cSrcweir 104cdf0e10cSrcweir 105cdf0e10cSrcweir #endif // SC_IMOPTDLG_HXX 106cdf0e10cSrcweir 107cdf0e10cSrcweir 108cdf0e10cSrcweir 109