1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10*c4eee24dSAndrew Rist * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c4eee24dSAndrew Rist * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19*c4eee24dSAndrew Rist * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_BACKGRND_HXX 24cdf0e10cSrcweir #define _SVX_BACKGRND_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 29cdf0e10cSrcweir #include <vcl/group.hxx> 30cdf0e10cSrcweir #endif 31cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 32cdf0e10cSrcweir #ifndef _GRAPH_HXX //autogen 33cdf0e10cSrcweir #include <vcl/graph.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir #include <svtools/valueset.hxx> 36cdf0e10cSrcweir #include <svx/dlgctrl.hxx> 37cdf0e10cSrcweir 38cdf0e10cSrcweir // class SvxBackgroundTabPage -------------------------------------------- 39cdf0e10cSrcweir /* 40cdf0e10cSrcweir {k:\svx\prototyp\dialog\backgrnd.bmp} 41cdf0e10cSrcweir [Beschreibung] 42cdf0e10cSrcweir Mit dieser TabPage kann eine Brush (z.B. fuer die Hintergrundfarbe eines 43cdf0e10cSrcweir Rahmens) eingestellt werden. 44cdf0e10cSrcweir [Items] 45cdf0e10cSrcweir <SvxBrushItem>: <SID_ATTR_BRUSH>; 46cdf0e10cSrcweir */ 47cdf0e10cSrcweir 48cdf0e10cSrcweir //------------------------------------------------------------------------ 49cdf0e10cSrcweir // forwards: 50cdf0e10cSrcweir 51cdf0e10cSrcweir class BackgroundPreviewImpl; 52cdf0e10cSrcweir class SvxOpenGraphicDialog; 53cdf0e10cSrcweir struct SvxBackgroundTable_Impl; 54cdf0e10cSrcweir struct SvxBackgroundPara_Impl; 55cdf0e10cSrcweir struct SvxBackgroundPage_Impl; 56cdf0e10cSrcweir class SvxBrushItem; 57cdf0e10cSrcweir //------------------------------------------------------------------------ 58cdf0e10cSrcweir 59cdf0e10cSrcweir class SvxBackgroundTabPage : public SvxTabPage 60cdf0e10cSrcweir { 61cdf0e10cSrcweir using TabPage::DeactivatePage; 62cdf0e10cSrcweir public: 63cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 64cdf0e10cSrcweir static sal_uInt16* GetRanges(); 65cdf0e10cSrcweir 66cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 67cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 68cdf0e10cSrcweir virtual void FillUserData(); 69cdf0e10cSrcweir virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); 70cdf0e10cSrcweir 71cdf0e10cSrcweir void ShowSelector(); // Umschalt-ListBox aktivieren 72cdf0e10cSrcweir void ShowTblControl(); // fuer den Writer (Zellen/Zeilen/Tabelle) 73cdf0e10cSrcweir void ShowParaControl(sal_Bool bCharOnly = sal_False); // fuer den Writer (Absatz/Zeichen) 74cdf0e10cSrcweir void EnableTransparency(sal_Bool bColor, sal_Bool bGraphic); 75cdf0e10cSrcweir virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 76cdf0e10cSrcweir protected: 77cdf0e10cSrcweir virtual int DeactivatePage( SfxItemSet* pSet = 0 ); 78cdf0e10cSrcweir 79cdf0e10cSrcweir private: 80cdf0e10cSrcweir SvxBackgroundTabPage( Window* pParent, const SfxItemSet& rCoreSet ); 81cdf0e10cSrcweir ~SvxBackgroundTabPage(); 82cdf0e10cSrcweir 83cdf0e10cSrcweir FixedText aSelectTxt; 84cdf0e10cSrcweir ListBox aLbSelect; 85cdf0e10cSrcweir const String aStrBrowse; 86cdf0e10cSrcweir const String aStrUnlinked; 87cdf0e10cSrcweir FixedText aTblDesc; 88cdf0e10cSrcweir ListBox aTblLBox; 89cdf0e10cSrcweir ListBox aParaLBox; 90cdf0e10cSrcweir // Hintergrundfarbe ------------------------------------ 91cdf0e10cSrcweir Control aBorderWin; 92cdf0e10cSrcweir ValueSet aBackgroundColorSet; 93cdf0e10cSrcweir FixedLine aBackgroundColorBox; 94cdf0e10cSrcweir BackgroundPreviewImpl* pPreviewWin1; 95cdf0e10cSrcweir //color transparency 96cdf0e10cSrcweir FixedText aColTransFT; 97cdf0e10cSrcweir MetricField aColTransMF; 98cdf0e10cSrcweir CheckBox aBtnPreview; 99cdf0e10cSrcweir // Hintergrund-Bitmap ---------------------------------- 100cdf0e10cSrcweir FixedLine aGbFile; 101cdf0e10cSrcweir PushButton aBtnBrowse; 102cdf0e10cSrcweir CheckBox aBtnLink; 103cdf0e10cSrcweir FixedLine aGbPosition; 104cdf0e10cSrcweir RadioButton aBtnPosition; 105cdf0e10cSrcweir RadioButton aBtnArea; 106cdf0e10cSrcweir RadioButton aBtnTile; 107cdf0e10cSrcweir SvxRectCtl aWndPosition; 108cdf0e10cSrcweir FixedInfo aFtFile; 109cdf0e10cSrcweir //transparency of graphics 110cdf0e10cSrcweir FixedLine aGraphTransFL; 111cdf0e10cSrcweir MetricField aGraphTransMF; 112cdf0e10cSrcweir 113cdf0e10cSrcweir BackgroundPreviewImpl* pPreviewWin2; 114cdf0e10cSrcweir 115cdf0e10cSrcweir // DDListBox fuer Writer ------------------------------- 116cdf0e10cSrcweir //------------------------------------------------------ 117cdf0e10cSrcweir Color aBgdColor; 118cdf0e10cSrcweir sal_uInt16 nHtmlMode; 119cdf0e10cSrcweir sal_Bool bAllowShowSelector : 1; 120cdf0e10cSrcweir sal_Bool bIsGraphicValid : 1; 121cdf0e10cSrcweir sal_Bool bLinkOnly : 1; 122cdf0e10cSrcweir sal_Bool bResized : 1; 123cdf0e10cSrcweir sal_Bool bColTransparency : 1; 124cdf0e10cSrcweir sal_Bool bGraphTransparency : 1; 125cdf0e10cSrcweir Graphic aBgdGraphic; 126cdf0e10cSrcweir String aBgdGraphicPath; 127cdf0e10cSrcweir String aBgdGraphicFilter; 128cdf0e10cSrcweir 129cdf0e10cSrcweir SvxBackgroundPage_Impl* pPageImpl; 130cdf0e10cSrcweir SvxOpenGraphicDialog* pImportDlg; 131cdf0e10cSrcweir 132cdf0e10cSrcweir // Items fuer Sw-Tabelle muessen gesammelt werden 133cdf0e10cSrcweir SvxBackgroundTable_Impl* pTableBck_Impl; 134cdf0e10cSrcweir // auch fuer die Absatzvorlage 135cdf0e10cSrcweir SvxBackgroundPara_Impl* pParaBck_Impl; 136cdf0e10cSrcweir 137cdf0e10cSrcweir #ifdef _SVX_BACKGRND_CXX 138cdf0e10cSrcweir void FillColorValueSets_Impl(); 139cdf0e10cSrcweir void ShowColorUI_Impl(); 140cdf0e10cSrcweir void ShowBitmapUI_Impl(); 141cdf0e10cSrcweir sal_Bool LoadLinkedGraphic_Impl(); 142cdf0e10cSrcweir void RaiseLoadError_Impl(); 143cdf0e10cSrcweir void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); 144cdf0e10cSrcweir SvxGraphicPosition GetGraphicPosition_Impl(); 145cdf0e10cSrcweir void FillControls_Impl(const SvxBrushItem& rBgdAttr, 146cdf0e10cSrcweir const String& rUserData); 147cdf0e10cSrcweir sal_Bool FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot); 148cdf0e10cSrcweir void ResetFromWallpaperItem( const SfxItemSet& rSet ); 149cdf0e10cSrcweir 150cdf0e10cSrcweir DECL_LINK( LoadTimerHdl_Impl, Timer* ); 151cdf0e10cSrcweir DECL_LINK( SelectHdl_Impl, ListBox* ); 152cdf0e10cSrcweir DECL_LINK( BrowseHdl_Impl, PushButton* ); 153cdf0e10cSrcweir DECL_LINK( RadioClickHdl_Impl, RadioButton* ); 154cdf0e10cSrcweir DECL_LINK( FileClickHdl_Impl, CheckBox* ); 155cdf0e10cSrcweir DECL_LINK( BackgroundColorHdl_Impl, ValueSet* ); 156cdf0e10cSrcweir DECL_LINK( TblDestinationHdl_Impl, ListBox* ); 157cdf0e10cSrcweir DECL_LINK( ParaDestinationHdl_Impl, ListBox* ); 158cdf0e10cSrcweir #endif 159cdf0e10cSrcweir }; 160cdf0e10cSrcweir 161cdf0e10cSrcweir #endif // #ifndef _SVX_BACKGRND_HXX 162cdf0e10cSrcweir 163cdf0e10cSrcweir 164