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 #pragma once
21 
22 #include "global.hxx"
23 #include "address.hxx"
24 #include <tools/solar.h>
25 #include <svl/hint.hxx>
26 
27 class SC_DLLPUBLIC ScPaintHint final : public SfxHint
28 {
31 
32 public:
33  ScPaintHint() = delete;
34  ScPaintHint( const ScRange& rRng, PaintPartFlags nPaint );
35  virtual ~ScPaintHint() override;
36 
37  SCCOL GetStartCol() const { return aRange.aStart.Col(); }
38  SCROW GetStartRow() const { return aRange.aStart.Row(); }
39  SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
40  SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
41  SCROW GetEndRow() const { return aRange.aEnd.Row(); }
42  SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
43  PaintPartFlags GetParts() const { return nParts; }
44 };
45 
46 class ScUpdateRefHint final : public SfxHint
47 {
53 
54 public:
55  ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
56  SCCOL nX, SCROW nY, SCTAB nZ );
57  virtual ~ScUpdateRefHint() override;
58 
59  UpdateRefMode GetMode() const { return eUpdateRefMode; }
60  const ScRange& GetRange() const { return aRange; }
61  SCCOL GetDx() const { return nDx; }
62  SCROW GetDy() const { return nDy; }
63  SCTAB GetDz() const { return nDz; }
64 };
65 
67 enum class ScLinkRefType {
68  NONE, SHEET, AREA, DDE
69 };
70 
71 class ScLinkRefreshedHint final : public SfxHint
72 {
74  OUString aUrl; // used for sheet links
75  OUString aDdeAppl; // used for dde links:
76  OUString aDdeTopic;
77  OUString aDdeItem;
78  ScAddress aDestPos; // used to identify area links
80 
81 public:
83  virtual ~ScLinkRefreshedHint() override;
84 
85  void SetSheetLink( const OUString& rSourceUrl );
86  void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI );
87  void SetAreaLink( const ScAddress& rPos );
88 
89  ScLinkRefType GetLinkType() const { return nLinkType; }
90  const OUString& GetUrl() const { return aUrl; }
91  const OUString& GetDdeAppl() const { return aDdeAppl; }
92  const OUString& GetDdeTopic() const { return aDdeTopic; }
93  const OUString& GetDdeItem() const { return aDdeItem; }
94  const ScAddress& GetDestPos() const { return aDestPos; }
95 };
96 
98 
99 class ScAutoStyleHint final : public SfxHint
100 {
102  OUString aStyle1;
103  OUString aStyle2;
105 
106 public:
107  ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
108  sal_uLong nT, const OUString& rSt2 );
109  virtual ~ScAutoStyleHint() override;
110 
111  const ScRange& GetRange() const { return aRange; }
112  const OUString& GetStyle1() const { return aStyle1; }
113  sal_uInt32 GetTimeout() const { return nTimeout; }
114  const OUString& GetStyle2() const { return aStyle2; }
115 };
116 
117 class ScDBRangeRefreshedHint final : public SfxHint
118 {
120 
121 public:
123  virtual ~ScDBRangeRefreshedHint() override;
124 
125  const ScImportParam& GetImportParam() const { return aParam; }
126 };
127 
128 class ScDataPilotModifiedHint final : public SfxHint
129 {
130  OUString maName;
131 
132 public:
133  ScDataPilotModifiedHint( const OUString& rName );
134  virtual ~ScDataPilotModifiedHint() override;
135 
136  const OUString& GetName() const { return maName; }
137 };
138 
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const ScImportParam & GetImportParam() const
Definition: hints.hxx:125
ScAddress aStart
Definition: address.hxx:499
virtual ~ScUpdateRefHint() override
Definition: hints.cxx:46
ScRange aRange
Definition: hints.hxx:29
ScImportParam aParam
Definition: hints.hxx:119
SCROW Row() const
Definition: address.hxx:261
OUString aDdeTopic
Definition: hints.hxx:76
OUString aUrl
Definition: hints.hxx:74
sal_uIntPtr sal_uLong
ScDBRangeRefreshedHint(const ScImportParam &rP)
Definition: hints.cxx:97
SCROW GetStartRow() const
Definition: hints.hxx:38
const OUString & GetName() const
Definition: hints.hxx:136
PaintPartFlags nParts
Definition: hints.hxx:30
ScAddress aEnd
Definition: address.hxx:500
const OUString & GetDdeItem() const
Definition: hints.hxx:93
ScAddress aDestPos
Definition: hints.hxx:78
OUString aStyle1
Definition: hints.hxx:102
ScLinkRefType nLinkType
Definition: hints.hxx:73
UpdateRefMode GetMode() const
Definition: hints.hxx:59
OUString aDdeAppl
Definition: hints.hxx:75
const ScRange & GetRange() const
Definition: hints.hxx:60
ScRange aRange
Definition: hints.hxx:101
SCTAB Tab() const
Definition: address.hxx:270
SCTAB GetEndTab() const
Definition: hints.hxx:42
void SetDdeLink(const OUString &rA, const OUString &rT, const OUString &rI)
Definition: hints.cxx:67
sal_uLong nTimeout
Definition: hints.hxx:104
OUString aDdeItem
Definition: hints.hxx:77
sal_Int16 SCCOL
Definition: types.hxx:21
SCTAB GetDz() const
Definition: hints.hxx:63
const OUString & GetUrl() const
Definition: hints.hxx:90
PaintPartFlags GetParts() const
Definition: hints.hxx:43
const OUString & GetStyle1() const
Definition: hints.hxx:112
ScRange aRange
Definition: hints.hxx:49
const ScAddress & GetDestPos() const
Definition: hints.hxx:94
const OUString & GetDdeTopic() const
Definition: hints.hxx:92
ScLinkRefType
move ScLinkRefreshedHint to a different file?
Definition: hints.hxx:67
ScLinkRefType GetLinkType() const
Definition: hints.hxx:89
virtual ~ScAutoStyleHint() override
Definition: hints.cxx:93
SCCOL Col() const
Definition: address.hxx:266
SCCOL GetEndCol() const
Definition: hints.hxx:40
void SetAreaLink(const ScAddress &rPos)
Definition: hints.cxx:76
UpdateRefMode
Definition: global.hxx:309
ScAutoStyleHint(const ScRange &rR, const OUString &rSt1, sal_uLong nT, const OUString &rSt2)
Definition: hints.cxx:84
sal_Int32 SCROW
Definition: types.hxx:17
ScUpdateRefHint(UpdateRefMode eMode, const ScRange &rR, SCCOL nX, SCROW nY, SCTAB nZ)
Definition: hints.cxx:36
SCROW GetEndRow() const
Definition: hints.hxx:41
const ScRange & GetRange() const
Definition: hints.hxx:111
void SetSheetLink(const OUString &rSourceUrl)
Definition: hints.cxx:61
ScLinkRefreshedHint()
also use source data for area links?
Definition: hints.cxx:52
SCCOL GetDx() const
Definition: hints.hxx:61
ScDataPilotModifiedHint(const OUString &rName)
Definition: hints.cxx:105
virtual ~ScDBRangeRefreshedHint() override
Definition: hints.cxx:101
const OUString & GetDdeAppl() const
Definition: hints.hxx:91
PaintPartFlags
Definition: global.hxx:118
UpdateRefMode eUpdateRefMode
Definition: hints.hxx:48
virtual ~ScDataPilotModifiedHint() override
Definition: hints.cxx:109
sal_uInt32 GetTimeout() const
Definition: hints.hxx:113
move ScAutoStyleHint to a different file?
Definition: hints.hxx:99
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
const OUString & GetStyle2() const
Definition: hints.hxx:114
virtual ~ScLinkRefreshedHint() override
Definition: hints.cxx:57
SCCOL GetStartCol() const
Definition: hints.hxx:37
OUString aStyle2
Definition: hints.hxx:103
sal_Int16 SCTAB
Definition: types.hxx:22
SCROW GetDy() const
Definition: hints.hxx:62
SCTAB GetStartTab() const
Definition: hints.hxx:39