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 #include <editeng/borderline.hxx>
22 #include <tabvwsh.hxx>
23 #include <document.hxx>
25 void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine
* pLine
)
29 pCurFrameLine
.reset( new ::editeng::SvxBorderLine( &pLine
->GetColor(),
31 pLine
->GetBorderLineStyle() ) );
34 pCurFrameLine
.reset();
37 bool ScTabViewShell::HasSelection( bool bText
) const
40 ScViewData
& rData
= const_cast<ScViewData
&>(GetViewData());
43 // Content contained: Count2 >= 1
44 ScDocument
& rDoc
= rData
.GetDocument();
45 ScMarkData
& rMark
= rData
.GetMarkData();
46 ScAddress
aCursor( rData
.GetCurX(), rData
.GetCurY(), rData
.GetTabNo() );
48 if ( rDoc
.GetSelectionFunction( SUBTOTAL_FUNC_CNT2
, aCursor
, rMark
, fVal
) )
49 bHas
= ( fVal
> 0.5 );
54 ScMarkType eMarkType
= rData
.GetSimpleArea( aRange
);
55 if ( eMarkType
== SC_MARK_SIMPLE
)
56 bHas
= ( aRange
.aStart
!= aRange
.aEnd
); // more than 1 cell
58 bHas
= true; // multiple selection or filtered
63 void ScTabViewShell::UIDeactivated( SfxInPlaceClient
* pClient
)
65 ClearHighlightRanges();
67 // Move in the ViewShell should really be called from Sfx, when the
68 // frame window is moved due to different toolboxes or other things
69 // (to not move painted objects by mistake, #56515#).
70 // this mechanism does however not work at the moment, that is why this
71 // call is here (in Move it is checked if the position has really changed).
73 SfxViewShell::UIDeactivated( pClient
);
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */