LibreOffice Module sc (master)
1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
sc
inc
tablink.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_TABLINK_HXX
21
#define INCLUDED_SC_INC_TABLINK_HXX
22
23
#include "
scdllapi.h
"
24
#include "
refreshtimer.hxx
"
25
#include <
sfx2/lnkbase.hxx
>
26
27
#include <
sfx2/objsh.hxx
>
28
#include <memory>
29
30
class
ScDocShell
;
31
struct
TableLink_Impl
;
32
33
namespace
weld
{
class
Window
; }
34
35
class
ScTableLink
final :
public
::sfx2::SvBaseLink
,
public
ScRefreshTimer
36
{
37
private
:
38
std::unique_ptr<TableLink_Impl>
pImpl
;
39
OUString
aFileName
;
40
OUString
aFilterName
;
41
OUString
aOptions
;
42
bool
bInCreate
:1;
43
bool
bInEdit
:1;
44
bool
bAddUndo
:1;
45
46
public
:
47
ScTableLink
(
ScDocShell
* pDocSh,
const
OUString& rFile,
48
const
OUString& rFilter,
const
OUString& rOpt,
sal_uLong
nRefresh );
49
ScTableLink
(
SfxObjectShell
* pShell,
const
OUString& rFile,
50
const
OUString& rFilter,
const
OUString& rOpt,
sal_uLong
nRefresh );
51
virtual
~ScTableLink
()
override
;
52
virtual
void
Closed
()
override
;
53
virtual ::sfx2::SvBaseLink::UpdateResult
DataChanged
(
54
const
OUString& rMimeType,
const
css::uno::Any & rValue )
override
;
55
56
virtual
void
Edit
(
weld::Window
*,
const
Link<SvBaseLink&,void>
& rEndEditHdl)
override
;
57
58
bool
Refresh
(
const
OUString& rNewFile,
const
OUString& rNewFilter,
59
const
OUString* pNewOptions
/* = NULL */
,
sal_uLong
nNewRefresh );
60
void
SetInCreate
(
bool
bSet) {
bInCreate
= bSet; }
61
void
SetAddUndo
(
bool
bSet) {
bAddUndo
= bSet; }
62
63
const
OUString&
GetFileName
()
const
{
return
aFileName
; }
64
const
OUString&
GetFilterName
()
const
{
return
aFilterName
; }
65
const
OUString&
GetOptions
()
const
{
return
aOptions
; }
66
67
bool
IsUsed
()
const
;
68
69
DECL_LINK
( RefreshHdl,
Timer
*,
void
);
70
DECL_LINK
( TableEndEditHdl, ::
sfx2::SvBaseLink
&,
void
);
71
};
72
73
class
ScDocument
;
74
class
SfxMedium
;
75
class
SfxFilter
;
76
77
class
SC_DLLPUBLIC
ScDocumentLoader
78
{
79
private
:
80
ScDocShell
*
pDocShell
;
81
SfxObjectShellRef
aRef
;
82
SfxMedium
*
pMedium
;
83
84
public
:
85
ScDocumentLoader
(
const
OUString& rFileName, OUString& rFilterName, OUString& rOptions,
86
sal_uInt32 nRekCnt = 0,
weld::Window
* pInteractionParent =
nullptr
,
87
css::uno::Reference<css::io::XInputStream> xInputStream
88
= css::uno::Reference<css::io::XInputStream>());
89
~
ScDocumentLoader
();
90
ScDocument
* GetDocument();
91
ScDocShell
*
GetDocShell
() {
return
pDocShell; }
92
bool
IsError()
const
;
93
OUString
GetTitle
()
const
;
94
95
void
ReleaseDocRef();
// without calling DoClose
96
100
static
SfxMedium
* CreateMedium(
const
OUString& rFileName, std::shared_ptr<const SfxFilter>
const
& pFilter,
101
const
OUString& rOptions,
weld::Window
* pInteractionParent =
nullptr
);
102
103
static
OUString GetOptions(
const
SfxMedium
& rMedium );
104
111
static
bool
GetFilterName(
const
OUString& rFileName,
112
OUString& rFilter, OUString& rOptions,
113
bool
bWithContent,
bool
bWithInteraction );
114
115
static
void
RemoveAppPrefix( OUString& rFilterName );
116
};
117
118
#endif
119
120
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScTableLink::Refresh
bool Refresh(const OUString &rNewFile, const OUString &rNewFilter, const OUString *pNewOptions, sal_uLong nNewRefresh)
Definition:
tablink.cxx:161
ScTableLink::bAddUndo
bool bAddUndo
Definition:
tablink.hxx:44
ScRefreshTimer
Definition:
refreshtimer.hxx:43
ScTableLink::aOptions
OUString aOptions
Definition:
tablink.hxx:41
sal_uLong
sal_uIntPtr sal_uLong
SfxFilter
ScTableLink::GetOptions
const OUString & GetOptions() const
Definition:
tablink.hxx:65
ScTableLink::ScTableLink
ScTableLink(ScDocShell *pDocSh, const OUString &rFile, const OUString &rFilter, const OUString &rOpt, sal_uLong nRefresh)
Definition:
tablink.cxx:64
scdllapi.h
weld::Window
ScTableLink::IsUsed
bool IsUsed() const
Definition:
tablink.cxx:156
GetTitle
UNOTOOLS_DLLPUBLIC bool GetTitle(OUString const &url, OUString *title)
ScDocumentLoader::GetDocShell
ScDocShell * GetDocShell()
Definition:
tablink.hxx:91
ScTableLink::aFileName
OUString aFileName
Definition:
tablink.hxx:39
ScTableLink::bInEdit
bool bInEdit
Definition:
tablink.hxx:43
Link
ScTableLink::DECL_LINK
DECL_LINK(RefreshHdl, Timer *, void)
ScTableLink::aFilterName
OUString aFilterName
Definition:
tablink.hxx:40
SfxObjectShell
ScTableLink::GetFileName
const OUString & GetFileName() const
Definition:
tablink.hxx:63
ScTableLink::bInCreate
bool bInCreate
Definition:
tablink.hxx:42
EViewType::Window
ScTableLink::Edit
virtual void Edit(weld::Window *, const Link< SvBaseLink &, void > &rEndEditHdl) override
Definition:
tablink.cxx:110
ScTableLink::GetFilterName
const OUString & GetFilterName() const
Definition:
tablink.hxx:64
ScTableLink
Definition:
tablink.hxx:35
ScDocumentLoader::pMedium
SfxMedium * pMedium
Definition:
tablink.hxx:82
ScDocumentLoader::aRef
SfxObjectShellRef aRef
Definition:
tablink.hxx:81
lnkbase.hxx
ScDocShell
Definition:
docsh.hxx:79
ScDocumentLoader
Definition:
tablink.hxx:77
ScDocumentLoader::pDocShell
ScDocShell * pDocShell
Definition:
tablink.hxx:80
refreshtimer.hxx
sfx2::SvBaseLink
ScTableLink::SetInCreate
void SetInCreate(bool bSet)
Definition:
tablink.hxx:60
weld
objsh.hxx
ScTableLink::~ScTableLink
virtual ~ScTableLink() override
Definition:
tablink.cxx:98
tools::SvRef< SfxObjectShell >
SfxMedium
Timer
ScTableLink::pImpl
std::unique_ptr< TableLink_Impl > pImpl
Definition:
tablink.hxx:38
ScTableLink::Closed
virtual void Closed() override
Definition:
tablink.cxx:137
ScDocument
Definition:
document.hxx:312
TableLink_Impl
Definition:
tablink.cxx:55
SC_DLLPUBLIC
#define SC_DLLPUBLIC
Definition:
scdllapi.h:28
ScTableLink::DataChanged
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(const OUString &rMimeType, const css::uno::Any &rValue) override
Definition:
tablink.cxx:118
ScTableLink::SetAddUndo
void SetAddUndo(bool bSet)
Definition:
tablink.hxx:61
Generated on Thu Jan 21 2021 08:29:43 for LibreOffice Module sc (master) by
1.8.10