LibreOffice Module sc (master)  1
hints.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SC_INC_HINTS_HXX
21 #define INCLUDED_SC_INC_HINTS_HXX
22 
23 #include "global.hxx"
24 #include "address.hxx"
25 #include <tools/solar.h>
26 #include <svl/hint.hxx>
27 
28 class SC_DLLPUBLIC ScPaintHint final : public SfxHint
29 {
32  bool bPrint; // flag indicating whether print/preview if affected
33 
34 public:
35  ScPaintHint() = delete;
36  ScPaintHint( const ScRange& rRng, PaintPartFlags nPaint );
37  virtual ~ScPaintHint() override;
38 
39  void SetPrintFlag(bool bSet) { bPrint = bSet; }
40  SCCOL GetStartCol() const { return aRange.aStart.Col(); }
41  SCROW GetStartRow() const { return aRange.aStart.Row(); }
42  SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
43  SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
44  SCROW GetEndRow() const { return aRange.aEnd.Row(); }
45  SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
46  PaintPartFlags GetParts() const { return nParts; }
47  bool GetPrintFlag() const { return bPrint; }
48 };
49 
50 class ScUpdateRefHint final : public SfxHint
51 {
57 
58 public:
59  ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
60  SCCOL nX, SCROW nY, SCTAB nZ );
61  virtual ~ScUpdateRefHint() override;
62 
63  UpdateRefMode GetMode() const { return eUpdateRefMode; }
64  const ScRange& GetRange() const { return aRange; }
65  SCCOL GetDx() const { return nDx; }
66  SCROW GetDy() const { return nDy; }
67  SCTAB GetDz() const { return nDz; }
68 };
69 
71 enum class ScLinkRefType {
72  NONE, SHEET, AREA, DDE
73 };
74 
75 class ScLinkRefreshedHint final : public SfxHint
76 {
78  OUString aUrl; // used for sheet links
79  OUString aDdeAppl; // used for dde links:
80  OUString aDdeTopic;
81  OUString aDdeItem;
82  ScAddress aDestPos; // used to identify area links
84 
85 public:
87  virtual ~ScLinkRefreshedHint() override;
88 
89  void SetSheetLink( const OUString& rSourceUrl );
90  void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI );
91  void SetAreaLink( const ScAddress& rPos );
92 
93  ScLinkRefType GetLinkType() const { return nLinkType; }
94  const OUString& GetUrl() const { return aUrl; }
95  const OUString& GetDdeAppl() const { return aDdeAppl; }
96  const OUString& GetDdeTopic() const { return aDdeTopic; }
97  const OUString& GetDdeItem() const { return aDdeItem; }
98  const ScAddress& GetDestPos() const { return aDestPos; }
99 };
100 
102 
103 class ScAutoStyleHint final : public SfxHint
104 {
106  OUString aStyle1;
107  OUString aStyle2;
109 
110 public:
111  ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
112  sal_uLong nT, const OUString& rSt2 );
113  virtual ~ScAutoStyleHint() override;
114 
115  const ScRange& GetRange() const { return aRange; }
116  const OUString& GetStyle1() const { return aStyle1; }
117  sal_uInt32 GetTimeout() const { return nTimeout; }
118  const OUString& GetStyle2() const { return aStyle2; }
119 };
120 
121 class ScDBRangeRefreshedHint final : public SfxHint
122 {
124 
125 public:
127  virtual ~ScDBRangeRefreshedHint() override;
128 
129  const ScImportParam& GetImportParam() const { return aParam; }
130 };
131 
132 class ScDataPilotModifiedHint final : public SfxHint
133 {
134  OUString maName;
135 
136 public:
137  ScDataPilotModifiedHint( const OUString& rName );
138  virtual ~ScDataPilotModifiedHint() override;
139 
140  const OUString& GetName() const { return maName; }
141 };
142 
143 #endif
144 
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const ScImportParam & GetImportParam() const
Definition: hints.hxx:129
ScAddress aStart
Definition: address.hxx:500
bool bPrint
Definition: hints.hxx:32
void SetPrintFlag(bool bSet)
Definition: hints.hxx:39
virtual ~ScUpdateRefHint() override
Definition: hints.cxx:47
ScRange aRange
Definition: hints.hxx:30
ScImportParam aParam
Definition: hints.hxx:123
SCROW Row() const
Definition: address.hxx:262
OUString aDdeTopic
Definition: hints.hxx:80
OUString aUrl
Definition: hints.hxx:78
sal_uIntPtr sal_uLong
ScDBRangeRefreshedHint(const ScImportParam &rP)
Definition: hints.cxx:98
SCROW GetStartRow() const
Definition: hints.hxx:41
const OUString & GetName() const
Definition: hints.hxx:140
PaintPartFlags nParts
Definition: hints.hxx:31
ScAddress aEnd
Definition: address.hxx:501
const OUString & GetDdeItem() const
Definition: hints.hxx:97
ScAddress aDestPos
Definition: hints.hxx:82
OUString aStyle1
Definition: hints.hxx:106
ScLinkRefType nLinkType
Definition: hints.hxx:77
UpdateRefMode GetMode() const
Definition: hints.hxx:63
OUString aDdeAppl
Definition: hints.hxx:79
const ScRange & GetRange() const
Definition: hints.hxx:64
ScRange aRange
Definition: hints.hxx:105
SCTAB Tab() const
Definition: address.hxx:271
SCTAB GetEndTab() const
Definition: hints.hxx:45
void SetDdeLink(const OUString &rA, const OUString &rT, const OUString &rI)
Definition: hints.cxx:68
sal_uLong nTimeout
Definition: hints.hxx:108
OUString aDdeItem
Definition: hints.hxx:81
sal_Int16 SCCOL
Definition: types.hxx:22
SCTAB GetDz() const
Definition: hints.hxx:67
const OUString & GetUrl() const
Definition: hints.hxx:94
PaintPartFlags GetParts() const
Definition: hints.hxx:46
const OUString & GetStyle1() const
Definition: hints.hxx:116
ScRange aRange
Definition: hints.hxx:53
const ScAddress & GetDestPos() const
Definition: hints.hxx:98
const OUString & GetDdeTopic() const
Definition: hints.hxx:96
ScLinkRefType
move ScLinkRefreshedHint to a different file?
Definition: hints.hxx:71
ScLinkRefType GetLinkType() const
Definition: hints.hxx:93
virtual ~ScAutoStyleHint() override
Definition: hints.cxx:94
SCCOL Col() const
Definition: address.hxx:267
SCCOL GetEndCol() const
Definition: hints.hxx:43
void SetAreaLink(const ScAddress &rPos)
Definition: hints.cxx:77
UpdateRefMode
Definition: global.hxx:311
ScAutoStyleHint(const ScRange &rR, const OUString &rSt1, sal_uLong nT, const OUString &rSt2)
Definition: hints.cxx:85
sal_Int32 SCROW
Definition: types.hxx:18
ScUpdateRefHint(UpdateRefMode eMode, const ScRange &rR, SCCOL nX, SCROW nY, SCTAB nZ)
Definition: hints.cxx:37
SCROW GetEndRow() const
Definition: hints.hxx:44
bool GetPrintFlag() const
Definition: hints.hxx:47
const ScRange & GetRange() const
Definition: hints.hxx:115
void SetSheetLink(const OUString &rSourceUrl)
Definition: hints.cxx:62
ScLinkRefreshedHint()
also use source data for area links?
Definition: hints.cxx:53
SCCOL GetDx() const
Definition: hints.hxx:65
ScDataPilotModifiedHint(const OUString &rName)
Definition: hints.cxx:106
virtual ~ScDBRangeRefreshedHint() override
Definition: hints.cxx:102
const OUString & GetDdeAppl() const
Definition: hints.hxx:95
PaintPartFlags
Definition: global.hxx:120
UpdateRefMode eUpdateRefMode
Definition: hints.hxx:52
virtual ~ScDataPilotModifiedHint() override
Definition: hints.cxx:110
sal_uInt32 GetTimeout() const
Definition: hints.hxx:117
move ScAutoStyleHint to a different file?
Definition: hints.hxx:103
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
const OUString & GetStyle2() const
Definition: hints.hxx:118
virtual ~ScLinkRefreshedHint() override
Definition: hints.cxx:58
SCCOL GetStartCol() const
Definition: hints.hxx:40
OUString aStyle2
Definition: hints.hxx:107
sal_Int16 SCTAB
Definition: types.hxx:23
SCROW GetDy() const
Definition: hints.hxx:66
SCTAB GetStartTab() const
Definition: hints.hxx:42