LCOV - code coverage report
Current view: top level - cui/source/inc - chardlg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 3 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 122 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_CHARDLG_HXX
      29                 :            : #define _SVX_CHARDLG_HXX
      30                 :            : 
      31                 :            : #include <svtools/ctrlbox.hxx>
      32                 :            : #include <svtools/stdctrl.hxx>
      33                 :            : #include <sfx2/tabdlg.hxx>
      34                 :            : #include <svx/fntctrl.hxx>
      35                 :            : #include <svx/checklbx.hxx>
      36                 :            : #include <svx/langbox.hxx>
      37                 :            : 
      38                 :            : // forward ---------------------------------------------------------------
      39                 :            : 
      40                 :            : class SvxFontListItem;
      41                 :            : class FontList;
      42                 :            : 
      43                 :            : // -----------------------------------------------------------------------
      44                 :            : 
      45                 :            : #define DISABLE_CASEMAP             ((sal_uInt16)0x0001)
      46                 :            : #define DISABLE_WORDLINE            ((sal_uInt16)0x0002)
      47                 :            : #define DISABLE_BLINK               ((sal_uInt16)0x0004)
      48                 :            : #define DISABLE_UNDERLINE_COLOR     ((sal_uInt16)0x0008)
      49                 :            : 
      50                 :            : #define DISABLE_LANGUAGE            ((sal_uInt16)0x0010)
      51                 :            : #define DISABLE_HIDE_LANGUAGE       ((sal_uInt16)0x0020)
      52                 :            : 
      53                 :            : // class SvxCharBasePage -------------------------------------------------
      54                 :            : 
      55                 :            : class SvxCharBasePage : public SfxTabPage
      56                 :            : {
      57                 :            : protected:
      58                 :            :     SvxFontPrevWindow   m_aPreviewWin;
      59                 :            :     FixedInfo           m_aFontTypeFT;
      60                 :            : 
      61                 :            :     sal_Bool                m_bPreviewBackgroundToCharacter;
      62                 :            : 
      63                 :            :                         SvxCharBasePage( Window* pParent, const ResId& rResIdTabPage, const SfxItemSet&,
      64                 :            :                                             sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT );
      65                 :            :     virtual             ~SvxCharBasePage();
      66                 :            : 
      67                 :            :     void SetPrevFontWidthScale( const SfxItemSet& rSet );
      68                 :            :     void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
      69                 :            : 
      70                 :            :     inline SvxFont&     GetPreviewFont();
      71                 :            :     inline SvxFont&     GetPreviewCJKFont();
      72                 :            :     inline SvxFont&     GetPreviewCTLFont();
      73                 :            : 
      74                 :            : public:
      75                 :            :     using SfxTabPage::ActivatePage;
      76                 :            :     using SfxTabPage::DeactivatePage;
      77                 :            : 
      78                 :            :     virtual void        ActivatePage( const SfxItemSet& rSet );
      79                 :            : 
      80                 :            : };
      81                 :            : 
      82                 :            : // class SvxCharNamePage -------------------------------------------------
      83                 :            : 
      84                 :            : struct SvxCharNamePage_Impl;
      85                 :            : 
      86                 :            : class SvxCharNamePage : public SvxCharBasePage
      87                 :            : {
      88                 :            : 
      89                 :            : private:
      90                 :            :     FixedLine*          m_pWestLine;
      91                 :            :     FixedText*          m_pWestFontNameFT;
      92                 :            :     FontNameBox*        m_pWestFontNameLB;
      93                 :            :     FixedText*          m_pWestFontStyleFT;
      94                 :            :     FontStyleBox*       m_pWestFontStyleLB;
      95                 :            :     FixedText*          m_pWestFontSizeFT;
      96                 :            :     FontSizeBox*        m_pWestFontSizeLB;
      97                 :            :     FixedText*          m_pWestFontLanguageFT;
      98                 :            :     SvxLanguageBox*     m_pWestFontLanguageLB;
      99                 :            : 
     100                 :            :     FixedLine*          m_pEastLine;
     101                 :            :     FixedText*          m_pEastFontNameFT;
     102                 :            :     FontNameBox*        m_pEastFontNameLB;
     103                 :            :     FixedText*          m_pEastFontStyleFT;
     104                 :            :     FontStyleBox*       m_pEastFontStyleLB;
     105                 :            :     FixedText*          m_pEastFontSizeFT;
     106                 :            :     FontSizeBox*        m_pEastFontSizeLB;
     107                 :            :     FixedText*          m_pEastFontLanguageFT;
     108                 :            :     SvxLanguageBox*     m_pEastFontLanguageLB;
     109                 :            : 
     110                 :            :     FixedLine*          m_pCTLLine;
     111                 :            :     FixedText*          m_pCTLFontNameFT;
     112                 :            :     FontNameBox*        m_pCTLFontNameLB;
     113                 :            :     FixedText*          m_pCTLFontStyleFT;
     114                 :            :     FontStyleBox*       m_pCTLFontStyleLB;
     115                 :            :     FixedText*          m_pCTLFontSizeFT;
     116                 :            :     FontSizeBox*        m_pCTLFontSizeLB;
     117                 :            :     FixedText*          m_pCTLFontLanguageFT;
     118                 :            :     SvxLanguageBox*     m_pCTLFontLanguageLB;
     119                 :            : 
     120                 :            :     FixedLine*          m_pColorFL;
     121                 :            :     FixedText*          m_pColorFT;
     122                 :            :     ColorListBox*       m_pColorLB;
     123                 :            : 
     124                 :            :     SvxCharNamePage_Impl*   m_pImpl;
     125                 :            : 
     126                 :            :                         SvxCharNamePage( Window* pParent, const SfxItemSet& rSet );
     127                 :            : 
     128                 :            :     void                Initialize();
     129                 :            :     const FontList*     GetFontList() const;
     130                 :            :     void                UpdatePreview_Impl();
     131                 :            :     void                FillStyleBox_Impl( const FontNameBox* rBox );
     132                 :            :     void                FillSizeBox_Impl( const FontNameBox* rBox );
     133                 :            : 
     134                 :            :     enum LanguageGroup
     135                 :            :     {
     136                 :            :         /** Language for western text.
     137                 :            :          */
     138                 :            :         Western = 0,
     139                 :            : 
     140                 :            :         /** Language for asian text.
     141                 :            :          */
     142                 :            :         Asian,
     143                 :            : 
     144                 :            :         /** Language for ctl text.
     145                 :            :          */
     146                 :            :         Ctl
     147                 :            :     };
     148                 :            : 
     149                 :            :     void                Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp );
     150                 :            :     sal_Bool                FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp );
     151                 :            :     void                ResetColor_Impl( const SfxItemSet& rSet );
     152                 :            : 
     153                 :            :     DECL_LINK(UpdateHdl_Impl, void *);
     154                 :            :     DECL_LINK(          FontModifyHdl_Impl, void* );
     155                 :            :     DECL_LINK(          ColorBoxSelectHdl_Impl, ColorListBox* );
     156                 :            : 
     157                 :            : public:
     158                 :            :     using SfxTabPage::ActivatePage;
     159                 :            :     using SfxTabPage::DeactivatePage;
     160                 :            : 
     161                 :            :     virtual void        ActivatePage( const SfxItemSet& rSet );
     162                 :            :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     163                 :            : 
     164                 :            : public:
     165                 :            :                         ~SvxCharNamePage();
     166                 :            : 
     167                 :            :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     168                 :            :     static sal_uInt16*      GetRanges();
     169                 :            : 
     170                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     171                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     172                 :            : 
     173                 :            :     void                SetFontList( const SvxFontListItem& rItem );
     174                 :            :     void                EnableRelativeMode();
     175                 :            :     void                EnableSearchMode();
     176                 :            :     ///                  the writer uses SID_ATTR_BRUSH as font background
     177                 :            :     void                SetPreviewBackgroundToCharacter();
     178                 :            : 
     179                 :            :     void                DisableControls( sal_uInt16 nDisable );
     180                 :            :     virtual void        PageCreated (SfxAllItemSet aSet);
     181                 :            : };
     182                 :            : 
     183                 :            : // class SvxCharEffectsPage ----------------------------------------------
     184                 :            : 
     185 [ #  # ][ #  # ]:          0 : class SvxCharEffectsPage : public SvxCharBasePage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     186                 :            : {
     187                 :            : 
     188                 :            : private:
     189                 :            :     FixedText           m_aFontColorFT;
     190                 :            :     ColorListBox        m_aFontColorLB;
     191                 :            : 
     192                 :            :     FixedText           m_aEffectsFT;
     193                 :            :     SvxCheckListBox     m_aEffectsLB;
     194                 :            : 
     195                 :            :     ListBox             m_aEffects2LB;
     196                 :            : 
     197                 :            :     FixedText           m_aReliefFT;
     198                 :            :     ListBox             m_aReliefLB;
     199                 :            : 
     200                 :            :     TriStateBox         m_aOutlineBtn;
     201                 :            :     TriStateBox         m_aShadowBtn;
     202                 :            :     TriStateBox         m_aBlinkingBtn;
     203                 :            :     TriStateBox         m_aHiddenBtn;
     204                 :            : 
     205                 :            :     FixedLine           m_aVerticalLine;
     206                 :            : 
     207                 :            :     FixedText           m_aOverlineFT;
     208                 :            :     ListBox             m_aOverlineLB;
     209                 :            :     FixedText           m_aOverlineColorFT;
     210                 :            :     ColorListBox        m_aOverlineColorLB;
     211                 :            : 
     212                 :            :     FixedText           m_aStrikeoutFT;
     213                 :            :     ListBox             m_aStrikeoutLB;
     214                 :            : 
     215                 :            :     FixedText           m_aUnderlineFT;
     216                 :            :     ListBox             m_aUnderlineLB;
     217                 :            :     FixedText           m_aUnderlineColorFT;
     218                 :            :     ColorListBox        m_aUnderlineColorLB;
     219                 :            : 
     220                 :            :     CheckBox            m_aIndividualWordsBtn;
     221                 :            : 
     222                 :            :     FixedLine           m_aAsianLine;
     223                 :            : 
     224                 :            :     FixedText           m_aEmphasisFT;
     225                 :            :     ListBox             m_aEmphasisLB;
     226                 :            : 
     227                 :            :     FixedText           m_aPositionFT;
     228                 :            :     ListBox             m_aPositionLB;
     229                 :            : 
     230                 :            :     sal_uInt16              m_nHtmlMode;
     231                 :            : 
     232                 :            :     String              m_aTransparentColorName;
     233                 :            : 
     234                 :            :                         SvxCharEffectsPage( Window* pParent, const SfxItemSet& rSet );
     235                 :            : 
     236                 :            :     void                Initialize();
     237                 :            :     void                UpdatePreview_Impl();
     238                 :            :     void                SetCaseMap_Impl( SvxCaseMap eCaseMap );
     239                 :            :     void                ResetColor_Impl( const SfxItemSet& rSet );
     240                 :            :     sal_Bool                FillItemSetColor_Impl( SfxItemSet& rSet );
     241                 :            : 
     242                 :            :     DECL_LINK(          SelectHdl_Impl, ListBox* );
     243                 :            :     DECL_LINK(CbClickHdl_Impl, void *);
     244                 :            :     DECL_LINK(TristClickHdl_Impl, void *);
     245                 :            :     DECL_LINK(UpdatePreview_Impl, void *);
     246                 :            :     DECL_LINK(          ColorBoxSelectHdl_Impl, ColorListBox* );
     247                 :            : 
     248                 :            : public:
     249                 :            :     using SfxTabPage::DeactivatePage;
     250                 :            : 
     251                 :            :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     252                 :            : 
     253                 :            : public:
     254                 :            :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     255                 :            :     static sal_uInt16*      GetRanges();
     256                 :            : 
     257                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     258                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     259                 :            : 
     260                 :            :     void                DisableControls( sal_uInt16 nDisable );
     261                 :            :     void                EnableFlash();
     262                 :            :     ///                  the writer uses SID_ATTR_BRUSH as font background
     263                 :            :     void                SetPreviewBackgroundToCharacter();
     264                 :            :     virtual void        PageCreated (SfxAllItemSet aSet);
     265                 :            : };
     266                 :            : 
     267                 :            : // class SvxCharPositionPage ---------------------------------------------
     268                 :            : 
     269 [ #  # ][ #  # ]:          0 : class SvxCharPositionPage : public SvxCharBasePage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     270                 :            : {
     271                 :            : 
     272                 :            : private:
     273                 :            :     FixedLine           m_aPositionLine;
     274                 :            :     RadioButton         m_aHighPosBtn;
     275                 :            :     RadioButton         m_aNormalPosBtn;
     276                 :            :     RadioButton         m_aLowPosBtn;
     277                 :            :     FixedText           m_aHighLowFT;
     278                 :            :     MetricField         m_aHighLowEdit;
     279                 :            :     CheckBox            m_aHighLowRB;
     280                 :            :     FixedText           m_aFontSizeFT;
     281                 :            :     MetricField         m_aFontSizeEdit;
     282                 :            :     FixedLine           m_aRotationScalingFL;
     283                 :            :     FixedLine           m_aScalingFL;
     284                 :            :     RadioButton         m_a0degRB;
     285                 :            :     RadioButton         m_a90degRB;
     286                 :            :     RadioButton         m_a270degRB;
     287                 :            :     CheckBox            m_aFitToLineCB;
     288                 :            :     FixedText           m_aScaleWidthFT;
     289                 :            :     MetricField         m_aScaleWidthMF;
     290                 :            : 
     291                 :            :     FixedLine           m_aKerningLine;
     292                 :            :     ListBox             m_aKerningLB;
     293                 :            :     FixedText           m_aKerningFT;
     294                 :            :     MetricField         m_aKerningEdit;
     295                 :            :     CheckBox            m_aPairKerningBtn;
     296                 :            : 
     297                 :            :     short               m_nSuperEsc;
     298                 :            :     short               m_nSubEsc;
     299                 :            : 
     300                 :            :     sal_uInt16              m_nScaleWidthItemSetVal;
     301                 :            :     sal_uInt16              m_nScaleWidthInitialVal;
     302                 :            : 
     303                 :            :     sal_uInt8                m_nSuperProp;
     304                 :            :     sal_uInt8                m_nSubProp;
     305                 :            : 
     306                 :            :                         SvxCharPositionPage( Window* pParent, const SfxItemSet& rSet );
     307                 :            : 
     308                 :            :     void                Initialize();
     309                 :            :     void                UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
     310                 :            :     void                SetEscapement_Impl( sal_uInt16 nEsc );
     311                 :            : 
     312                 :            :     DECL_LINK(          PositionHdl_Impl, RadioButton* );
     313                 :            :     DECL_LINK(          RotationHdl_Impl, RadioButton* );
     314                 :            :     DECL_LINK(FontModifyHdl_Impl, void *);
     315                 :            :     DECL_LINK(          AutoPositionHdl_Impl, CheckBox* );
     316                 :            :     DECL_LINK(          FitToLineHdl_Impl, CheckBox* );
     317                 :            :     DECL_LINK(KerningSelectHdl_Impl, void *);
     318                 :            :     DECL_LINK(KerningModifyHdl_Impl, void *);
     319                 :            :     DECL_LINK(PairKerningHdl_Impl, void *);
     320                 :            :     DECL_LINK(          LoseFocusHdl_Impl, MetricField* );
     321                 :            :     DECL_LINK(ScaleWidthModifyHdl_Impl, void *);
     322                 :            : 
     323                 :            : public:
     324                 :            :     using SfxTabPage::ActivatePage;
     325                 :            :     using SfxTabPage::DeactivatePage;
     326                 :            : 
     327                 :            :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     328                 :            :     virtual void        ActivatePage( const SfxItemSet& rSet );
     329                 :            : 
     330                 :            : public:
     331                 :            :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     332                 :            :     static sal_uInt16*      GetRanges();
     333                 :            : 
     334                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     335                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     336                 :            :     virtual void        FillUserData();
     337                 :            :     ///                  the writer uses SID_ATTR_BRUSH as font background
     338                 :            :     void                SetPreviewBackgroundToCharacter();
     339                 :            :     virtual void        PageCreated (SfxAllItemSet aSet);
     340                 :            : };
     341                 :            : 
     342                 :            : // class SvxCharTwoLinesPage ---------------------------------------------
     343                 :            : 
     344 [ #  # ][ #  # ]:          0 : class SvxCharTwoLinesPage : public SvxCharBasePage
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     345                 :            : {
     346                 :            : private:
     347                 :            :     FixedLine           m_aSwitchOnLine;
     348                 :            :     CheckBox            m_aTwoLinesBtn;
     349                 :            : 
     350                 :            :     FixedLine           m_aEncloseLine;
     351                 :            :     FixedText           m_aStartBracketFT;
     352                 :            :     ListBox             m_aStartBracketLB;
     353                 :            :     FixedText           m_aEndBracketFT;
     354                 :            :     ListBox             m_aEndBracketLB;
     355                 :            : 
     356                 :            :     sal_uInt16              m_nStartBracketPosition;
     357                 :            :     sal_uInt16              m_nEndBracketPosition;
     358                 :            : 
     359                 :            :                         SvxCharTwoLinesPage( Window* pParent, const SfxItemSet& rSet );
     360                 :            : 
     361                 :            :     void                UpdatePreview_Impl();
     362                 :            :     void                Initialize();
     363                 :            :     void                SelectCharacter( ListBox* pBox );
     364                 :            :     void                SetBracket( sal_Unicode cBracket, sal_Bool bStart );
     365                 :            : 
     366                 :            :     DECL_LINK(TwoLinesHdl_Impl, void *);
     367                 :            :     DECL_LINK(          CharacterMapHdl_Impl, ListBox* );
     368                 :            : 
     369                 :            : public:
     370                 :            :     using SfxTabPage::ActivatePage;
     371                 :            :     using SfxTabPage::DeactivatePage;
     372                 :            : 
     373                 :            :     virtual void        ActivatePage( const SfxItemSet& rSet );
     374                 :            :     virtual int         DeactivatePage( SfxItemSet* pSet = 0 );
     375                 :            : 
     376                 :            : public:
     377                 :            :     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
     378                 :            :     static sal_uInt16*      GetRanges();
     379                 :            : 
     380                 :            :     virtual void        Reset( const SfxItemSet& rSet );
     381                 :            :     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
     382                 :            :     ///                  the writer uses SID_ATTR_BRUSH as font background
     383                 :            :     void                SetPreviewBackgroundToCharacter();
     384                 :            :     virtual void        PageCreated (SfxAllItemSet aSet);
     385                 :            : };
     386                 :            : 
     387                 :            : #endif // #ifndef _SVX_CHARDLG_HXX
     388                 :            : 
     389                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10