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 24 #ifndef SC_HINTS_HXX 25 #define SC_HINTS_HXX 26 27 #include "global.hxx" 28 #include "address.hxx" 29 #include <svl/hint.hxx> 30 31 // --------------------------------------------------------------------------- 32 33 class ScPaintHint : public SfxHint 34 { 35 ScRange aRange; 36 sal_uInt16 nParts; 37 sal_Bool bPrint; // Flag, ob auch Druck/Vorschau betroffen ist 38 39 ScPaintHint(); // disabled 40 41 public: 42 TYPEINFO(); 43 ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL ); 44 ~ScPaintHint(); 45 SetPrintFlag(sal_Bool bSet)46 void SetPrintFlag(sal_Bool bSet) { bPrint = bSet; } 47 GetRange() const48 const ScRange& GetRange() const { return aRange; } GetStartCol() const49 SCCOL GetStartCol() const { return aRange.aStart.Col(); } GetStartRow() const50 SCROW GetStartRow() const { return aRange.aStart.Row(); } GetStartTab() const51 SCTAB GetStartTab() const { return aRange.aStart.Tab(); } GetEndCol() const52 SCCOL GetEndCol() const { return aRange.aEnd.Col(); } GetEndRow() const53 SCROW GetEndRow() const { return aRange.aEnd.Row(); } GetEndTab() const54 SCTAB GetEndTab() const { return aRange.aEnd.Tab(); } GetParts() const55 sal_uInt16 GetParts() const { return nParts; } GetPrintFlag() const56 sal_Bool GetPrintFlag() const { return bPrint; } 57 }; 58 59 60 class ScUpdateRefHint : public SfxHint 61 { 62 UpdateRefMode eUpdateRefMode; 63 ScRange aRange; 64 SCsCOL nDx; 65 SCsROW nDy; 66 SCsTAB nDz; 67 68 public: 69 TYPEINFO(); 70 71 ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR, 72 SCsCOL nX, SCsROW nY, SCsTAB nZ ); 73 ~ScUpdateRefHint(); 74 GetMode() const75 UpdateRefMode GetMode() const { return eUpdateRefMode; } GetRange() const76 const ScRange& GetRange() const { return aRange; } GetDx() const77 SCsCOL GetDx() const { return nDx; } GetDy() const78 SCsROW GetDy() const { return nDy; } GetDz() const79 SCsTAB GetDz() const { return nDz; } 80 }; 81 82 83 #define SC_POINTERCHANGED_NUMFMT 1 84 85 class ScPointerChangedHint : public SfxHint 86 { 87 sal_uInt16 nFlags; 88 89 public: 90 TYPEINFO(); 91 92 //UNUSED2008-05 ScPointerChangedHint( sal_uInt16 nF ); 93 ~ScPointerChangedHint(); 94 GetFlags() const95 sal_uInt16 GetFlags() const { return nFlags; } 96 }; 97 98 99 //! move ScLinkRefreshedHint to a different file? 100 101 #define SC_LINKREFTYPE_NONE 0 102 #define SC_LINKREFTYPE_SHEET 1 103 #define SC_LINKREFTYPE_AREA 2 104 #define SC_LINKREFTYPE_DDE 3 105 106 class ScLinkRefreshedHint : public SfxHint 107 { 108 sal_uInt16 nLinkType; // SC_LINKREFTYPE_... 109 String aUrl; // used for sheet links 110 String aDdeAppl; // used for dde links: 111 String aDdeTopic; 112 String aDdeItem; 113 sal_uInt8 nDdeMode; 114 ScAddress aDestPos; // used to identify area links 115 //! also use source data for area links? 116 117 public: 118 TYPEINFO(); 119 ScLinkRefreshedHint(); 120 ~ScLinkRefreshedHint(); 121 122 void SetSheetLink( const String& rSourceUrl ); 123 void SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM ); 124 void SetAreaLink( const ScAddress& rPos ); 125 GetLinkType() const126 sal_uInt16 GetLinkType() const { return nLinkType; } GetUrl() const127 const String& GetUrl() const { return aUrl; } GetDdeAppl() const128 const String& GetDdeAppl() const { return aDdeAppl; } GetDdeTopic() const129 const String& GetDdeTopic() const { return aDdeTopic; } GetDdeItem() const130 const String& GetDdeItem() const { return aDdeItem; } GetDdeMode() const131 sal_uInt8 GetDdeMode() const { return nDdeMode; } GetDestPos() const132 const ScAddress& GetDestPos() const { return aDestPos; } 133 }; 134 135 136 //! move ScAutoStyleHint to a different file? 137 138 class ScAutoStyleHint : public SfxHint 139 { 140 ScRange aRange; 141 String aStyle1; 142 String aStyle2; 143 sal_uLong nTimeout; 144 145 public: 146 TYPEINFO(); 147 ScAutoStyleHint( const ScRange& rR, const String& rSt1, 148 sal_uLong nT, const String& rSt2 ); 149 ~ScAutoStyleHint(); 150 GetRange() const151 const ScRange& GetRange() const { return aRange; } GetStyle1() const152 const String& GetStyle1() const { return aStyle1; } GetTimeout() const153 sal_uInt32 GetTimeout() const { return nTimeout; } GetStyle2() const154 const String& GetStyle2() const { return aStyle2; } 155 }; 156 157 class ScDBRangeRefreshedHint : public SfxHint 158 { 159 ScImportParam aParam; 160 161 public: 162 TYPEINFO(); 163 ScDBRangeRefreshedHint( const ScImportParam& rP ); 164 ~ScDBRangeRefreshedHint(); 165 GetImportParam() const166 const ScImportParam& GetImportParam() const { return aParam; } 167 }; 168 169 class ScDataPilotModifiedHint : public SfxHint 170 { 171 String maName; 172 173 public: 174 TYPEINFO(); 175 ScDataPilotModifiedHint( const String& rName ); 176 ~ScDataPilotModifiedHint(); 177 GetName() const178 const String& GetName() const { return maName; } 179 }; 180 181 #endif 182