1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_INC_HINTS_HXX
21 #define INCLUDED_SC_INC_HINTS_HXX
24 #include "address.hxx"
25 #include <svl/hint.hxx>
27 class SC_DLLPUBLIC ScPaintHint
: public SfxHint
30 PaintPartFlags nParts
;
31 bool bPrint
; // flag indicating whether print/preview if affected
34 ScPaintHint() = delete;
35 ScPaintHint( const ScRange
& rRng
, PaintPartFlags nPaint
);
36 virtual ~ScPaintHint() override
;
38 void SetPrintFlag(bool bSet
) { bPrint
= bSet
; }
39 SCCOL
GetStartCol() const { return aRange
.aStart
.Col(); }
40 SCROW
GetStartRow() const { return aRange
.aStart
.Row(); }
41 SCTAB
GetStartTab() const { return aRange
.aStart
.Tab(); }
42 SCCOL
GetEndCol() const { return aRange
.aEnd
.Col(); }
43 SCROW
GetEndRow() const { return aRange
.aEnd
.Row(); }
44 SCTAB
GetEndTab() const { return aRange
.aEnd
.Tab(); }
45 PaintPartFlags
GetParts() const { return nParts
; }
46 bool GetPrintFlag() const { return bPrint
; }
49 class ScUpdateRefHint
: public SfxHint
51 UpdateRefMode eUpdateRefMode
;
58 ScUpdateRefHint( UpdateRefMode eMode
, const ScRange
& rR
,
59 SCCOL nX
, SCROW nY
, SCTAB nZ
);
60 virtual ~ScUpdateRefHint() override
;
62 UpdateRefMode
GetMode() const { return eUpdateRefMode
; }
63 const ScRange
& GetRange() const { return aRange
; }
64 SCCOL
GetDx() const { return nDx
; }
65 SCROW
GetDy() const { return nDy
; }
66 SCTAB
GetDz() const { return nDz
; }
69 //! move ScLinkRefreshedHint to a different file?
70 enum class ScLinkRefType
{
71 NONE
, SHEET
, AREA
, DDE
74 class ScLinkRefreshedHint
: public SfxHint
76 ScLinkRefType nLinkType
;
77 OUString aUrl
; // used for sheet links
78 OUString aDdeAppl
; // used for dde links:
81 ScAddress aDestPos
; // used to identify area links
82 //! also use source data for area links?
85 ScLinkRefreshedHint();
86 virtual ~ScLinkRefreshedHint() override
;
88 void SetSheetLink( const OUString
& rSourceUrl
);
89 void SetDdeLink( const OUString
& rA
, const OUString
& rT
, const OUString
& rI
);
90 void SetAreaLink( const ScAddress
& rPos
);
92 ScLinkRefType
GetLinkType() const { return nLinkType
; }
93 const OUString
& GetUrl() const { return aUrl
; }
94 const OUString
& GetDdeAppl() const { return aDdeAppl
; }
95 const OUString
& GetDdeTopic() const { return aDdeTopic
; }
96 const OUString
& GetDdeItem() const { return aDdeItem
; }
97 const ScAddress
& GetDestPos() const { return aDestPos
; }
100 //! move ScAutoStyleHint to a different file?
102 class ScAutoStyleHint
: public SfxHint
110 ScAutoStyleHint( const ScRange
& rR
, const OUString
& rSt1
,
111 sal_uLong nT
, const OUString
& rSt2
);
112 virtual ~ScAutoStyleHint() override
;
114 const ScRange
& GetRange() const { return aRange
; }
115 const OUString
& GetStyle1() const { return aStyle1
; }
116 sal_uInt32
GetTimeout() const { return nTimeout
; }
117 const OUString
& GetStyle2() const { return aStyle2
; }
120 class ScDBRangeRefreshedHint
: public SfxHint
122 ScImportParam aParam
;
125 ScDBRangeRefreshedHint( const ScImportParam
& rP
);
126 virtual ~ScDBRangeRefreshedHint() override
;
128 const ScImportParam
& GetImportParam() const { return aParam
; }
131 class ScDataPilotModifiedHint
: public SfxHint
136 ScDataPilotModifiedHint( const OUString
& rName
);
137 virtual ~ScDataPilotModifiedHint() override
;
139 const OUString
& GetName() const { return maName
; }
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */