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 "scitems.hxx"
21 #include <editeng/boxitem.hxx>
23 #include "tabvwsh.hxx"
24 #include "document.hxx"
26 void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine
* pLine
)
31 pCurFrameLine
= new ::editeng::SvxBorderLine( &pLine
->GetColor(),
33 pLine
->GetBorderLineStyle() );
35 else if ( pCurFrameLine
)
42 bool ScTabViewShell::HasSelection( bool bText
) const
45 ScViewData
* pData
= const_cast<ScViewData
*>(&GetViewData()); // const weggecasted
48 // Text enthalten: Anzahl2 >= 1
49 ScDocument
* pDoc
= pData
->GetDocument();
50 ScMarkData
& rMark
= pData
->GetMarkData();
51 ScAddress
aCursor( pData
->GetCurX(), pData
->GetCurY(), pData
->GetTabNo() );
53 if ( pDoc
->GetSelectionFunction( SUBTOTAL_FUNC_CNT2
, aCursor
, rMark
, fVal
) )
54 bHas
= ( fVal
> 0.5 );
59 ScMarkType eMarkType
= pData
->GetSimpleArea( aRange
);
60 if ( eMarkType
== SC_MARK_SIMPLE
)
61 bHas
= ( aRange
.aStart
!= aRange
.aEnd
); // more than 1 cell
63 bHas
= true; // multiple selection or filtered
68 void ScTabViewShell::UIDeactivated( SfxInPlaceClient
* pClient
)
70 ClearHighlightRanges();
72 // Move an der ViewShell soll eigentlich vom Sfx gerufen werden, wenn sich
73 // das Frame-Window wegen unterschiedlicher Toolboxen o.ae. verschiebt
74 // (um nicht aus Versehen z.B. Zeichenobjekte zu verschieben, #56515#).
75 // Dieser Mechanismus funktioniert aber momentan nicht, darum hier der Aufruf
76 // per Hand (im Move wird verglichen, ob die Position wirklich geaendert ist).
78 SfxViewShell::UIDeactivated( pClient
);
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */