LCOV - code coverage report
Current view: top level - cui/source/inc - hltpbase.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 8 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 7 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_CUI_SOURCE_INC_HLTPBASE_HXX
      20             : #define INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
      21             : 
      22             : #include <sfx2/app.hxx>
      23             : #include <sfx2/tabdlg.hxx>
      24             : #include <vcl/group.hxx>
      25             : #include <vcl/button.hxx>
      26             : #include <vcl/fixed.hxx>
      27             : #include <vcl/combobox.hxx>
      28             : #include <vcl/edit.hxx>
      29             : #include <vcl/lstbox.hxx>
      30             : #include <svl/stritem.hxx>
      31             : #include <svl/eitem.hxx>
      32             : #include <svtools/transfer.hxx>
      33             : #include <sfx2/dispatch.hxx>
      34             : #include <vcl/msgbox.hxx>
      35             : #include <sfx2/fcontnr.hxx>
      36             : #include <svtools/inettbc.hxx>
      37             : #include <vcl/timer.hxx>
      38             : 
      39             : #include <dialmgr.hxx>
      40             : #include <sfx2/docfile.hxx>
      41             : #include <cuires.hrc>
      42             : #include <com/sun/star/frame/XFrame.hpp>
      43             : #include "helpid.hrc"
      44             : #include <svx/hlnkitem.hxx>
      45             : 
      46             : #include "hlmarkwn.hxx"
      47             : #include "iconcdlg.hxx"
      48             : 
      49             : /// ComboBox-Control for URL's with History and Autocompletion
      50           0 : class SvxHyperURLBox : public SvtURLBox, public DropTargetHelper
      51             : {
      52             : protected:
      53             :     virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
      54             :     virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
      55             : 
      56             :     virtual bool        Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      57             :     virtual void        Select() SAL_OVERRIDE;
      58             :     virtual void        Modify() SAL_OVERRIDE;
      59             :     virtual bool        PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
      60             : 
      61             : public:
      62             :     SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INetProtocol::File );
      63             : 
      64             : };
      65             : 
      66             : /// Tabpage : Basisclass
      67             : class SvxHyperlinkTabPageBase : public IconChoicePage
      68             : {
      69             : private:
      70             :     VclPtr<ComboBox>            mpCbbFrame;
      71             :     VclPtr<ListBox>             mpLbForm;
      72             :     VclPtr<Edit>                mpEdIndication;
      73             :     VclPtr<Edit>                mpEdText;
      74             :     VclPtr<PushButton>          mpBtScript;
      75             : 
      76             :     bool            mbIsCloseDisabled;
      77             : 
      78             :     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
      79             :                         mxDocumentFrame;
      80             : 
      81             : protected:
      82             :     VclPtr<vcl::Window> mpDialog;
      83             : 
      84             :     bool                mbStdControlsInit;
      85             : 
      86             :     OUString            maStrInitURL;
      87             : 
      88             :     Timer               maTimer;
      89             : 
      90             :     VclPtr<SvxHlinkDlgMarkWnd> mpMarkWnd;
      91             : 
      92             :     void InitStdControls ();
      93             :     void FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem );
      94             :     virtual void FillDlgFields(const OUString& rStrURL) = 0;
      95             :     virtual void GetCurentItemData     ( OUString& rStrURL, OUString& aStrName,
      96             :                                          OUString& aStrIntName, OUString& aStrFrame,
      97             :                                          SvxLinkInsertMode& eMode ) = 0;
      98             :     OUString CreateUiNameFromURL( const OUString& aStrURL );
      99             : 
     100             :     void         GetDataFromCommonFields( OUString& aStrName,
     101             :                                           OUString& aStrIntName, OUString& aStrFrame,
     102             :                                           SvxLinkInsertMode& eMode );
     103             : 
     104             :     DECL_LINK (ClickScriptHdl_Impl, void * ); ///< Button : Script
     105             : 
     106             :     OUString            aEmptyStr;
     107             : 
     108             :     static OUString GetSchemeFromURL( const OUString& rStrURL );
     109             : 
     110           0 :     inline void     DisableClose( bool _bDisable ) { mbIsCloseDisabled = _bDisable; }
     111             : 
     112             : public:
     113             :     SvxHyperlinkTabPageBase (
     114             :         vcl::Window *pParent,
     115             :         IconChoiceDialog* pDlg,
     116             :         const OString& rID,
     117             :         const OUString& rUIXMLDescription,
     118             :         const SfxItemSet& rItemSet
     119             :     );
     120             :     virtual ~SvxHyperlinkTabPageBase ();
     121             :     virtual void dispose() SAL_OVERRIDE;
     122             : 
     123           0 :     void    SetDocumentFrame(
     124             :         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame )
     125             :     {
     126           0 :         mxDocumentFrame = rxDocumentFrame;
     127           0 :     }
     128             : 
     129             :     virtual bool AskApply ();
     130             :     virtual void DoApply ();
     131             :     virtual void SetInitFocus();
     132             :     virtual void SetMarkStr ( const OUString& aStrMark );
     133             :     virtual void Reset( const SfxItemSet& ) SAL_OVERRIDE;
     134             :     virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
     135             :     virtual void ActivatePage( const SfxItemSet& rItemSet ) SAL_OVERRIDE;
     136             :     virtual int  DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
     137             : 
     138           0 :     bool IsMarkWndVisible ()      { return static_cast<vcl::Window*>(mpMarkWnd)->IsVisible(); }
     139           0 :     Size GetSizeExtraWnd ()       { return ( mpMarkWnd->GetSizePixel() ); }
     140             :     bool MoveToExtraWnd ( Point aNewPos, bool bDisConnectDlg = false );
     141             : 
     142             :     virtual void        ActivatePage() SAL_OVERRIDE;
     143             :     virtual void        DeactivatePage() SAL_OVERRIDE;
     144             :     virtual bool        QueryClose() SAL_OVERRIDE;
     145             : 
     146             : protected:
     147             :     virtual bool ShouldOpenMarkWnd();
     148             :     virtual void SetMarkWndShouldOpen(bool bOpen);
     149             : 
     150             :     void ShowMarkWnd ();
     151           0 :     void HideMarkWnd ()           { static_cast<vcl::Window*>(mpMarkWnd)->Hide(); }
     152             :     void InvalidateMarkWnd ()     { static_cast<vcl::Window*>(mpMarkWnd)->Invalidate(); }
     153             : 
     154             :     SfxDispatcher* GetDispatcher() const;
     155             : 
     156             :     sal_uInt16             GetMacroEvents();
     157             :     SvxMacroTableDtor* GetMacroTable();
     158             : 
     159             :     bool IsHTMLDoc() const;
     160             : };
     161             : 
     162             : #endif // INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
     163             : 
     164             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11