1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_HINTS_HXX 29 #define SC_HINTS_HXX 30 31 #include "global.hxx" 32 #include "address.hxx" 33 #include <svl/hint.hxx> 34 35 // --------------------------------------------------------------------------- 36 37 class ScPaintHint : public SfxHint 38 { 39 ScRange aRange; 40 sal_uInt16 nParts; 41 sal_Bool bPrint; // Flag, ob auch Druck/Vorschau betroffen ist 42 43 ScPaintHint(); // disabled 44 45 public: 46 TYPEINFO(); 47 ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL ); 48 ~ScPaintHint(); 49 50 void SetPrintFlag(sal_Bool bSet) { bPrint = bSet; } 51 52 const ScRange& GetRange() const { return aRange; } 53 SCCOL GetStartCol() const { return aRange.aStart.Col(); } 54 SCROW GetStartRow() const { return aRange.aStart.Row(); } 55 SCTAB GetStartTab() const { return aRange.aStart.Tab(); } 56 SCCOL GetEndCol() const { return aRange.aEnd.Col(); } 57 SCROW GetEndRow() const { return aRange.aEnd.Row(); } 58 SCTAB GetEndTab() const { return aRange.aEnd.Tab(); } 59 sal_uInt16 GetParts() const { return nParts; } 60 sal_Bool GetPrintFlag() const { return bPrint; } 61 }; 62 63 64 class ScUpdateRefHint : public SfxHint 65 { 66 UpdateRefMode eUpdateRefMode; 67 ScRange aRange; 68 SCsCOL nDx; 69 SCsROW nDy; 70 SCsTAB nDz; 71 72 public: 73 TYPEINFO(); 74 75 ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR, 76 SCsCOL nX, SCsROW nY, SCsTAB nZ ); 77 ~ScUpdateRefHint(); 78 79 UpdateRefMode GetMode() const { return eUpdateRefMode; } 80 const ScRange& GetRange() const { return aRange; } 81 SCsCOL GetDx() const { return nDx; } 82 SCsROW GetDy() const { return nDy; } 83 SCsTAB GetDz() const { return nDz; } 84 }; 85 86 87 #define SC_POINTERCHANGED_NUMFMT 1 88 89 class ScPointerChangedHint : public SfxHint 90 { 91 sal_uInt16 nFlags; 92 93 public: 94 TYPEINFO(); 95 96 //UNUSED2008-05 ScPointerChangedHint( sal_uInt16 nF ); 97 ~ScPointerChangedHint(); 98 99 sal_uInt16 GetFlags() const { return nFlags; } 100 }; 101 102 103 //! move ScLinkRefreshedHint to a different file? 104 105 #define SC_LINKREFTYPE_NONE 0 106 #define SC_LINKREFTYPE_SHEET 1 107 #define SC_LINKREFTYPE_AREA 2 108 #define SC_LINKREFTYPE_DDE 3 109 110 class ScLinkRefreshedHint : public SfxHint 111 { 112 sal_uInt16 nLinkType; // SC_LINKREFTYPE_... 113 String aUrl; // used for sheet links 114 String aDdeAppl; // used for dde links: 115 String aDdeTopic; 116 String aDdeItem; 117 sal_uInt8 nDdeMode; 118 ScAddress aDestPos; // used to identify area links 119 //! also use source data for area links? 120 121 public: 122 TYPEINFO(); 123 ScLinkRefreshedHint(); 124 ~ScLinkRefreshedHint(); 125 126 void SetSheetLink( const String& rSourceUrl ); 127 void SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM ); 128 void SetAreaLink( const ScAddress& rPos ); 129 130 sal_uInt16 GetLinkType() const { return nLinkType; } 131 const String& GetUrl() const { return aUrl; } 132 const String& GetDdeAppl() const { return aDdeAppl; } 133 const String& GetDdeTopic() const { return aDdeTopic; } 134 const String& GetDdeItem() const { return aDdeItem; } 135 sal_uInt8 GetDdeMode() const { return nDdeMode; } 136 const ScAddress& GetDestPos() const { return aDestPos; } 137 }; 138 139 140 //! move ScAutoStyleHint to a different file? 141 142 class ScAutoStyleHint : public SfxHint 143 { 144 ScRange aRange; 145 String aStyle1; 146 String aStyle2; 147 sal_uLong nTimeout; 148 149 public: 150 TYPEINFO(); 151 ScAutoStyleHint( const ScRange& rR, const String& rSt1, 152 sal_uLong nT, const String& rSt2 ); 153 ~ScAutoStyleHint(); 154 155 const ScRange& GetRange() const { return aRange; } 156 const String& GetStyle1() const { return aStyle1; } 157 sal_uInt32 GetTimeout() const { return nTimeout; } 158 const String& GetStyle2() const { return aStyle2; } 159 }; 160 161 class ScDBRangeRefreshedHint : public SfxHint 162 { 163 ScImportParam aParam; 164 165 public: 166 TYPEINFO(); 167 ScDBRangeRefreshedHint( const ScImportParam& rP ); 168 ~ScDBRangeRefreshedHint(); 169 170 const ScImportParam& GetImportParam() const { return aParam; } 171 }; 172 173 class ScDataPilotModifiedHint : public SfxHint 174 { 175 String maName; 176 177 public: 178 TYPEINFO(); 179 ScDataPilotModifiedHint( const String& rName ); 180 ~ScDataPilotModifiedHint(); 181 182 const String& GetName() const { return maName; } 183 }; 184 185 #endif 186