From ca4a3819475da1eb6115d83b1e8e33ae4e011261 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 21 May 2014 13:45:12 +0100 Subject: lets drop the custom DescriptionEdit widget Change-Id: Id08b364b828ccacd5c54276daf605ec4ff3fdb0a --- desktop/Library_deploymentgui.mk | 1 - desktop/source/deployment/gui/descedit.cxx | 74 ---------------------- desktop/source/deployment/gui/descedit.hxx | 48 -------------- .../source/deployment/gui/dp_gui_updatedialog.cxx | 5 +- .../source/deployment/gui/dp_gui_updatedialog.hxx | 3 +- desktop/uiconfig/ui/updatedialog.ui | 23 +++---- 6 files changed, 10 insertions(+), 144 deletions(-) delete mode 100644 desktop/source/deployment/gui/descedit.cxx delete mode 100644 desktop/source/deployment/gui/descedit.hxx (limited to 'desktop') diff --git a/desktop/Library_deploymentgui.mk b/desktop/Library_deploymentgui.mk index 2a13cc6ce3a1..ec0a836e7670 100644 --- a/desktop/Library_deploymentgui.mk +++ b/desktop/Library_deploymentgui.mk @@ -56,7 +56,6 @@ endif $(eval $(call gb_Library_set_componentfile,deploymentgui,desktop/source/deployment/gui/deploymentgui)) $(eval $(call gb_Library_add_exception_objects,deploymentgui,\ - desktop/source/deployment/gui/descedit \ desktop/source/deployment/gui/dp_gui_autoscrolledit \ desktop/source/deployment/gui/dp_gui_dependencydialog \ desktop/source/deployment/gui/dp_gui_dialog2 \ diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx deleted file mode 100644 index a7fb8b431678..000000000000 --- a/desktop/source/deployment/gui/descedit.cxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include -#include -#include -#include - -#include "descedit.hxx" - -#include "dp_gui.hrc" - -using dp_gui::DescriptionEdit; - -// DescriptionEdit ------------------------------------------------------- - -DescriptionEdit::DescriptionEdit( Window* pParent) : - - ExtMultiLineEdit( pParent), - - m_bIsVerticalScrollBarHidden( true ) - -{ - Init(); -} - - -extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeDescriptionEdit(Window* pParent, VclBuilder::stringmap &) -{ - return new DescriptionEdit(pParent); -} - - -void DescriptionEdit::Init() -{ - Clear(); - // no tabstop - SetStyle( ( GetStyle() & ~WB_TABSTOP ) | WB_NOTABSTOP ); - // read-only - SetReadOnly(); - // no cursor - EnableCursor( false ); -} - - - -void DescriptionEdit::Clear() -{ - SetText( OUString() ); - - m_bIsVerticalScrollBarHidden = true; - ScrollBar* pVScrBar = GetVScrollBar(); - if ( pVScrBar ) - pVScrBar->Hide(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/gui/descedit.hxx b/desktop/source/deployment/gui/descedit.hxx deleted file mode 100644 index da2ee7d461f0..000000000000 --- a/desktop/source/deployment/gui/descedit.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DESCEDIT_HXX -#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DESCEDIT_HXX - -#include "svtools/svmedit2.hxx" - -/// @HTML - -namespace dp_gui -{ - - class DescriptionEdit : public ExtMultiLineEdit - { - private: - bool m_bIsVerticalScrollBarHidden; - - void Init(); - - public: - DescriptionEdit( Window* pParent); - virtual inline ~DescriptionEdit() {} - - void Clear(); - }; - -} // namespace dp_gui - -#endif // INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DESCEDIT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 89e00abfbf3f..02db3ff8be32 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -907,7 +907,6 @@ void UpdateDialog::initDescription() m_pPublisherLink->Hide(); m_pReleaseNotesLabel->Hide(); m_pReleaseNotesLink->Hide(); - m_pDescriptions->Hide(); Link aLink = LINK( this, UpdateDialog, hyperlink_clicked ); m_pPublisherLink->SetClickHdl( aLink ); @@ -924,8 +923,7 @@ void UpdateDialog::clearDescription() m_pReleaseNotesLabel->Hide(); m_pReleaseNotesLink->Hide(); m_pReleaseNotesLink->SetURL( sEmpty ); - m_pDescriptions->Hide(); - m_pDescriptions->Clear(); + m_pDescriptions->SetText(""); } bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo) @@ -976,7 +974,6 @@ bool UpdateDialog::showDescription( const OUString& rDescription) // nothing to show return false; - m_pDescriptions->Show(); m_pDescriptions->SetText( rDescription ); return true; } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index e7740c170353..18a4f9ac4cd0 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -37,7 +37,6 @@ #include #include -#include "descedit.hxx" #include "dp_gui_updatedata.hxx" /// @HTML @@ -181,7 +180,7 @@ private: FixedHyperlink* m_pPublisherLink; FixedText* m_pReleaseNotesLabel; FixedHyperlink* m_pReleaseNotesLink; - dp_gui::DescriptionEdit* m_pDescriptions; + VclMultiLineEdit* m_pDescriptions; HelpButton* m_pHelp; PushButton* m_pOk; PushButton* m_pClose; diff --git a/desktop/uiconfig/ui/updatedialog.ui b/desktop/uiconfig/ui/updatedialog.ui index 9410aff2311a..34e6b10f4473 100644 --- a/desktop/uiconfig/ui/updatedialog.ui +++ b/desktop/uiconfig/ui/updatedialog.ui @@ -1,7 +1,6 @@ - False @@ -278,24 +277,18 @@ - + True + False True - always - in - - - True - False - True - True - True - False - - + True + True + False + False + False - True + False True 2 -- cgit