loplugin:unusedfields in sd
Change-Id: I7f89e038f3d9bd0da658c7d3b8faec23d8a593db Reviewed-on: https://gerrit.libreoffice.org/40257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1058,24 +1058,6 @@ sd/source/filter/eppt/epptbase.hxx:279
|
||||
PPTExParaSheet maParaLevel struct PPTExParaLevel [5]
|
||||
sd/source/filter/ppt/propread.hxx:142
|
||||
PropRead mApplicationCLSID sal_uInt8 [16]
|
||||
sd/source/ui/animations/CategoryListBox.hxx:43
|
||||
sd::CategoryListBox maDoubleClickHdl Link<class sd::CategoryListBox &, void>
|
||||
sd/source/ui/dlg/filedlg.cxx:55
|
||||
SdFileDialog_Imp mbUsableSelection _Bool
|
||||
sd/source/ui/dlg/RemoteDialogClientBox.hxx:91
|
||||
sd::ClientBox m_bInCheckMode _Bool
|
||||
sd/source/ui/inc/docprev.hxx:41
|
||||
SdDocPreviewWin aClickHdl Link<class SdDocPreviewWin &, void>
|
||||
sd/source/ui/inc/unomodel.hxx:110
|
||||
SdXImpressDocument mxStyleFamilies css::uno::WeakReference<css::container::XNameAccess>
|
||||
sd/source/ui/inc/unomodel.hxx:111
|
||||
SdXImpressDocument mxPresentation css::uno::WeakReference<css::presentation::XPresentation>
|
||||
sd/source/ui/inc/unosrch.hxx:46
|
||||
SdUnoSearchReplaceShape mpShape css::drawing::XShape *
|
||||
sd/source/ui/presenter/PresenterCanvas.hxx:306
|
||||
sd::presenter::PresenterCanvas maClipRectangle css::awt::Rectangle
|
||||
sd/source/ui/sidebar/LayoutMenu.hxx:128
|
||||
sd::sidebar::LayoutMenu mbUseOwnScrollBar _Bool
|
||||
sd/source/ui/sidebar/MasterPageContainer.cxx:148
|
||||
sd::sidebar::MasterPageContainer::Implementation maLargePreviewBeingCreated class Image
|
||||
sd/source/ui/sidebar/MasterPageContainer.cxx:149
|
||||
@@ -1084,12 +1066,8 @@ sd/source/ui/sidebar/MasterPageContainer.cxx:154
|
||||
sd::sidebar::MasterPageContainer::Implementation maLargePreviewNotAvailable class Image
|
||||
sd/source/ui/sidebar/MasterPageContainer.cxx:155
|
||||
sd::sidebar::MasterPageContainer::Implementation maSmallPreviewNotAvailable class Image
|
||||
sd/source/ui/sidebar/PanelBase.hxx:62
|
||||
sd::sidebar::PanelBase mxSidebar css::uno::Reference<css::ui::XSidebar>
|
||||
sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx:97
|
||||
sd::slidesorter::controller::Animator maElapsedTime ::canvas::tools::ElapsedTime
|
||||
sd/source/ui/view/ViewShellManager.cxx:180
|
||||
sd::ViewShellManager::Implementation mbKeepMainViewShellOnTop _Bool
|
||||
sdext/source/pdfimport/pdfparse/pdfentries.cxx:1018
|
||||
pdfparse::PDFFileImplData m_aOEntry sal_uInt8 [32]
|
||||
sdext/source/pdfimport/pdfparse/pdfentries.cxx:1019
|
||||
|
@@ -81,11 +81,7 @@ IMPL_LINK_NOARG(CategoryListBox, implDoubleClickHdl, ListBox&, void)
|
||||
void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
{
|
||||
ReleaseMouse();
|
||||
if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) )
|
||||
{
|
||||
maDoubleClickHdl.Call( *this );
|
||||
}
|
||||
else
|
||||
if (!( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) ))
|
||||
{
|
||||
ListBox::MouseButtonUp( rMEvt );
|
||||
}
|
||||
|
@@ -39,8 +39,6 @@ public:
|
||||
|
||||
private:
|
||||
virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
|
||||
|
||||
Link<CategoryListBox&,void> maDoubleClickHdl;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -64,7 +64,6 @@ ClientBox::ClientBox( vcl::Window* pParent, WinBits nStyle ) :
|
||||
m_bHasScrollBar( false ),
|
||||
m_bHasActive( false ),
|
||||
m_bNeedsRecalc( true ),
|
||||
m_bInCheckMode( false ),
|
||||
m_bAdjustActive( false ),
|
||||
m_bInDelete( false ),
|
||||
m_nActive( 0 ),
|
||||
@@ -219,9 +218,6 @@ void ClientBox::selectEntry( const long nPos )
|
||||
//the whole painting operation. See issue i86993
|
||||
::osl::ClearableMutexGuard guard(m_entriesMutex);
|
||||
|
||||
if ( m_bInCheckMode )
|
||||
return;
|
||||
|
||||
if ( m_bHasActive )
|
||||
{
|
||||
if ( nPos == m_nActive )
|
||||
@@ -633,18 +629,11 @@ void ClientBox::addEntry( const std::shared_ptr<ClientInfo>& pClientInfo )
|
||||
}
|
||||
else
|
||||
{
|
||||
// if ( !FindEntryPos( xEntry, 0, m_vEntries.size()-1, nPos ) )
|
||||
// {
|
||||
m_vEntries.insert( m_vEntries.begin()+nPos, xEntry );
|
||||
// }
|
||||
// else if ( !m_bInCheckMode )
|
||||
// {
|
||||
// OSL_FAIL( "ClientBox::addEntry(): Will not add duplicate entries" );
|
||||
// }
|
||||
}
|
||||
|
||||
//access to m_nActive must be guarded
|
||||
if ( !m_bInCheckMode && m_bHasActive && ( m_nActive >= nPos ) )
|
||||
if ( m_bHasActive && ( m_nActive >= nPos ) )
|
||||
m_nActive += 1;
|
||||
|
||||
guard.clear();
|
||||
|
@@ -88,7 +88,6 @@ class ClientBox : public Control
|
||||
bool m_bHasScrollBar : 1;
|
||||
bool m_bHasActive : 1;
|
||||
bool m_bNeedsRecalc : 1;
|
||||
bool m_bInCheckMode : 1;
|
||||
bool m_bAdjustActive : 1;
|
||||
bool m_bInDelete : 1;
|
||||
//Must be guarded together with m_vEntries to ensure a valid index at all times.
|
||||
|
@@ -143,23 +143,6 @@ void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const ::too
|
||||
}
|
||||
}
|
||||
|
||||
bool SdDocPreviewWin::EventNotify( NotifyEvent& rNEvt )
|
||||
{
|
||||
if ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN )
|
||||
{
|
||||
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
|
||||
if ( pMEvt->IsLeft() )
|
||||
{
|
||||
if( rNEvt.GetWindow() == this )
|
||||
{
|
||||
aClickHdl.Call(*this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Control::EventNotify(rNEvt);
|
||||
}
|
||||
|
||||
void SdDocPreviewWin::updateViewSettings()
|
||||
{
|
||||
SvtAccessibilityOptions aAccOptions;
|
||||
|
@@ -52,12 +52,9 @@ private:
|
||||
|
||||
css::uno::Reference< css::media::XPlayer > mxPlayer;
|
||||
ImplSVEvent * mnPlaySoundEvent;
|
||||
bool mbUsableSelection;
|
||||
bool mbLabelPlaying;
|
||||
Idle maUpdateIdle;
|
||||
|
||||
void CheckSelectionState();
|
||||
|
||||
DECL_LINK( PlayMusicHdl, void *, void );
|
||||
DECL_LINK( IsMusicStoppedHdl, Timer *, void );
|
||||
|
||||
@@ -65,8 +62,6 @@ public:
|
||||
explicit SdFileDialog_Imp();
|
||||
virtual ~SdFileDialog_Imp() override;
|
||||
|
||||
ErrCode Execute();
|
||||
|
||||
// overwritten from FileDialogHelper, to receive user feedback
|
||||
virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ) override;
|
||||
};
|
||||
@@ -77,10 +72,6 @@ void SAL_CALL SdFileDialog_Imp::ControlStateChanged( const css::ui::dialogs::Fil
|
||||
|
||||
switch( aEvent.ElementId )
|
||||
{
|
||||
case css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER:
|
||||
CheckSelectionState();
|
||||
break;
|
||||
|
||||
case css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY:
|
||||
if( mxControlAccess.is() )
|
||||
{
|
||||
@@ -183,33 +174,9 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void)
|
||||
}
|
||||
}
|
||||
|
||||
// check whether to disable the "selection" checkbox
|
||||
void SdFileDialog_Imp::CheckSelectionState()
|
||||
{
|
||||
if( mbUsableSelection && mxControlAccess.is() )
|
||||
{
|
||||
OUString aCurrFilter( GetCurrentFilter() );
|
||||
|
||||
try
|
||||
{
|
||||
if( aCurrFilter.isEmpty() || ( aCurrFilter == SdResId( STR_EXPORT_HTML_NAME ) ) )
|
||||
mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, false );
|
||||
else
|
||||
mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, true );
|
||||
}
|
||||
catch (const css::lang::IllegalArgumentException&)
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
OSL_FAIL( "Cannot access \"selection\" checkbox" );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SdFileDialog_Imp::SdFileDialog_Imp() :
|
||||
FileDialogHelper( css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY ),
|
||||
mnPlaySoundEvent( nullptr ),
|
||||
mbUsableSelection( false ),
|
||||
mbLabelPlaying(false)
|
||||
{
|
||||
maUpdateIdle.SetInvokeHandler(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
|
||||
@@ -242,13 +209,6 @@ SdFileDialog_Imp::~SdFileDialog_Imp()
|
||||
Application::RemoveUserEvent( mnPlaySoundEvent );
|
||||
}
|
||||
|
||||
ErrCode SdFileDialog_Imp::Execute()
|
||||
{
|
||||
// make sure selection checkbox is disabled if HTML is current filter!
|
||||
CheckSelectionState();
|
||||
return FileDialogHelper::Execute();
|
||||
}
|
||||
|
||||
// ----------- SdOpenSoundFileDialog -----------------------
|
||||
|
||||
// these are simple forwarders
|
||||
|
@@ -38,7 +38,6 @@ namespace sd {
|
||||
class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
|
||||
{
|
||||
protected:
|
||||
Link<SdDocPreviewWin&,void> aClickHdl;
|
||||
Color maDocumentColor;
|
||||
rtl::Reference< sd::SlideShow > mxSlideShow;
|
||||
|
||||
@@ -59,8 +58,6 @@ public:
|
||||
virtual void dispose() override;
|
||||
virtual void Resize() override;
|
||||
|
||||
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
|
||||
|
||||
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
|
||||
|
||||
};
|
||||
|
@@ -107,8 +107,6 @@ private:
|
||||
css::uno::WeakReference< css::drawing::XDrawPages > mxMasterPagesAccess;
|
||||
css::uno::WeakReference< css::container::XNameAccess > mxLayerManager;
|
||||
css::uno::WeakReference< css::container::XNameContainer > mxCustomPresentationAccess;
|
||||
css::uno::WeakReference< css::container::XNameAccess > mxStyleFamilies;
|
||||
css::uno::WeakReference< css::presentation::XPresentation > mxPresentation;
|
||||
css::uno::WeakReference< css::i18n::XForbiddenCharacters > mxForbiddenCharacters;
|
||||
css::uno::Reference< css::container::XNameAccess > mxLinks;
|
||||
|
||||
|
@@ -43,7 +43,6 @@ class SdUnoSearchReplaceDescriptor;
|
||||
class SdUnoSearchReplaceShape : public css::util::XReplaceable
|
||||
{
|
||||
protected:
|
||||
css::drawing::XShape* mpShape;
|
||||
css::drawing::XDrawPage* mpPage;
|
||||
|
||||
css::uno::Reference< css::text::XTextRange > Search( const css::uno::Reference< css::text::XTextRange >& xText, SdUnoSearchReplaceDescriptor* pDescr ) throw();
|
||||
|
@@ -107,7 +107,6 @@ PresenterCanvas::PresenterCanvas (
|
||||
mxSharedWindow(rxSharedWindow),
|
||||
mxWindow(rxWindow),
|
||||
maOffset(),
|
||||
maClipRectangle(),
|
||||
mbOffsetUpdatePending(true)
|
||||
{
|
||||
if (mxWindow.is())
|
||||
@@ -589,22 +588,8 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind
|
||||
|
||||
// Get the bounding box of the window and create a range in the
|
||||
// coordinate system of the child window.
|
||||
::tools::Rectangle aLocalClip;
|
||||
if (maClipRectangle.Width <= 0 || maClipRectangle.Height <= 0)
|
||||
{
|
||||
// No clip rectangle has been set via SetClip by the pane.
|
||||
// Use the window extents instead.
|
||||
aLocalClip = pWindow->GetWindowExtentsRelative(pSharedWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use a previously given clip rectangle.
|
||||
aLocalClip = ::tools::Rectangle(
|
||||
maClipRectangle.X + rOffset.X,
|
||||
maClipRectangle.Y + rOffset.Y,
|
||||
maClipRectangle.X + maClipRectangle.Width + rOffset.X,
|
||||
maClipRectangle.Y + maClipRectangle.Height + rOffset.Y);
|
||||
}
|
||||
// Use the window extents.
|
||||
::tools::Rectangle aLocalClip = pWindow->GetWindowExtentsRelative(pSharedWindow);
|
||||
|
||||
// The local clip rectangle is used to clip the view state clipping
|
||||
// polygon.
|
||||
|
@@ -301,10 +301,6 @@ private:
|
||||
*/
|
||||
std::shared_ptr<CanvasUpdateRequester> m_pUpdateRequester;
|
||||
|
||||
/** The clip rectangle as given to SetClip().
|
||||
*/
|
||||
css::awt::Rectangle maClipRectangle;
|
||||
|
||||
/** When this flag is true (it is set to true after every call to
|
||||
updateScreen()) then the next call to MergeViewState updates the
|
||||
maOffset member. A possible optimization would set this flag only
|
||||
|
@@ -129,7 +129,6 @@ LayoutMenu::LayoutMenu (
|
||||
DragSourceHelper(this),
|
||||
DropTargetHelper(this),
|
||||
mrBase(rViewShellBase),
|
||||
mbUseOwnScrollBar(false),
|
||||
mxListener(nullptr),
|
||||
mbSelectionUpdatePending(true),
|
||||
mbIsMainViewChangePending(false),
|
||||
@@ -162,8 +161,6 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
|
||||
| WB_MENUSTYLEVALUESET
|
||||
| WB_NO_DIRECTSELECT
|
||||
);
|
||||
if (mbUseOwnScrollBar)
|
||||
SetStyle (GetStyle() | WB_VSCROLL);
|
||||
SetExtraSpacing(2);
|
||||
SetSelectHdl (LINK(this, LayoutMenu, ClickHandler));
|
||||
InvalidateContent();
|
||||
@@ -237,7 +234,7 @@ AutoLayout LayoutMenu::GetSelectedAutoLayout()
|
||||
ui::LayoutSize LayoutMenu::GetHeightForWidth (const sal_Int32 nWidth)
|
||||
{
|
||||
sal_Int32 nPreferredHeight = 200;
|
||||
if ( ! mbUseOwnScrollBar && GetItemCount()>0)
|
||||
if (GetItemCount()>0)
|
||||
{
|
||||
Image aImage = GetItemImage(GetItemId(0));
|
||||
Size aItemSize = CalcItemSizePixel (aImage.GetSizePixel());
|
||||
|
@@ -122,11 +122,6 @@ public:
|
||||
private:
|
||||
ViewShellBase& mrBase;
|
||||
|
||||
/** Do we use our own scroll bar or is viewport handling done by
|
||||
our parent?
|
||||
*/
|
||||
bool mbUseOwnScrollBar;
|
||||
|
||||
/** If we are asked for the preferred window size, then use this
|
||||
many columns for the calculation.
|
||||
*/
|
||||
|
@@ -26,7 +26,6 @@ PanelBase::PanelBase (
|
||||
ViewShellBase& rViewShellBase)
|
||||
: Control(pParentWindow),
|
||||
mpWrappedControl(nullptr),
|
||||
mxSidebar(),
|
||||
mrViewShellBase(rViewShellBase)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
@@ -69,8 +68,6 @@ bool PanelBase::ProvideWrappedControl()
|
||||
mpWrappedControl.reset(CreateWrappedControl(this, mrViewShellBase));
|
||||
if (mpWrappedControl)
|
||||
mpWrappedControl->Show();
|
||||
if (mxSidebar.is())
|
||||
mxSidebar->requestLayout();
|
||||
}
|
||||
return mpWrappedControl.get() != nullptr;
|
||||
}
|
||||
|
@@ -59,7 +59,6 @@ protected:
|
||||
ViewShellBase& rViewShellBase) = 0;
|
||||
|
||||
private:
|
||||
css::uno::Reference<css::ui::XSidebar> mxSidebar;
|
||||
ViewShellBase& mrViewShellBase;
|
||||
|
||||
bool ProvideWrappedControl();
|
||||
|
@@ -2679,25 +2679,6 @@ void SAL_CALL SdXImpressDocument::dispose()
|
||||
SfxBaseModel::dispose();
|
||||
mbDisposed = true;
|
||||
|
||||
uno::Reference< container::XNameAccess > xStyles(mxStyleFamilies);
|
||||
if( xStyles.is() )
|
||||
{
|
||||
uno::Reference< lang::XComponent > xComp( xStyles, uno::UNO_QUERY );
|
||||
if( xComp.is() )
|
||||
xComp->dispose();
|
||||
|
||||
xStyles = nullptr;
|
||||
}
|
||||
|
||||
uno::Reference< presentation::XPresentation > xPresentation( mxPresentation );
|
||||
if( xPresentation.is() )
|
||||
{
|
||||
uno::Reference< css::presentation::XPresentation2 > xPres( mpDoc->getPresentation().get() );
|
||||
uno::Reference< lang::XComponent > xPresComp( xPres, uno::UNO_QUERY );
|
||||
if( xPresComp.is() )
|
||||
xPresComp->dispose();
|
||||
}
|
||||
|
||||
uno::Reference< container::XNameAccess > xLinks( mxLinks );
|
||||
if( xLinks.is() )
|
||||
{
|
||||
|
@@ -88,8 +88,7 @@ public:
|
||||
*/
|
||||
|
||||
SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XDrawPage* pPage ) throw()
|
||||
: mpShape(nullptr)
|
||||
, mpPage(pPage)
|
||||
: mpPage(pPage)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -131,10 +130,6 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
|
||||
xShapes = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xShape = mpShape;
|
||||
}
|
||||
|
||||
while( xShape.is() )
|
||||
{
|
||||
@@ -231,10 +226,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
|
||||
xShapes = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xShape = mpShape;
|
||||
}
|
||||
|
||||
while( xShape.is() )
|
||||
{
|
||||
// find in xShape
|
||||
@@ -330,10 +322,6 @@ uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetCurrentShape() co
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( mpShape )
|
||||
{
|
||||
xShape = mpShape;
|
||||
}
|
||||
|
||||
return xShape;
|
||||
|
||||
|
@@ -58,7 +58,6 @@ public:
|
||||
explicit ShellDescriptor (ShellId nId);
|
||||
ShellDescriptor (const ShellDescriptor& rDescriptor);
|
||||
ShellDescriptor& operator= (const ShellDescriptor& rDescriptor);
|
||||
bool IsMainViewShell() const;
|
||||
vcl::Window* GetWindow() const;
|
||||
};
|
||||
|
||||
@@ -174,11 +173,6 @@ private:
|
||||
|
||||
int mnUpdateLockCount;
|
||||
|
||||
/** When this flag is set then the main view shell is always kept at the
|
||||
top of the shell stack.
|
||||
*/
|
||||
bool mbKeepMainViewShellOnTop;
|
||||
|
||||
/** The UpdateShellStack() method can be called recursively. This flag
|
||||
is used to communicate between different levels of invocation: if
|
||||
the stack has been updated in an inner call the outer call can (has
|
||||
@@ -361,7 +355,6 @@ ViewShellManager::Implementation::Implementation (
|
||||
maShellFactories(),
|
||||
maActiveViewShells(),
|
||||
mnUpdateLockCount(0),
|
||||
mbKeepMainViewShellOnTop(false),
|
||||
mbShellStackIsUpToDate(true),
|
||||
mpFormShell(nullptr),
|
||||
mpFormShellParent(nullptr),
|
||||
@@ -485,22 +478,7 @@ void ViewShellManager::Implementation::ActivateShell (const ShellDescriptor& rDe
|
||||
// Put shell on top of the active view shells.
|
||||
if (rDescriptor.mpShell != nullptr)
|
||||
{
|
||||
// Determine where to put the view shell on the stack. By default
|
||||
// it is put on top of the stack. When the view shell of the center
|
||||
// pane is to be kept top most and the new view shell is not
|
||||
// displayed in the center pane then it is inserted at the position
|
||||
// one below the top.
|
||||
ActiveShellList::iterator iInsertPosition (maActiveViewShells.begin());
|
||||
if (iInsertPosition != maActiveViewShells.end()
|
||||
&& mbKeepMainViewShellOnTop
|
||||
&& ! rDescriptor.IsMainViewShell()
|
||||
&& iInsertPosition->IsMainViewShell())
|
||||
{
|
||||
++iInsertPosition;
|
||||
}
|
||||
maActiveViewShells.insert(
|
||||
iInsertPosition,
|
||||
rDescriptor);
|
||||
maActiveViewShells.insert( maActiveViewShells.begin(), rDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,23 +599,13 @@ void ViewShellManager::Implementation::MoveToTop (const SfxShell& rShell)
|
||||
// the case in mind that mbKeepMainViewShellOnTop is true. Shells
|
||||
// that are not the main view shell are placed on the second-to-top
|
||||
// position in this case.
|
||||
if (iShell == maActiveViewShells.begin()
|
||||
&& (iShell->IsMainViewShell() || ! mbKeepMainViewShellOnTop))
|
||||
if (iShell == maActiveViewShells.begin())
|
||||
{
|
||||
// The shell is at the top position and is either a) the main
|
||||
// view shell or b) another shell but the main view shell is not
|
||||
// kept at the top position. We do not have to move the shell.
|
||||
bMove = false;
|
||||
}
|
||||
else if (iShell == ++maActiveViewShells.begin()
|
||||
&& ! iShell->IsMainViewShell()
|
||||
&& mbKeepMainViewShellOnTop)
|
||||
{
|
||||
// The shell is a the second-to-top position, not the main view
|
||||
// shell and the main view shell is kept at the top position.
|
||||
// Therefore we do not have to move the shell.
|
||||
bMove = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -658,15 +626,7 @@ void ViewShellManager::Implementation::MoveToTop (const SfxShell& rShell)
|
||||
TakeShellsFromStack(&rShell);
|
||||
maActiveViewShells.erase(iShell);
|
||||
|
||||
// Find out whether to insert at the top or one below.
|
||||
ActiveShellList::iterator aInsertPosition (maActiveViewShells.begin());
|
||||
if (mbKeepMainViewShellOnTop && ! aDescriptor.IsMainViewShell())
|
||||
{
|
||||
if (maActiveViewShells.back().IsMainViewShell())
|
||||
++aInsertPosition;
|
||||
}
|
||||
|
||||
maActiveViewShells.insert(aInsertPosition, aDescriptor);
|
||||
maActiveViewShells.insert(maActiveViewShells.begin(), aDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1234,15 +1194,6 @@ ShellDescriptor& ShellDescriptor::operator= (const ShellDescriptor& rDescriptor)
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool ShellDescriptor::IsMainViewShell() const
|
||||
{
|
||||
ViewShell* pViewShell = dynamic_cast<ViewShell*>(mpShell);
|
||||
if (pViewShell != nullptr)
|
||||
return pViewShell->IsMainViewShell();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
vcl::Window* ShellDescriptor::GetWindow() const
|
||||
{
|
||||
ViewShell* pViewShell = dynamic_cast<ViewShell*>(mpShell);
|
||||
|
Reference in New Issue
Block a user