Line data Source code
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 :
10 : #ifndef INCLUDED_CUI_SOURCE_OPTIONS_OPTABOUTCONFIG_HXX
11 : #define INCLUDED_CUI_SOURCE_OPTIONS_OPTABOUTCONFIG_HXX
12 :
13 : #include <com/sun/star/container/XNameAccess.hpp>
14 : #include <com/sun/star/beans/NamedValue.hpp>
15 :
16 : #include <sfx2/tabdlg.hxx>
17 : #include <svtools/simptabl.hxx>
18 : #include <vcl/edit.hxx>
19 :
20 : #include <vector>
21 : #include <boost/scoped_ptr.hpp>
22 : #include <boost/shared_ptr.hpp>
23 :
24 : namespace svx { class OptHeaderTabListBox; }
25 : class CuiAboutConfigTabPage;
26 : class CuiAboutConfigValueDialog;
27 : struct Prop_Impl;
28 :
29 0 : class CuiCustomMultilineEdit : public Edit
30 : {
31 : public:
32 : bool bNumericOnly;
33 0 : CuiCustomMultilineEdit( Window* pParent, WinBits nStyle )
34 : : Edit( pParent, nStyle )
35 0 : , bNumericOnly(false)
36 0 : {}
37 :
38 : virtual void KeyInput( const KeyEvent& rKeyEvent ) SAL_OVERRIDE;
39 : virtual Size GetOptimalSize() const SAL_OVERRIDE;
40 : //void setBehaviour( bool bNumeric, int nLengthLimit);
41 : };
42 :
43 0 : class CuiAboutConfigTabPage : public ModalDialog
44 : {
45 : private:
46 : SvSimpleTableContainer* m_pPrefCtrl;
47 : PushButton* m_pResetBtn;
48 : PushButton* m_pEditBtn;
49 :
50 : std::vector< boost::shared_ptr< Prop_Impl > > m_vectorOfModified;
51 : boost::scoped_ptr< svx::OptHeaderTabListBox > m_pPrefBox;
52 :
53 : void AddToModifiedVector( const boost::shared_ptr< Prop_Impl >& rProp );
54 : std::vector< OUString > commaStringToSequence( const OUString& rCommaSepString );
55 :
56 : DECL_LINK( StandardHdl_Impl, void * );
57 : DECL_LINK( ResetBtnHdl_Impl, void * );
58 :
59 : public:
60 : //static ModalDialog* Create( Window* pParent, const SfxItemSet& rItemset );
61 : CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSet& rItemSet*/ );
62 : void InsertEntry(const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue);
63 : void Reset(/* const SfxItemSet&*/ );
64 : void FillItems(const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& xNameAccess);
65 : com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > getConfigAccess( const OUString& sNodePath, sal_Bool bUpdate );
66 : virtual bool FillItemSet( /* SfxItemSet& rSet*/ );
67 :
68 : virtual Size GetOptimalSize() const SAL_OVERRIDE;
69 : };
70 :
71 0 : class CuiAboutConfigValueDialog : public ModalDialog
72 : {
73 : private:
74 : CuiCustomMultilineEdit* m_pEDValue;
75 :
76 : public:
77 : CuiAboutConfigValueDialog( Window* pWindow, const OUString& rValue , int limit = 0);
78 :
79 0 : OUString getValue()
80 : {
81 0 : return m_pEDValue->GetText();
82 : }
83 : };
84 :
85 : #endif
86 :
87 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|