LCOV - code coverage report
Current view: top level - cui/source/inc - hltpbase.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 8 0.0 %
Date: 2012-08-25 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_TABBASE_HYPERLINK_HXX
      29                 :            : #define _SVX_TABBASE_HYPERLINK_HXX
      30                 :            : 
      31                 :            : #include <sfx2/app.hxx>
      32                 :            : #include <sfx2/tabdlg.hxx>
      33                 :            : #include <vcl/group.hxx>
      34                 :            : #include <vcl/button.hxx>
      35                 :            : #include <vcl/fixed.hxx>
      36                 :            : #include <vcl/combobox.hxx>
      37                 :            : #include <vcl/edit.hxx>
      38                 :            : #include <vcl/lstbox.hxx>
      39                 :            : #include <svl/stritem.hxx>
      40                 :            : #include <svl/eitem.hxx>
      41                 :            : #include <svtools/transfer.hxx>
      42                 :            : #include <sfx2/dispatch.hxx>
      43                 :            : #include <vcl/msgbox.hxx>
      44                 :            : #include <sfx2/fcontnr.hxx>
      45                 :            : #include <svtools/inettbc.hxx>
      46                 :            : #include <vcl/timer.hxx>
      47                 :            : 
      48                 :            : #include <dialmgr.hxx>
      49                 :            : #include <sfx2/docfile.hxx>
      50                 :            : #include <cuires.hrc>
      51                 :            : #include <com/sun/star/frame/XFrame.hpp>
      52                 :            : #include "helpid.hrc"
      53                 :            : #include <svx/hlnkitem.hxx>
      54                 :            : 
      55                 :            : #include "hlmarkwn.hxx"
      56                 :            : #include "iconcdlg.hxx"
      57                 :            : 
      58                 :            : /// ComboBox-Control, wich is filled with all current framenames
      59                 :            : class SvxFramesComboBox : public ComboBox
      60                 :            : {
      61                 :            : public:
      62                 :            :     SvxFramesComboBox (Window* pParent, const ResId& rResId, SfxDispatcher* pDispatch);
      63                 :            :     ~SvxFramesComboBox ();
      64                 :            : };
      65                 :            : 
      66                 :            : /// ComboBox-Control for URL's with History and Autocompletion
      67 [ #  # ][ #  # ]:          0 : class SvxHyperURLBox : public SvtURLBox, public DropTargetHelper
      68                 :            : {
      69                 :            : private:
      70                 :            :     sal_Bool   mbAccessAddress;
      71                 :            : 
      72                 :            : protected:
      73                 :            :     virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt );
      74                 :            :     virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt );
      75                 :            : 
      76                 :            :     virtual long        Notify( NotifyEvent& rNEvt );
      77                 :            :     virtual void        Select();
      78                 :            :     virtual void        Modify();
      79                 :            :     virtual long        PreNotify( NotifyEvent& rNEvt );
      80                 :            : 
      81                 :            : public:
      82                 :            :     SvxHyperURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_FILE, sal_Bool bAddresses = sal_False );
      83                 :            : 
      84                 :            : };
      85                 :            : 
      86                 :            : /// Tabpage : Basisclass
      87                 :            : class SvxHyperlinkTabPageBase : public IconChoicePage
      88                 :            : {
      89                 :            : private:
      90                 :            :     FixedLine           *mpGrpMore;
      91                 :            :     FixedText           *mpFtFrame;
      92                 :            :     SvxFramesComboBox   *mpCbbFrame;
      93                 :            :     FixedText           *mpFtForm;
      94                 :            :     ListBox             *mpLbForm;
      95                 :            :     FixedText           *mpFtIndication;
      96                 :            :     Edit                *mpEdIndication;
      97                 :            :     FixedText           *mpFtText;
      98                 :            :     Edit                *mpEdText;
      99                 :            :     ImageButton         *mpBtScript;
     100                 :            : 
     101                 :            :     sal_Bool            mbIsCloseDisabled;
     102                 :            : 
     103                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
     104                 :            :                         mxDocumentFrame;
     105                 :            : 
     106                 :            : protected:
     107                 :            :     Window*             mpDialog;
     108                 :            : 
     109                 :            :     sal_Bool                mbStdControlsInit;
     110                 :            : 
     111                 :            :     String              maStrInitURL;
     112                 :            : 
     113                 :            :     Timer               maTimer;
     114                 :            : 
     115                 :            :     SvxHlinkDlgMarkWnd* mpMarkWnd;
     116                 :            : 
     117                 :            :     void InitStdControls ();
     118                 :            :     virtual void FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem );
     119                 :            :     virtual void FillDlgFields         ( String& aStrURL ) = 0;
     120                 :            :     virtual void GetCurentItemData     ( String& aStrURL, String& aStrName,
     121                 :            :                                          String& aStrIntName, String& aStrFrame,
     122                 :            :                                          SvxLinkInsertMode& eMode ) = 0;
     123                 :            :     virtual String CreateUiNameFromURL( const String& aStrURL );
     124                 :            : 
     125                 :            :     void         GetDataFromCommonFields( String& aStrName,
     126                 :            :                                           String& aStrIntName, String& aStrFrame,
     127                 :            :                                           SvxLinkInsertMode& eMode );
     128                 :            : 
     129                 :            :     DECL_LINK (ClickScriptHdl_Impl, void * ); ///< Button : Script
     130                 :            : 
     131                 :            :     String              aEmptyStr;
     132                 :            : 
     133                 :            :     static String   GetSchemeFromURL( String aStrURL );
     134                 :            : 
     135                 :          0 :     inline void     DisableClose( sal_Bool _bDisable ) { mbIsCloseDisabled = _bDisable; }
     136                 :            : 
     137                 :            : public:
     138                 :            :     SvxHyperlinkTabPageBase (
     139                 :            :         Window *pParent,
     140                 :            :         const ResId &rResId,
     141                 :            :         const SfxItemSet& rItemSet
     142                 :            :     );
     143                 :            :     virtual ~SvxHyperlinkTabPageBase ();
     144                 :            : 
     145                 :          0 :     void    SetDocumentFrame(
     146                 :            :         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame )
     147                 :            :     {
     148                 :          0 :         mxDocumentFrame = rxDocumentFrame;
     149                 :          0 :     }
     150                 :            : 
     151                 :            :     virtual sal_Bool AskApply ();
     152                 :            :     virtual void DoApply ();
     153                 :            :     virtual void SetOnlineMode( sal_Bool bEnable );
     154                 :            :     virtual void SetInitFocus();
     155                 :            :     virtual void SetMarkStr ( String& aStrMark );
     156                 :            :     virtual void Reset( const SfxItemSet& );
     157                 :            :     virtual sal_Bool FillItemSet( SfxItemSet& );
     158                 :            :     virtual void ActivatePage( const SfxItemSet& rItemSet );
     159                 :            :     virtual int  DeactivatePage( SfxItemSet* pSet = 0 );
     160                 :            : 
     161                 :          0 :     sal_Bool IsMarkWndVisible ()      { return ((Window*)mpMarkWnd)->IsVisible(); }
     162                 :          0 :     Size GetSizeExtraWnd ()       { return ( mpMarkWnd->GetSizePixel() ); }
     163                 :            :     sal_Bool MoveToExtraWnd ( Point aNewPos, sal_Bool bDisConnectDlg = sal_False );
     164                 :            : 
     165                 :            :     virtual void        ActivatePage();
     166                 :            :     virtual void        DeactivatePage();
     167                 :            :     virtual sal_Bool    QueryClose();
     168                 :            : 
     169                 :            : protected:
     170                 :            :     virtual sal_Bool ShouldOpenMarkWnd();
     171                 :            :     virtual void SetMarkWndShouldOpen(sal_Bool bOpen);
     172                 :            : 
     173                 :            :     void ShowMarkWnd ();
     174                 :          0 :     void HideMarkWnd ()           { ( ( Window* ) mpMarkWnd )->Hide(); }
     175                 :            :     void InvalidateMarkWnd ()     { ( ( Window* ) mpMarkWnd )->Invalidate(); }
     176                 :            : 
     177                 :            :     SfxDispatcher* GetDispatcher() const;
     178                 :            : 
     179                 :            :     sal_uInt16             GetMacroEvents();
     180                 :            :     SvxMacroTableDtor* GetMacroTable();
     181                 :            : 
     182                 :            :     sal_Bool IsHTMLDoc() const;
     183                 :            : };
     184                 :            : 
     185                 :            : #endif // _SVX_TABBASE_HYPERLINK_HXX
     186                 :            : 
     187                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10