LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sfx2/source/appl - newhelp.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 59 0.0 %
Date: 2013-07-09 Functions: 0 44 0.0 %
Legend: Lines: hit not hit

          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             :  * 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             : #ifndef INCLUDED_SFX_NEWHELP_HXX
      20             : #define INCLUDED_SFX_NEWHELP_HXX
      21             : 
      22             : #include <cppuhelper/implbase1.hxx>
      23             : #include <com/sun/star/uno/Reference.h>
      24             : #include <com/sun/star/frame/XDispatchResultListener.hpp>
      25             : #include <com/sun/star/frame/XDispatch.hpp>
      26             : #include <com/sun/star/frame/XFrame2.hpp>
      27             : 
      28             : namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
      29             : namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
      30             : namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
      31             : 
      32             : #include <vcl/window.hxx>
      33             : #include <vcl/toolbox.hxx>
      34             : #include <vcl/tabpage.hxx>
      35             : #include <vcl/splitwin.hxx>
      36             : #include <vcl/tabctrl.hxx>
      37             : #include <vcl/combobox.hxx>
      38             : #include <vcl/fixed.hxx>
      39             : #include <vcl/button.hxx>
      40             : #include <vcl/lstbox.hxx>
      41             : #include <vcl/dialog.hxx>
      42             : #include <svtools/treelistbox.hxx>
      43             : #include <unotools/moduleoptions.hxx>
      44             : 
      45             : #include "srchdlg.hxx"
      46             : 
      47             : // class OpenStatusListener_Impl -----------------------------------------
      48             : 
      49             : class OpenStatusListener_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XDispatchResultListener >
      50             : {
      51             : private:
      52             :     sal_Bool    m_bFinished;
      53             :     sal_Bool    m_bSuccess;
      54             :     Link        m_aOpenLink;
      55             :     String      m_sURL;
      56             : 
      57             : public:
      58             :     OpenStatusListener_Impl() : m_bFinished( sal_False ), m_bSuccess( sal_False ) {}
      59             : 
      60             :     virtual void SAL_CALL   dispatchFinished( const ::com::sun::star::frame::DispatchResultEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
      61             :     virtual void SAL_CALL   disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
      62             : 
      63             :     inline sal_Bool         IsFinished() const { return m_bFinished; }
      64             :     inline sal_Bool         IsSuccessful() const { return m_bSuccess; }
      65             :     inline void             SetURL( const String& rURL ) { m_sURL = rURL; }
      66             :     inline String           GetURL() const  { return m_sURL; }
      67             :     inline void             SetOpenHdl( const Link& rLink ) { m_aOpenLink = rLink; }
      68             : };
      69             : 
      70             : // ContentListBox_Impl ---------------------------------------------------
      71             : 
      72             : class ContentListBox_Impl : public SvTreeListBox
      73             : {
      74             : private:
      75             :     Image           aOpenBookImage;
      76             :     Image           aClosedBookImage;
      77             :     Image           aDocumentImage;
      78             : 
      79             :     void            InitRoot();
      80             :     void            ClearChildren( SvTreeListEntry* pParent );
      81             : 
      82             : public:
      83             :     ContentListBox_Impl( Window* pParent, const ResId& rResId );
      84             :     ~ContentListBox_Impl();
      85             : 
      86             : 
      87             :     virtual void    RequestingChildren( SvTreeListEntry* pParent );
      88             :     virtual long    Notify( NotifyEvent& rNEvt );
      89             : 
      90           0 :     inline void     SetOpenHdl( const Link& rLink ) { SetDoubleClickHdl( rLink ); }
      91             :     String          GetSelectEntry() const;
      92             : };
      93             : 
      94             : // class HelpTabPage_Impl ------------------------------------------------
      95             : 
      96             : class SfxHelpIndexWindow_Impl;
      97             : 
      98           0 : class HelpTabPage_Impl : public TabPage
      99             : {
     100             : protected:
     101             :     SfxHelpIndexWindow_Impl*    m_pIdxWin;
     102             : 
     103             : public:
     104             :     HelpTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin, const ResId& rResId );
     105             : 
     106             :     virtual Control*    GetLastFocusControl() = 0;
     107             : };
     108             : 
     109             : // class ContentTabPage_Impl ---------------------------------------------
     110             : 
     111           0 : class ContentTabPage_Impl : public HelpTabPage_Impl
     112             : {
     113             : private:
     114             :     ContentListBox_Impl aContentBox;
     115             : 
     116             : public:
     117             :     ContentTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     118             : 
     119             :     virtual void        Resize();
     120             :     virtual void        ActivatePage();
     121             :     virtual Control*    GetLastFocusControl();
     122             : 
     123           0 :     inline void     SetOpenHdl( const Link& rLink ) { aContentBox.SetOpenHdl( rLink ); }
     124           0 :     inline String   GetSelectEntry() const { return aContentBox.GetSelectEntry(); }
     125           0 :     inline void     SetFocusOnBox() { aContentBox.GrabFocus(); }
     126             : };
     127             : 
     128             : // class IndexTabPage_Impl -----------------------------------------------
     129             : 
     130           0 : class IndexBox_Impl : public ComboBox
     131             : {
     132             : public:
     133             :     IndexBox_Impl( Window* pParent, const ResId& rResId );
     134             : 
     135             :     virtual void        UserDraw( const UserDrawEvent& rUDEvt );
     136             :     virtual long        Notify( NotifyEvent& rNEvt );
     137             : 
     138             :     void                SelectExecutableEntry();
     139             : };
     140             : 
     141             : class IndexTabPage_Impl : public HelpTabPage_Impl
     142             : {
     143             : private:
     144             :     FixedText           aExpressionFT;
     145             :     IndexBox_Impl       aIndexCB;
     146             :     PushButton          aOpenBtn;
     147             : 
     148             :     Timer               aFactoryTimer;
     149             :     Timer               aKeywordTimer;
     150             :     Link                aKeywordLink;
     151             : 
     152             :     String              sFactory;
     153             :     String              sKeyword;
     154             : 
     155             :     long                nMinWidth;
     156             :     sal_Bool            bIsActivated;
     157             : 
     158             :     void                InitializeIndex();
     159             :     void                ClearIndex();
     160             : 
     161             :     DECL_LINK(OpenHdl, void *);
     162             :     DECL_LINK(          TimeoutHdl, Timer* );
     163             : 
     164             : public:
     165             :     IndexTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     166             :     ~IndexTabPage_Impl();
     167             : 
     168             :     virtual void        Resize();
     169             :     virtual void        ActivatePage();
     170             :     virtual Control*    GetLastFocusControl();
     171             : 
     172             :     void                SetDoubleClickHdl( const Link& rLink );
     173             :     void                SetFactory( const String& rFactory );
     174           0 :     inline String       GetFactory() const { return sFactory; }
     175             :     String              GetSelectEntry() const;
     176           0 :     inline void         SetFocusOnBox() { aIndexCB.GrabFocus(); }
     177           0 :     inline sal_Bool     HasFocusOnEdit() const { return aIndexCB.HasChildPathFocus(); }
     178             : 
     179           0 :     inline void         SetKeywordHdl( const Link& rLink ) { aKeywordLink = rLink; }
     180             :     void                SetKeyword( const String& rKeyword );
     181             :     sal_Bool            HasKeyword() const;
     182             :     sal_Bool            HasKeywordIgnoreCase();
     183             :     void                OpenKeyword();
     184             : 
     185           0 :     inline void         SelectExecutableEntry() { aIndexCB.SelectExecutableEntry(); }
     186             : };
     187             : 
     188             : // class SearchTabPage_Impl ----------------------------------------------
     189             : 
     190           0 : class SearchBox_Impl : public ComboBox
     191             : {
     192             : private:
     193             :     Link                aSearchLink;
     194             : 
     195             : public:
     196           0 :     SearchBox_Impl( Window* pParent, const ResId& rResId ) :
     197           0 :         ComboBox( pParent, rResId ) { SetDropDownLineCount( 5 ); }
     198             : 
     199             :     virtual long        PreNotify( NotifyEvent& rNEvt );
     200             :     virtual void        Select();
     201             : 
     202           0 :     inline void         SetSearchLink( const Link& rLink ) { aSearchLink = rLink; }
     203             : };
     204             : 
     205           0 : class SearchResultsBox_Impl : public ListBox
     206             : {
     207             : public:
     208           0 :     SearchResultsBox_Impl( Window* pParent, const ResId& rResId ) : ListBox( pParent, rResId ) {}
     209             : 
     210             :     virtual long    Notify( NotifyEvent& rNEvt );
     211             : };
     212             : 
     213             : class SearchTabPage_Impl : public HelpTabPage_Impl
     214             : {
     215             : private:
     216             :     FixedText               aSearchFT;
     217             :     SearchBox_Impl          aSearchED;
     218             :     PushButton              aSearchBtn;
     219             :     CheckBox                aFullWordsCB;
     220             :     CheckBox                aScopeCB;
     221             :     SearchResultsBox_Impl   aResultsLB;
     222             :     PushButton              aOpenBtn;
     223             : 
     224             :     Size                    aMinSize;
     225             :     String                  aFactory;
     226             : 
     227             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     228             :                             xBreakIterator;
     229             : 
     230             :     void                ClearSearchResults();
     231             :     void                RememberSearchText( const String& rSearchText );
     232             : 
     233             :     DECL_LINK(SearchHdl, void *);
     234             :     DECL_LINK(OpenHdl, void *);
     235             :     DECL_LINK(ModifyHdl, void *);
     236             : 
     237             : public:
     238             :     SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     239             :     ~SearchTabPage_Impl();
     240             : 
     241             :     virtual void        Resize();
     242             :     virtual void        ActivatePage();
     243             :     virtual Control*    GetLastFocusControl();
     244             : 
     245             :     void                SetDoubleClickHdl( const Link& rLink );
     246           0 :     inline void         SetFactory( const String& rFactory ) { aFactory = rFactory; }
     247             :     String              GetSelectEntry() const;
     248             :     void                ClearPage();
     249           0 :     inline void         SetFocusOnBox() { aResultsLB.GrabFocus(); }
     250           0 :     inline sal_Bool     HasFocusOnEdit() const { return aSearchED.HasChildPathFocus(); }
     251           0 :     inline String       GetSearchText() const { return aSearchED.GetText(); }
     252           0 :     inline sal_Bool     IsFullWordSearch() const { return aFullWordsCB.IsChecked(); }
     253             :     sal_Bool            OpenKeyword( const String& rKeyword );
     254             : };
     255             : 
     256             : // class BookmarksTabPage_Impl -------------------------------------------
     257             : 
     258             : class BookmarksBox_Impl : public ListBox
     259             : {
     260             : private:
     261             :     void                DoAction( sal_uInt16 nAction );
     262             : 
     263             : public:
     264             :     BookmarksBox_Impl( Window* pParent, const ResId& rResId );
     265             :     ~BookmarksBox_Impl();
     266             : 
     267             :     virtual long        Notify( NotifyEvent& rNEvt );
     268             : };
     269             : 
     270           0 : class BookmarksTabPage_Impl : public HelpTabPage_Impl
     271             : {
     272             : private:
     273             :     FixedText           aBookmarksFT;
     274             :     BookmarksBox_Impl   aBookmarksBox;
     275             :     PushButton          aBookmarksPB;
     276             : 
     277             :     long                nMinWidth;
     278             : 
     279             :     DECL_LINK(OpenHdl, void *);
     280             : 
     281             : public:
     282             :     BookmarksTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
     283             : 
     284             :     virtual void        Resize();
     285             :     virtual void        ActivatePage();
     286             :     virtual Control*    GetLastFocusControl();
     287             : 
     288             :     void                SetDoubleClickHdl( const Link& rLink );
     289             :     String              GetSelectEntry() const;
     290             :     void                AddBookmarks( const String& rTitle, const String& rURL );
     291           0 :     inline void         SetFocusOnBox() { aBookmarksBox.GrabFocus(); }
     292             : };
     293             : 
     294             : // class SfxHelpIndexWindow_Impl -----------------------------------------
     295             : 
     296             : class SfxHelpWindow_Impl;
     297             : 
     298             : class SfxHelpIndexWindow_Impl : public Window
     299             : {
     300             : private:
     301             :     ListBox             aActiveLB;
     302             :     FixedLine           aActiveLine;
     303             : 
     304             :     TabControl          aTabCtrl;
     305             :     Timer               aTimer;
     306             : 
     307             :     Link                aSelectFactoryLink;
     308             :     Link                aPageDoubleClickLink;
     309             :     Link                aIndexKeywordLink;
     310             :     String              sKeyword;
     311             : 
     312             :     SfxHelpWindow_Impl*     pParentWin;
     313             : 
     314             :     ContentTabPage_Impl*    pCPage;
     315             :     IndexTabPage_Impl*      pIPage;
     316             :     SearchTabPage_Impl*     pSPage;
     317             :     BookmarksTabPage_Impl*  pBPage;
     318             : 
     319             :     long                nMinWidth;
     320             :     bool                bWasCursorLeftOrRight;
     321             :     bool                bIsInitDone;
     322             : 
     323             :     void                Initialize();
     324             :     void                SetActiveFactory();
     325             :     HelpTabPage_Impl*   GetCurrentPage( sal_uInt16& rCurId );
     326             : 
     327             :     inline ContentTabPage_Impl*     GetContentPage();
     328             :     inline IndexTabPage_Impl*       GetIndexPage();
     329             :     inline SearchTabPage_Impl*      GetSearchPage();
     330             :     inline BookmarksTabPage_Impl*   GetBookmarksPage();
     331             : 
     332             :     DECL_LINK(          ActivatePageHdl, TabControl* );
     333             :     DECL_LINK(SelectHdl, void *);
     334             :     DECL_LINK(InitHdl, void *);
     335             :     DECL_LINK(SelectFactoryHdl, void *);
     336             :     DECL_LINK(KeywordHdl, void *);
     337             : 
     338             : public:
     339             :     SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
     340             :     ~SfxHelpIndexWindow_Impl();
     341             : 
     342             :     virtual void        Resize();
     343             :     virtual long        PreNotify( NotifyEvent& rNEvt );
     344             :     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
     345             : 
     346             :     void                SetDoubleClickHdl( const Link& rLink );
     347           0 :     inline void         SetSelectFactoryHdl( const Link& rLink ) { aSelectFactoryLink = rLink; }
     348             :     void                SetFactory( const String& rFactory, sal_Bool bActive );
     349           0 :     inline String       GetFactory() const { return pIPage->GetFactory(); }
     350             :     String              GetSelectEntry() const;
     351             :     void                AddBookmarks( const String& rTitle, const String& rURL );
     352             :     bool                IsValidFactory( const String& _rFactory );
     353           0 :     inline String       GetActiveFactoryTitle() const { return aActiveLB.GetSelectEntry(); }
     354             :     inline void         UpdateTabControl() { aTabCtrl.Invalidate(); }
     355             :     void                ClearSearchPage();
     356             :     void                GrabFocusBack();
     357             :     sal_Bool            HasFocusOnEdit() const;
     358             :     String              GetSearchText() const;
     359             :     sal_Bool            IsFullWordSearch() const;
     360             :     void                OpenKeyword( const String& rKeyword );
     361             :     void                SelectExecutableEntry();
     362             :     inline bool         WasCursorLeftOrRight();
     363             : };
     364             : 
     365             : // inlines ---------------------------------------------------------------
     366             : 
     367           0 : ContentTabPage_Impl* SfxHelpIndexWindow_Impl::GetContentPage()
     368             : {
     369           0 :     if ( !pCPage )
     370             :     {
     371           0 :         pCPage = new ContentTabPage_Impl( &aTabCtrl, this );
     372           0 :         pCPage->SetOpenHdl( aPageDoubleClickLink );
     373             :     }
     374           0 :     return pCPage;
     375             : }
     376           0 : IndexTabPage_Impl* SfxHelpIndexWindow_Impl::GetIndexPage()
     377             : {
     378           0 :     if ( !pIPage )
     379             :     {
     380           0 :         pIPage = new IndexTabPage_Impl( &aTabCtrl, this );
     381           0 :         pIPage->SetDoubleClickHdl( aPageDoubleClickLink );
     382           0 :         pIPage->SetKeywordHdl( aIndexKeywordLink );
     383             :     }
     384           0 :     return pIPage;
     385             : }
     386             : 
     387           0 : SearchTabPage_Impl* SfxHelpIndexWindow_Impl::GetSearchPage()
     388             : {
     389           0 :     if ( !pSPage )
     390             :     {
     391           0 :         pSPage = new SearchTabPage_Impl( &aTabCtrl, this );
     392           0 :         pSPage->SetDoubleClickHdl( aPageDoubleClickLink );
     393             :     }
     394           0 :     return pSPage;
     395             : }
     396             : 
     397           0 : BookmarksTabPage_Impl* SfxHelpIndexWindow_Impl::GetBookmarksPage()
     398             : {
     399           0 :     if ( !pBPage )
     400             :     {
     401           0 :         pBPage = new BookmarksTabPage_Impl( &aTabCtrl, this );
     402           0 :         pBPage->SetDoubleClickHdl( aPageDoubleClickLink );
     403             :     }
     404           0 :     return pBPage;
     405             : }
     406             : 
     407           0 : bool SfxHelpIndexWindow_Impl::WasCursorLeftOrRight()
     408             : {
     409           0 :     bool bRet = bWasCursorLeftOrRight;
     410           0 :     bWasCursorLeftOrRight = false;
     411           0 :     return bRet;
     412             : }
     413             : 
     414             : // class TextWin_Impl ----------------------------------------------------
     415             : 
     416             : class TextWin_Impl : public DockingWindow
     417             : {
     418             : public:
     419             :                             TextWin_Impl( Window* pParent );
     420             :     virtual                 ~TextWin_Impl();
     421             : 
     422             :     virtual long            Notify( NotifyEvent& rNEvt );
     423             : };
     424             : 
     425             : // class SfxHelpTextWindow_Impl ------------------------------------------
     426             : 
     427             : class SvtMiscOptions;
     428             : class SfxHelpWindow_Impl;
     429             : 
     430             : class SfxHelpTextWindow_Impl : public Window
     431             : {
     432             : private:
     433             :     ToolBox                 aToolBox;
     434             :     CheckBox                aOnStartupCB;
     435             :     Timer                   aSelectTimer;
     436             :     Image                   aIndexOnImage;
     437             :     Image                   aIndexOffImage;
     438             :     String                  aIndexOnText;
     439             :     String                  aIndexOffText;
     440             :     String                  aSearchText;
     441             :     String                  aOnStartupText;
     442             :     OUString         sCurrentFactory;
     443             : 
     444             :     SfxHelpWindow_Impl*     pHelpWin;
     445             :     Window*                 pTextWin;
     446             :     sfx2::SearchDialog*     pSrchDlg;
     447             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     448             :                             xFrame;
     449             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     450             :                             xBreakIterator;
     451             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
     452             :                             xConfiguration;
     453             :     long                    nMinPos;
     454             :     sal_Bool                bIsDebug;
     455             :     sal_Bool                bIsIndexOn;
     456             :     sal_Bool                bIsInClose;
     457             :     sal_Bool                bIsFullWordSearch;
     458             : 
     459             :     sal_Bool                HasSelection() const;
     460             :     void                    InitToolBoxImages();
     461             :     void                    InitOnStartupBox( bool bOnlyText );
     462             :     void                    SetOnStartupBoxPosition();
     463             : 
     464             :     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
     465             :                             GetBreakIterator();
     466             :     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >
     467             :                             getCursor() const;
     468             :     bool                    isHandledKey( const KeyCode& _rKeyCode );
     469             : 
     470             :     DECL_LINK(SelectHdl, void *);
     471             :     DECL_LINK(              NotifyHdl, SvtMiscOptions* );
     472             :     DECL_LINK(              FindHdl, sfx2::SearchDialog* );
     473             :     DECL_LINK(              CloseHdl, sfx2::SearchDialog* );
     474             :     DECL_LINK(              CheckHdl, CheckBox* );
     475             : 
     476             : public:
     477             :     SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent );
     478             :     ~SfxHelpTextWindow_Impl();
     479             : 
     480             :     virtual void            Resize();
     481             :     virtual long            PreNotify( NotifyEvent& rNEvt );
     482             :     virtual void            GetFocus();
     483             :     virtual void            DataChanged( const DataChangedEvent& rDCEvt );
     484             : 
     485             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     486           0 :                             getFrame() const { return xFrame; }
     487             : 
     488           0 :     inline void             SetSelectHdl( const Link& rLink ) { aToolBox.SetSelectHdl( rLink ); }
     489             :     void                    ToggleIndex( sal_Bool bOn );
     490             :     void                    SelectSearchText( const String& rSearchText, sal_Bool _bIsFullWordSearch );
     491             :     void                    SetPageStyleHeaderOff() const;
     492           0 :     inline ToolBox&         GetToolBox() { return aToolBox; }
     493             :      void                   CloseFrame();
     494             :     void                    DoSearch();
     495             : };
     496             : 
     497             : // class SfxHelpWindow_Impl ----------------------------------------------
     498             : 
     499             : class HelpInterceptor_Impl;
     500             : class HelpListener_Impl;
     501             : class SfxHelpWindow_Impl : public SplitWindow
     502             : {
     503             : private:
     504             : friend class SfxHelpIndexWindow_Impl;
     505             : 
     506             :     ::com::sun::star::uno::Reference < ::com::sun::star::awt::XWindow >
     507             :                                 xWindow;
     508             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
     509             :                                 xOpenListener;
     510             :     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     511             :                                 xFrame;
     512             : 
     513             :     SfxHelpIndexWindow_Impl*    pIndexWin;
     514             :     SfxHelpTextWindow_Impl*     pTextWin;
     515             :     HelpInterceptor_Impl*       pHelpInterceptor;
     516             :     HelpListener_Impl*          pHelpListener;
     517             : 
     518             :     sal_Int32           nExpandWidth;
     519             :     sal_Int32           nCollapseWidth;
     520             :     sal_Int32           nHeight;
     521             :     long                nIndexSize;
     522             :     long                nTextSize;
     523             :     sal_Bool            bIndex;
     524             :     sal_Bool            bGrabFocusToToolBox;
     525             :     Point               aWinPos;
     526             :     OUString            sTitle;
     527             :     String              sKeyword;
     528             : 
     529             :     virtual void        Resize();
     530             :     virtual void        Split();
     531             :     virtual void        GetFocus();
     532             : 
     533             :     void                MakeLayout();
     534             :     void                InitSizes();
     535             :     void                LoadConfig();
     536             :     void                SaveConfig();
     537             :     void                ShowStartPage();
     538             : 
     539             :     DECL_LINK(          SelectHdl, ToolBox* );
     540             :     DECL_LINK(OpenHdl, void *);
     541             :     DECL_LINK(          SelectFactoryHdl, SfxHelpIndexWindow_Impl* );
     542             :     DECL_LINK(          ChangeHdl, HelpListener_Impl* );
     543             : 
     544             : public:
     545             :     SfxHelpWindow_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >& rFrame,
     546             :                         Window* pParent, WinBits nBits );
     547             :     ~SfxHelpWindow_Impl();
     548             : 
     549             :     virtual long        PreNotify( NotifyEvent& rNEvt );
     550             : 
     551             :     void                setContainerWindow(
     552             :                             ::com::sun::star::uno::Reference < ::com::sun::star::awt::XWindow > xWin );
     553             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
     554           0 :                         getTextFrame() const { return pTextWin->getFrame(); }
     555             :     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
     556             :                         getOpenListener() const { return xOpenListener; }
     557             : 
     558             :     void                SetFactory( const String& rFactory );
     559             :     void                SetHelpURL( const String& rURL );
     560             :     void                DoAction( sal_uInt16 nActionId );
     561             :     void                CloseWindow();
     562             : 
     563             :     void                UpdateToolbox();
     564           0 :     inline void         OpenKeyword( const String& rKeyword ) { pIndexWin->OpenKeyword( rKeyword ); }
     565             :     inline String       GetFactory() const { return pIndexWin->GetFactory(); }
     566             : 
     567             :     sal_Bool            HasHistoryPredecessor() const;      // forward to interceptor
     568             :     sal_Bool            HasHistorySuccessor() const;        // forward to interceptor
     569             : 
     570             :     void                openDone(const OUString& sURL    ,
     571             :                                        sal_Bool         bSuccess);
     572             : 
     573             :     static OUString  buildHelpURL(const OUString& sFactory        ,
     574             :                                          const OUString& sContent        ,
     575             :                                          const OUString& sAnchor         ,
     576             :                                                sal_Bool         bUseQuestionMark);
     577             : 
     578             :     void                loadHelpContent(const OUString& sHelpURL                ,
     579             :                                               sal_Bool         bAddToHistory = sal_True);
     580             : };
     581             : 
     582             : class SfxAddHelpBookmarkDialog_Impl : public ModalDialog
     583             : {
     584             : private:
     585             :     FixedText       aTitleFT;
     586             :     Edit            aTitleED;
     587             :     OKButton        aOKBtn;
     588             :     CancelButton    aEscBtn;
     589             :     HelpButton      aHelpBtn;
     590             : 
     591             : public:
     592             :     SfxAddHelpBookmarkDialog_Impl( Window* pParent, sal_Bool bRename = sal_True );
     593             :     ~SfxAddHelpBookmarkDialog_Impl();
     594             : 
     595             :     void            SetTitle( const String& rTitle );
     596           0 :     inline String   GetTitle() const { return aTitleED.GetText(); }
     597             : };
     598             : 
     599             : /// Appends ?Language=xy&System=abc to the help URL in rURL
     600             : void AppendConfigToken(OUStringBuffer& rURL, sal_Bool bQuestionMark, const OUString &rLang = OUString());
     601             : 
     602             : #endif // #ifndef INCLUDED_SFX_NEWHELP_HXX
     603             : 
     604             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10