summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-12 14:48:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-13 09:49:18 +0000
commitf88473c56a718574e3cf45725f568cb4e1397aa4 (patch)
treefdafcca510f2aa3259b0d7110c71aebf0a841c22 /svtools
parentc814fba439237cb11f5d880eeba4bb8457752f02 (diff)
convert extension dialog to .ui
Change-Id: I4d938be9e960f421398dd40bbcf1b3cadc643de1
Diffstat (limited to 'svtools')
-rw-r--r--svtools/Library_svt.mk1
-rw-r--r--svtools/Package_inc.mk1
-rw-r--r--svtools/inc/svtools/prgsbar.hxx94
-rw-r--r--svtools/source/control/prgsbar.cxx249
-rw-r--r--svtools/source/uno/unoiface.cxx2
5 files changed, 1 insertions, 346 deletions
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 4916808e748c..56fd3c07990c 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -119,7 +119,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/control/hyperlabel \
svtools/source/control/indexentryres \
svtools/source/control/inettbc \
- svtools/source/control/prgsbar \
svtools/source/control/roadmap \
svtools/source/control/ruler \
svtools/source/control/scriptedtext \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index 3aeb5d36d2f7..7ec94d3407d0 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -115,7 +115,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/place.hxx,svtools/plac
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/PlaceEditDialog.hxx,svtools/PlaceEditDialog.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupmenucontrollerbase.hxx,svtools/popupmenucontrollerbase.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupwindowcontroller.hxx,svtools/popupwindowcontroller.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prgsbar.hxx,svtools/prgsbar.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printoptions.hxx,svtools/printoptions.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prnsetup.hxx,svtools/prnsetup.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmap.hxx,svtools/roadmap.hxx))
diff --git a/svtools/inc/svtools/prgsbar.hxx b/svtools/inc/svtools/prgsbar.hxx
deleted file mode 100644
index 1f4b311fdc45..000000000000
--- a/svtools/inc/svtools/prgsbar.hxx
+++ /dev/null
@@ -1,94 +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 _PRGSBAR_HXX
-#define _PRGSBAR_HXX
-
-#include "svtools/svtdllapi.h"
-#include <vcl/window.hxx>
-
-/*************************************************************************
-
-Beschreibung
-============
-
-class ProgressBar
-
-Diese Klasse dient zur Anzeige einer Progress-Anzeige.
-
---------------------------------------------------------------------------
-
-WinBits
-
-WB_BORDER Border um das Fenster
-WB_3DLOOK 3D-Darstellung
-
---------------------------------------------------------------------------
-
-Methoden
-
-Mit SetValue() setzt man einen Prozent-Wert zwischen 0 und 100. Wenn Werte
-groesser 100 gesetzt werden, faengt das letzte Rechteck an zu blinken.
-
-*************************************************************************/
-
-// -----------
-// - WinBits -
-// -----------
-
-#define WB_STDPROGRESSBAR WB_BORDER
-
-// ---------------
-// - ProgressBar -
-// ---------------
-
-class SVT_DLLPUBLIC ProgressBar : public Window
-{
-private:
- Point maPos;
- long mnPrgsWidth;
- long mnPrgsHeight;
- sal_uInt16 mnPercent;
- sal_uInt16 mnPercentCount;
- sal_Bool mbCalcNew;
-
-#ifdef _SV_PRGSBAR_CXX
- using Window::ImplInit;
- SVT_DLLPRIVATE void ImplInit();
- SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
- SVT_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc );
-#endif
-
-public:
- ProgressBar( Window* pParent, WinBits nWinBits = WB_STDPROGRESSBAR );
- ProgressBar( Window* pParent, const ResId& rResId );
- ~ProgressBar();
-
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void StateChanged( StateChangedType nStateChange );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- void SetValue( sal_uInt16 nNewPercent );
- sal_uInt16 GetValue() const { return mnPercent; }
-};
-
-#endif // _PRGSBAR_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx
deleted file mode 100644
index 18881a07a59e..000000000000
--- a/svtools/source/control/prgsbar.cxx
+++ /dev/null
@@ -1,249 +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 .
- */
-
-
-#define _SV_PRGSBAR_CXX
-
-#include <tools/debug.hxx>
-#include <vcl/status.hxx>
-#include <svtools/prgsbar.hxx>
-
-// =======================================================================
-
-#define PROGRESSBAR_OFFSET 3
-#define PROGRESSBAR_WIN_OFFSET 2
-
-// =======================================================================
-
-void ProgressBar::ImplInit()
-{
- mnPercent = 0;
- mbCalcNew = sal_True;
-
- ImplInitSettings( sal_True, sal_True, sal_True );
-}
-
-static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle )
-{
- WinBits nOutStyle = nOrgStyle;
- if( pParent && (nOrgStyle & WB_BORDER) != 0 )
- {
- if( pParent->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
- nOutStyle &= WB_BORDER;
- }
- return nOutStyle;
-}
-
-// -----------------------------------------------------------------------
-
-ProgressBar::ProgressBar( Window* pParent, WinBits nWinStyle ) :
- Window( pParent, clearProgressBarBorder( pParent, nWinStyle ) )
-{
- SetOutputSizePixel( Size( 150, 20 ) );
- ImplInit();
-}
-
-// -----------------------------------------------------------------------
-
-ProgressBar::ProgressBar( Window* pParent, const ResId& rResId ) :
- Window( pParent, rResId )
-{
- ImplInit();
-}
-
-// -----------------------------------------------------------------------
-
-ProgressBar::~ProgressBar()
-{
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::ImplInitSettings( sal_Bool bFont,
- sal_Bool bForeground, sal_Bool bBackground )
-{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
-/* !!! Derzeit unterstuetzen wir keine Textausgaben
- if ( bFont )
- {
- Font aFont;
- aFont = rStyleSettings.GetAppFont();
- if ( IsControlFont() )
- aFont.Merge( GetControlFont() );
- SetZoomedPointFont( aFont );
- }
-*/
-
- if ( bBackground )
- {
- if( !IsControlBackground() &&
- IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
- {
- if( (GetStyle() & WB_BORDER) )
- SetBorderStyle( WINDOW_BORDER_REMOVEBORDER );
- EnableChildTransparentMode( sal_True );
- SetPaintTransparent( sal_True );
- SetBackground();
- SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- }
- else
- {
- Color aColor;
- if ( IsControlBackground() )
- aColor = GetControlBackground();
- else
- aColor = rStyleSettings.GetFaceColor();
- SetBackground( aColor );
- }
- }
-
- if ( bForeground || bFont )
- {
- Color aColor = rStyleSettings.GetHighlightColor();
- if ( IsControlForeground() )
- aColor = GetControlForeground();
- if ( aColor.IsRGBEqual( GetBackground().GetColor() ) )
- {
- if ( aColor.GetLuminance() > 100 )
- aColor.DecreaseLuminance( 64 );
- else
- aColor.IncreaseLuminance( 64 );
- }
- SetLineColor();
- SetFillColor( aColor );
-/* !!! Derzeit unterstuetzen wir keine Textausgaben
- SetTextColor( aColor );
- SetTextFillColor();
-*/
- }
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc )
-{
- if ( mbCalcNew )
- {
- mbCalcNew = sal_False;
-
- Size aSize = GetOutputSizePixel();
- mnPrgsHeight = aSize.Height()-(PROGRESSBAR_WIN_OFFSET*2);
- mnPrgsWidth = (mnPrgsHeight*2)/3;
- maPos.Y() = PROGRESSBAR_WIN_OFFSET;
- long nMaxWidth = (aSize.Width()-(PROGRESSBAR_WIN_OFFSET*2)+PROGRESSBAR_OFFSET);
- sal_uInt16 nMaxCount = (sal_uInt16)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
- if ( nMaxCount <= 1 )
- nMaxCount = 1;
- else
- {
- while ( ((10000/(10000/nMaxCount))*(mnPrgsWidth+PROGRESSBAR_OFFSET)) > nMaxWidth )
- nMaxCount--;
- }
- mnPercentCount = 10000/nMaxCount;
- nMaxWidth = ((10000/(10000/nMaxCount))*(mnPrgsWidth+PROGRESSBAR_OFFSET))-PROGRESSBAR_OFFSET;
- maPos.X() = (aSize.Width()-nMaxWidth)/2;
- }
-
- ::DrawProgress( this, maPos, PROGRESSBAR_OFFSET, mnPrgsWidth, mnPrgsHeight,
- nOldPerc*100, nNewPerc*100, mnPercentCount,
- Rectangle( Point(), GetSizePixel() ) );
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::Paint( const Rectangle& )
-{
- ImplDrawProgress( 0, mnPercent );
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::Resize()
-{
- mbCalcNew = sal_True;
- if ( IsReallyVisible() )
- Invalidate();
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::SetValue( sal_uInt16 nNewPercent )
-{
- DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" );
-
- if ( nNewPercent < mnPercent )
- {
- mbCalcNew = sal_True;
- mnPercent = nNewPercent;
- if ( IsReallyVisible() )
- {
- Invalidate();
- Update();
- }
- }
- else
- {
- ImplDrawProgress( mnPercent, nNewPercent );
- mnPercent = nNewPercent;
- }
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::StateChanged( StateChangedType nType )
-{
-/* !!! Derzeit unterstuetzen wir keine Textausgaben
- if ( (nType == STATE_CHANGE_ZOOM) ||
- (nType == STATE_CHANGE_CONTROLFONT) )
- {
- ImplInitSettings( sal_True, sal_False, sal_False );
- Invalidate();
- }
- else
-*/
- if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
- {
- ImplInitSettings( sal_False, sal_True, sal_False );
- Invalidate();
- }
- else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
- {
- ImplInitSettings( sal_False, sal_False, sal_True );
- Invalidate();
- }
-
- Window::StateChanged( nType );
-}
-
-// -----------------------------------------------------------------------
-
-void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt )
-{
- if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
- (rDCEvt.GetFlags() & SETTINGS_STYLE) )
- {
- ImplInitSettings( sal_True, sal_True, sal_True );
- Invalidate();
- }
-
- Window::DataChanged( rDCEvt );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index bb05a95e5a89..9034f1383055 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -29,6 +29,7 @@
#include <tools/debug.hxx>
#include <vcl/fixedhyper.hxx>
+#include <vcl/prgsbar.hxx>
#include <vcl/svapp.hxx>
#include <svtools/svmedit.hxx>
#include <unoiface.hxx>
@@ -43,7 +44,6 @@
#include <svtools/fmtfield.hxx>
#include <svl/numuno.hxx>
#include <svtools/calendar.hxx>
-#include <svtools/prgsbar.hxx>
#include <svtools/treelistbox.hxx>
#include "treecontrolpeer.hxx"
#include "svtxgridcontrol.hxx"