1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _SVX_NUMVSET_HXX 24 #define _SVX_NUMVSET_HXX 25 26 27 // include --------------------------------------------------------------- 28 29 30 #include <svtools/valueset.hxx> 31 #include <limits.h> 32 #include <com/sun/star/uno/Reference.h> 33 #include <com/sun/star/uno/Sequence.h> 34 #include <com/sun/star/lang/Locale.hpp> 35 #include "svx/svxdllapi.h" 36 37 namespace com{namespace sun{ namespace star{ 38 namespace container{ 39 class XIndexAccess; 40 } 41 namespace beans{ 42 struct PropertyValue; 43 } 44 namespace text{ 45 class XNumberingFormatter; 46 } 47 }}} 48 49 class SvxBrushItem; 50 class SvxNumRule; 51 struct SvxBmpItemInfo 52 { 53 SvxBrushItem* pBrushItem; 54 sal_uInt16 nItemId; 55 }; 56 57 /*-----------------09/09/97 01:05pm----------------- 58 59 --------------------------------------------------*/ 60 class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet 61 { 62 Color aLineColor; 63 sal_uInt16 nPageType; 64 sal_Bool bHTMLMode; 65 Rectangle aOrgRect; 66 VirtualDevice* pVDev; 67 68 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; 69 com::sun::star::lang::Locale aLocale; 70 71 com::sun::star::uno::Sequence< 72 com::sun::star::uno::Sequence< 73 com::sun::star::beans::PropertyValue> > aNumSettings; 74 75 com::sun::star::uno::Sequence< 76 com::sun::star::uno::Reference< 77 com::sun::star::container::XIndexAccess> > aOutlineSettings; 78 public: 79 SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType ); 80 ~SvxNumValueSet(); 81 82 virtual void UserDraw( const UserDrawEvent& rUDEvt ); 83 SetHTMLMode(sal_Bool bSet)84 void SetHTMLMode(sal_Bool bSet) {bHTMLMode = bSet;} 85 void SetNumberingSettings( 86 const com::sun::star::uno::Sequence< 87 com::sun::star::uno::Sequence< 88 com::sun::star::beans::PropertyValue> >& aNum, 89 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, 90 const com::sun::star::lang::Locale& rLocale ); 91 92 void SetOutlineNumberingSettings( 93 com::sun::star::uno::Sequence< 94 com::sun::star::uno::Reference< 95 com::sun::star::container::XIndexAccess> >& rOutline, 96 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter, 97 const com::sun::star::lang::Locale& rLocale); 98 }; 99 100 /*-----------------13.02.97 09.32------------------- 101 102 --------------------------------------------------*/ 103 104 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet 105 { 106 String sBullets; 107 Timer aFormatTimer; 108 sal_Bool bGrfNotFound; 109 110 protected: 111 DECL_LINK(FormatHdl_Impl, Timer*); 112 SetGrfNotFound(sal_Bool bSet)113 void SetGrfNotFound(sal_Bool bSet) {bGrfNotFound = bSet;} IsGrfNotFound() const114 sal_Bool IsGrfNotFound()const {return bGrfNotFound;} 115 GetFormatTimer()116 Timer& GetFormatTimer() {return aFormatTimer;} 117 118 public: 119 SvxBmpNumValueSet( Window* pParent, const ResId& rResId/*, const List& rStrNames*/); 120 ~SvxBmpNumValueSet(); 121 122 virtual void UserDraw( const UserDrawEvent& rUDEvt ); 123 124 }; 125 /*-----------------02.12.97 10:31------------------- 126 127 --------------------------------------------------*/ 128 129 class SvxNumberingPreview : public Window 130 { 131 const SvxNumRule* pActNum; 132 Font aStdFont; 133 long nPageWidth; 134 const String* pOutlineNames; 135 sal_Bool bPosition; 136 sal_uInt16 nActLevel; 137 138 protected: 139 virtual void Paint( const Rectangle& rRect ); 140 141 public: SvxNumberingPreview(Window * pParent,const ResId & rResId)142 SvxNumberingPreview(Window* pParent, const ResId& rResId ) : 143 Window(pParent, rResId), 144 pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX) 145 { SetBorderStyle( WINDOW_BORDER_MONO ); } 146 SetNumRule(const SvxNumRule * pNum)147 void SetNumRule(const SvxNumRule* pNum) 148 {pActNum = pNum; Invalidate();}; SetPageWidth(long nPgWidth)149 void SetPageWidth(long nPgWidth) 150 {nPageWidth = nPgWidth;} SetOutlineNames(const String * pNames)151 void SetOutlineNames(const String* pNames) 152 {pOutlineNames = pNames;} SetPositionMode()153 void SetPositionMode() 154 { bPosition = sal_True;} SetLevel(sal_uInt16 nSet)155 void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;} 156 157 }; 158 159 160 #endif 161 162