xref: /AOO41X/main/sc/inc/hints.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_HINTS_HXX
25cdf0e10cSrcweir #define SC_HINTS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "global.hxx"
28cdf0e10cSrcweir #include "address.hxx"
29cdf0e10cSrcweir #include <svl/hint.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // ---------------------------------------------------------------------------
32cdf0e10cSrcweir 
33cdf0e10cSrcweir class ScPaintHint : public SfxHint
34cdf0e10cSrcweir {
35cdf0e10cSrcweir     ScRange     aRange;
36cdf0e10cSrcweir     sal_uInt16      nParts;
37cdf0e10cSrcweir     sal_Bool        bPrint;     //  Flag, ob auch Druck/Vorschau betroffen ist
38cdf0e10cSrcweir 
39cdf0e10cSrcweir     ScPaintHint(); // disabled
40cdf0e10cSrcweir 
41cdf0e10cSrcweir public:
42cdf0e10cSrcweir                     TYPEINFO();
43cdf0e10cSrcweir                     ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
44cdf0e10cSrcweir                     ~ScPaintHint();
45cdf0e10cSrcweir 
SetPrintFlag(sal_Bool bSet)46cdf0e10cSrcweir     void            SetPrintFlag(sal_Bool bSet) { bPrint = bSet; }
47cdf0e10cSrcweir 
GetRange() const48cdf0e10cSrcweir     const ScRange&  GetRange() const        { return aRange; }
GetStartCol() const49cdf0e10cSrcweir     SCCOL           GetStartCol() const     { return aRange.aStart.Col(); }
GetStartRow() const50cdf0e10cSrcweir     SCROW           GetStartRow() const     { return aRange.aStart.Row(); }
GetStartTab() const51cdf0e10cSrcweir     SCTAB           GetStartTab() const     { return aRange.aStart.Tab(); }
GetEndCol() const52cdf0e10cSrcweir     SCCOL           GetEndCol() const       { return aRange.aEnd.Col(); }
GetEndRow() const53cdf0e10cSrcweir     SCROW           GetEndRow() const       { return aRange.aEnd.Row(); }
GetEndTab() const54cdf0e10cSrcweir     SCTAB           GetEndTab() const       { return aRange.aEnd.Tab(); }
GetParts() const55cdf0e10cSrcweir     sal_uInt16          GetParts() const        { return nParts; }
GetPrintFlag() const56cdf0e10cSrcweir     sal_Bool            GetPrintFlag() const    { return bPrint; }
57cdf0e10cSrcweir };
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir class ScUpdateRefHint : public SfxHint
61cdf0e10cSrcweir {
62cdf0e10cSrcweir     UpdateRefMode   eUpdateRefMode;
63cdf0e10cSrcweir     ScRange         aRange;
64cdf0e10cSrcweir     SCsCOL          nDx;
65cdf0e10cSrcweir     SCsROW          nDy;
66cdf0e10cSrcweir     SCsTAB          nDz;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir public:
69cdf0e10cSrcweir                     TYPEINFO();
70cdf0e10cSrcweir 
71cdf0e10cSrcweir                     ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
72cdf0e10cSrcweir                                         SCsCOL nX, SCsROW nY, SCsTAB nZ );
73cdf0e10cSrcweir                     ~ScUpdateRefHint();
74cdf0e10cSrcweir 
GetMode() const75cdf0e10cSrcweir     UpdateRefMode   GetMode() const         { return eUpdateRefMode; }
GetRange() const76cdf0e10cSrcweir     const ScRange&  GetRange() const        { return aRange; }
GetDx() const77cdf0e10cSrcweir     SCsCOL          GetDx() const           { return nDx; }
GetDy() const78cdf0e10cSrcweir     SCsROW          GetDy() const           { return nDy; }
GetDz() const79cdf0e10cSrcweir     SCsTAB          GetDz() const           { return nDz; }
80cdf0e10cSrcweir };
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 
83cdf0e10cSrcweir #define SC_POINTERCHANGED_NUMFMT    1
84cdf0e10cSrcweir 
85cdf0e10cSrcweir class ScPointerChangedHint : public SfxHint
86cdf0e10cSrcweir {
87cdf0e10cSrcweir     sal_uInt16          nFlags;
88cdf0e10cSrcweir 
89cdf0e10cSrcweir public:
90cdf0e10cSrcweir                     TYPEINFO();
91cdf0e10cSrcweir 
92cdf0e10cSrcweir //UNUSED2008-05     ScPointerChangedHint( sal_uInt16 nF );
93cdf0e10cSrcweir                     ~ScPointerChangedHint();
94cdf0e10cSrcweir 
GetFlags() const95cdf0e10cSrcweir     sal_uInt16          GetFlags() const            { return nFlags; }
96cdf0e10cSrcweir };
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir //! move ScLinkRefreshedHint to a different file?
100cdf0e10cSrcweir 
101cdf0e10cSrcweir #define SC_LINKREFTYPE_NONE     0
102cdf0e10cSrcweir #define SC_LINKREFTYPE_SHEET    1
103cdf0e10cSrcweir #define SC_LINKREFTYPE_AREA     2
104cdf0e10cSrcweir #define SC_LINKREFTYPE_DDE      3
105cdf0e10cSrcweir 
106cdf0e10cSrcweir class ScLinkRefreshedHint : public SfxHint
107cdf0e10cSrcweir {
108cdf0e10cSrcweir     sal_uInt16      nLinkType;  // SC_LINKREFTYPE_...
109cdf0e10cSrcweir     String      aUrl;       // used for sheet links
110cdf0e10cSrcweir     String      aDdeAppl;   // used for dde links:
111cdf0e10cSrcweir     String      aDdeTopic;
112cdf0e10cSrcweir     String      aDdeItem;
113cdf0e10cSrcweir     sal_uInt8       nDdeMode;
114cdf0e10cSrcweir     ScAddress   aDestPos;   // used to identify area links
115cdf0e10cSrcweir                             //! also use source data for area links?
116cdf0e10cSrcweir 
117cdf0e10cSrcweir public:
118cdf0e10cSrcweir                     TYPEINFO();
119cdf0e10cSrcweir                     ScLinkRefreshedHint();
120cdf0e10cSrcweir                     ~ScLinkRefreshedHint();
121cdf0e10cSrcweir 
122cdf0e10cSrcweir     void            SetSheetLink( const String& rSourceUrl );
123cdf0e10cSrcweir     void            SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM );
124cdf0e10cSrcweir     void            SetAreaLink( const ScAddress& rPos );
125cdf0e10cSrcweir 
GetLinkType() const126cdf0e10cSrcweir     sal_uInt16              GetLinkType() const { return nLinkType; }
GetUrl() const127cdf0e10cSrcweir     const String&       GetUrl() const      { return aUrl; }
GetDdeAppl() const128cdf0e10cSrcweir     const String&       GetDdeAppl() const  { return aDdeAppl; }
GetDdeTopic() const129cdf0e10cSrcweir     const String&       GetDdeTopic() const { return aDdeTopic; }
GetDdeItem() const130cdf0e10cSrcweir     const String&       GetDdeItem() const  { return aDdeItem; }
GetDdeMode() const131cdf0e10cSrcweir     sal_uInt8               GetDdeMode() const  { return nDdeMode; }
GetDestPos() const132cdf0e10cSrcweir     const ScAddress&    GetDestPos() const  { return aDestPos; }
133cdf0e10cSrcweir };
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 
136cdf0e10cSrcweir //! move ScAutoStyleHint to a different file?
137cdf0e10cSrcweir 
138cdf0e10cSrcweir class ScAutoStyleHint : public SfxHint
139cdf0e10cSrcweir {
140cdf0e10cSrcweir     ScRange     aRange;
141cdf0e10cSrcweir     String      aStyle1;
142cdf0e10cSrcweir     String      aStyle2;
143cdf0e10cSrcweir     sal_uLong       nTimeout;
144cdf0e10cSrcweir 
145cdf0e10cSrcweir public:
146cdf0e10cSrcweir                     TYPEINFO();
147cdf0e10cSrcweir                     ScAutoStyleHint( const ScRange& rR, const String& rSt1,
148cdf0e10cSrcweir                                         sal_uLong nT, const String& rSt2 );
149cdf0e10cSrcweir                     ~ScAutoStyleHint();
150cdf0e10cSrcweir 
GetRange() const151cdf0e10cSrcweir     const ScRange&  GetRange() const    { return aRange; }
GetStyle1() const152cdf0e10cSrcweir     const String&   GetStyle1() const   { return aStyle1; }
GetTimeout() const153cdf0e10cSrcweir     sal_uInt32          GetTimeout() const  { return nTimeout; }
GetStyle2() const154cdf0e10cSrcweir     const String&   GetStyle2() const   { return aStyle2; }
155cdf0e10cSrcweir };
156cdf0e10cSrcweir 
157cdf0e10cSrcweir class ScDBRangeRefreshedHint : public SfxHint
158cdf0e10cSrcweir {
159cdf0e10cSrcweir     ScImportParam   aParam;
160cdf0e10cSrcweir 
161cdf0e10cSrcweir public:
162cdf0e10cSrcweir                     TYPEINFO();
163cdf0e10cSrcweir                     ScDBRangeRefreshedHint( const ScImportParam& rP );
164cdf0e10cSrcweir                     ~ScDBRangeRefreshedHint();
165cdf0e10cSrcweir 
GetImportParam() const166cdf0e10cSrcweir     const ScImportParam&  GetImportParam() const    { return aParam; }
167cdf0e10cSrcweir };
168cdf0e10cSrcweir 
169cdf0e10cSrcweir class ScDataPilotModifiedHint : public SfxHint
170cdf0e10cSrcweir {
171cdf0e10cSrcweir     String          maName;
172cdf0e10cSrcweir 
173cdf0e10cSrcweir public:
174cdf0e10cSrcweir                     TYPEINFO();
175cdf0e10cSrcweir                     ScDataPilotModifiedHint( const String& rName );
176cdf0e10cSrcweir                     ~ScDataPilotModifiedHint();
177cdf0e10cSrcweir 
GetName() const178cdf0e10cSrcweir     const String&   GetName() const { return maName; }
179cdf0e10cSrcweir };
180cdf0e10cSrcweir 
181cdf0e10cSrcweir #endif
182