LibreOffice Module sw (master)  1
swbaslnk.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 #ifndef INCLUDED_SW_INC_SWBASLNK_HXX
20 #define INCLUDED_SW_INC_SWBASLNK_HXX
21 
22 #include <sfx2/lnkbase.hxx>
23 #include <tools/solar.h>
24 
25 class SwNode;
26 class SwContentNode;
27 
29 {
31  bool m_bNoDataFlag : 1;
32 
33 public:
34 
35  SwBaseLink( SfxLinkUpdateMode nMode, SotClipboardFormatId nFormat, SwContentNode* pNode = nullptr )
36  : ::sfx2::SvBaseLink( nMode, nFormat ), m_pContentNode( pNode ),
37  m_bNoDataFlag( false )
38  {}
39  virtual ~SwBaseLink() override;
40 
41  virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
42  const OUString& rMimeType, const css::uno::Any & rValue ) override;
43 
44  virtual void Closed() override;
45 
46  virtual const SwNode* GetAnchor() const;
47 
48  // For graphics only.
49  bool SwapIn( bool bWaitForData = false, bool bNativFormat = false );
50 
51  void Connect() { SvBaseLink::GetRealObject(); }
52 
53  // Only for graphics-links (for switching between DDE / Grf-link).
54  using SvBaseLink::SetObjType;
55 
56  bool IsRecursion( const SwBaseLink* pChkLnk ) const;
57  virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const;
58 
59  void SetNoDataFlag() { m_bNoDataFlag = true; }
60  bool ChkNoDataFlag() { const bool bRet = m_bNoDataFlag; m_bNoDataFlag = false; return bRet; }
61  bool IsNoDataFlag() const { return m_bNoDataFlag; }
62 };
63 
64 #endif
65 
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uIntPtr sal_uLong
SotClipboardFormatId
SfxLinkUpdateMode
Base class of the Writer document model elements.
Definition: node.hxx:79