LibreOffice Module sc (master)  1
scuiimoptdlg.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <vcl/weld.hxx>
23 
24 class ScDelimiterTable;
25 class ScImportOptions;
26 class SvxTextEncodingBox;
28 
30 {
31 public:
33  bool bAscii,
34  const ScImportOptions* pOptions,
35  const OUString* pStrTitle,
36  bool bMultiByte,
37  bool bOnlyDbtoolsEncodings,
38  bool bImport);
39 
40  virtual ~ScImportOptionsDlg() override;
41 
42  void GetImportOptions( ScImportOptions& rOptions ) const;
43  void SaveImportOptions() const;
44 
45 private:
46  std::unique_ptr<ScDelimiterTable> pFieldSepTab;
47  std::unique_ptr<ScDelimiterTable> pTextSepTab;
48 
50 
51  std::unique_ptr<weld::Frame> m_xFieldFrame;
52  std::unique_ptr<weld::Label> m_xFtCharset;
53  std::unique_ptr<weld::Widget> m_xEncGrid;
54  std::unique_ptr<weld::Label> m_xFtFieldSep;
55  std::unique_ptr<weld::ComboBox> m_xEdFieldSep;
56  std::unique_ptr<weld::Label> m_xFtTextSep;
57  std::unique_ptr<weld::ComboBox> m_xEdTextSep;
58  std::unique_ptr<weld::CheckButton> m_xCbShown;
59  std::unique_ptr<weld::CheckButton> m_xCbFormulas;
60  std::unique_ptr<weld::CheckButton> m_xCbQuoteAll;
61  std::unique_ptr<weld::CheckButton> m_xCbFixed;
62  std::unique_ptr<weld::Button> m_xBtnOk;
63  std::unique_ptr<SvxTextEncodingBox> m_xLbCharset;
64  std::unique_ptr<SvxTextEncodingTreeView> m_xTvCharset;
65 
66 private:
67  sal_uInt16 GetCodeFromCombo( const weld::ComboBox& rEd ) const;
68  void FillFromTextEncodingTable(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags = 0);
69  void FillFromDbTextEncodingMap(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags = 0);
70 
71  DECL_LINK(FixedWidthHdl, weld::Toggleable&, void);
72  DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
73 };
74 
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScImportOptionsDlg(weld::Window *pParent, bool bAscii, const ScImportOptions *pOptions, const OUString *pStrTitle, bool bMultiByte, bool bOnlyDbtoolsEncodings, bool bImport)
sal_uInt16 GetCodeFromCombo(const weld::ComboBox &rEd) const
std::unique_ptr< weld::Label > m_xFtCharset
std::unique_ptr< weld::CheckButton > m_xCbQuoteAll
std::unique_ptr< weld::CheckButton > m_xCbFixed
std::unique_ptr< ScDelimiterTable > pTextSepTab
std::unique_ptr< weld::ComboBox > m_xEdFieldSep
void GetImportOptions(ScImportOptions &rOptions) const
std::unique_ptr< SvxTextEncodingBox > m_xLbCharset
virtual ~ScImportOptionsDlg() override
void FillFromDbTextEncodingMap(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags=0)
std::unique_ptr< weld::CheckButton > m_xCbFormulas
std::unique_ptr< SvxTextEncodingTreeView > m_xTvCharset
std::unique_ptr< weld::Button > m_xBtnOk
void SaveImportOptions() const
std::unique_ptr< weld::CheckButton > m_xCbShown
void FillFromTextEncodingTable(bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags=0)
std::unique_ptr< ScDelimiterTable > pFieldSepTab
std::unique_ptr< weld::ComboBox > m_xEdTextSep
std::unique_ptr< weld::Label > m_xFtTextSep
std::unique_ptr< weld::Widget > m_xEncGrid
std::unique_ptr< weld::Frame > m_xFieldFrame
DECL_LINK(FixedWidthHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Label > m_xFtFieldSep