summaryrefslogtreecommitdiff
path: root/svtools/source/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/dialogs')
-rw-r--r--svtools/source/dialogs/colctrl.cxx814
-rw-r--r--svtools/source/dialogs/colrdlg.cxx358
-rw-r--r--svtools/source/dialogs/colrdlg.hrc101
-rw-r--r--svtools/source/dialogs/colrdlg.src576
-rw-r--r--svtools/source/dialogs/filedlg.cxx185
-rw-r--r--svtools/source/dialogs/filedlg2.cxx1377
-rw-r--r--svtools/source/dialogs/filedlg2.hrc75
-rw-r--r--svtools/source/dialogs/filedlg2.hxx255
-rw-r--r--svtools/source/dialogs/filedlg2.src422
-rw-r--r--svtools/source/dialogs/makefile.mk93
-rw-r--r--svtools/source/dialogs/mcvmath.cxx336
-rw-r--r--svtools/source/dialogs/mcvmath.hxx264
-rw-r--r--svtools/source/dialogs/printdlg.cxx527
-rw-r--r--svtools/source/dialogs/printdlg.hrc95
-rw-r--r--svtools/source/dialogs/printdlg.src616
-rw-r--r--svtools/source/dialogs/prnsetup.cxx444
-rw-r--r--svtools/source/dialogs/prnsetup.hrc78
-rw-r--r--svtools/source/dialogs/prnsetup.src966
-rw-r--r--svtools/source/dialogs/propctrl.cxx534
-rw-r--r--svtools/source/dialogs/property.cxx1582
-rw-r--r--svtools/source/dialogs/wizdlg.cxx678
21 files changed, 10376 insertions, 0 deletions
diff --git a/svtools/source/dialogs/colctrl.cxx b/svtools/source/dialogs/colctrl.cxx
new file mode 100644
index 000000000000..eb7c168af6de
--- /dev/null
+++ b/svtools/source/dialogs/colctrl.cxx
@@ -0,0 +1,814 @@
+/*************************************************************************
+ *
+ * $RCSfile: colctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _SV_SALBTYPE_HXX //autogen
+#include <vcl/salbtype.hxx>
+#endif
+
+#ifndef _SV_BMPACC_HXX //autogen
+#include <vcl/bmpacc.hxx>
+#endif
+
+#include <colctrl.hxx>
+
+// ----------------
+// - ColorControl -
+// ----------------
+
+// -----------------------------------------------------------------------
+SvColorControl::SvColorControl( Window* pParent, WinBits nStyle ) :
+ Control ( pParent, nStyle ),
+ mpBitmap ( NULL ),
+ mpReadAccess ( NULL ),
+ mnLuminance ( 50 )
+{
+ Initialize();
+}
+
+// -----------------------------------------------------------------------
+SvColorControl::SvColorControl( Window* pParent, const ResId& rResId ) :
+ Control ( pParent, rResId ),
+ mpBitmap ( NULL ),
+ mpReadAccess ( NULL ),
+ mnLuminance ( 50 )
+{
+ Initialize();
+}
+
+
+// -----------------------------------------------------------------------
+SvColorControl::~SvColorControl()
+{
+ if( mpReadAccess )
+ mpBitmap->ReleaseAccess( mpReadAccess );
+
+ delete mpBitmap;
+
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::Initialize()
+{
+ SetLineColor( Color( COL_BLACK ) );
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::CreateBitmap()
+{
+ Size aSize = GetOutputSizePixel();
+ Size aBmpSize;
+ if( mpBitmap && mpBitmap->GetSizePixel() != aSize )
+ {
+ delete mpBitmap;
+ mpBitmap = NULL;
+ }
+ if( !mpBitmap )
+ mpBitmap = new Bitmap( aSize, 24 );
+
+ BitmapWriteAccess* pWriteAccess = mpBitmap->AcquireWriteAccess();
+
+ USHORT nX = (USHORT) aSize.Width();
+ USHORT nY = (USHORT) aSize.Height();
+
+ UINT16 nHue, nSat;
+ UINT16 nBri = mnLuminance;
+ ColorHSB aColHSB( 0, 0, mnLuminance );
+
+ for( USHORT i = 0; i < nY; i++ )
+ {
+ nSat = 100 - ( 100.0 * i + 0.5 ) / nY;
+
+ for( USHORT j = 0; j < nX; j++ )
+ {
+ nHue = ( 360.0 * j + 0.5 ) / nX;
+
+ aColHSB.SetHue( nHue );
+ aColHSB.SetSat( nSat );
+ Color aCol( aColHSB.GetRGB() );
+
+ pWriteAccess->SetPixel( i, j, BitmapColor( aCol ) );
+
+ }
+ }
+
+ /*
+ erster Ansatz nur mit RGB
+ USHORT n1_6 = (USHORT) ((nX+3) / 6);
+ USHORT n2_6 = (USHORT) ((nX*2+3) / 6);
+ USHORT n3_6 = (USHORT) ((nX*3+3) / 6);
+ USHORT n4_6 = (USHORT) ((nX*4+3) / 6);
+ USHORT n5_6 = (USHORT) ((nX*5+3) / 6);
+ USHORT n6_6 = nX;
+
+ BitmapColor aBmpColor;
+ BYTE cR, cG, cB;
+ */
+ /*
+ for( USHORT i = 0; i < nY; i++ )
+ {
+ USHORT nK = 100 * i / nY;
+
+ for( USHORT j = 0; j < nX; j++ )
+ {
+ if( j < n1_6 )
+ {
+ cR = 255;
+ cG = 255 * j / n1_6;
+ cB = 0;
+ }
+ else if( j < n2_6 )
+ {
+ cR = 255 - 255 * ( j - n1_6 ) / n1_6;
+ cG = 255;
+ cB = 0;
+ }
+ else if( j < n3_6 )
+ {
+ cR = 0;
+ cG = 255;
+ cB = 255 * (j - n2_6 ) / n1_6;
+ }
+ else if( j < n4_6 )
+ {
+ cR = 0;
+ cG = 255 - 255 * ( j - n3_6 ) / n1_6;
+ cB = 255;
+ }
+ else if( j < n5_6 )
+ {
+ cR = 255 * (j - n4_6 ) / n1_6;
+ cG = 0;
+ cB = 255;
+ }
+ else if( j < nX )
+ {
+ cR = 255;
+ cG = 0;
+ cB = 255 - 255 * ( j - n5_6 ) / n1_6;;
+ }
+
+ //cR -= ( cR - mnLuminance * 256 / 100 ) * nK / 100;
+ //cG -= ( cG - mnLuminance * 256 / 100 ) * nK / 100;
+ //cB -= ( cB - mnLuminance * 256 / 100 ) * nK / 100;
+
+ //aBmpColor.SetRed( cR );
+ //aBmpColor.SetGreen( cG );
+ //aBmpColor.SetBlue( cB );
+
+ //pWriteAccess->SetPixel( i, j, aBmpColor );
+
+ ColorHSB aColHSB( Color( cR, cG, cB ) );
+ aColHSB.SetSat( nK );
+ Color aCol( aColHSB.GetRGB() );
+
+ pWriteAccess->SetPixel( i, j, BitmapColor( aCol ) );
+
+ }
+ }
+ */
+ mpBitmap->ReleaseAccess( pWriteAccess );
+
+ mpReadAccess = mpBitmap->AcquireReadAccess();
+
+ SetColor( maColor ); // Anzeige der Position im Control
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::ShowPosition( const Point& rPos )
+{
+ // Explizites Abfragen des Bereichs, da schon mal ein Wert < 0 vorhanden ist
+ if( mpBitmap )
+ {
+ long nX = rPos.X();
+ long nY = rPos.Y();
+ if( nX < 0L )
+ nX = 0L;
+ else if( nX >= mpBitmap->GetSizePixel().Width() )
+ nX = mpBitmap->GetSizePixel().Width() - 1L;
+
+ if( nY < 0L )
+ nY= 0L;
+ else if( nY >= mpBitmap->GetSizePixel().Height() )
+ nY = mpBitmap->GetSizePixel().Height() - 1L;
+
+ Point aPos = maPosition;
+ maPosition.X() = nX - 2;
+ maPosition.Y() = nY - 2;
+ Invalidate( Rectangle( aPos, Size( 5, 5) ) );
+ Invalidate( Rectangle( maPosition, Size( 5, 5) ) );
+
+ maColor = mpReadAccess->GetPixel( nY, nX );
+ }
+}
+// -----------------------------------------------------------------------
+void SvColorControl::MouseMove( const MouseEvent& rMEvt )
+{
+ if( rMEvt.IsLeft() )
+ {
+ ShowPosition( rMEvt.GetPosPixel() );
+ Modify();
+ }
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if( rMEvt.IsLeft() && !rMEvt.IsShift() )
+ {
+ //ShowPointer( FALSE );
+ CaptureMouse();
+ ShowPosition( rMEvt.GetPosPixel() );
+ Modify();
+ }
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ //ShowPointer( TRUE );
+ if( IsMouseCaptured() )
+ ReleaseMouse();
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::Paint( const Rectangle& rRect )
+{
+ if( !mpBitmap )
+ CreateBitmap();
+
+ // dither bitmap if there only 256 colors available !
+ if( GetBitCount() <= 8 )
+ mpBitmap->Dither();
+
+ DrawBitmap( rRect.TopLeft(), rRect.GetSize(),
+ rRect.TopLeft(), rRect.GetSize(), *mpBitmap );
+
+ // Positions-Control (Fadenkreuz oder Aehnliches)
+ Point aPos1( maPosition );
+ Point aPos2( maPosition );
+ aPos2.X() += 4;
+ DrawLine( aPos1, aPos2 );
+ aPos2.X() -= 4;
+ aPos2.Y() += 4;
+ DrawLine( aPos1, aPos2 );
+ aPos1.Y() += 4;
+ aPos2.X() += 4;
+ DrawLine( aPos1, aPos2 );
+ aPos1.X() += 4;
+ aPos2.Y() -= 4;
+ DrawLine( aPos1, aPos2 );
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::Resize()
+{
+ CreateBitmap();
+
+ Control::Resize();
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::Modify()
+{
+ maModifyHdl.Call( this );
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::SetColor( const ColorHSB& rCol, BOOL bSetColor )
+{
+ if( bSetColor )
+ maColor = rCol.GetRGB();
+
+ if( mpBitmap )
+ {
+ USHORT nX = (USHORT) mpBitmap->GetSizePixel().Width();
+ USHORT nY = (USHORT) mpBitmap->GetSizePixel().Height();
+
+ INT16 nZ = rCol.GetBri();
+ SetLuminance( nZ );
+
+ nX = rCol.GetHue() * nX / 360; // Farbe
+ nY = nY - rCol.GetSat() * nY / 100; // Saettigung
+
+ ShowPosition( Point( nX, nY ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::SetColor( const Color& rCol )
+{
+ maColor = rCol;
+
+ if( mpBitmap )
+ {
+ ColorHSB aColHsb( rCol );
+ SetColor( aColHsb, FALSE );
+ /*
+ BOOL bDone = FALSE;
+ USHORT nX = (USHORT) mpBitmap->GetSizePixel().Width();
+ USHORT nY = (USHORT) mpBitmap->GetSizePixel().Height();
+ USHORT i, j;
+
+ BitmapColor aBmpColor;
+
+ for( i = 0; i < nY && !bDone; i++ )
+ {
+ for( j = 0; j < nX && !bDone; j++ )
+ {
+ aBmpColor = mpReadAccess->GetPixel( i, j );
+
+ if( maColor == (Color)aBmpColor )
+ bDone = TRUE;
+ }
+ }
+
+ if( bDone )
+ ShowPosition( Point( j, i ) );
+ */
+ }
+}
+
+// -----------------------------------------------------------------------
+void SvColorControl::SetLuminance( short nLum )
+{
+ if( nLum != mnLuminance &&
+ nLum >= 0 && nLum <= 100 )
+ {
+ mnLuminance = nLum;
+
+ if( mnLuminance < 40 )
+ SetLineColor( Color( COL_WHITE ) );
+ else
+ SetLineColor( Color( COL_BLACK ) );
+
+ CreateBitmap();
+
+ USHORT nX = maPosition.X() + 2;
+ USHORT nY = maPosition.Y() + 2;
+ maColor = mpReadAccess->GetPixel( nY, nX );
+
+ Invalidate();
+ }
+}
+
+
+// -----------------------
+// - ColorPreviewControl -
+// -----------------------
+
+
+// -----------------------------------------------------------------------
+ColorPreviewControl::ColorPreviewControl( Window* pParent, WinBits nStyle ) :
+ Control ( pParent, nStyle )
+{
+ SetFillColor( maColor );
+ SetLineColor( maColor );
+}
+
+// -----------------------------------------------------------------------
+ColorPreviewControl::ColorPreviewControl( Window* pParent, const ResId& rResId ) :
+ Control ( pParent, rResId )
+{
+ SetFillColor( maColor );
+ SetLineColor( maColor );
+}
+
+
+// -----------------------------------------------------------------------
+ColorPreviewControl::~ColorPreviewControl()
+{
+}
+
+// -----------------------------------------------------------------------
+void ColorPreviewControl::Paint( const Rectangle& rRect )
+{
+ DrawRect( rRect );
+}
+
+// -----------------------------------------------------------------------
+void ColorPreviewControl::SetColor( const Color& rCol )
+{
+ if( rCol != maColor )
+ {
+ maColor = rCol;
+ SetFillColor( maColor );
+ SetLineColor( maColor );
+ Invalidate();
+ }
+}
+
+
+// -----------------------
+// - ColorMixingControl -
+// -----------------------
+
+
+// -----------------------------------------------------------------------
+ColorMixingControl::ColorMixingControl( Window* pParent, WinBits nStyle,
+ USHORT nRows, USHORT nColumns ) :
+ ValueSet ( pParent, nStyle ),
+ mnRows ( nRows ),
+ mnColumns ( nColumns )
+{
+ Initialize();
+}
+
+// -----------------------------------------------------------------------
+ColorMixingControl::ColorMixingControl( Window* pParent, const ResId& rResId,
+ USHORT nRows, USHORT nColumns ) :
+ ValueSet ( pParent, rResId ),
+ mnRows ( nRows ),
+ mnColumns ( nColumns )
+{
+ Initialize();
+}
+
+
+// -----------------------------------------------------------------------
+ColorMixingControl::~ColorMixingControl()
+{
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::Initialize()
+{
+ SetColCount( mnColumns );
+
+ Color aColor;
+ String aStr;
+ for( USHORT i = 1; i <= mnRows * mnColumns; i++ )
+ {
+ InsertItem( i, aColor, aStr );
+ }
+
+ /*maColor[ 0 ] = Color( COL_LIGHTRED );
+ maColor[ 1 ] = Color( COL_LIGHTGREEN );
+ maColor[ 2 ] = Color( COL_YELLOW );
+ maColor[ 3 ] = Color( COL_LIGHTBLUE );*/
+
+ SetColor( CMC_TOPLEFT, Color( COL_LIGHTRED ) );
+ SetColor( CMC_BOTTOMRIGHT, Color( COL_LIGHTBLUE ) );
+
+ SetColor( CMC_TOPRIGHT, Color( COL_LIGHTGREEN ) );
+ SetColor( CMC_BOTTOMLEFT, Color( COL_YELLOW ) );
+
+ /*FillColumn( 0 );
+ FillColumn( mnColumns - 1 );
+ for( i = 0; i < mnRows; i++ )
+ FillRow( i );*/
+}
+
+// -----------------------------------------------------------------------
+Color ColorMixingControl::CalcDifferenceColor( USHORT nCol1, USHORT nCol2,
+ USHORT nSteps )
+{
+ // Die Berechnung ist noch etwas ungenau, daher sollte besser mit floats
+ // gearbeitet werden... (muss !!!)
+ Color aColor( GetItemColor( nCol1 ) );
+ Color aColor2( GetItemColor( nCol2 ) );
+
+ aColor.SetRed( (UINT8) ( ( aColor2.GetRed() - aColor.GetRed() ) / nSteps ) );
+ aColor.SetGreen( (UINT8) ( ( aColor2.GetGreen() - aColor.GetGreen() ) / nSteps ) );
+ aColor.SetBlue( (UINT8) ( ( aColor2.GetBlue() - aColor.GetBlue() ) / nSteps ) );
+
+ return( aColor );
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::FillRow( USHORT nRow )
+{
+ USHORT nCol1 = nRow * mnColumns + 1;
+ USHORT nCol2 = ( nRow + 1 ) * mnColumns;
+ Color aColor( GetItemColor( nCol1 ) );
+ Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnColumns - 1 ) );
+
+ for( USHORT i = nCol1 + 1; i < nCol2; i++ )
+ {
+ aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
+ aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
+ aColor.SetBlue( aColor.GetBlue() + aDiffColor.GetBlue() );
+
+ SetItemColor( i, aColor );
+ SetItemText( i, GetRGBString( aColor ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::FillColumn( USHORT nColumn )
+{
+ USHORT nCol1 = nColumn + 1;
+ USHORT nCol2 = nColumn + ( mnRows - 1 ) * mnColumns + 1;
+ Color aColor( GetItemColor( nCol1 ) );
+ Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnRows - 1 ) );
+
+ for( USHORT i = nCol1 + mnColumns; i < nCol2; i += mnColumns )
+ {
+ aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
+ aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
+ aColor.SetBlue( aColor.GetBlue() + aDiffColor.GetBlue() );
+
+ SetItemColor( i, aColor );
+ SetItemText( i, GetRGBString( aColor ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::SetRows( USHORT nRows )
+{
+ mnRows = nRows;
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::SetColumns( USHORT nColumns )
+{
+ mnColumns = nColumns;
+}
+
+// -----------------------------------------------------------------------
+void ColorMixingControl::SetColor( CMCPosition ePos, const Color& rCol )
+{
+ if( rCol != maColor[ ePos ] )
+ {
+ maColor[ ePos ] = rCol;
+ USHORT nPos, nColumn;
+ String aStr( GetRGBString( rCol ) );
+
+ switch( ePos )
+ {
+ case CMC_TOPLEFT:
+ nPos = 1;
+ nColumn = 0;
+ break;
+
+ case CMC_TOPRIGHT:
+ nPos = mnColumns;
+ nColumn = mnColumns - 1;
+ break;
+
+ case CMC_BOTTOMLEFT:
+ nPos = ( mnRows - 1 ) * mnColumns + 1;
+ nColumn = 0;
+ break;
+
+ case CMC_BOTTOMRIGHT:
+ nPos = mnRows * mnColumns;
+ nColumn = mnColumns - 1;
+ break;
+ }
+ SetItemColor( nPos, rCol );
+ SetItemText( nPos, aStr );
+ FillColumn( nColumn );
+
+ for( USHORT i = 0; i < mnRows; i++ )
+ FillRow( i );
+ }
+}
+
+// -----------------------------------------------------------------------
+String ColorMixingControl::GetRGBString( const Color& rColor )
+{
+ String aStr( String::CreateFromInt32(rColor.GetRed()) );
+ aStr += ' ';
+ aStr += String::CreateFromInt32(rColor.GetGreen());
+ aStr += ' ';
+ aStr += String::CreateFromInt32(rColor.GetBlue());
+
+ return aStr;
+}
+// -----------------------------------------------------------------------
+CMCPosition ColorMixingControl::GetCMCPosition() const
+{
+ CMCPosition ePos = CMC_OTHER;
+ USHORT nPos = GetSelectItemId();
+
+ if( nPos == 1 )
+ ePos = CMC_TOPLEFT;
+ else if( nPos == mnColumns )
+ ePos = CMC_TOPRIGHT;
+ else if( nPos == ( mnRows - 1 ) * mnColumns + 1 )
+ ePos = CMC_BOTTOMLEFT;
+ else if( nPos == mnRows * mnColumns )
+ ePos = CMC_BOTTOMRIGHT;
+
+ return( ePos );
+}
+
+
+// ------------
+// - ColorHSB -
+// ------------
+
+// Erste Ansaetze gingen auf die Berechnung von Sven Hannover zurueck
+// Der jetzige Algorithmus stammt im weitesten Sinne aus dem Foley/VanDam
+
+
+/**************************************************************************
+|*
+|* ColorHSB::ColorHSB()
+|*
+|* Beschreibung RGB nach HSB
+|* Ersterstellung SOH 02.10.97
+|*
+**************************************************************************/
+
+ColorHSB::ColorHSB( const Color& rColor )
+{
+ UINT8 c[3];
+ UINT8 cMax, cMin;
+
+ c[0] = rColor.GetRed();
+ c[1] = rColor.GetGreen();
+ c[2] = rColor.GetBlue();
+
+ cMax = c[0];
+ if( c[1] > cMax )
+ cMax = c[1];
+ if( c[2] > cMax )
+ cMax = c[2];
+
+ // Brightness = max(R, G, B);
+ mnBri = cMax * 100 / 255;
+
+ cMin = c[0];
+ if( c[1] < cMin )
+ cMin = c[1];
+ if( c[2] < cMin )
+ cMin = c[2];
+
+ UINT8 cDelta = cMax - cMin;
+
+ // Saturation = max - min / max
+ if( mnBri > 0 )
+ mnSat = cDelta * 100 / cMax;
+ else
+ mnSat = 0;
+
+ if( mnSat == 0 )
+ mnHue = 0; // Default = undefined
+ else
+ {
+ double dHue;
+
+ if( c[0] == cMax )
+ {
+ dHue = (double)( c[1] - c[2] ) / (double)cDelta;
+ }
+ else if( c[1] == cMax )
+ {
+ dHue = 2.0 + (double)( c[2] - c[0] ) / (double)cDelta;
+ }
+ else if ( c[2] == cMax )
+ {
+ dHue = 4.0 + (double)( c[0] - c[1] ) / (double)cDelta;
+ }
+ dHue *= 60.0;
+
+ if( dHue < 0.0 )
+ dHue += 360.0;
+
+ mnHue = (UINT16) dHue;
+ }
+}
+
+/**************************************************************************
+|*
+|* ColorHSB::GetRGB()
+|*
+|* Beschreibung HSB nach RGB
+|* Ersterstellung SOH 02.10.97
+|*
+**************************************************************************/
+
+Color ColorHSB::GetRGB() const
+{
+ UINT8 cR,cG,cB;
+ UINT8 nB = (UINT8) ( mnBri * 255 / 100 );
+
+ if( mnSat == 0 )
+ {
+ cR = nB;
+ cG = nB;
+ cB = nB;
+ }
+ else
+ {
+ double dH = mnHue;
+ double f;
+ UINT16 n;
+ if( dH == 360.0 )
+ dH = 0.0;
+
+ dH /= 60.0;
+ n = (UINT16) dH;
+ f = dH - n;
+
+ UINT8 a = (UINT8) ( nB * ( 100 - mnSat ) / 100 );
+ UINT8 b = (UINT8) ( nB * ( 100 - ( (double)mnSat * f + 0.5 ) ) / 100 );
+ UINT8 c = (UINT8) ( nB * ( 100 - ( (double)mnSat * ( 1.0 - f ) + 0.5 ) ) / 100 );
+
+ switch( n )
+ {
+ case 0: cR = nB; cG = c; cB = a; break;
+ case 1: cR = b; cG = nB; cB = a; break;
+ case 2: cR = a; cG = nB; cB = c; break;
+ case 3: cR = a; cG = b; cB = nB; break;
+ case 4: cR = c; cG = a; cB = nB; break;
+ case 5: cR = nB; cG = a; cB = b; break;
+ }
+ }
+
+ return( Color( cR, cG, cB ) );
+}
+
+// ------------
+// - ColorCMYK -
+// ------------
+
+
+// -----------------------------------------------------------------------
+ColorCMYK::ColorCMYK( const Color& rColor )
+{
+ mnCyan = 255 - rColor.GetRed();
+ mnMagenta = 255 - rColor.GetGreen();
+ mnYellow = 255 - rColor.GetBlue();
+
+ mnKey = Min( Min( mnCyan, mnMagenta ), mnYellow );
+
+ mnCyan = mnCyan - mnKey;
+ mnMagenta = mnMagenta - mnKey;
+ mnYellow = mnYellow - mnKey;
+}
+
+// -----------------------------------------------------------------------
+Color ColorCMYK::GetRGB() const
+{
+ INT16 nTmp = Max( 0, 255 - ( mnCyan + mnKey ) );
+ UINT8 cR = (UINT8) nTmp;
+ nTmp = Max( 0, 255 - ( mnMagenta + mnKey ) );
+ UINT8 cG = (UINT8) nTmp;
+ nTmp = Max( 0, 255 - ( mnYellow + mnKey ) );
+ UINT8 cB = (UINT8) nTmp;
+
+ return( Color( cR, cG, cB ) );
+}
+
+
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
new file mode 100644
index 000000000000..5ffb0640b003
--- /dev/null
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * $RCSfile: colrdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "svtdata.hxx"
+#include "colrdlg.hrc"
+#include "colrdlg.hxx"
+
+// ---------------
+// - ColorDialog -
+// ---------------
+
+SvColorDialog::SvColorDialog( Window* pWindow ) :
+ ModalDialog ( pWindow, SvtResId( DLG_COLOR ) ),
+ maColMixCtrl ( this, SvtResId( VAL_SET_COLOR ), 8, 8 ),
+ maBtn1 ( this, SvtResId( BTN_1 ) ),
+ maBtn2 ( this, SvtResId( BTN_2 ) ),
+ //maBtn3 ( this, SvtResId( BTN_3 ) ),
+ //maBtn4 ( this, SvtResId( BTN_4 ) ),
+ //maFtRGB ( this, SvtResId( FT_RGB ) ),
+ maCtlColor ( this, SvtResId( CTL_COLOR ) ),
+
+ maFtCyan ( this, SvtResId( FT_CYAN ) ),
+ maNumCyan ( this, SvtResId( NUM_CYAN ) ),
+ maFtMagenta ( this, SvtResId( FT_MAGENTA ) ),
+ maNumMagenta ( this, SvtResId( NUM_MAGENTA ) ),
+ maFtYellow ( this, SvtResId( FT_YELLOW ) ),
+ maNumYellow ( this, SvtResId( NUM_YELLOW ) ),
+ maFtKey ( this, SvtResId( FT_KEY ) ),
+ maNumKey ( this, SvtResId( NUM_KEY ) ),
+
+ maFtRed ( this, SvtResId( FT_RED ) ),
+ maNumRed ( this, SvtResId( NUM_RED ) ),
+ maFtGreen ( this, SvtResId( FT_GREEN ) ),
+ maNumGreen ( this, SvtResId( NUM_GREEN ) ),
+ maFtBlue ( this, SvtResId( FT_BLUE ) ),
+ maNumBlue ( this, SvtResId( NUM_BLUE ) ),
+
+ maFtHue ( this, SvtResId( FT_HUE ) ),
+ maNumHue ( this, SvtResId( NUM_HUE ) ),
+ maFtSaturation ( this, SvtResId( FT_SATURATION ) ),
+ maNumSaturation ( this, SvtResId( NUM_SATURATION ) ),
+ maFtLuminance ( this, SvtResId( FT_LUMINANCE ) ),
+ maNumLuminance ( this, SvtResId( NUM_LUMINANCE ) ),
+ maCtlPreview ( this, SvtResId( CTL_PREVIEW ) ),
+ maCtlPreviewOld ( this, SvtResId( CTL_PREVIEW_OLD ) ),
+
+ maBtnOK ( this, SvtResId( BTN_OK ) ),
+ maBtnCancel ( this, SvtResId( BTN_CANCEL ) ),
+ maBtnHelp ( this, SvtResId( BTN_HELP ) )
+{
+ FreeResource();
+
+ maColMixCtrl.SetDoubleClickHdl( LINK( this, SvColorDialog, ClickMixCtrlHdl ) );
+ maColMixCtrl.SetSelectHdl( LINK( this, SvColorDialog, SelectMixCtrlHdl ) );
+
+ Link aLink( LINK( this, SvColorDialog, ColorModifyHdl ) );
+ maCtlColor.SetModifyHdl( aLink );
+
+ maNumRed.SetModifyHdl( aLink );
+ maNumGreen.SetModifyHdl( aLink );
+ maNumBlue.SetModifyHdl( aLink );
+
+ maNumCyan.SetModifyHdl( aLink );
+ maNumMagenta.SetModifyHdl( aLink );
+ maNumYellow.SetModifyHdl( aLink );
+ maNumKey.SetModifyHdl( aLink );
+
+ maNumHue.SetModifyHdl( aLink );
+ maNumSaturation.SetModifyHdl( aLink );
+ maNumLuminance.SetModifyHdl( aLink );
+
+ aLink = ( LINK( this, SvColorDialog, ClickBtnHdl ) );
+ maBtn1.SetClickHdl( aLink );
+ maBtn2.SetClickHdl( aLink );
+ //maBtn3.SetClickHdl( aLink );
+ //maBtn4.SetClickHdl( aLink );
+
+ maColMixCtrl.SetExtraSpacing( 0 );
+}
+
+
+// -----------------------------------------------------------------------
+SvColorDialog::~SvColorDialog()
+{
+}
+
+// -----------------------------------------------------------------------
+void SvColorDialog::Initialize()
+{
+ maNumRed.SetValue( maColor.GetRed() );
+ maNumGreen.SetValue( maColor.GetGreen() );
+ maNumBlue.SetValue( maColor.GetBlue() );
+
+ ColorCMYK aColorCMYK( maColor );
+
+ long aCyan = (long) ( (double)aColorCMYK.GetCyan() * 100.0 / 255.0 + 0.5 );
+ long aMagenta = (long) ( (double)aColorCMYK.GetMagenta() * 100.0 / 255.0 + 0.5 );
+ long aYellow = (long) ( (double)aColorCMYK.GetYellow() * 100.0 / 255.0 + 0.5 );
+ long aKey = (long) ( (double)aColorCMYK.GetKey() * 100.0 / 255.0 + 0.5 );
+ maNumCyan.SetValue( aCyan );
+ maNumMagenta.SetValue( aMagenta );
+ maNumYellow.SetValue( aYellow );
+ maNumKey.SetValue( aKey );
+
+ ColorHSB aColorHSB( maColor );
+ maNumHue.SetValue( aColorHSB.GetHue() );
+ maNumSaturation.SetValue( aColorHSB.GetSat() );
+ maNumLuminance.SetValue( aColorHSB.GetBri() );
+
+ maCtlColor.SetColor( aColorHSB );
+
+ maColMixCtrl.SelectItem( 1 );
+
+ maCtlPreview.SetColor( maColor );
+ maCtlPreviewOld.SetColor( maColor );
+}
+
+// -----------------------------------------------------------------------
+void SvColorDialog::SetColor( const Color& rColor )
+{
+ maColor = rColor;
+}
+
+// -----------------------------------------------------------------------
+const Color& SvColorDialog::GetColor() const
+{
+ return( maColor );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
+{
+ UINT16 n = 0x00; // 1 == RGB, 2 == CMYK, 4 == HSB
+
+ if( p == &maCtlColor )
+ {
+ maColor = maCtlColor.GetColor();
+ maNumRed.SetValue( maColor.GetRed() );
+ maNumGreen.SetValue( maColor.GetGreen() );
+ maNumBlue.SetValue( maColor.GetBlue() );
+
+ n = 7;
+ }
+ else if( p == &maNumRed )
+ {
+ maColor.SetRed( (UINT8)maNumRed.GetValue() );
+ maCtlColor.SetColor( maColor );
+ n = 6;
+ }
+ else if( p == &maNumGreen )
+ {
+ maColor.SetGreen( (UINT8)maNumGreen.GetValue() );
+ maCtlColor.SetColor( maColor );
+ n = 6;
+ }
+ else if( p == &maNumBlue )
+ {
+ maColor.SetBlue( (UINT8)maNumBlue.GetValue() );
+ maCtlColor.SetColor( maColor );
+ n = 6;
+ }
+ else if( p == &maNumHue ||
+ p == &maNumSaturation ||
+ p == &maNumLuminance )
+ {
+
+ ColorHSB aColorHSB( (UINT16) maNumHue.GetValue(),
+ (UINT16) maNumSaturation.GetValue(),
+ (UINT16) maNumLuminance.GetValue() );
+ maCtlColor.SetColor( aColorHSB );
+ maColor = maCtlColor.GetColor();
+ n = 3;
+ }
+ else if( p == &maNumCyan ||
+ p == &maNumMagenta ||
+ p == &maNumYellow ||
+ p == &maNumKey )
+ {
+ long aCyan = (long) ( (double)maNumCyan.GetValue() * 255.0 / 100.0 + 0.5 );
+ long aMagenta = (long) ( (double)maNumMagenta.GetValue() * 255.0 / 100.0 + 0.5 );
+ long aYellow = (long) ( (double)maNumYellow.GetValue() * 255.0 / 100.0 + 0.5 );
+ long aKey = (long) ( (double)maNumKey.GetValue() * 255.0 / 100.0 + 0.5 );
+
+ ColorCMYK aColorCMYK( (UINT16) aCyan,
+ (UINT16) aMagenta,
+ (UINT16) aYellow,
+ (UINT16) aKey );
+ maColor = aColorCMYK.GetRGB();
+ maCtlColor.SetColor( maColor );
+ n = 5;
+ }
+
+ if( n & 1 ) // RGB setzen
+ {
+ maNumRed.SetValue( maColor.GetRed() );
+ maNumGreen.SetValue( maColor.GetGreen() );
+ maNumBlue.SetValue( maColor.GetBlue() );
+ }
+ if( n & 2 ) // CMYK setzen
+ {
+ ColorCMYK aColorCMYK( maColor );
+ long aCyan = (long) ( (double)aColorCMYK.GetCyan() * 100.0 / 255.0 + 0.5 );
+ long aMagenta = (long) ( (double)aColorCMYK.GetMagenta() * 100.0 / 255.0 + 0.5 );
+ long aYellow = (long) ( (double)aColorCMYK.GetYellow() * 100.0 / 255.0 + 0.5 );
+ long aKey = (long) ( (double)aColorCMYK.GetKey() * 100.0 / 255.0 + 0.5 );
+ maNumCyan.SetValue( aCyan );
+ maNumMagenta.SetValue( aMagenta );
+ maNumYellow.SetValue( aYellow );
+ maNumKey.SetValue( aKey );
+ }
+ if( n & 4 ) // HSB setzen
+ {
+ ColorHSB aColorHSB( maColor );
+ maNumHue.SetValue( aColorHSB.GetHue() );
+ maNumSaturation.SetValue( aColorHSB.GetSat() );
+ maNumLuminance.SetValue( aColorHSB.GetBri() );
+ }
+
+ maCtlPreview.SetColor( maColor );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvColorDialog, ClickBtnHdl, void *, p )
+{
+ /*
+ Color aColor = maCtlColor.GetColor();
+ if( p == &maBtn1 )
+ maColMixCtrl.SetColor( CMC_TOPLEFT, aColor );
+ if( p == &maBtn2 )
+ maColMixCtrl.SetColor( CMC_TOPRIGHT, aColor );
+ if( p == &maBtn3 )
+ maColMixCtrl.SetColor( CMC_BOTTOMLEFT, aColor );
+ if( p == &maBtn4 )
+ maColMixCtrl.SetColor( CMC_BOTTOMRIGHT, aColor );
+ */
+
+ if( p == &maBtn1 )
+ {
+ CMCPosition ePos = maColMixCtrl.GetCMCPosition();
+ if( ePos != CMC_OTHER )
+ maColMixCtrl.SetColor( ePos, maColor );
+ }
+ else if( p == &maBtn2 )
+ {
+ USHORT nPos = maColMixCtrl.GetSelectItemId();
+ maColor = maColMixCtrl.GetItemColor( nPos );
+ maCtlColor.SetColor( maColor );
+ ColorModifyHdl( &maCtlColor );
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvColorDialog, ClickMixCtrlHdl, void *, p )
+{
+ USHORT nPos = maColMixCtrl.GetSelectItemId();
+ CMCPosition ePos = maColMixCtrl.GetCMCPosition();
+
+ if( ePos != CMC_OTHER )
+ maColMixCtrl.SetColor( ePos, maColor );
+ else
+ {
+ maColor = maColMixCtrl.GetItemColor( nPos );
+ maCtlColor.SetColor( maColor );
+ ColorModifyHdl( &maCtlColor );
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvColorDialog, SelectMixCtrlHdl, void *, p )
+{
+ //USHORT nPos = maColMixCtrl.GetSelectItemId();
+ //maFtRGB.SetText( maColMixCtrl.GetItemText( nPos ) );
+
+ CMCPosition ePos = maColMixCtrl.GetCMCPosition();
+ if( ePos == CMC_OTHER )
+ maBtn1.Enable( FALSE );
+ else
+ maBtn1.Enable();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+short SvColorDialog::Execute()
+{
+ Initialize();
+
+ short nRet = ModalDialog::Execute();
+
+ return( nRet );
+}
+
diff --git a/svtools/source/dialogs/colrdlg.hrc b/svtools/source/dialogs/colrdlg.hrc
new file mode 100644
index 000000000000..6d06df632a8e
--- /dev/null
+++ b/svtools/source/dialogs/colrdlg.hrc
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: colrdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define DLG_COLOR 996
+
+#define VAL_SET_COLOR 2
+#define BTN_1 1
+#define BTN_2 2
+#define BTN_3 3
+#define BTN_4 4
+#define FT_RGB 12
+
+#define CTL_COLOR 1
+
+#define FT_RED 1
+#define NUM_RED 1
+#define FT_GREEN 2
+#define NUM_GREEN 2
+#define FT_BLUE 3
+#define NUM_BLUE 3
+
+#define FT_CYAN 7
+#define NUM_CYAN 7
+#define FT_MAGENTA 8
+#define NUM_MAGENTA 8
+#define FT_YELLOW 9
+#define NUM_YELLOW 9
+#define FT_KEY 10
+#define NUM_KEY 10
+
+#define FT_HUE 4
+#define NUM_HUE 4
+#define FT_SATURATION 5
+#define NUM_SATURATION 5
+#define FT_LUMINANCE 6
+#define NUM_LUMINANCE 6
+
+#define CTL_PREVIEW 3
+#define CTL_PREVIEW_OLD 4
+
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+
diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src
new file mode 100644
index 000000000000..e9b07fd387a1
--- /dev/null
+++ b/svtools/source/dialogs/colrdlg.src
@@ -0,0 +1,576 @@
+/*************************************************************************
+ *
+ * $RCSfile: colrdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "colrdlg.hrc"
+#define DIFF 3
+ModalDialog DLG_COLOR
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 165 + DIFF ) ;
+ Moveable = TRUE ;
+ Text = "Farbe" ;
+ Text [ ENGLISH ] = "Color" ;
+ Text [ english_us ] = "Color" ;
+ Text [ portuguese_brazilian ] = "Farbe" ;
+ Text [ swedish ] = "Färg" ;
+ Text [ danish ] = "Farve" ;
+ Text [ italian ] = "Colore" ;
+ Text [ spanish ] = "Color" ;
+ Text [ french ] = "Couleur" ;
+ Text [ dutch ] = "Kleur" ;
+ Text [ portuguese ] = "Cor" ;
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 205 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 205 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 205 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 100 , 6 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_RED
+ {
+ Pos = MAP_APPFONT ( 64 , 123 + DIFF ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ Text = "~Rot" ;
+ Text [ ENGLISH ] = "~Red" ;
+ Text [ english_us ] = "~Red" ;
+ Text [ portuguese_brazilian ] = "~Rot" ;
+ Text [ swedish ] = "~Rött" ;
+ Text [ danish ] = "Rød" ;
+ Text [ italian ] = "~Rosso" ;
+ Text [ spanish ] = "~Rojo" ;
+ Text [ french ] = "~Rouge" ;
+ Text [ dutch ] = "~Rood" ;
+ Text [ portuguese ] = "~Vermelho" ;
+ Text[ chinese_simplified ] = "ºìÉ«(~R)";
+ Text[ russian ] = "~Êðàñí.";
+ Text[ polish ] = "Czerw.";
+ Text[ japanese ] = "Ô(~R)";
+ Text[ chinese_traditional ] = "¬õ¦â(~R)";
+ Text[ arabic ] = "ÃÍãÑ";
+ Text[ dutch ] = "~Rood";
+ Text[ chinese_simplified ] = "ºìÉ«(~R)";
+ Text[ greek ] = "Êüêêéíï";
+ Text[ korean ] = "»¡°­(~R)";
+ Text[ turkish ] = "~Kýrmýzý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_GREEN
+ {
+ Pos = MAP_APPFONT ( 64 , 136 + DIFF ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Grün : ~Gr³n */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Grün : ~Gr³n */
+ Text = "~Grün" ;
+ Text [ ENGLISH ] = "~Green" ;
+ Text [ english_us ] = "~Green" ;
+ Text [ portuguese_brazilian ] = "~Grün" ;
+ Text [ swedish ] = "~Grönt" ;
+ Text [ danish ] = "Grøn" ;
+ Text [ italian ] = "~Verde" ;
+ Text [ spanish ] = "~Verde" ;
+ Text [ french ] = "~Vert" ;
+ Text [ dutch ] = "~Groen" ;
+ Text [ portuguese ] = "~Verde" ;
+ Text[ chinese_simplified ] = "ÂÌÉ«(~G)";
+ Text[ russian ] = "~Çåëåí.";
+ Text[ polish ] = "Zielony";
+ Text[ japanese ] = "—Î(~G)";
+ Text[ chinese_traditional ] = "ºñ¦â(~G)";
+ Text[ arabic ] = "ÃÎÖÑ";
+ Text[ dutch ] = "~Groen";
+ Text[ chinese_simplified ] = "ÂÌÉ«(~G)";
+ Text[ greek ] = "ÐñÜóéíï";
+ Text[ korean ] = "ÃÊ·Ï(~G)";
+ Text[ turkish ] = "~Yeþil";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BLUE
+ {
+ Pos = MAP_APPFONT ( 64 , 149 + DIFF ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ Text = "~Blau" ;
+ Text [ ENGLISH ] = "~Blue" ;
+ Text [ english_us ] = "~Blue" ;
+ Text [ portuguese_brazilian ] = "~Blau" ;
+ Text [ swedish ] = "~Blått" ;
+ Text [ danish ] = "Blå" ;
+ Text [ italian ] = "~Blu" ;
+ Text [ spanish ] = "~Azul" ;
+ Text [ french ] = "~Bleu" ;
+ Text [ dutch ] = "~Blauw" ;
+ Text [ portuguese ] = "~Azul" ;
+ Text[ chinese_simplified ] = "À¶É«(~B)";
+ Text[ russian ] = "Ñèíèé";
+ Text[ polish ] = "Nieb.";
+ Text[ japanese ] = "Â(~B)";
+ Text[ chinese_traditional ] = "ÂŦâ(~B)";
+ Text[ arabic ] = "ÃÒÑÞ";
+ Text[ dutch ] = "~Blauw";
+ Text[ chinese_simplified ] = "À¶É«(~B)";
+ Text[ greek ] = "Ìðëå";
+ Text[ korean ] = "ÆĶû(~B)";
+ Text[ turkish ] = "~Mavi";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_RED
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 88 , 122 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 255 ;
+ Last = 255 ;
+ };
+ NumericField NUM_GREEN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 88 , 135 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 255 ;
+ Last = 255 ;
+ };
+ NumericField NUM_BLUE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 88 , 148 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 255 ;
+ Last = 255 ;
+ };
+ FixedText FT_CYAN
+ {
+ Pos = MAP_APPFONT ( 6 , 110 + DIFF ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Cyan" ;
+ Text [ ENGLISH ] = "~Cyan" ;
+ Text [ english_us ] = "~Cyan" ;
+ Text [ portuguese_brazilian ] = "~Cyan" ;
+ Text [ swedish ] = "~Cyanblått" ;
+ Text [ danish ] = "Cyan" ;
+ Text [ italian ] = "~Ciano" ;
+ Text [ spanish ] = "~Cian" ;
+ Text [ french ] = "~Cyan" ;
+ Text [ dutch ] = "~Cyaan" ;
+ Text [ portuguese ] = "~Ciano" ;
+ Text[ chinese_simplified ] = "À¶ÂÌÉ«(~C)";
+ Text[ russian ] = "Ãîëóáîé";
+ Text[ polish ] = "Nieb.-ziel.";
+ Text[ japanese ] = "¼±Ý(~C)";
+ Text[ chinese_traditional ] = "Âźñ¦â(~C)";
+ Text[ arabic ] = "ÃÒÑÞ ÓãÇæí";
+ Text[ dutch ] = "~Cyaan";
+ Text[ chinese_simplified ] = "À¶ÂÌÉ«(~C)";
+ Text[ greek ] = "Êõáíü";
+ Text[ korean ] = "û·Ï(~C)";
+ Text[ turkish ] = "~Camgöbeði";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MAGENTA
+ {
+ Pos = MAP_APPFONT ( 6 , 123 + DIFF ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Magenta" ;
+ Text [ ENGLISH ] = "~Magenta" ;
+ Text [ english_us ] = "~Magenta" ;
+ Text [ portuguese_brazilian ] = "~Magenta" ;
+ Text [ swedish ] = "~Magenta" ;
+ Text [ danish ] = "Magenta" ;
+ Text [ italian ] = "~Magenta" ;
+ Text [ spanish ] = "~Magenta" ;
+ Text [ french ] = "~Magenta" ;
+ Text [ dutch ] = "~Magenta" ;
+ Text [ portuguese ] = "~Magenta" ;
+ Text[ chinese_simplified ] = "×ϺìÉ«(~M)";
+ Text[ russian ] = "~Ëèëîâûé";
+ Text[ polish ] = "Purpurowy";
+ Text[ japanese ] = "ϾÞÝÀ(~M)";
+ Text[ chinese_traditional ] = "µµ¬õ¦â(~M)";
+ Text[ arabic ] = "ÃÑÌæÇäí";
+ Text[ dutch ] = "~Magenta";
+ Text[ chinese_simplified ] = "×ϺìÉ«(~M)";
+ Text[ greek ] = "ÌáôæÝíôá";
+ Text[ korean ] = "¸¶Á¨Å¸(~M)";
+ Text[ turkish ] = "M~or";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_YELLOW
+ {
+ Pos = MAP_APPFONT ( 6 , 136 + DIFF ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Yellow" ;
+ Text [ ENGLISH ] = "~Yellow" ;
+ Text [ english_us ] = "~Yellow" ;
+ Text [ portuguese_brazilian ] = "~Yellow" ;
+ Text [ swedish ] = "~Gult" ;
+ Text [ danish ] = "Gul" ;
+ Text [ italian ] = "~Giallo" ;
+ Text [ spanish ] = "~Amarillo" ;
+ Text [ french ] = "~Jaune" ;
+ Text [ dutch ] = "~Yellow" ;
+ Text [ portuguese ] = "~Amarelo" ;
+ Text[ chinese_simplified ] = "»ÆÉ«(~Y)";
+ Text[ russian ] = "~Æåëòûé";
+ Text[ polish ] = "¯ó³ty";
+ Text[ japanese ] = "‰©(~Y)";
+ Text[ chinese_traditional ] = "¶À¦â(~Y)";
+ Text[ arabic ] = "ÃÕÝÑ";
+ Text[ dutch ] = "~Yellow";
+ Text[ chinese_simplified ] = "»ÆÉ«(~Y)";
+ Text[ greek ] = "Êßôñéíï";
+ Text[ korean ] = "³ë¶û(~Y)";
+ Text[ turkish ] = "~Sarý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_KEY
+ {
+ Pos = MAP_APPFONT ( 6 , 149 + DIFF ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Key" ;
+ Text [ ENGLISH ] = "~Key" ;
+ Text [ english_us ] = "~Key" ;
+ Text [ portuguese_brazilian ] = "~Key" ;
+ Text [ swedish ] = "~Key" ;
+ Text [ danish ] = "Nøgle" ;
+ Text [ italian ] = "~Chiave" ;
+ Text [ spanish ] = "~Llave" ;
+ Text [ french ] = "~Khôl" ;
+ Text [ dutch ] = "~Key" ;
+ Text [ portuguese ] = "~Chave" ;
+ Text[ chinese_simplified ] = "¼üÂë(~K)";
+ Text[ russian ] = "~Êëþ÷";
+ Text[ polish ] = "Klucz";
+ Text[ japanese ] = "•(~K)";
+ Text[ chinese_traditional ] = "Áä½X(~K)";
+ Text[ arabic ] = "ãÝÊÇÍ";
+ Text[ dutch ] = "~Key";
+ Text[ chinese_simplified ] = "¼üÂë(~K)";
+ Text[ greek ] = "~Êëåéäß";
+ Text[ korean ] = "Å°(~K)";
+ Text[ turkish ] = "~Key";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField NUM_CYAN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 34 , 109 + DIFF ) ;
+ Size = MAP_APPFONT ( 27 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField NUM_MAGENTA
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 34 , 122 + DIFF ) ;
+ Size = MAP_APPFONT ( 27 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField NUM_YELLOW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 34 , 135 + DIFF ) ;
+ Size = MAP_APPFONT ( 27 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField NUM_KEY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 34 , 148 + DIFF ) ;
+ Size = MAP_APPFONT ( 27 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ Control CTL_PREVIEW_OLD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 184 , 109 ) ;
+ Size = MAP_APPFONT ( 35 , 51 + DIFF ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 219 , 109 ) ;
+ Size = MAP_APPFONT ( 35 , 51 + DIFF ) ;
+ TabStop = TRUE ;
+ };
+ Control VAL_SET_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 91 , 100 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_HUE
+ {
+ Pos = MAP_APPFONT ( 117 , 123 + DIFF ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "H~ue" ;
+ Text [ english_us ] = "H~ue" ;
+ Text [ portuguese_brazilian ] = "~Farbe" ;
+ Text [ swedish ] = "~Färg" ;
+ Text [ danish ] = "Farve" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ spanish ] = "~Color" ;
+ Text [ french ] = "~Teinte" ;
+ Text [ dutch ] = "~Kleur" ;
+ Text [ portuguese ] = "~Tons" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«(~U)";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F‡‚¢(~U)";
+ Text[ chinese_traditional ] = "ÃC¦â(~U)";
+ Text[ arabic ] = "Çááæä";
+ Text[ dutch ] = "~Kleur";
+ Text[ chinese_simplified ] = "ÑÕÉ«(~U)";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»öÁ¶(~U)";
+ Text[ turkish ] = "~Renk";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_HUE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 153 , 122 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 359 ;
+ Last = 359 ;
+ };
+ FixedText FT_SATURATION
+ {
+ Pos = MAP_APPFONT ( 117 , 136 + DIFF ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Sättigung : ~Sõttigung */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Sättigung : ~Sõttigung */
+ Text = "~Sättigung" ;
+ Text [ ENGLISH ] = "~Saturation" ;
+ Text [ english_us ] = "~Saturation" ;
+ Text [ portuguese_brazilian ] = "~Sättigung" ;
+ Text [ swedish ] = "Mä~ttnad" ;
+ Text [ danish ] = "Mætning" ;
+ Text [ italian ] = "~Saturazione" ;
+ Text [ spanish ] = "~Saturación" ;
+ Text [ french ] = "S~aturation" ;
+ Text [ dutch ] = "~Verzadiging" ;
+ Text [ portuguese ] = "~Saturação" ;
+ Text[ chinese_simplified ] = "±¥ºÍ¶È(~S)";
+ Text[ russian ] = "~Íàñûùåí.";
+ Text[ polish ] = "Nasycenie";
+ Text[ japanese ] = "Ê“x(~S)";
+ Text[ chinese_traditional ] = "¹¡©M«×(~S)";
+ Text[ arabic ] = "ÇáÅÔÈÇÚ";
+ Text[ dutch ] = "~Verzadiging";
+ Text[ chinese_simplified ] = "±¥ºÍ¶È(~S)";
+ Text[ greek ] = "Êïñå~óìüò";
+ Text[ korean ] = "äµµ(~S)";
+ Text[ turkish ] = "~Doygunluk";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_SATURATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 153 , 135 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ };
+ FixedText FT_LUMINANCE
+ {
+ Pos = MAP_APPFONT ( 117 , 149 + DIFF ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "He~lligkeit" ;
+ Text [ ENGLISH ] = "~Luminance" ;
+ Text [ english_us ] = "Bright~ness" ;
+ Text [ portuguese_brazilian ] = "He~lligkeit" ;
+ Text [ swedish ] = "~Ljusstyrka" ;
+ Text [ danish ] = "Lysstyrke" ;
+ Text [ italian ] = "~Luminosità" ;
+ Text [ spanish ] = "~Brillo" ;
+ Text [ french ] = "~Luminosité" ;
+ Text [ dutch ] = "Hel~derheid" ;
+ Text [ portuguese ] = "~Brilho" ;
+ Text[ chinese_simplified ] = "ÁÁ¶È(~L)";
+ Text[ russian ] = "ßðêîñòü";
+ Text[ polish ] = "JasnoϾ";
+ Text[ japanese ] = "–¾“x(~L)";
+ Text[ chinese_traditional ] = "«G«×(~L)";
+ Text[ arabic ] = "ÇáÅÖÇÁÉ";
+ Text[ dutch ] = "Hel~derheid";
+ Text[ chinese_simplified ] = "ÁÁ¶È(~L)";
+ Text[ greek ] = "Öùôåéíüôçôá";
+ Text[ korean ] = "¹à±â(~N)";
+ Text[ turkish ] = "Par~laklýk";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_LUMINANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 153 , 148 + DIFF ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Last = 100 ;
+ };
+ /*
+ FixedText FT_RGB {
+ Pos = MAP_APPFONT( 6, 110 );
+ Size = MAP_APPFONT( 43, 10 );
+ };
+*/
+ PushButton BTN_1
+ {
+ Pos = MAP_APPFONT ( 80 , 109 ) ;
+ Size = MAP_APPFONT ( 17 , 12 ) ;
+ Text = "~<--" ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_2
+ {
+ Pos = MAP_APPFONT ( 100 , 109 ) ;
+ Size = MAP_APPFONT ( 17 , 12 ) ;
+ Text = "--~>" ;
+ TabStop = TRUE ;
+ };
+ /*
+ PushButton BTN_3 {
+ Pos = MAP_APPFONT( 6, 137 );
+ Size = MAP_APPFONT( 12, 12 );
+ Text = "~3";
+ TabStop = TRUE;
+ };
+ PushButton BTN_4 {
+ Pos = MAP_APPFONT( 21, 137 );
+ Size = MAP_APPFONT( 12, 12 );
+ Text = "~4";
+ TabStop = TRUE;
+ };
+*/
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "ÃC¦â";
+ Text[ arabic ] = "Çááæä";
+ Text[ dutch ] = "Kleur";
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»ö»ó";
+ Text[ turkish ] = "Renk";
+ Text[ language_user1 ] = " ";
+};
diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx
new file mode 100644
index 000000000000..f596badb43e6
--- /dev/null
+++ b/svtools/source/dialogs/filedlg.cxx
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * $RCSfile: filedlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <filedlg.hxx>
+#include <filedlg2.hxx>
+#include <vcl/rcid.h>
+
+PathDialog::PathDialog( Window* _pParent, WinBits nStyle, BOOL bCreateDir ) :
+ ModalDialog( _pParent, WB_STDMODAL | nStyle )
+{
+ pImpFileDlg = new ImpSvFileDlg;
+ pImpFileDlg->CreateDialog( this, nStyle, WINDOW_PATHDIALOG, bCreateDir );
+}
+
+PathDialog::~PathDialog()
+{
+ delete pImpFileDlg;
+}
+
+short PathDialog::Execute()
+{
+ pImpFileDlg->GetDialog()->PreExecute();
+ short n = ModalDialog::Execute();
+ return n;
+}
+
+UniString PathDialog::GetPath() const
+{
+ return pImpFileDlg->GetDialog()->GetPath();
+}
+
+void PathDialog::SetPath( const UniString& rPath )
+{
+ pImpFileDlg->GetDialog()->SetPath( rPath );
+}
+
+void PathDialog::SetPath( const Edit& rEdit )
+{
+ pImpFileDlg->GetDialog()->SetPath( rEdit );
+}
+
+long PathDialog::OK()
+{
+ if( aOKHdlLink.IsSet() )
+ return aOKHdlLink.Call( this );
+ else
+ return TRUE;
+}
+
+
+FileDialog::FileDialog( Window* _pParent, WinBits nStyle ) :
+ PathDialog( _pParent, WB_STDMODAL | nStyle )
+{
+ // Dadurch dass hier bei VCL nicht der CTOR mit ResType verwendet wird,
+ // wurde im PathDialog-CTOR leider ein ImpPathDialog angelegt...
+ // So zwar scheisse, aber der Dialog ist eh' nur ein Hack:
+ pImpFileDlg->CreateDialog( this, nStyle, WINDOW_FILEDIALOG, FALSE );
+}
+
+FileDialog::~FileDialog()
+{
+}
+
+void FileDialog::AddFilter( const UniString& rFilter, const UniString& rMask )
+{
+ ((ImpFileDialog*)pImpFileDlg->GetDialog())->AddFilter( rFilter, rMask );
+}
+
+void FileDialog::AddFilter( const UniString& rFilter, const UniString& rMask, const UniString& rSysType )
+{
+ ((ImpFileDialog*)pImpFileDlg->GetDialog())->AddFilter( rFilter, rMask );
+}
+
+void FileDialog::RemoveFilter( const UniString& rFilter )
+{
+ ((ImpFileDialog*)pImpFileDlg->GetDialog())->RemoveFilter( rFilter );
+}
+
+void FileDialog::RemoveAllFilter()
+{
+ ((ImpFileDialog*)pImpFileDlg->GetDialog())->RemoveAllFilter();
+}
+
+void FileDialog::SetCurFilter( const UniString& rFilter )
+{
+ ((ImpFileDialog*)pImpFileDlg->GetDialog())->SetCurFilter( rFilter );
+}
+
+UniString FileDialog::GetCurFilter() const
+{
+ return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetCurFilter();
+}
+
+void FileDialog::FileSelect()
+{
+ aFileHdlLink.Call( this );
+}
+
+void FileDialog::FilterSelect()
+{
+ aFilterHdlLink.Call( this );
+}
+
+USHORT FileDialog::GetFilterCount() const
+{
+ return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterCount();
+}
+
+UniString FileDialog::GetFilterName( USHORT nPos ) const
+{
+ return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterName( nPos );
+}
+
+UniString FileDialog::GetFilterType( USHORT nPos ) const
+{
+ return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterType( nPos );
+}
+
+void FileDialog::SetOkButtonText( const UniString& rText )
+{
+ pImpFileDlg->SetOkButtonText( rText );
+}
+
+void FileDialog::SetCancelButtonText( const UniString& rText )
+{
+ pImpFileDlg->SetCancelButtonText( rText );
+}
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
new file mode 100644
index 000000000000..cd798724a878
--- /dev/null
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -0,0 +1,1377 @@
+/*************************************************************************
+ *
+ * $RCSfile: filedlg2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <svtdata.hxx>
+
+#include <filedlg2.hxx>
+#include <filedlg.hxx>
+#include <filedlg2.hrc>
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _VOS_SECURITY_HXX_
+#include <vos/security.hxx>
+#endif
+
+#include <vcl/rcid.h>
+
+#include <stdctrl.hxx>
+
+#if defined (WNT) && defined (MSC)
+#pragma optimize ("", off)
+#endif
+
+#include <helpid.hrc>
+
+
+DECLARE_LIST( UniStringList, UniString* );
+
+#define STD_BTN_WIDTH 80
+#define STD_BTN_HEIGHT 26
+
+#ifndef UNX
+ #define ALLFILES "*.*"
+#else
+ #define ALLFILES "*"
+#endif
+// #define STD_BTN_WIDTH 90
+// #define STD_BTN_HEIGHT 35
+
+#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, nHelpId ) \
+ p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
+ p->SetHelpId( nHelpId ); \
+ p->SetPosSizePixel( aPos, aSize ); \
+ p->SetText( aTitel ); \
+ p->Show();
+
+
+inline BOOL IsPrintable( sal_Unicode c )
+{
+ return c >= 32 && c != 127 ? TRUE : FALSE;
+}
+
+long
+KbdListBox::PreNotify( NotifyEvent& rNEvt )
+{
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
+ sal_Unicode cCharCode = aKeyEvt.GetCharCode();
+
+ if ( IsPrintable ( cCharCode ) )
+ {
+ USHORT nCurrentPos = GetSelectEntryPos();
+ USHORT nEntries = GetEntryCount();
+
+ for ( USHORT i = 1; i < nEntries; i++ )
+ {
+ UniString aEntry = GetEntry ( (i + nCurrentPos) % nEntries );
+ aEntry.EraseLeadingChars( ' ' );
+ aEntry.ToUpperAscii();
+ UniString aCompare( cCharCode );
+ aCompare.ToUpperAscii();
+
+ if ( aEntry.CompareTo( aCompare, 1 ) == COMPARE_EQUAL )
+ {
+ SelectEntryPos ( (i + nCurrentPos) % nEntries );
+ break;
+ }
+ }
+ }
+ else
+ if ( aKeyEvt.GetKeyCode().GetCode() == KEY_RETURN )
+ {
+ DoubleClick();
+ }
+ }
+
+ return ListBox::PreNotify ( rNEvt );
+}
+
+ImpPathDialog::ImpPathDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType, BOOL bCreateDir )
+{
+ pSvPathDialog = pDlg;
+ nDirCount = 0;
+
+ // initialize Controls if not used as a base class
+ if ( nType == WINDOW_PATHDIALOG )
+ {
+ InitControls();
+ if( pNewDirBtn )
+ pNewDirBtn->Enable( bCreateDir );
+ }
+
+ pDlg->SetHelpId( HID_FILEDLG_PATHDLG );
+}
+
+ImpPathDialog::~ImpPathDialog()
+{
+ delete pEdit;
+ delete pDirTitel;
+ delete pDirList;
+ delete pDirPath;
+ delete pDriveList;
+ delete pDriveTitle;
+ delete pLoadBtn;
+ delete pOkBtn;
+ delete pCancelBtn;
+ delete pNewDirBtn;
+# ifdef UNX
+ delete pHomeBtn;
+# endif
+}
+
+void ImpPathDialog::InitControls()
+{
+ PathDialog* pDlg = GetPathDialog();
+ pDlg->SetText( UniString( SvtResId( STR_FILEDLG_SELECT ) ) );
+
+ Size a3Siz = pDlg->LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size a6Siz = pDlg->LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
+ Size aBtnSiz = pDlg->LogicToPixel( Size( 70, 14 ), MAP_APPFONT );
+ Size aFTSiz = pDlg->LogicToPixel( Size( 142, 10 ), MAP_APPFONT );
+ Size aEDSiz = pDlg->LogicToPixel( Size( 142, 12 ), MAP_APPFONT );
+ Point aPnt( a6Siz.Width(), a6Siz.Height() );
+ long nLbH1 = pDlg->LogicToPixel( Size( 0, 93 ), MAP_APPFONT ).Height();
+ long nLbH2 = pDlg->LogicToPixel( Size( 0, 60 ), MAP_APPFONT ).Height();
+ long nH = 0;
+ UniString aEmptyStr;
+
+ INITCONTROL( pDirTitel, FixedText, 0,
+ aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DIR ) ), HID_FILEDLG_DIR );
+ aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
+
+ INITCONTROL( pEdit, Edit, WB_BORDER, aPnt, aEDSiz, aPath.GetFull(), HID_FILEDLG_EDIT );
+
+ aPnt.Y() += aEDSiz.Height() + a3Siz.Height();
+#ifndef UNX
+ INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
+ aPnt, Size( aEDSiz.Width(), nLbH1 ), aEmptyStr, HID_FILEDLG_DIRS );
+ aPnt.Y() += nLbH1 + a6Siz.Height();
+ INITCONTROL( pDriveTitle, FixedText, 0,
+ aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DRIVES ) ), HID_FILEDLG_DRIVE );
+ aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
+ INITCONTROL( pDriveList, ListBox, WB_DROPDOWN,
+ aPnt, Size( aEDSiz.Width(), nLbH2 ), aEmptyStr, HID_FILEDLG_DRIVES );
+ nH = aPnt.Y() + aEDSiz.Height() + a6Siz.Height();
+#else
+ long nNewH = nLbH1 + 3 * a3Siz.Height() +
+ aFTSiz.Height() + aEDSiz.Height();
+ INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
+ aPnt, Size( aEDSiz.Width(), nNewH ), aEmptyStr, HID_FILEDLG_DIRS );
+ nH = aPnt.Y() + nNewH + a6Siz.Height();
+ pDriveTitle = NULL;
+ pDriveList = NULL;
+#endif
+
+ aPnt.X() = 2 * a6Siz.Width() + aEDSiz.Width();
+ aPnt.Y() = a6Siz.Height();
+ INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON,
+ aPnt, aBtnSiz, Button::GetStandardText( BUTTON_OK ), 0 );
+ aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
+ INITCONTROL( pCancelBtn, CancelButton, 0,
+ aPnt, aBtnSiz, Button::GetStandardText( BUTTON_CANCEL ), 0 );
+ aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
+ INITCONTROL( pNewDirBtn, PushButton, WB_DEFBUTTON,
+ aPnt, aBtnSiz, UniString( SvtResId( STR_FILEDLG_NEWDIR ) ), HID_FILEDLG_NEWDIR );
+#ifdef UNX
+ aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
+ INITCONTROL( pHomeBtn, PushButton, WB_DEFBUTTON,
+ aPnt, aBtnSiz, UniString( SvtResId( STR_FILEDLG_HOME ) ), HID_FILEDLG_HOME );
+#else
+ pHomeBtn = NULL;
+#endif
+
+ pDirPath = 0;
+ pLoadBtn = 0;
+ // Dialogbreite == OKBtn-Position + OKBtn-Breite + Rand
+ long nW = aPnt.X() + aBtnSiz.Width() + a6Siz.Width();
+
+ pDlg->SetOutputSizePixel( Size( nW, nH ) ); // Groesse ggf. auch Resource wird geplaettet?
+
+ if (pDirList)
+ pDirList->SetDoubleClickHdl(LINK( this, ImpPathDialog, DblClickHdl) );
+
+ if (pDirList)
+ pDirList->SetSelectHdl( LINK( this, ImpPathDialog, SelectHdl ) );
+
+ if (pDriveList)
+ pDriveList->SetSelectHdl( LINK( this, ImpPathDialog, SelectHdl ) );
+
+ if (pOkBtn)
+ pOkBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
+
+ if (pCancelBtn)
+ pCancelBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
+
+ if (pHomeBtn)
+ pHomeBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
+
+ if (pNewDirBtn)
+ pNewDirBtn->SetClickHdl( LINK( this, ImpPathDialog, ClickHdl) );
+
+ nOwnChilds = pDlg->GetChildCount();
+}
+
+
+
+IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p )
+{
+ if( p == pDriveList )
+ {
+ UniString aDrive( pDriveList->GetSelectEntry(), 0, 2);
+ aDrive += '\\';
+ SetPath( aDrive );
+ }
+ else
+ if( p == pDirList )
+ {
+ // isolate the pure name of the entry
+ // removing trainling stuff and leading spaces
+ UniString aEntry( pDirList->GetSelectEntry() );
+
+ aEntry.EraseLeadingChars( ' ' );
+ USHORT nPos = aEntry.Search( '/' );
+ aEntry.Erase( nPos );
+
+ // build the absolute path to the selected item
+ DirEntry aNewPath;
+ aNewPath.ToAbs();
+
+ USHORT nCurPos = pDirList->GetSelectEntryPos();
+
+ // Wird nach oben gewechselt
+ if( nCurPos < nDirCount )
+ aNewPath = aNewPath[nDirCount-nCurPos-1];
+ else
+ aNewPath += aEntry;
+
+ pEdit->SetText( aNewPath.GetFull() );
+ }
+
+ return 0;
+}
+
+
+IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
+{
+ if ( pBtn == pOkBtn || pBtn == pLoadBtn )
+ {
+ DirEntry aFile( pEdit->GetText() );
+
+ // Existiert File / File ueberschreiben
+ if( IsFileOk( aFile ) )
+ {
+ // Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
+ aPath = aFile;
+ aPath.ToAbs();
+ GetPathDialog()->EndDialog( TRUE );
+ }
+ else
+ {
+ DirEntry aCheck( aPath );
+ aCheck += aFile;
+ if( aCheck.Exists() )
+ {
+ aCheck.ToAbs();
+ SetPath( aCheck.GetFull() );
+ pEdit->SetSelection( Selection( 0x7FFFFFFF, 0x7FFFFFFF ) );
+ }
+ }
+ }
+ else
+ if ( pBtn == pCancelBtn )
+ {
+ GetPathDialog()->EndDialog( FALSE );
+ }
+ else
+ if ( pBtn == pHomeBtn )
+ {
+ NAMESPACE_RTL( OUString )aHomeDir;
+ NAMESPACE_VOS( OSecurity ) aSecurity;
+ if ( aSecurity.getHomeDir( aHomeDir ) )
+ {
+ DirEntry aFile ( aHomeDir );
+ if ( IsFileOk( aFile ) )
+ {
+ aFile.ToAbs();
+ SetPath( aFile.GetFull() );
+ }
+ }
+ }
+ else
+ if ( pBtn == pNewDirBtn )
+ {
+ DirEntry aFile( pEdit->GetText() );
+ if( ! aFile.Exists() && ! FileStat( aFile ).IsKind( FSYS_KIND_WILD ) )
+ aFile.MakeDir();
+
+ if( IsFileOk ( aFile ) )
+ {
+ aFile.ToAbs();
+ SetPath( aFile.GetFull() );
+ }
+ }
+
+ return 0;
+}
+
+
+IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
+{
+ // isolate the pure name of the entry
+ // removing trainling stuff and leading spaces
+ UniString aEntry( pBox->GetSelectEntry() );
+
+ aEntry.EraseLeadingChars( ' ' );
+ USHORT nPos = aEntry.Search( '/' );
+ aEntry.Erase( nPos );
+
+ // build the absolute path to the selected item
+ DirEntry aNewPath;
+ aNewPath.ToAbs();
+ if( pBox == pDirList )
+ {
+ USHORT nCurPos = pDirList->GetSelectEntryPos();
+
+ // Wenn es schon das aktuelle ist, dann mache nichts
+ if( nCurPos == nDirCount-1 )
+ return 0;
+
+ // Wird nach oben gewechselt
+ if( nCurPos < nDirCount )
+ aNewPath = aNewPath[nDirCount-nCurPos-1];
+ else
+ aNewPath += aEntry;
+ }
+ else
+ aNewPath += aEntry;
+
+ USHORT nCurPos = pBox->GetSelectEntryPos();
+
+ pSvPathDialog->EnterWait();
+
+ if( FileStat( aNewPath ).GetKind() & FSYS_KIND_DIR )
+ {
+ // Neuen Pfad setzen und Listboxen updaten
+ aPath = aNewPath;
+ if( !aPath.SetCWD( TRUE ) )
+ {
+ ErrorBox aBox( GetPathDialog(),
+ WB_OK_CANCEL | WB_DEF_OK,
+ UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) );
+ if( aBox.Execute() == RET_CANCEL )
+ GetPathDialog()->EndDialog( FALSE );
+ }
+ UpdateEntries( TRUE );
+ }
+
+ pSvPathDialog->LeaveWait();
+ return 0;
+}
+
+void ImpPathDialog::UpdateEntries( const BOOL dummy_bWithDirs )
+{
+ UniString aTabString;
+ DirEntry aTmpPath;
+ aTmpPath.ToAbs();
+
+ nDirCount = aTmpPath.Level();
+
+ pDirList->SetUpdateMode( FALSE );
+ pDirList->Clear();
+
+ for( USHORT i = nDirCount; i > 0; i-- )
+ {
+ UniString aName( aTabString );
+ aName += aTmpPath[i-1].GetName();
+ pDirList->InsertEntry( aName );
+ aTabString.AppendAscii( " ", 2 );
+ }
+
+ // scan the directory
+ DirEntry aCurrent;
+ aCurrent.ToAbs();
+
+ Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
+
+ USHORT nEntries = aDir.Count();
+ if( nEntries )
+ {
+ UniStringList aSortDirList;
+ for ( USHORT n = 0; n < nEntries; n++ )
+ {
+ DirEntry& rEntry = aDir[n];
+ UniString aName( rEntry.GetName() );
+ if( aName.Len() && ( aName.GetChar(0) != '.' ) && rEntry.Exists() )
+ {
+ if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
+ {
+ ULONG l;
+ for( l = 0; l < aSortDirList.Count(); l++ )
+ if( *aSortDirList.GetObject(l) > aName )
+ break;
+ aSortDirList.Insert( new UniString( aName ), l );
+ }
+ }
+ }
+
+ for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ {
+ UniString aEntryStr( aTabString );
+ aEntryStr += *aSortDirList.GetObject(l);
+ pDirList->InsertEntry( aEntryStr );
+ delete aSortDirList.GetObject(l);
+ }
+ }
+
+ UpdateDirs( aTmpPath );
+}
+
+void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
+{
+ pDirList->SelectEntryPos( nDirCount-1 );
+ pDirList->SetTopEntry( nDirCount > 1
+ ? nDirCount - 2
+ : nDirCount - 1 );
+ pDirList->SetUpdateMode( TRUE );
+ pDirList->Invalidate();
+ pDirList->Update();
+
+ UniString aDirName = rTmpPath.GetFull();
+ if( pDirPath )
+ pDirPath->SetText( aDirName );
+ else
+ pEdit->SetText( aDirName );
+}
+
+BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
+{
+ if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
+ return FALSE;
+ else
+ {
+ // Datei vorhanden ?
+ if( ! rDirEntry.Exists() )
+ {
+ UniString aQueryTxt( SvtResId( STR_FILEDLG_ASKNEWDIR ) );
+ aQueryTxt.SearchAndReplaceAscii( "%s", rDirEntry.GetFull() );
+ QueryBox aQuery( GetPathDialog(),
+ WB_YES_NO | WB_DEF_YES,
+ aQueryTxt );
+ if( aQuery.Execute() == RET_YES )
+ rDirEntry.MakeDir();
+ else
+ return FALSE;
+ }
+ if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) )
+ {
+ UniString aBoxText( SvtResId( STR_FILEDLG_CANTOPENDIR ) );
+ aBoxText.AppendAscii( "\n[" );
+ aBoxText += rDirEntry.GetFull();
+ aBoxText.AppendAscii( "]" );
+ InfoBox aBox( GetPathDialog(), aBoxText );
+ aBox.Execute();
+ return FALSE;
+ }
+ }
+ return GetPathDialog()->OK() != 0;
+}
+
+
+void ImpPathDialog::PreExecute()
+{
+ // Neues Verzeichnis setzen und Listboxen updaten
+ aPath.SetCWD( TRUE );
+ UpdateEntries( TRUE );
+
+ // Zusaetzliche Buttons anordnen
+ Point aPos;
+ Size aSize;
+ long nDY;
+ if( pLoadBtn )
+ {
+ aPos = pLoadBtn->GetPosPixel();
+ aSize = pLoadBtn->GetSizePixel();
+ nDY = pLoadBtn->GetSizePixel().Height() * 2;
+ }
+ else
+ {
+ aPos = pCancelBtn->GetPosPixel();
+ aSize = pCancelBtn->GetSizePixel();
+ nDY = pCancelBtn->GetPosPixel().Y() - pOkBtn->GetPosPixel().Y();
+ }
+
+ // Standard-Controls anpassen
+ long nMaxWidth = 0;
+
+ // Maximale Breite ermitteln
+ USHORT nChilds = GetPathDialog()->GetChildCount();
+ USHORT n;
+ for ( n = nOwnChilds; n < nChilds; n++ )
+ {
+ Window* pChild = GetPathDialog()->GetChild( n );
+ pChild = pChild->GetWindow( WINDOW_CLIENT );
+ if( pChild->GetType() != WINDOW_WINDOW )
+ {
+ long nWidth = pChild->GetTextWidth( pChild->GetText() ) + 12;
+ if( nMaxWidth < nWidth )
+ nMaxWidth = nWidth;
+ nWidth = pChild->GetSizePixel().Width();
+ if( nMaxWidth < nWidth )
+ nMaxWidth = nWidth;
+ }
+ }
+
+ if( nMaxWidth > aSize.Width() )
+ {
+ Size aDlgSize = GetPathDialog()->GetOutputSizePixel();
+ GetPathDialog()->SetOutputSizePixel( Size( aDlgSize.Width()+nMaxWidth-aSize.Width(), aDlgSize.Height() ) );
+ aSize.Width() = nMaxWidth;
+
+ if( pOkBtn )
+ pOkBtn->SetSizePixel( aSize );
+ if( pCancelBtn )
+ pCancelBtn->SetSizePixel( aSize );
+ if( pLoadBtn )
+ pLoadBtn->SetSizePixel( aSize );
+ }
+ else
+ nMaxWidth = aSize.Width();
+
+ for ( n = nOwnChilds; n < nChilds; n++ )
+ {
+ Window* pChild = GetPathDialog()->GetChild( n );
+ pChild = pChild->GetWindow( WINDOW_CLIENT );
+ if( pChild->GetType() != WINDOW_WINDOW )
+ {
+ aPos.Y() += nDY;
+ pChild->SetPosSizePixel( aPos, aSize );
+ }
+ else
+ {
+ Size aDlgSize = GetPathDialog()->GetOutputSizePixel();
+ long nExtra = Min( aDlgSize.Height(), (long)160);
+ GetPathDialog()->SetOutputSizePixel( Size( aDlgSize.Width()+nExtra, aDlgSize.Height() ) );
+ Size aSz( nExtra, nExtra );
+ aSz.Width() -= 8;
+ aSz.Height() -= 8;
+ Point aCtrlPos( aDlgSize.Width() + 2, (aDlgSize.Height()-aSz.Height())/2 );
+ pChild->SetPosSizePixel( aCtrlPos, aSz );
+ }
+ }
+
+ // Laufwerke-LB fuellen
+ if( pDriveList )
+ {
+ DirEntry aTmpDirEntry;
+ Dir aDir( aTmpDirEntry, FSYS_KIND_BLOCK );
+
+ USHORT nCount = aDir.Count(), i;
+ for( i = 0; i < nCount; ++i )
+ {
+ DirEntry& rEntry = aDir[i];
+ UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, FALSE );
+
+ UniString aVolume = rEntry.GetVolume() ;
+ aStr.ToUpperAscii();
+ if ( aVolume.Len() )
+ {
+ aStr += ' ';
+ aStr += aVolume;
+ }
+ pDriveList->InsertEntry( aStr );
+
+ }
+ UniString aPathStr = aPath.GetFull();
+
+ for ( i = 0; i < pDriveList->GetEntryCount(); ++i )
+ {
+ UniString aEntry = pDriveList->GetEntry(i);
+ int nLen = aEntry.Len();
+ nLen = nLen > 2 ? 2 : nLen;
+ if ( aEntry.CompareIgnoreCaseToAscii( aPathStr, nLen ) == COMPARE_EQUAL )
+ {
+ pDriveList->SelectEntryPos(i);
+ break;
+ }
+ }
+ }
+}
+
+void ImpPathDialog::PostExecute()
+{
+}
+
+void ImpPathDialog::SetPath( UniString const & rPath )
+{
+ aPath = DirEntry( rPath );
+
+ pSvPathDialog->EnterWait();
+
+ DirEntry aFile( rPath );
+ // Falls der Pfad eine Wildcard oder einen Filenamen enthaelt
+ // -> abschneiden und merken
+ if( FileStat( aFile ).GetKind() & (FSYS_KIND_FILE | FSYS_KIND_WILD) || !aFile.Exists() )
+ aFile.CutName();
+
+ // Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
+ pEdit->SetText( rPath );
+ aFile.SetCWD( TRUE );
+ UpdateEntries( TRUE );
+
+ pSvPathDialog->LeaveWait();
+}
+
+void ImpPathDialog::SetPath( Edit const & rEdit )
+{
+ UniString aPresetText = rEdit.GetText();
+ if( aPresetText.Len() )
+ SetPath( aPresetText );
+}
+
+
+UniString ImpPathDialog::GetPath() const
+{
+ DirEntry aFile( pEdit->GetText() );
+ aFile.ToAbs();
+ return aFile.GetFull();
+}
+
+
+ImpFileDialog::ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType ) :
+ ImpPathDialog( pDlg, nWinBits, nType, FALSE )
+{
+ bOpen = (nWinBits & WB_SAVEAS) == 0;
+
+ SvtResId aSvtResId = bOpen ? STR_FILEDLG_OPEN : STR_FILEDLG_SAVE;
+
+ // Titel setzen
+ GetFileDialog()->SetText( UniString( aSvtResId ) );
+ nDirCount = 0;
+
+ // initialize Controls if not used as a base class
+ if ( nType == WINDOW_FILEDIALOG )
+ InitControls();
+
+ pDlg->SetHelpId( HID_FILEDLG_OPENDLG );
+
+}
+
+ImpFileDialog::~ImpFileDialog()
+{
+ ImpFilterItem* pItem = aFilterList.First();
+ while( pItem )
+ {
+ delete pItem;
+ pItem = aFilterList.Next();
+ }
+
+ delete pFileTitel;
+ if (pFileList && ( pFileList != pDirList ) )
+ delete pFileList;
+
+ delete pTypeTitel;
+ delete pTypeList;
+}
+
+void ImpFileDialog::InitControls()
+{
+ UniString aEmptyStr;
+
+ const nW = 160;
+ const nH = 48; // Um den Dialog in eine akzeptable Form zu bringen
+
+ INITCONTROL( pFileTitel, FixedText, 0,
+ Point(10, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_FILE ) ), HID_FILEDLG_FILE );
+ INITCONTROL( pEdit, Edit, WB_BORDER,
+ Point(10, 31), Size(nW, 20), aEmptyStr, HID_FILEDLG_EDIT ); // aMask()
+ INITCONTROL( pFileList, ListBox, WB_SORT | WB_AUTOHSCROLL | WB_BORDER,
+ Point(10, 58), Size(nW, 180-nH), aEmptyStr, HID_FILEDLG_FILES );
+
+ INITCONTROL( pDirTitel, FixedText, 0,
+ Point(nW+20, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DIR ) ), HID_FILEDLG_DIR );
+ INITCONTROL( pDirPath, FixedInfo, WB_PATHELLIPSIS,
+ Point(nW+20, 33), Size(nW, 20), aPath.GetFull(), HID_FILEDLG_PATH );
+ INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
+ Point(nW+20, 58), Size(nW, 180-nH ), aEmptyStr, HID_FILEDLG_DIRS );
+
+ INITCONTROL( pTypeTitel, FixedText, 0,
+ Point(10, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_TYPE ) ), HID_FILEDLG_TYPE );
+
+#ifndef UNX
+ INITCONTROL( pTypeList, ListBox, WB_DROPDOWN,
+ Point(10, 265-nH ), Size(nW, 100 ), aEmptyStr, HID_FILEDLG_TYPES );
+
+ INITCONTROL( pDriveTitle, FixedText, 0,
+ Point(nW+20, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DRIVES ) ), HID_FILEDLG_DRIVE );
+ INITCONTROL( pDriveList, ListBox, WB_DROPDOWN,
+ Point(nW+20, 265-nH ), Size(nW, 100 ), aEmptyStr, HID_FILEDLG_DRIVES );
+ pNewDirBtn = NULL;
+ pHomeBtn = NULL;
+#else
+ INITCONTROL( pTypeList, ListBox, WB_DROPDOWN,
+ Point(10, 265-nH ), Size(2*nW+20, 100 ), aEmptyStr, HID_FILEDLG_TYPES );
+
+ pDriveTitle = NULL;
+ pDriveList = NULL;
+ pNewDirBtn = NULL;
+ pHomeBtn = NULL;
+#endif
+
+ const long nButtonStartX = 2*nW+20+15;
+ INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON,
+ Point(nButtonStartX, 10), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT),
+ Button::GetStandardText( BUTTON_OK ), 0 );
+ INITCONTROL( pCancelBtn, CancelButton, 0,
+ Point(nButtonStartX, 45 ), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT),
+ Button::GetStandardText( BUTTON_CANCEL ), 0 );
+
+ pLoadBtn = 0;
+
+ GetFileDialog()->SetOutputSizePixel( Size(nButtonStartX+STD_BTN_WIDTH+10, 298-nH) );
+
+ nOwnChilds = GetPathDialog()->GetChildCount();
+
+ // Handler setzen
+ if (pDriveList)
+ pDriveList->SetSelectHdl( LINK( this, ImpFileDialog, SelectHdl ) );
+
+ if (pDirList)
+ pDirList->SetDoubleClickHdl(LINK( this, ImpFileDialog, DblClickHdl) );
+
+ if (pOkBtn)
+ pOkBtn->SetClickHdl( LINK( this, ImpFileDialog, ClickHdl) );
+
+ if (pCancelBtn)
+ pCancelBtn->SetClickHdl( LINK( this, ImpFileDialog, ClickHdl) );
+
+ if( pFileList )
+ {
+ pFileList->SetSelectHdl( LINK( this, ImpFileDialog, SelectHdl ) );
+ pFileList->SetDoubleClickHdl( LINK( this, ImpFileDialog, DblClickHdl ) );
+ }
+
+ if( pTypeList )
+ pTypeList->SetSelectHdl( LINK( this, ImpFileDialog, DblClickHdl ) );
+}
+
+IMPL_LINK( ImpFileDialog, SelectHdl, ListBox *, p )
+{
+ if( p == pDriveList )
+ {
+ UniString aDrive ( pDriveList->GetSelectEntry(), 0, 2);
+ aDrive += '\\';
+ SetPath( aDrive );
+ }
+ else if (p == pFileList)
+ {
+ // Ausgewaehltes File in das Edit stellen
+ pEdit->SetText( pFileList->GetSelectEntry() );
+ GetFileDialog()->FileSelect();
+ }
+ return 0;
+}
+
+
+IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
+{
+ // isolate the pure name of the entry
+ // removing trailing stuff and leading spaces
+ UniString aEntry( pBox->GetSelectEntry() );
+
+ aEntry.EraseLeadingChars( ' ' );
+ USHORT nPos = aEntry.Search( '/' );
+ aEntry.Erase( nPos );
+
+ // build the absolute path to the selected item
+ DirEntry aNewPath;
+ aNewPath.ToAbs();
+
+ if( ( pDirList != pFileList ) && ( pBox == pDirList ) )
+ {
+ // SVLOOK
+ USHORT nCurPos = pDirList->GetSelectEntryPos();
+
+ // Wenn es schon das aktuelle ist, dann mache nichts
+ if( nCurPos == nDirCount-1 )
+ return 0;
+
+ // Wird nach oben gewechselt
+ if( nCurPos < nDirCount )
+ aNewPath = aNewPath[nDirCount-nCurPos-1];
+ else
+ aNewPath += aEntry;
+ }
+ else
+ {
+ // non-SVLOOK
+ if( aEntry == UniString( SvtResId( STR_FILEDLG_GOUP ) ) )
+ aEntry.AssignAscii( ".." );
+ aNewPath += aEntry;
+ }
+
+ if( pBox == pFileList )
+ {
+ DirEntry aFile( aEntry );
+
+ // Abfrage, ob File ueberschrieben werden soll...
+ if( !FileStat(aFile).IsKind(FSYS_KIND_DIR) && IsFileOk( aFile ) )
+ {
+ // dann kompletten Pfad mit Filenamen merken und Dialog beenden
+ aPath = aNewPath;
+ GetFileDialog()->EndDialog( TRUE );
+ }
+ }
+
+ USHORT nCurPos = pBox->GetSelectEntryPos();
+
+ GetFileDialog()->EnterWait();
+
+ UniString aFull = aNewPath.GetFull();
+
+ if( ( ( pBox == pDirList ) && ( pDirList != pFileList ) ) ||
+ ( ( pDirList == pFileList ) && FileStat( aNewPath ).GetKind() & FSYS_KIND_DIR ) )
+ {
+ // Neuen Pfad setzen und Listboxen updaten
+ aPath = aNewPath;
+ if( !aPath.SetCWD( TRUE ) )
+ {
+ if( ErrorBox( GetFileDialog(), WB_OK_CANCEL|WB_DEF_OK,
+ UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) ).Execute() == RET_CANCEL )
+ {
+ GetFileDialog()->EndDialog( FALSE );
+ }
+ }
+ UpdateEntries( TRUE );
+ GetFileDialog()->FileSelect();
+ }
+
+ if( pBox == pTypeList )
+ {
+ // Neue Maske setzen, und Listboxen updaten
+ USHORT nCurPos = pTypeList->GetSelectEntryPos();
+ if( nCurPos+1 > (USHORT)aFilterList.Count() )
+ aMask = UniString::CreateFromAscii( ALLFILES );
+ else
+ {
+ UniString aFilterListMask = aFilterList.GetObject( nCurPos )->aMask;
+// if( aFilterListMask.Search( ';' ) == STRING_NOTFOUND ) // kein ; in der Maske
+// aMask = WildCard( aFilterListMask, '\0' );
+// else // ; muss beruecksichtigt werden
+ aMask = WildCard( aFilterListMask, ';' );
+ }
+
+ pEdit->SetText( aMask() );
+ UpdateEntries( FALSE );
+ GetFileDialog()->FilterSelect();
+ }
+
+ GetFileDialog()->LeaveWait();
+
+ return 0;
+}
+
+IMPL_LINK( ImpFileDialog, ClickHdl, Button*, pBtn )
+{
+ if( ( pBtn == pOkBtn ) || ( pBtn == pLoadBtn ) )
+ {
+ DirEntry aFile( pEdit->GetText() );
+
+ // Existiert File / File ueberschreiben
+ if( IsFileOk( aFile ) )
+ {
+ // Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
+ aPath = aFile;
+ aPath.ToAbs();
+ GetFileDialog()->EndDialog( TRUE );
+ }
+ else
+ {
+ GetFileDialog()->EnterWait();
+
+ // Falls der Pfad eine Wildcard oder einen Filenamen enthaelt
+ // -> abschneiden und merken
+ if( FileStat( aFile ).GetKind() & (FSYS_KIND_FILE | FSYS_KIND_WILD) || !aFile.Exists() )
+ {
+ aMask = aFile.CutName();
+ }
+
+ // Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
+ pEdit->SetText( aMask() );
+ aFile.SetCWD( TRUE );
+ UpdateEntries( TRUE );
+
+ GetFileDialog()->LeaveWait();
+ }
+ }
+ else if( pBtn == pCancelBtn )
+ GetFileDialog()->EndDialog( FALSE );
+
+ return 0;
+}
+
+void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
+{
+ GetFileDialog()->EnterWait();
+
+ UniString aTabString;
+ DirEntry aTmpPath;
+ aTmpPath.ToAbs();
+ nDirCount = aTmpPath.Level();
+
+ if( pFileList )
+ {
+ pFileList->SetUpdateMode( FALSE );
+ pFileList->Clear();
+ }
+
+ if( bWithDirs && (pDirList != pFileList) )
+ {
+ pDirList->SetUpdateMode( FALSE );
+ pDirList->Clear();
+
+ for( USHORT i = nDirCount; i > 0; i-- )
+ {
+ UniString aEntryStr( aTabString );
+ aEntryStr += aTmpPath[i-1].GetName();
+ pDirList->InsertEntry( aEntryStr );
+ aTabString.AppendAscii( " ", 2 );
+ }
+ }
+
+ // for the combined box insert a '..'
+ // (this happens only if WB_SVLOOK is not set)
+
+ if( pDirList == pFileList && nDirCount != 1 )
+ pFileList->InsertEntry( UniString( SvtResId( STR_FILEDLG_GOUP ) ) );
+
+ // scan the directory
+ DirEntry aCurrent;
+ aCurrent.ToAbs();
+ Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
+ USHORT nEntries = aDir.Count();
+
+ // TempMask, weil Vergleich case-sensitiv
+ BOOL bMatchCase = FALSE; //aCurrent.IsCaseSensitive();
+ UniString aWildCard( aMask.GetWildCard() );
+ if ( !bMatchCase )
+ aWildCard.ToLowerAscii();
+ WildCard aTmpMask( aWildCard, ';' );
+ if ( nEntries )
+ {
+ UniStringList aSortDirList;
+ for ( USHORT n = 0; n < nEntries; n++ )
+ {
+ DirEntry& rEntry = aDir[n];
+ UniString aName( rEntry.GetName() );
+
+ if( aName.Len() &&
+ ( ( ( aName.GetChar(0) != '.' ) ||
+ ( ( aName.GetChar(0) == '.' ) && ( aMask.GetWildCard() ).GetChar(0) == '.' ) )
+ && rEntry.Exists() ) )
+ {
+ FileStat aFileStat( rEntry );
+ UniString aTmpName( aName );
+ if ( !bMatchCase )
+ aTmpName.ToLowerAscii();
+ if( ( aFileStat.GetKind() & FSYS_KIND_FILE ) && aTmpMask.Matches( aTmpName ) )
+ {
+ ULONG n = aFileStat.GetKind();
+ if( pFileList )
+ pFileList->InsertEntry( aName );
+ }
+ else if( bWithDirs && ( aFileStat.GetKind() & FSYS_KIND_DIR ) )
+ {
+ if( pDirList == pFileList )
+ {
+ UniString aEntryStr( aName );
+ aEntryStr += '/';
+ pDirList->InsertEntry( aEntryStr );
+ }
+ else
+ {
+ ULONG l;
+ for( l = 0; l < aSortDirList.Count(); l++ )
+ if( *aSortDirList.GetObject(l) > aName )
+ break;
+ aSortDirList.Insert( new UniString( aName ), l );
+ }
+ }
+ }
+ }
+ for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ {
+ UniString aEntryStr( aTabString );
+ aEntryStr += *aSortDirList.GetObject(l);
+ pDirList->InsertEntry( aEntryStr );
+ delete aSortDirList.GetObject(l);
+ }
+ }
+
+ if( bWithDirs )
+ UpdateDirs( aTmpPath );
+
+ if( pFileList )
+ {
+ if ( pDirList == pFileList && nDirCount > 1 )
+ pFileList->SelectEntryPos( 1 );
+ else
+ pFileList->SetNoSelection();
+ pFileList->SetUpdateMode( TRUE );
+ pFileList->Invalidate();
+ pFileList->Update();
+ }
+
+ if( pDriveList )
+ {
+ if( pDirList->GetEntryCount() > 0 )
+ {
+ UniString aStr( pDirList->GetEntry( 0 ) );
+ aStr.Erase( 2 );
+ aStr.ToLowerAscii();
+ pDriveList->SelectEntry( aStr );
+ }
+ }
+
+ GetFileDialog()->LeaveWait();
+}
+
+BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
+{
+ if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
+ return FALSE;
+ if( FileStat( rDirEntry ).GetKind() & FSYS_KIND_DIR )
+ {
+ if( pFileList )
+ return FALSE;
+ }
+ else if( bOpen )
+ {
+ // Datei vorhanden ?
+ if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_FILE ) )
+ {
+ UniString aErrorString( SvtResId( STR_FILEDLG_CANTOPENFILE ) );
+ aErrorString.AppendAscii( "\n[" );
+ aErrorString += rDirEntry.GetFull();
+ aErrorString += ']';
+ InfoBox aBox( GetFileDialog(),
+ aErrorString );
+ aBox.Execute();
+ return FALSE;
+ }
+ }
+ else
+ {
+ // Datei vorhanden ?
+ if( FileStat( ExtendFileName( rDirEntry ) ).IsKind( FSYS_KIND_FILE ) )
+ {
+ UniString aQueryString( SvtResId( STR_FILEDLG_OVERWRITE ) );
+ aQueryString.AppendAscii( "\n[" );
+ aQueryString += rDirEntry.GetFull();
+ aQueryString += ']';
+ QueryBox aBox( GetFileDialog(),
+ WinBits( WB_YES_NO | WB_DEF_NO ),
+ aQueryString );
+ if( aBox.Execute() != RET_YES )
+ return FALSE;
+ }
+ }
+ return GetFileDialog()->OK() != 0;
+}
+
+void ImpFileDialog::SetPath( UniString const & rPath )
+{
+ aPath = DirEntry( rPath );
+ GetFileDialog()->EnterWait();
+
+ DirEntry aFile( rPath );
+
+ // Falls der Pfad eine Wildcard oder einen Filenamen enthaelt
+ // -> abschneiden und merken
+ if( FileStat( aFile ).GetKind() & (FSYS_KIND_FILE | FSYS_KIND_WILD) || !aFile.Exists() )
+ {
+ aMask = aFile.CutName();
+
+ // Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
+ if( pDirList )
+ {
+ UniString aWildCard( aMask.GetWildCard() );
+ pEdit->SetText( aWildCard );
+ }
+ else
+ pEdit->SetText( rPath );
+ }
+
+ aFile.SetCWD( TRUE );
+
+ UpdateEntries( TRUE );
+
+ GetFileDialog()->LeaveWait();
+}
+
+void ImpFileDialog::SetPath( Edit const& rEdit )
+{
+ UniString aPresetText = rEdit.GetText();
+ if( aPresetText.Len() )
+ SetPath( aPresetText );
+}
+
+
+void ImpFileDialog::AddFilter( const UniString& rFilter, const UniString& rMask )
+{
+ aFilterList.Insert( new ImpFilterItem( rFilter, rMask ), LIST_APPEND );
+ if( pTypeList )
+ pTypeList->InsertEntry( rFilter, LISTBOX_APPEND );
+
+ if( !GetCurFilter().Len() )
+ SetCurFilter( rFilter );
+}
+
+void ImpFileDialog::RemoveFilter( const UniString& rFilter )
+{
+ ImpFilterItem* pItem = aFilterList.First();
+ while( pItem && pItem->aName != rFilter )
+ pItem = aFilterList.Next();
+
+ if( pItem )
+ {
+ delete aFilterList.Remove();
+ if( pTypeList )
+ pTypeList->RemoveEntry( rFilter );
+ }
+}
+
+void ImpFileDialog::RemoveAllFilter()
+{
+ ImpFilterItem* pItem = aFilterList.First();
+ while( pItem )
+ {
+ delete pItem;
+ pItem = aFilterList.Next();
+ }
+ aFilterList.Clear();
+
+ if( pTypeList )
+ pTypeList->Clear();
+}
+
+void ImpFileDialog::SetCurFilter( const UniString& rFilter )
+{
+ if( !pTypeList )
+ return;
+
+ ImpFilterItem* pItem = aFilterList.First();
+ while( pItem && pItem->aName != rFilter )
+ pItem = aFilterList.Next();
+
+ if( pItem )
+ pTypeList->SelectEntryPos( (USHORT)aFilterList.GetCurPos() );
+ else
+ pTypeList->SetNoSelection();
+}
+
+UniString ImpFileDialog::GetCurFilter() const
+{
+ UniString aFilter;
+ if ( pTypeList )
+ aFilter = pTypeList->GetSelectEntry();
+ return aFilter;
+}
+
+void ImpFileDialog::PreExecute()
+{
+ // ListBoxen erst unmittelbar vor Execute fuellen
+ // (damit vor Execute der Pfad umgesetzt werden kann, ohne das immer die
+ // Listboxen sofort upgedatet werden)
+
+ GetFileDialog()->EnterWait();
+
+ // Wenn kein Filter vorhanden, dann auch keine FilterBox
+ if( pTypeList && !pTypeList->GetEntryCount() )
+ {
+ // pTypeList->InsertEntry( "* (all files)" );
+ pTypeTitel->Disable();
+ pTypeList->Disable();
+ }
+
+ if( pTypeList )
+ {
+ USHORT nCurType = pTypeList->GetSelectEntryPos();
+ if( nCurType < aFilterList.Count() )
+ {
+ UniString aFilterListMask = aFilterList.GetObject( nCurType )->aMask;
+ if( aFilterListMask.Search( ';' ) == STRING_NOTFOUND ) // kein ; in der Maske
+ aMask = WildCard( aFilterListMask, '\0' );
+ else // ; in der Maske, muss in der Wildcard beruecksichtigt werden
+ aMask = WildCard( aFilterListMask, ';' );
+ }
+ else
+ aMask = UniString::CreateFromAscii( ALLFILES );
+ }
+ else
+ aMask = UniString::CreateFromAscii( ALLFILES );
+
+ // Neue Maske setzen
+ if( pEdit->GetText().Len() == 0 )
+ pEdit->SetText( aMask() );
+
+ ImpPathDialog::PreExecute();
+
+ GetFileDialog()->LeaveWait();
+}
+
+UniString ImpFileDialog::GetPath() const
+{
+ DirEntry aFile( pEdit->GetText() );
+ return ExtendFileName( aFile );
+}
+
+UniString ImpFileDialog::ExtendFileName( DirEntry aEntry ) const
+{
+ aEntry.ToAbs();
+ // das ganze Theater hier ohnehin nur machen, wenn Dateiname
+ // ohne Extension angegeben wurde
+ if( !aEntry.GetExtension().Len() )
+ {
+ UniString aPostfix; // hier kommt die ausgesuchte Extension herein
+
+ // ist ein Filter mit Extension gesetzt?
+ USHORT nChosenFilterPos = pTypeList->GetSelectEntryPos();
+ if( nChosenFilterPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ UniString aExtensionMask = GetFileDialog()->GetFilterType( nChosenFilterPos );
+ // aExtension ist z.B. *.sdw, alles bis einschliesslich Punkt abschneiden
+ UniString aExtension = aExtensionMask.Copy( aExtensionMask.Search( '.' )+1 );
+
+ // hat der Filter ueberhaupt eine Extension
+ if( aExtension.Len() )
+ {
+ // keine Wildcards enthalten?
+ if( ( aExtension.Search( '*' ) == STRING_NOTFOUND ) &&
+ ( aExtension.Search( '?' ) == STRING_NOTFOUND ) )
+ {
+ // OK, Filter hat Extension ohne Wildcards -> verwenden
+ aPostfix = aExtension;
+ }
+ else
+ {
+ // Filter hat Extension mit Wildcards (z.B. *.*) -> nicht verwenden
+ aPostfix.Erase();
+ }
+ }
+ else
+ {
+ // Filter hatte keine Extension (schwer vorstellbar) -> nichts anhaengen
+ aPostfix.Erase();
+ }
+ }
+ else
+ {
+ // kein Filter gefunden (merkwÆrdig) -> Default-Extension anhaengen
+ aPostfix = GetFileDialog()->GetDefaultExt();
+ }
+
+ // jetzt kann es mit dem Anhaengen losgehen
+ const sal_Unicode* pExt = aPostfix.GetBuffer();
+ while( *pExt == '*' || *pExt == '?' )
+ pExt++;
+
+ if( *pExt )
+ {
+ UniString aName = aEntry.GetName();
+ if( *pExt != '.' )
+ aName += '.';
+ aName += pExt;
+ aEntry.SetName( aName );
+ }
+ }
+ return aEntry.GetFull();
+}
+
+
+void ImpSvFileDlg::CreateDialog( PathDialog* pSvDlg, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate )
+{
+ delete pDlg;
+ if ( nType == WINDOW_PATHDIALOG )
+ pDlg = new ImpPathDialog( pSvDlg, nStyle, nType, bCreate );
+ else
+ pDlg = new ImpFileDialog( pSvDlg, nStyle, nType );
+}
+
+
diff --git a/svtools/source/dialogs/filedlg2.hrc b/svtools/source/dialogs/filedlg2.hrc
new file mode 100644
index 000000000000..bcb474f0e9db
--- /dev/null
+++ b/svtools/source/dialogs/filedlg2.hrc
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * $RCSfile: filedlg2.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define STR_FILEDLG_SELECT 1000
+#define STR_FILEDLG_CANTCHDIR 1001
+#define STR_FILEDLG_OPEN 1002
+#define STR_FILEDLG_FILE 1003
+#define STR_FILEDLG_DIR 1004
+#define STR_FILEDLG_TYPE 1005
+#define STR_FILEDLG_CANTOPENFILE 1006
+#define STR_FILEDLG_CANTOPENDIR 1007
+#define STR_FILEDLG_OVERWRITE 1008
+#define STR_FILEDLG_GOUP 1009
+#define STR_FILEDLG_SAVE 1010
+#define STR_FILEDLG_DRIVES 1011
+#define STR_FILEDLG_HOME 1012
+#define STR_FILEDLG_NEWDIR 1013
+#define STR_FILEDLG_ASKNEWDIR 1014
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
new file mode 100644
index 000000000000..f9f41eb8413d
--- /dev/null
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * $RCSfile: filedlg2.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _FILEDLG2_HXX
+#define _FILEDLG2_HXX
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#ifndef _FSYS_HXX //autogen
+#include <tools/fsys.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen wg. PushButton
+#include <vcl/button.hxx>
+#endif
+class FixedText;
+class Edit;
+class ListBox;
+class ListBox;
+class Button;
+
+class PathDialog;
+class FileDialog;
+class ImpPathDialog;
+
+struct ImpFilterItem
+{
+ String aName;
+ String aMask;
+
+ ImpFilterItem( const String & rFilter, const String & rMask )
+ {
+ aName = rFilter;
+ aMask = rMask;
+ }
+};
+
+DECLARE_LIST( ImpFilterList, ImpFilterItem* )
+
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif // _SV_LSTBOX_HXX
+
+class KbdListBox : public ListBox
+{
+public:
+
+ KbdListBox( Window* pParent, WinBits nStyle = WB_BORDER )
+ : ListBox ( pParent, nStyle )
+ {};
+
+virtual long PreNotify( NotifyEvent& rNEvt );
+
+};
+
+
+class ImpPathDialog
+{
+ friend class ImpFileDialog;
+
+private:
+ PathDialog* pSvPathDialog;
+ Edit* pEdit;
+ FixedText* pDirTitel;
+ KbdListBox* pDirList;
+ FixedText* pDirPath;
+ ListBox* pDriveList;
+ FixedText* pDriveTitle;
+ PushButton* pLoadBtn;
+ PushButton* pOkBtn;
+ PushButton* pCancelBtn;
+ PushButton* pHomeBtn;
+ PushButton* pNewDirBtn;
+
+ USHORT nOwnChilds;
+
+ DirEntry aPath; // aktuell angewaehlter Pfad
+ USHORT nDirCount; // Anzahl der Verzeichnis-
+ // Verschachtelungen
+
+protected:
+
+ virtual void UpdateEntries( const BOOL bWithDirs );
+ void UpdateDirs( const DirEntry& rTmpPath );
+
+ BOOL IsFileOk( const DirEntry& rDirEntry );
+ void InitControls();
+
+ DECL_LINK( SelectHdl, ListBox * );
+ DECL_LINK( DblClickHdl, ListBox * );
+ DECL_LINK( ClickHdl, Button * );
+
+public:
+ ImpPathDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType, BOOL bCreateDir );
+ virtual ~ImpPathDialog();
+
+ virtual void SetPath( const String& rPath );
+ virtual void SetPath( const Edit& rEdit );
+ virtual String GetPath() const;
+
+ virtual void PreExecute();
+ virtual void PostExecute();
+
+ PathDialog* GetPathDialog() const { return pSvPathDialog; }
+
+ void SetOkButtonText( const String& rText ) { pOkBtn->SetText( rText ); }
+ void SetCancelButtonText( const String& rText ) { pCancelBtn->SetText( rText ); }
+
+};
+
+
+class ImpFileDialog : public ImpPathDialog
+{
+private:
+ FixedText* pFileTitel;
+ ListBox* pFileList;
+ FixedText* pTypeTitel;
+ ListBox* pTypeList;
+
+ WildCard aMask; // aktuelle Maske
+
+ ImpFilterList aFilterList; // Filterliste
+ USHORT nCurFilter; // aktueller Filter
+
+ BOOL bOpen; // TRUE = Open; FALSE = SAVEAS
+
+protected:
+ void InitControls();
+
+ String ExtendFileName( DirEntry aEntry ) const;
+
+ DECL_LINK( SelectHdl, ListBox * );
+ DECL_LINK( DblClickHdl, ListBox * );
+ DECL_LINK( ClickHdl, Button * );
+
+ virtual void UpdateEntries( const BOOL bWithDirs );
+ BOOL IsFileOk( const DirEntry& rDirEntry );
+
+public:
+ ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType );
+ virtual ~ImpFileDialog();
+
+ void AddFilter( const String& rFilter, const String& rMask );
+ void RemoveFilter( const String& rFilter );
+ void RemoveAllFilter();
+ void SetCurFilter( const String& rFilter );
+ String GetCurFilter() const;
+
+ USHORT GetFilterCount() const { return (USHORT)aFilterList.Count(); }
+ inline String GetFilterName( USHORT nPos ) const;
+ inline String GetFilterType( USHORT nPos ) const;
+
+ virtual void SetPath( const String& rPath );
+ virtual void SetPath( const Edit& rEdit );
+ virtual String GetPath() const;
+
+ virtual void PreExecute();
+
+ FileDialog* GetFileDialog() const { return (FileDialog*)GetPathDialog(); }
+};
+
+inline String ImpFileDialog::GetFilterName( USHORT nPos ) const
+{
+ String aName;
+ ImpFilterItem* pItem = aFilterList.GetObject( nPos );
+ if ( pItem )
+ aName = pItem->aName;
+ return aName;
+}
+
+inline String ImpFileDialog::GetFilterType( USHORT nPos ) const
+{
+ String aMask;
+ ImpFilterItem* pItem = aFilterList.GetObject( nPos );
+ if ( pItem )
+ aMask = pItem->aMask;
+ return aMask;
+}
+
+class ImpSvFileDlg
+{
+private:
+ ImpPathDialog* pDlg;
+
+public:
+ ImpSvFileDlg() { pDlg = 0; }
+ ~ImpSvFileDlg() { delete pDlg; }
+
+ ImpPathDialog* GetDialog() const { return pDlg; }
+ void CreateDialog( PathDialog* pCreateFrom, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate );
+
+ void SetOkButtonText( const String& rText ) { pDlg->SetOkButtonText( rText ); } // ihr habts ja nicht anders gewollt
+ void SetCancelButtonText( const String& rText ) { pDlg->SetCancelButtonText( rText ); }
+
+};
+
+#endif // _FILEDLG2_HXX
diff --git a/svtools/source/dialogs/filedlg2.src b/svtools/source/dialogs/filedlg2.src
new file mode 100644
index 000000000000..45364d5cbb31
--- /dev/null
+++ b/svtools/source/dialogs/filedlg2.src
@@ -0,0 +1,422 @@
+/*************************************************************************
+ *
+ * $RCSfile: filedlg2.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <filedlg2.hrc>
+String STR_FILEDLG_SELECT
+{
+ Text = "Verzeichnis auswählen" ;
+ Text [ ENGLISH ] = "Select" ;
+ Text [ portuguese ] = "Seleccionar directório" ;
+ Text [ english_us ] = "Select Directory" ;
+ Text [ portuguese_brazilian ] = "Verzeichnis auswählen" ;
+ Text [ swedish ] = "Välj mapp" ;
+ Text [ danish ] = "Vælg bibliotek" ;
+ Text [ italian ] = "Scelta cartella" ;
+ Text [ spanish ] = "Seleccionar directorio" ;
+ Text [ french ] = "Sélection du répertoire" ;
+ Text [ dutch ] = "Map selecteren" ;
+ Text[ chinese_simplified ] = "Ñ¡ÔñĿ¼";
+ Text[ russian ] = "Âûáîð êàòàëîãà";
+ Text[ polish ] = "Wybierz katalog";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ‚ð‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü¥Ø¿ý";
+ Text[ arabic ] = "ÊÍÏíÏ ÇáÏáíá";
+ Text[ greek ] = "ÅðéëïãÞ êáôáëüãïõ";
+ Text[ korean ] = "µð·ºÅ丮 ¼±ÅÃ";
+ Text[ turkish ] = "Dizin seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_CANTCHDIR
+{
+ Text = "Kann nicht in Verzeichnis wechseln" ;
+ Text [ ENGLISH ] = "Can't change directory" ;
+ Text [ english_us ] = "Cannot change to directory" ;
+ Text [ portuguese_brazilian ] = "Kann nicht in Verzeichnis wechseln" ;
+ Text [ swedish ] = "Kan inte byta mapp" ;
+ Text [ danish ] = "Kan ikke skifte til bibliotek" ;
+ Text [ italian ] = "Impossibile passare alla cartella" ;
+ Text [ spanish ] = "No es posible cambiar en directorio" ;
+ Text [ french ] = "Impossible de changer le répertoire" ;
+ Text [ dutch ] = "Kan niet in map komen" ;
+ Text [ portuguese ] = "Impossível mudar para directório" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨×ªµ½Ä¿Â¼";
+ Text[ russian ] = "Ñìåíèòü êàòàëîã íåâîçìîæíî";
+ Text[ polish ] = "Nie mo¿e zmieniæ katalogu";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ‚ð•ÏX‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªkÂà¨ì¥Ø¿ý";
+ Text[ arabic ] = "áÇ íãßä ÊÛííÑ ÇáÏáíá";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá ãßíåé áëëáãÞ óôïí êáôÜëïãï";
+ Text[ korean ] = "µð·ºÅ丮¸¦ º¯°æÇÒ ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Dizin deðiþtirilemiyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_OPEN
+{
+ Text = "Öffnen" ;
+ Text [ ENGLISH ] = "Open" ;
+ Text [ portuguese ] = "Abrir" ;
+ Text [ english_us ] = "Open" ;
+ Text [ portuguese_brazilian ] = "Öffnen" ;
+ Text [ swedish ] = "Öppna" ;
+ Text [ danish ] = "Åbn" ;
+ Text [ italian ] = "Apri" ;
+ Text [ spanish ] = "Abrir" ;
+ Text [ french ] = "Ouvrir" ;
+ Text [ dutch ] = "Openen" ;
+ Text[ chinese_simplified ] = "´ò¿ª";
+ Text[ russian ] = "Îòêðûòü";
+ Text[ polish ] = "Otwórz";
+ Text[ japanese ] = "ŠJ‚­";
+ Text[ chinese_traditional ] = "¶}±ÒÂÂÀÉ";
+ Text[ arabic ] = "ÝÊÍ";
+ Text[ greek ] = "¢íïéãìá";
+ Text[ korean ] = "¿­±â";
+ Text[ turkish ] = "Aç";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_FILE
+{
+ Text = "~Datei" ;
+ Text [ ENGLISH ] = "~File" ;
+ Text [ portuguese ] = "~Ficheiro" ;
+ Text [ english_us ] = "~File" ;
+ Text [ portuguese_brazilian ] = "Datei" ;
+ Text [ swedish ] = "F~il" ;
+ Text [ danish ] = "Fil" ;
+ Text [ italian ] = "File" ;
+ Text [ spanish ] = "~Archivo" ;
+ Text [ french ] = "~Fichier" ;
+ Text [ dutch ] = "~Bestand" ;
+ Text[ chinese_simplified ] = "Îļþ(~F)";
+ Text[ russian ] = "~Ôàéë";
+ Text[ polish ] = "Plik";
+ Text[ japanese ] = "̧²Ù(~F)";
+ Text[ chinese_traditional ] = "ÀÉ®×(~F)";
+ Text[ arabic ] = "ãáÝ";
+ Text[ greek ] = "Áñ÷åßï";
+ Text[ korean ] = "ÆÄÀÏ(~F)";
+ Text[ turkish ] = "~Dosya";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_DIR
+{
+ Text = "~Verzeichnis" ;
+ Text [ ENGLISH ] = "~Directory" ;
+ Text [ portuguese ] = "~Directório" ;
+ Text [ english_us ] = "~Directory" ;
+ Text [ portuguese_brazilian ] = "Verzeichnis" ;
+ Text [ swedish ] = "Mapp" ;
+ Text [ danish ] = "Bibliotek" ;
+ Text [ italian ] = "Cartella" ;
+ Text [ spanish ] = "~Directorio" ;
+ Text [ french ] = "~Répertoire" ;
+ Text [ dutch ] = "~Directory" ;
+ Text[ chinese_simplified ] = "Ŀ¼(~D)";
+ Text[ russian ] = "Êàòàëîã";
+ Text[ polish ] = "Katalog";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ(~D)";
+ Text[ chinese_traditional ] = "¥Ø¿ý(~D)";
+ Text[ arabic ] = "Ïáíá";
+ Text[ greek ] = "ÊáôÜëïãïò";
+ Text[ korean ] = "µð·ºÅ丮(~D)";
+ Text[ turkish ] = "~Dizin";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_TYPE
+{
+ Text = "Datei~typ" ;
+ Text [ ENGLISH ] = "File ~type" ;
+ Text [ portuguese ] = "~Tipo de ficheiro" ;
+ Text [ english_us ] = "File ~type" ;
+ Text [ portuguese_brazilian ] = "Dateityp" ;
+ Text [ swedish ] = "Fil~typ" ;
+ Text [ danish ] = "Filtype" ;
+ Text [ italian ] = "Tipo di file" ;
+ Text [ spanish ] = "Tipo de ar~chivo" ;
+ Text [ french ] = "~Type de fichier" ;
+ Text [ dutch ] = "Bestand~type" ;
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ(~T)";
+ Text[ russian ] = "Òèï ôàéëà";
+ Text[ polish ] = "Typ pliku";
+ Text[ japanese ] = "̧²Ù‚ÌŽí—Þ(~T)";
+ Text[ chinese_traditional ] = "ÀÉ®×Ãþ«¬(~T)";
+ Text[ arabic ] = "äæÚ ÇáãáÝ";
+ Text[ greek ] = "Ôýðïò áñ÷åßïõ";
+ Text[ korean ] = "ÆÄÀÏ ÇüÅÂ(~T)";
+ Text[ turkish ] = "Dosya ~tipi";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_CANTOPENFILE
+{
+ Text = "Kann Datei nicht öffnen" ;
+ Text [ English ] = "Can't open file" ;
+ Text [ portuguese ] = "Impossível abrir ficheiro" ;
+ Text [ english_us ] = "Can't open file" ;
+ Text [ portuguese_brazilian ] = "Kann Datei nicht öffnen" ;
+ Text [ swedish ] = "Kan inte öppna fil" ;
+ Text [ danish ] = "Kan ikke åbne fil" ;
+ Text [ italian ] = "Impossibile aprire il file" ;
+ Text [ spanish ] = "No es posible abrir el archivo" ;
+ Text [ french ] = "Impossible d'ouvrir le fichier" ;
+ Text [ dutch ] = "Kan bestand niet openen" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÎļþ";
+ Text[ russian ] = "Îòêðûòü ôàéë íåâîçìîæíî";
+ Text[ polish ] = "Nie mo¿e otworzyæ pliku";
+ Text[ japanese ] = "̧²Ù‚ðŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¶}±ÒÀÉ®×";
+ Text[ arabic ] = "áÇ íãßä ÝÊÍ ÇáãáÝ";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß ôï áñ÷åßï";
+ Text[ korean ] = "ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Dosya açýlamýyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_CANTOPENDIR
+{
+ Text = "Kann Verzeichnis nicht öffnen" ;
+ Text [ English ] = "Can't open directory" ;
+ Text [ portuguese ] = "Impossível abrir directório" ;
+ Text [ english_us ] = "Can't open directory" ;
+ Text [ portuguese_brazilian ] = "Kann Verzeichnis nicht öffnen" ;
+ Text [ swedish ] = "Kan inte öppna mappen" ;
+ Text [ danish ] = "Kan ikke åbne bibliotek" ;
+ Text [ italian ] = "Imposibile aprire la cartella" ;
+ Text [ spanish ] = "No es posible abrir el directorio" ;
+ Text [ french ] = "Impossible d'ouvrir le répertoire" ;
+ Text [ dutch ] = "Kan map niet openen" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÄ¿Â¼";
+ Text[ russian ] = "Îòêðûòü êàòàëîã íåâîçìîæíî";
+ Text[ polish ] = "Nie mo¿e otworzyæ katalogu";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ‚ðŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¶}±Ò¥Ø¿ý";
+ Text[ arabic ] = "áÇ íãßä ÝÊÍ ÇáÏáíá";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß ï êáôÜëïãïò";
+ Text[ korean ] = "µð·ºÅ丮¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Dizin açýlamýyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_OVERWRITE
+{
+ Text = "Datei existiert. \nDatei überschreiben?" ;
+ Text [ English ] = "File exists. \nOverwrite file?" ;
+ Text [ portuguese ] = "O ficheiro já existe.\nSobregravar?" ;
+ Text [ english_us ] = "This file already exists. \nOverwrite ?" ;
+ Text [ portuguese_brazilian ] = "Datei existiert. \nDatei überschreiben?" ;
+ Text [ swedish ] = "Filen finns redan. \nSkriva över filen?" ;
+ Text [ danish ] = "Filen eksisterer allerede.\nSkal den overskrives?" ;
+ Text [ italian ] = "Il file esistet. \nSovrascriverlo?" ;
+ Text [ spanish ] = "El archivo ya existe.\n¿Desea sobrescribirlo?" ;
+ Text [ french ] = "Ce fichier existe déjà. \nVoulez-vous le remplacer ?" ;
+ Text [ dutch ] = "Het bestand bestaat reeds. \nOverschrijven?" ;
+ Text[ chinese_simplified ] = "Îļþ´æÔÚ¡£ \nÄúÒª¸²Ð´ÎļþÂð£¿";
+ Text[ russian ] = "Ýòî ôàéë óæå ñóùåñòâóåò. \nÏåðåïèñàòü åãî?";
+ Text[ polish ] = "Plik ju¿ istnieje. \nSkasowaæ plik przez zapisanie?";
+ Text[ japanese ] = "̧²Ù‚Í‚ ‚è‚Ü‚·B \nã‘‚«‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "Àɮצs¦b¡C \n±z­nÂмgÀɮסH";
+ Text[ arabic ] = "åÐÇ ÇáãáÝ ãæÌæÏ ãÓÈÞÇð.\nåá ÊÑíÏ ÇáßÊÇÈÉ ÝæÞå¿";
+ Text[ greek ] = "Ôï áñ÷åßï áõôü õðÜñ÷åé Þäç. \nÍá áíôéêáôáóôáèåß;";
+ Text[ korean ] = "ÀÌ ÆÄÀÏÀº ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù. \n µ¤¾î ¾²½Ã°Ú½À´Ï±î ?";
+ Text[ turkish ] = "Dosya mevcut. \nÜzerine yazýlsýn mý?";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_GOUP
+{
+ Text = "Eine Ebene höher" ;
+ Text [ English ] = "Go up" ;
+ Text [ portuguese ] = "Um nível acima" ;
+ Text [ english_us ] = "Up One Level" ;
+ Text [ portuguese_brazilian ] = "Eine Ebene höher" ;
+ Text [ swedish ] = "En nivå högre" ;
+ Text [ danish ] = "Et niveau op" ;
+ Text [ italian ] = "Un livello più alto" ;
+ Text [ spanish ] = "Subir un nivel" ;
+ Text [ french ] = "Niveau supérieur" ;
+ Text [ dutch ] = "Een niveau hoger" ;
+ Text[ chinese_simplified ] = "ÏòÉÏÉýÒ»¼¶";
+ Text[ russian ] = "Íà îäèí óðîâåíü ââåðõ";
+ Text[ polish ] = "Jeden poziom wy¿ej";
+ Text[ japanese ] = "ˆê‚Âã‚ÌÌ«ÙÀÞ‚Ö";
+ Text[ chinese_traditional ] = "¦V¤Wª@¤@¯Å";
+ Text[ arabic ] = "ãÓÊæì æÇÍÏ ááÃÚáì";
+ Text[ greek ] = "¸íá åðßðåäï ðéï øçëÜ";
+ Text[ korean ] = "ÇÑ ¼öÁØ À§·Î";
+ Text[ turkish ] = "Bir seviye yukarý";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_SAVE
+{
+ Text = "Speichern" ;
+ Text [ English ] = "Save" ;
+ Text [ portuguese ] = "Guardar" ;
+ Text [ english_us ] = "Save" ;
+ Text [ portuguese_brazilian ] = "Speichern" ;
+ Text [ swedish ] = "Spara" ;
+ Text [ danish ] = "Gem" ;
+ Text [ italian ] = "Salva" ;
+ Text [ spanish ] = "Guardar" ;
+ Text [ french ] = "Enregistrer" ;
+ Text [ dutch ] = "Opslaan" ;
+ Text[ chinese_simplified ] = "´æÅÌ";
+ Text[ russian ] = "Ñîõðàíèòü";
+ Text[ polish ] = "Zapisz";
+ Text[ japanese ] = "•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦s";
+ Text[ arabic ] = "ÍÝÙ";
+ Text[ greek ] = "ÁðïèÞêåõóç";
+ Text[ korean ] = "ÀúÀå";
+ Text[ turkish ] = "Kaydet";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_DRIVES
+{
+ Text = "~Laufwerke" ;
+ Text [ English ] = "D~rives" ;
+ Text [ portuguese ] = "~Unidades" ;
+ Text [ english_us ] = "D~rive" ;
+ Text [ portuguese_brazilian ] = "Unidades" ;
+ Text [ swedish ] = "~Enheter" ;
+ Text [ danish ] = "Drev" ;
+ Text [ italian ] = "Drive" ;
+ Text [ spanish ] = "~Unidades" ;
+ Text [ french ] = "~Lecteurs" ;
+ Text [ dutch ] = "~Stations" ;
+ Text[ chinese_simplified ] = "Çý¶¯ÅÌ(~R)";
+ Text[ russian ] = "Äèñêè";
+ Text[ polish ] = "Napêdy";
+ Text[ japanese ] = "ÄÞײÌÞ(~R)";
+ Text[ chinese_traditional ] = "ÅX°Ê¾¹(~R)";
+ Text[ arabic ] = "ãÍÑßÇÊ ÇáÃÞÑÇÕ";
+ Text[ greek ] = "ÌïíÜäá äßóêïõ";
+ Text[ korean ] = "µå¶óÀ̺ê(~R)";
+ Text[ turkish ] = "~Sürücü";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_HOME
+{
+ Text = "Benutzer Verzeichnis" ;
+ Text [ ENGLISH ] = "Home Directory" ;
+ Text [ portuguese ] = "Directório do utilizador" ;
+ Text [ english_us ] = "User Directory" ;
+ Text [ portuguese_brazilian ] = "Verzeichnis" ;
+ Text [ swedish ] = "Användarmapp" ;
+ Text [ danish ] = "Brugerbibliotek" ;
+ Text [ italian ] = "Cartella utente" ;
+ Text [ spanish ] = "Directorio de usuario" ;
+ Text [ french ] = "Répertoire d'utilisateur" ;
+ Text [ dutch ] = "Gebruikers-map" ;
+ Text[ chinese_simplified ] = "ʹÓÃÕßĿ¼";
+ Text[ russian ] = "Êàòàëîã ïîëüçîâàòåëÿ";
+ Text[ polish ] = "Katalog u¿ytkowników";
+ Text[ japanese ] = "Õ°»Þ°‚ÌÃÞ¨Ú¸ÄØ";
+ Text[ chinese_traditional ] = "¦Û­q¥Ø¿ý";
+ Text[ arabic ] = "Ïáíá ÇáãÓÊÎÏã";
+ Text[ greek ] = "ÊáôÜëïãïò ÷ñÞóôç";
+ Text[ korean ] = "»ç¿ëÀÚ µð·ºÅ丮";
+ Text[ turkish ] = "Kullanýcý dizini";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_NEWDIR
+{
+ Text = "Verzeichnis anlegen" ;
+ Text [ ENGLISH ] = "Create Directory" ;
+ Text [ portuguese ] = "Criar directório" ;
+ Text [ english_us ] = "Create Directory" ;
+ Text [ portuguese_brazilian ] = "Verzeichnis" ;
+ Text [ swedish ] = "Skapa mapp" ;
+ Text [ danish ] = "Opret bibliotek" ;
+ Text [ italian ] = "Crea cartella" ;
+ Text [ spanish ] = "Crear directorio" ;
+ Text [ french ] = "Créer un répertoire" ;
+ Text [ dutch ] = "Map maken" ;
+ Text[ chinese_simplified ] = "´´½¨Ä¿Â¼";
+ Text[ russian ] = "Ñîçäàòü êàòàëîã";
+ Text[ polish ] = "Utwórz katalog";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ‚ðì¬";
+ Text[ chinese_traditional ] = "«Ø¥ß¥Ø¿ý";
+ Text[ arabic ] = "ÅäÔÇÁ Ïáíá";
+ Text[ greek ] = "Äçìéïõñãßá êáôáëüãïõ";
+ Text[ korean ] = "µð·ºÅ丮 ¸¸µé±â";
+ Text[ turkish ] = "Dizin oluþtur";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILEDLG_ASKNEWDIR
+{
+ Text = "Soll das Verzeichnis %s angelegt werden ?" ;
+ Text [ English ] = "Do you want the directory %s to be created ?" ;
+ Text [ english_us ] = "Do you want the directory %s to be created ?" ;
+ Text [ portuguese_brazilian ] = "Soll das Verzeichnis %s angelegt werden ?" ;
+ Text [ swedish ] = "Skall mappen %s skapas ?" ;
+ Text [ danish ] = "Skal biblioteket %s oprettes?" ;
+ Text [ italian ] = "Si deve creare una cartella %s ?" ;
+ Text [ spanish ] = "¿Desea crear el directorio %s?" ;
+ Text [ french ] = "Souhaitez vous créer le répertoire %s ?" ;
+ Text [ dutch ] = "Wilt u dat map %s wordt aangelegd ?" ;
+ Text [ portuguese ] = "Deseja criar o directório %s ?" ;
+ Text[ chinese_simplified ] = "ÄúÒª½¨Á¢Õâ¸öĿ¼ %s £¿";
+ Text[ russian ] = "Ñîçäàòü êàòàëîã %s ?";
+ Text[ polish ] = "Czy utworzyæ katalog %s?";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ%s‚ð쬂µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z­n«Ø¥ß³o­Ó¥Ø¿ý %s ¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÅäÔÇÁ ÇáÏáíá %s¿";
+ Text[ greek ] = "ÈÝëåôå íá äçìéïõñãçèåß ï êáôÜëïãïò %s;";
+ Text[ korean ] = "µð·ºÅ丮 %s ¸¦ ¸¸µå½Ã°Ú½À´Ï±î ?";
+ Text[ turkish ] = "%s oluþturulsun mu ?";
+ Text[ language_user1 ] = " ";
+};
diff --git a/svtools/source/dialogs/makefile.mk b/svtools/source/dialogs/makefile.mk
new file mode 100644
index 000000000000..9a0dada89c60
--- /dev/null
+++ b/svtools/source/dialogs/makefile.mk
@@ -0,0 +1,93 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (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.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=SVTOOLS
+TARGET=dialogs
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SRCFILES= filedlg2.src \
+ prnsetup.src \
+ printdlg.src \
+ colrdlg.src
+
+SLOFILES= $(SLO)$/filedlg.obj \
+ $(SLO)$/filedlg2.obj \
+ $(SLO)$/prnsetup.obj \
+ $(SLO)$/printdlg.obj \
+ $(SLO)$/colctrl.obj \
+ $(SLO)$/colrdlg.obj \
+ $(SLO)$/property.obj \
+ $(SLO)$/wizdlg.obj \
+ $(SLO)$/mcvmath.obj
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
new file mode 100644
index 000000000000..e4127fab5579
--- /dev/null
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -0,0 +1,336 @@
+/*************************************************************************
+ *
+ * $RCSfile: mcvmath.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <mcvmath.hxx>
+
+// ---------------------------------------------------------------------
+// die folgenden Tabellen enthalten sin(phi) * 2**14
+// fuer phi= 360Grad*2**-32 bis 360 Grad
+// def. fuer x: phi=360Grad * 2**(x-16)
+// d.h. x = 16 -> 360 Grad
+// x = -16 -> (2**-16) * 360 Grad
+// x: -16 ... 0 ... 15
+//x= 0, 1, 2, 3, 4, 5, 6, 7,
+// 8, 9, 10, 11, 12, 13, 14, 15
+
+static const short CosTab[16] =
+{
+ 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16383,
+ 16379, 16364, 16305, 16069, 15137, 11585, 0, -16383
+};
+static const short SinTab[16]=
+{
+ 2, 3, 6, 13, 25, 50, 101, 201,
+ 402, 804, 1606, 3196, 6270, 11585, 16384, 0
+};
+
+/**************************************************************************
+|*
+|* ImpMultBig2()
+|*
+|* Beschreibung Multiplikation fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+// first parameter should be the bigger one
+
+Fix ImpMultBig2( const Fix& a, const Fix& b )
+{
+ Fix f;
+ f.x = (((b.x+FIX_A2)>>FIX_P2)*a.x+FIX_A3)>>FIX_P3;
+ return f;
+}
+
+/**************************************************************************
+|*
+|* ImpMultBig2()
+|*
+|* Beschreibung Multiplikation fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+// first parameter should be the bigger one
+
+FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb )
+{
+ Fix rr = ImpMultBig2(ra.r,rb.r)-ImpMultBig2(ra.i,rb.i);
+ Fix ii = ImpMultBig2(ra.r,rb.i)+ImpMultBig2(ra.i,rb.r);
+ return FixCpx( rr,ii );
+}
+
+/**************************************************************************
+|*
+|* ImpSqrt()
+|*
+|* Beschreibung Wurzelfunktion fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+USHORT ImpSqrt( ULONG nRadi )
+{
+ register ULONG inf = 1;
+ register ULONG sup = nRadi;
+ register USHORT sqr;
+
+ if ( !nRadi )
+ return 0;
+
+ while ( (inf<<1) <= sup )
+ {
+ sup >>= 1;
+ inf <<= 1;
+ }
+ sqr = (sup+inf) >> 1; // Anfangswert der Iteration
+
+ sqr = (nRadi/sqr + sqr) >> 1; // 2 Newton-Iterationen reichen fuer
+ sqr = (nRadi/sqr + sqr) >> 1; // +- 1 Digit
+
+ return sqr;
+}
+
+/**************************************************************************
+|*
+|* ImpExPI()
+|*
+|* Beschreibung EXPI-Funktion fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+// e**(i*nPhi), Einheit nPhi: 2**16 == 360 Grad
+
+FixCpx ImpExPI( USHORT nPhi )
+{
+ short i;
+ FixCpx aIter(1L); // e**(0*i)
+ FixCpx Mul;
+ const char Sft=14-FIX_POST;
+
+ for ( i = 15; i >= 0; i-- )
+ {
+ if ( (1L<<i) & nPhi )
+ {
+ Mul.r.x = CosTab[i]>>Sft; // e**(i(phi1+phi2)) =
+ Mul.i.x = SinTab[i]>>Sft; // e**(i*phi1)) * e**(i*phi2))
+ aIter *= Mul;
+ }
+ }
+
+ return aIter;
+}
+
+/**************************************************************************
+|*
+|* ImpATanx2()
+|*
+|* Beschreibung ATANX2-Funktion fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+// use for x*x+y*y==1 only
+
+static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
+{
+ USHORT phi0 = 0; // result angel higher part
+ USHORT phi = 0; // dito lower part
+ long x = rX.x;
+ long y = rY.x;
+ long z;
+ const char Sft=14-FIX_POST;
+ short i;
+ FixCpx aTry;
+ FixCpx aInc;
+ FixCpx aIter(1L);
+ BOOL Small = FALSE;
+
+ if ( (x==0) && (y==0) )
+ return 0;
+
+ if ( y < 0)
+ {
+ // reduce 3. to 1. quadrant (0..90 Degree)
+ phi0 += 180L * 65536L / 360L;
+ // turn 180 degree
+ y *= -1;
+ x *= -1;
+ }
+
+ if ( x < 0)
+ {
+ // 2. to 1. q.
+ phi0 += 90L * 65536L / 360L;
+ // turn 90 degree clockwise
+ z = y;
+ y = -x;
+ x = z;
+ }
+
+ for ( i = 13; i >= 0; i-- )
+ {
+ aInc.r.x = CosTab[i]>>Sft; // e**(i(phi1+phi2)) =
+ aInc.i.x = SinTab[i]>>Sft; // e**(i*phi1)) * e**(i*phi2))
+ aTry = aIter*aInc;
+
+ if ( Small )
+ {
+ // is try ok
+ if ( aTry.r.x >= x )
+ {
+ aIter = aTry;
+ phi += (1<<i);
+ }
+ }
+ else
+ {
+ // is try ok
+ if ( aTry.i.x <= y )
+ {
+ aIter = aTry;
+ phi += (1<<i);
+
+ if ( i > 11 )
+ Small=TRUE;
+ }
+ }
+ }
+
+ return phi0+phi;
+}
+
+/**************************************************************************
+|*
+|* ImpATan2()
+|*
+|* Beschreibung ATAN-Funktion fuer FixPoint-Berechnungen
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+USHORT ImpATan2( const short x, const short y )
+{
+ Fix rRad = ImpSqrt(ULONG(long(x)*x+long(y)*y));
+
+ if ( !rRad.x )
+ return 0;
+ Fix fx = x;
+ fx.DivBig( rRad ); // Normiere auf Einheitskreis
+ Fix fy = y;
+ fy.DivBig( rRad );
+
+ return ImpATanx2( fx, fy );
+}
+
+/**************************************************************************
+|*
+|* ImpCartToPolar()
+|*
+|* Beschreibung Koordinaaten-Wandlung
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi )
+{
+ rRad = Fix( ImpSqrt( ULONG( long(x)*x+long(y)*y ) ) );
+
+ if ( !rRad.x )
+ rPhi=0;
+ else
+ {
+ // Normiere auf Einheitskreis
+ Fix fx = x;
+ fx.DivBig(rRad);
+ Fix fy = y;
+ fy.DivBig(rRad);
+ rPhi = ImpATanx2(fx, fy);
+ }
+}
+
+/**************************************************************************
+|*
+|* ImpPolarToCart()
+|*
+|* Beschreibung Koordinaaten-Wandlung
+|* Ersterstellung SH 01.07.93
+|* Letzte Aenderung SH 01.07.93
+|*
+**************************************************************************/
+
+void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY )
+{
+ FixCpx fc = ImpExPI( Phi ); // calculate sin() & cos()
+ fc.GetReal().MultBig( rR );
+ rX = long( fc.GetReal() );
+ fc.GetImag().MultBig( rR );
+ rY = long( fc.GetImag() );
+}
+
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
new file mode 100644
index 000000000000..02eaf3a78657
--- /dev/null
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * $RCSfile: mcvmath.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MCVMATH_HXX
+#define _MCVMATH_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+class FixCpx;
+class ColWheel;
+
+// No of fractal bits
+// allowed range 0..14, must be even
+#define FIX_POST 14
+
+// scale for ...Big() -Functions
+#if (FIX_POST>=4)
+#define FIX_P2 4
+#define FIX_P3 (FIX_POST-FIX_P2)
+#else
+#define FIX_P2 0
+#define FIX_P3 FIX_POST
+#endif
+
+#if (FIX_POST>=1)
+#define FIX_ADD (1<<(FIX_POST-1))
+#else
+#define FIX_ADD 0
+#endif
+
+#if (FIX_P2>=1)
+#define FIX_A2 (1<<(FIX_P2-1))
+#else
+#define FIX_A2 0
+#endif
+
+#if (FIX_P3>=1)
+#define FIX_A3 (1<<(FIX_P3-1))
+#else
+#define FIX_A3 0
+#endif
+
+// -------
+// - Fix -
+// -------
+
+class Fix
+{
+private:
+ friend FixCpx;
+ friend ColWheel;
+
+// friend Fix ImpMultBig2( const Fix& a, const Fix& b );
+
+public:
+ long x;
+
+public:
+ Fix() { x=0; }
+ Fix( int i ) { x=(long(i)<<FIX_POST); }
+ Fix( short l ) { x=(long(l)<<FIX_POST); }
+ Fix( USHORT l ) { x=(long(l)<<FIX_POST); }
+ Fix( long l ) { x=(l<<FIX_POST); }
+ Fix( long Z, long N ) { x=(Z<<FIX_POST)/N; }
+
+ void SetInternVal( long nVal ) { x=nVal; }
+ long GetInternVal() const { return x; }
+
+ void operator+= ( const Fix& a ) { x+=a.x; }
+ void operator-= ( const Fix& a ) { x-=a.x; }
+ void operator*= ( const Fix& a ) { x=(x*a.x+FIX_ADD)>>FIX_POST; }
+ void operator/= ( const Fix& a ) { x=(x<<FIX_POST)/a.x; }
+ friend Fix operator- ( const Fix& a );
+
+ void MultBig( const Fix& a )
+ { x=((((a.x+FIX_A2)>>FIX_P2)*x+FIX_A3)>>FIX_P3); }
+ void DivBig( const Fix& a )
+ { x=((x<<FIX_P3)/a.x)<<FIX_P2; }
+
+ friend BOOL operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; }
+ friend BOOL operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; }
+
+ operator long() const { return (x+FIX_ADD) >> FIX_POST; }
+ operator double() const { return double(x)/(1<<FIX_POST); }
+
+ friend Fix operator+ ( const Fix& a, const Fix& b );
+ friend Fix operator- ( const Fix& a, const Fix& b );
+ friend Fix operator* ( const Fix& a, const Fix& b );
+ friend Fix operator/ ( const Fix& a, const Fix& b );
+
+ friend FixCpx operator-( const FixCpx& a );
+};
+
+// ----------
+// - FixCpx -
+// ----------
+
+class FixCpx
+{
+// friend FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
+
+public:
+ Fix r;
+ Fix i;
+
+public:
+ FixCpx() : r(), i() {}
+ FixCpx( Fix a ) : r( a ), i() {}
+ FixCpx( Fix a, Fix b ) : r( a ), i( b ) {}
+
+ Fix& GetReal() { return r; }
+ Fix& GetImag() { return i; }
+
+ void operator*= ( const FixCpx& ra );
+ void MultBig( const FixCpx& ra, const FixCpx& rb );
+
+ friend FixCpx operator+ ( const FixCpx& a, const FixCpx& b );
+ friend FixCpx operator- ( const FixCpx& a, const FixCpx& b );
+ friend FixCpx operator* ( const FixCpx& a, const FixCpx& b );
+ friend FixCpx operator/ ( const FixCpx& a, const FixCpx& b );
+ friend FixCpx operator- ( const FixCpx& a );
+};
+
+inline Fix operator- ( const Fix& a )
+{
+ Fix f;
+ f.x = -a.x;
+ return f;
+}
+
+inline Fix operator+ ( const Fix& a, const Fix& b )
+{
+ long l = a.x+b.x;
+ return *((Fix*)&l);
+}
+
+inline Fix operator- ( const Fix& a, const Fix& b )
+{
+ long l = a.x-b.x;
+ return *((Fix*)&l);
+}
+
+inline Fix operator* ( const Fix& a, const Fix& b )
+{
+ long l=(a.x*b.x+FIX_ADD)>>FIX_POST;
+ return *((Fix*)&l);
+}
+
+inline Fix operator/ ( const Fix& a, const Fix& b )
+{
+ long l=(a.x<<FIX_POST)/b.x;
+ return *((Fix*)&l);
+}
+
+inline FixCpx operator- ( const FixCpx& a )
+{
+ FixCpx fc;
+
+ fc.r.x = -a.r.x;
+ fc.i.x = -a.i.x;
+ return fc;
+}
+
+inline FixCpx operator+ ( const FixCpx& a, const FixCpx& b )
+{
+ return FixCpx( a.r+b.r, a.i+b.i );
+}
+
+inline FixCpx operator- ( const FixCpx& a, const FixCpx& b )
+{
+ return FixCpx( a.r-b.r, a.i-b.i );
+}
+
+inline void FixCpx::operator*= ( const FixCpx& ra )
+{
+ Fix rr = ra.r*r-ra.i*i;
+ i = ra.r*i+ra.i*r;
+ r = rr;
+}
+
+inline FixCpx operator* ( const FixCpx& a, const FixCpx& b )
+{
+ return FixCpx( a.r*b.r-a.i*b.i, a.r*b.i+a.i*b.r );
+}
+
+inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
+{
+ return FixCpx( (a.r*b.r+a.i*b.i)/(b.r*b.r+b.i*b.i),
+ (b.r*a.r-a.r*b.i)/(b.r*b.r+b.i*b.i) );
+}
+
+// -----------------------------------------------------------------------
+
+Fix ImpMultBig2( const Fix& a, const Fix& b );
+FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
+
+void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi );
+void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY );
+
+USHORT ImpSqrt( ULONG nRadi );
+USHORT ImpATan2( const short x, const short y );
+FixCpx ImpExPI( USHORT nPhi );
+
+#endif // _MCVMATH_HXX
diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx
new file mode 100644
index 000000000000..dd6ba66fc705
--- /dev/null
+++ b/svtools/source/dialogs/printdlg.cxx
@@ -0,0 +1,527 @@
+/*************************************************************************
+ *
+ * $RCSfile: printdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_APP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VCL_PRINT_HXX
+#include <vcl/print.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _VCL_FILEDLG_HXX
+#include <vcl/filedlg.hxx>
+#endif
+#ifndef _SVTOOLS_FILEDLG_HXX
+#include <filedlg.hxx>
+#endif
+#include <tools/urlobj.hxx>
+#pragma hdrstop
+
+#include "printdlg.hrc"
+#include <prnsetup.hxx>
+#include <printdlg.hxx>
+#include <svtdata.hxx>
+
+// =======================================================================
+
+PrintDialog::PrintDialog( Window* pWindow ) :
+ ModalDialog ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRINTDLG ) ),
+ maGrpPrinter ( this, SvtResId( GRP_PRINTER ) ),
+ maFtName ( this, SvtResId( FT_NAME ) ),
+ maLbName ( this, SvtResId( LB_NAMES ) ),
+ maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ),
+ maFtStatus ( this, SvtResId( FT_STATUS ) ),
+ maFiStatus ( this, SvtResId( FI_STATUS ) ),
+ maFtType ( this, SvtResId( FT_TYPE ) ),
+ maFiType ( this, SvtResId( FI_TYPE ) ),
+ maFtLocation ( this, SvtResId( FT_LOCATION ) ),
+ maFiLocation ( this, SvtResId( FI_LOCATION ) ),
+ maFtComment ( this, SvtResId( FT_COMMENT ) ),
+ maFiComment ( this, SvtResId( FI_COMMENT ) ),
+ maCbxFilePrint ( this, SvtResId( CBX_FILEPRINT ) ),
+ maFiPrintFile ( this, SvtResId( FI_PRINTFILE ) ),
+ maBtnBrowse ( this, SvtResId( BTN_BROWSE ) ),
+ maGrpPrintRange ( this, SvtResId( GRP_PRINTRANGE ) ),
+ maRbtAll ( this, SvtResId( RBT_ALL ) ),
+ maRbtPages ( this, SvtResId( RBT_PAGES ) ),
+ maRbtSelection ( this, SvtResId( RBT_SELECTION ) ),
+ maEdtPages ( this, SvtResId( EDT_PAGES ) ),
+ maGrpCopies ( this, SvtResId( GRP_COPIES ) ),
+ maFtCopies ( this, SvtResId( FT_COPIES ) ),
+ maNumCopies ( this, SvtResId( NUM_COPIES ) ),
+ maImgCollate ( this, SvtResId( IMG_COLLATE ) ),
+ maImgNotCollate ( this, SvtResId( IMG_NOT_COLLATE ) ),
+ maCbxCollate ( this, SvtResId( CBX_COLLATE ) ),
+ maBtnOptions ( this, SvtResId( BTN_OPTIONS ) ),
+ maBtnHelp ( this, SvtResId( BTN_HELP ) ),
+ maBtnOK ( this, SvtResId( BTN_OK ) ),
+ maBtnCancel ( this, SvtResId( BTN_CANCEL ) )
+{
+ FreeResource();
+
+ mpPrinter = NULL;
+ mpTempPrinter = NULL;
+ mnCopyCount = 1;
+ mnFirstPage = 0;
+ mnLastPage = 0;
+ mnMinPage = 1;
+ mnMaxPage = 65535;
+ meCheckRange = PRINTDIALOG_ALL;
+ mbAll = TRUE;
+ mbSelection = FALSE;
+ mbFromTo = FALSE;
+ mbRange = FALSE;
+ mbCollate = FALSE;
+ mbCollateCheck = FALSE;
+ mbOptions = FALSE;
+
+ maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE );
+ maStatusTimer.SetTimeoutHdl( LINK( this, PrintDialog, ImplStatusHdl ) );
+ maBtnProperties.SetClickHdl( LINK( this, PrintDialog, ImplPropertiesHdl ) );
+ maLbName.SetSelectHdl( LINK( this, PrintDialog, ImplChangePrinterHdl ) );
+ maBtnBrowse.SetClickHdl( LINK( this, PrintDialog, ImplBrowseHdl ) );
+
+ maFiPrintFile.SetStyle( maFiPrintFile.GetStyle() | WB_PATHELLIPSIS );
+
+ Link aLink( LINK( this, PrintDialog, ImplModifyControlHdl ) );
+ maCbxFilePrint.SetClickHdl( aLink );
+ maRbtAll.SetClickHdl( aLink );
+ maRbtPages.SetClickHdl( aLink );
+ maRbtSelection.SetClickHdl( aLink );
+ maEdtPages.SetModifyHdl( aLink );
+ maNumCopies.SetModifyHdl( aLink );
+ maCbxCollate.SetClickHdl( aLink );
+ maBtnOptions.SetClickHdl( aLink );
+
+ maRbtAll.Check();
+
+ // Because we have no local print Dialog, or in the other case
+ // the print client and print server must handle this with a
+ // temporaery file and copy the file after printing to the
+ // destionation file name.
+ if ( Application::IsRemoteServer() )
+ maCbxFilePrint.Enable( FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+PrintDialog::~PrintDialog()
+{
+ ImplFreePrnDlgListBox( &maLbName, FALSE );
+ delete mpTempPrinter;
+}
+
+// -----------------------------------------------------------------------
+
+void PrintDialog::ImplSetInfo()
+{
+ const QueueInfo* pInfo = (QueueInfo*)(maLbName.GetEntryData( maLbName.GetSelectEntryPos() ));
+ if ( pInfo )
+ {
+ maFiType.SetText( pInfo->GetDriver() );
+ maFiLocation.SetText( pInfo->GetLocation() );
+ maFiComment.SetText( pInfo->GetComment() );
+ maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) );
+ }
+ else
+ {
+ XubString aTempStr;
+ maFiType.SetText( aTempStr );
+ maFiLocation.SetText( aTempStr );
+ maFiComment.SetText( aTempStr );
+ maFiStatus.SetText( aTempStr );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void PrintDialog::ImplCheckOK()
+{
+ // Ueberprueft, ob der OK-Button enabled ist
+ BOOL bEnable = TRUE;
+
+ if ( maCbxFilePrint.IsChecked() )
+ bEnable = maFiPrintFile.GetText().Len() > 0;
+
+ if ( bEnable && maRbtPages.IsChecked() )
+ bEnable = maEdtPages.GetText().Len() > 0;
+
+ if ( bEnable )
+ {
+ if ( mpTempPrinter )
+ bEnable = mpTempPrinter->IsValid();
+ else
+ bEnable = mpPrinter->IsValid();
+ }
+
+ maBtnOK.Enable( bEnable );
+}
+
+// -----------------------------------------------------------------------
+
+void PrintDialog::ImplInitControls()
+{
+ // Alles
+ if ( mbAll )
+ {
+ maRbtAll.Enable();
+ if( meCheckRange == PRINTDIALOG_ALL )
+ maRbtAll.Check( TRUE );
+ }
+ else
+ maRbtAll.Enable( FALSE );
+
+ // Selektion
+ if ( mbSelection )
+ {
+ maRbtSelection.Enable();
+ if ( meCheckRange == PRINTDIALOG_SELECTION )
+ maRbtSelection.Check( TRUE );
+ }
+ else
+ maRbtSelection.Enable( FALSE );
+
+ // Seiten
+ if ( mbRange )
+ {
+ maRbtPages.Enable();
+ maEdtPages.Show();
+ maEdtPages.SetText( maRangeText );
+
+ if( ( meCheckRange == PRINTDIALOG_FROMTO ) ||
+ ( meCheckRange == PRINTDIALOG_RANGE ) )
+ {
+ maRbtPages.Check( TRUE );
+ maEdtPages.Enable();
+ }
+ else
+ maEdtPages.Enable( FALSE );
+ }
+ else
+ {
+ maRbtPages.Enable( FALSE );
+ maEdtPages.Hide();
+ }
+
+ // Anzahl Kopien
+ maNumCopies.SetValue( mnCopyCount );
+
+ // Sortierung
+ maCbxCollate.Enable( mbCollate );
+ maCbxCollate.Check( mbCollateCheck );
+
+ // Zusaetze-Button
+ if ( mbOptions )
+ maBtnOptions.Show();
+}
+
+// -----------------------------------------------------------------------
+
+void PrintDialog::ImplFillDialogData()
+{
+ if ( maRbtAll.IsChecked() )
+ meCheckRange = PRINTDIALOG_ALL;
+ else if( maRbtSelection.IsChecked() )
+ meCheckRange = PRINTDIALOG_SELECTION;
+ else
+ {
+ meCheckRange = PRINTDIALOG_RANGE;
+ maRangeText = maEdtPages.GetText();
+ }
+
+ mnCopyCount = (USHORT) maNumCopies.GetValue();
+ mbCollateCheck = maCbxCollate.IsChecked();
+
+ // In Datei drucken
+ if ( maCbxFilePrint.IsChecked() )
+ mpPrinter->SetPrintFile( maFiPrintFile.GetText() );
+ mpPrinter->EnablePrintFile( maCbxFilePrint.IsChecked() );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrintDialog, ImplStatusHdl, Timer*, EMPTYARG )
+{
+ QueueInfo aInfo;
+ ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo );
+ maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrintDialog, ImplPropertiesHdl, void*, EMPTYARG )
+{
+ if ( !mpTempPrinter )
+ mpTempPrinter = new Printer( mpPrinter->GetJobSetup() );
+ mpTempPrinter->Setup();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrintDialog, ImplChangePrinterHdl, void*, EMPTYARG )
+{
+ mpTempPrinter = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties,
+ mpPrinter, mpTempPrinter );
+ ImplSetInfo();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrintDialog, ImplBrowseHdl, void*, EMPTYARG )
+{
+ VclFileDialog* pVclFileDlg = GetpApp()->CreateFileDialog( this, WB_SAVEAS );
+ if ( pVclFileDlg )
+ {
+ short nRet = pVclFileDlg->Execute();
+
+ if ( nRet == RET_OK )
+ {
+ INetURLObject aObj( pVclFileDlg->GetPath() );
+ maFiPrintFile.SetText( aObj.PathToFileName() );
+ ImplCheckOK();
+ }
+
+ delete pVclFileDlg;
+ }
+ else
+ {
+ FileDialog* pFileDlg = new FileDialog( this, WB_SAVEAS );
+ short nRet = pFileDlg->Execute();
+
+ if ( nRet == RET_OK )
+ {
+ maFiPrintFile.SetText( pFileDlg->GetPath() );
+ ImplCheckOK();
+ }
+
+ delete pFileDlg;
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrintDialog, ImplModifyControlHdl, void*, p )
+{
+ // Drucken in Datei
+ if ( !p || (p == &maCbxFilePrint) )
+ {
+ BOOL bCheck = maCbxFilePrint.IsChecked();
+ if ( bCheck && !maFiPrintFile.GetText().Len() )
+ ImplBrowseHdl( &maBtnBrowse );
+ maFiPrintFile.Enable( bCheck );
+ maBtnBrowse.Enable( bCheck );
+ ImplCheckOK();
+ }
+
+ // Radiobuttons (Umfang)
+ if ( !p || (p == &maRbtAll) || (p == &maRbtPages) || (p == &maRbtSelection) )
+ {
+ BOOL bCheck = maRbtPages.IsChecked();
+ maEdtPages.Enable( bCheck );
+ if ( p == &maRbtPages )
+ maEdtPages.GrabFocus();
+ ImplCheckOK();
+ }
+
+ // Edit-Felder (Dateiname, Seiten)
+ if ( p == &maEdtPages )
+ ImplCheckOK();
+
+ // Anzahl Kopien
+ BOOL bNumCopies = FALSE;
+
+ if ( !p || p == &maNumCopies )
+ {
+ if ( p )
+ bNumCopies = TRUE;
+ BOOL bCopies = maNumCopies.GetValue() > 1;
+ maCbxCollate.Enable( bCopies && mbCollate );
+
+ if ( !bCopies )
+ maCbxCollate.Check( FALSE );
+ else if ( mbCollateCheck )
+ maCbxCollate.Check( TRUE );
+ }
+
+ // Sortieren
+ if ( !p || p == &maCbxCollate || bNumCopies )
+ {
+ BOOL bCheck = maCbxCollate.IsChecked();
+
+ if ( !bNumCopies )
+ mbCollateCheck = maCbxCollate.IsChecked();
+
+ if( bCheck )
+ {
+ maImgCollate.Show();
+ maImgNotCollate.Hide();
+ }
+ else
+ {
+ maImgCollate.Hide();
+ maImgNotCollate.Show();
+ }
+ }
+
+ // Zus"atze
+ if ( p == &maBtnOptions )
+ ClickOptionsHdl();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+long PrintDialog::ClickOptionsHdl()
+{
+ if ( maOptionsHdlLink.IsSet() )
+ return maOptionsHdlLink.Call( this );
+ else
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+long PrintDialog::OK()
+{
+ if ( maOKHdlLink.IsSet() )
+ return maOKHdlLink.Call( this );
+ else
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+long PrintDialog::Notify( NotifyEvent& rNEvt )
+{
+ if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() )
+ ImplStatusHdl( &maStatusTimer );
+
+ return ModalDialog::Notify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void PrintDialog::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( rDCEvt.GetType() == DATACHANGED_PRINTER )
+ {
+ mpTempPrinter = ImplPrnDlgUpdatePrinter( mpPrinter, mpTempPrinter );
+ Printer* pPrn;
+ if ( mpTempPrinter )
+ pPrn = mpTempPrinter;
+ else
+ pPrn = mpPrinter;
+ ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties );
+ ImplSetInfo();
+ ImplCheckOK();
+ }
+
+ ModalDialog::DataChanged( rDCEvt );
+}
+
+// -----------------------------------------------------------------------
+
+short PrintDialog::Execute()
+{
+ if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() )
+ {
+ DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" );
+ return FALSE;
+ }
+
+ // Controls initialisieren
+ ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties );
+ ImplSetInfo();
+ maStatusTimer.Start();
+ ImplInitControls();
+ ImplModifyControlHdl( NULL );
+
+ // Dialog starten
+ short nRet = ModalDialog::Execute();
+
+ // Wenn Dialog mit OK beendet wurde, dann die Daten updaten
+ if( nRet == TRUE )
+ {
+ if ( mpTempPrinter )
+ mpPrinter->SetPrinterProps( mpTempPrinter );
+ ImplFillDialogData();
+ }
+
+ maStatusTimer.Stop();
+
+ return nRet;
+}
+
+
diff --git a/svtools/source/dialogs/printdlg.hrc b/svtools/source/dialogs/printdlg.hrc
new file mode 100644
index 000000000000..4b674f1c83f3
--- /dev/null
+++ b/svtools/source/dialogs/printdlg.hrc
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: printdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <svtools.hrc>
+
+#define GRP_PRINTER 1
+#define LB_NAMES 2
+#define BTN_PROPERTIES 3
+#define FT_NAME 4
+#define FT_STATUS 5
+#define FI_STATUS 6
+#define FT_TYPE 7
+#define FI_TYPE 8
+#define FT_LOCATION 9
+#define FI_LOCATION 10
+#define FT_COMMENT 11
+#define FI_COMMENT 12
+#define CBX_FILEPRINT 13
+#define FI_PRINTFILE 14
+#define BTN_BROWSE 15
+
+#define GRP_PRINTRANGE 16
+#define RBT_ALL 17
+#define RBT_PAGES 18
+#define RBT_SELECTION 19
+#define EDT_PAGES 20
+
+#define GRP_COPIES 21
+#define FT_COPIES 22
+#define NUM_COPIES 23
+#define CBX_COLLATE 24
+#define IMG_COLLATE 25
+#define IMG_NOT_COLLATE 26
+
+#define BTN_OK 27
+#define BTN_CANCEL 28
+#define BTN_HELP 29
+#define BTN_OPTIONS 30
diff --git a/svtools/source/dialogs/printdlg.src b/svtools/source/dialogs/printdlg.src
new file mode 100644
index 000000000000..cb3e65ae32c9
--- /dev/null
+++ b/svtools/source/dialogs/printdlg.src
@@ -0,0 +1,616 @@
+/*************************************************************************
+ *
+ * $RCSfile: printdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "printdlg.hrc"
+
+#ifndef IMAGE_STDBTN_COLOR
+#define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
+#endif
+
+ModalDialog DLG_SVT_PRNDLG_PRINTDLG
+{
+ SVLook = TRUE ;
+ OutputSize = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 260 , 169 ) ;
+ Text = "Drucken" ;
+ Text [ ENGLISH ] = "Print" ;
+ Text [ english_us ] = "Print" ;
+ Text [ portuguese_brazilian ] = "Drucken" ;
+ Text [ swedish ] = "Skriv ut" ;
+ Text [ danish ] = "Udskriv" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ spanish ] = "Imprimir" ;
+ Text [ french ] = "Impression" ;
+ Text [ dutch ] = "Afdrukken" ;
+ Text [ portuguese ] = "Imprimir" ;
+ GroupBox GRP_PRINTER
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 90 ) ;
+ Text = "Drucker" ;
+ Text [ ENGLISH ] = "Printer" ;
+ Text [ english_us ] = "Printer" ;
+ Text [ portuguese_brazilian ] = "Drucker" ;
+ Text [ swedish ] = "Skrivare" ;
+ Text [ danish ] = "Printer" ;
+ Text [ italian ] = "Stampante" ;
+ Text [ spanish ] = "Impresora" ;
+ Text [ french ] = "Imprimante" ;
+ Text [ dutch ] = "Printer" ;
+ Text [ portuguese ] = "Impressora" ;
+ Text[ chinese_simplified ] = "´òÓ¡»ú";
+ Text[ russian ] = "Ïðèíòåð";
+ Text[ polish ] = "Drukarka";
+ Text[ japanese ] = "ÌßØÝÀ";
+ Text[ chinese_traditional ] = "¦Lªí¾÷";
+ Text[ arabic ] = "ÇáØÇÈÚÉ";
+ Text[ greek ] = "ÅêôõðùôÞò";
+ Text[ korean ] = "ÇÁ¸°ÅÍ";
+ Text[ turkish ] = "Yazýcý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Name" ;
+ Text [ ENGLISH ] = "~Name" ;
+ Text [ english_us ] = "~Name" ;
+ Text [ portuguese_brazilian ] = "~Name" ;
+ Text [ swedish ] = "~Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ spanish ] = "~Nombre" ;
+ Text [ french ] = "~Nom" ;
+ Text [ dutch ] = "~Naam" ;
+ Text [ portuguese ] = "~Nome" ;
+ Text[ chinese_simplified ] = "Ãû³Æ(~N)";
+ Text[ russian ] = "~Èìÿ";
+ Text[ polish ] = "Nazwa";
+ Text[ japanese ] = "–¼‘O(~N)";
+ Text[ chinese_traditional ] = "¦WºÙ(~N)";
+ Text[ arabic ] = "ÇáÇÓã";
+ Text[ greek ] = "¼íïìá";
+ Text[ korean ] = "À̸§(~N)";
+ Text[ turkish ] = "~Ad";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_NAMES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 12 ) ;
+ Size = MAP_APPFONT ( 125 , 80 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ PushButton BTN_PROPERTIES
+ {
+ Pos = MAP_APPFONT ( 188 , 12 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Eigenschaften..." ;
+ Text [ ENGLISH ] = "~Properties..." ;
+ Text [ portuguese ] = "~Propriedades..." ;
+ Text [ english_us ] = "Propert~ies..." ;
+ Text [ portuguese_brazilian ] = "~Eigenschaften..." ;
+ Text [ swedish ] = "~Egenskaper..." ;
+ Text [ danish ] = "Egenskaber..." ;
+ Text [ italian ] = "~Proprietà..." ;
+ Text [ spanish ] = "~Propiedades..." ;
+ Text [ french ] = "~Propriétés..." ;
+ Text [ dutch ] = "~Eigenschappen..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~I)...";
+ Text[ russian ] = "~Ñâîéñòâà...";
+ Text[ polish ] = "W³aœciwoœci...";
+ Text[ japanese ] = "ÌßÛÊßè(~I)...";
+ Text[ chinese_traditional ] = "ÄÝ©Ê(~I)...";
+ Text[ arabic ] = "ÎÕÇÆÕ...";
+ Text[ greek ] = "Éäéüôçôåò...";
+ Text[ korean ] = "µî·ÏÁ¤º¸(~I)...";
+ Text[ turkish ] = "~Özellikler...";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_STATUS
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Status" ;
+ Text [ ENGLISH ] = "Status" ;
+ Text [ english_us ] = "Status" ;
+ Text [ portuguese_brazilian ] = "Status" ;
+ Text [ swedish ] = "Status" ;
+ Text [ danish ] = "Status" ;
+ Text [ italian ] = "Stato" ;
+ Text [ spanish ] = "Estado" ;
+ Text [ french ] = "État" ;
+ Text [ dutch ] = "Status" ;
+ Text [ portuguese ] = "Estado" ;
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = "Ñîñòîÿíèå";
+ Text[ polish ] = "Stan";
+ Text[ japanese ] = "½Ã°À½";
+ Text[ chinese_traditional ] = "ª¬ºA";
+ Text[ arabic ] = "ÇáÍÇáÉ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "»óÅÂ";
+ Text[ turkish ] = "Durum";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_STATUS
+ {
+ Pos = MAP_APPFONT ( 60 , 29 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Typ" ;
+ Text [ ENGLISH ] = "Type" ;
+ Text [ english_us ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Typ" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "Type" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "Ží—Þ";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "ÇüÅÂ";
+ Text[ turkish ] = "Tip";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_TYPE
+ {
+ Pos = MAP_APPFONT ( 60 , 40 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_LOCATION
+ {
+ Pos = MAP_APPFONT ( 12 , 51 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Ort" ;
+ Text [ ENGLISH ] = "Location" ;
+ Text [ english_us ] = "Location" ;
+ Text [ portuguese_brazilian ] = "Ort" ;
+ Text [ swedish ] = "Plats" ;
+ Text [ danish ] = "Placering" ;
+ Text [ italian ] = "Percorso" ;
+ Text [ spanish ] = "Ubicación" ;
+ Text [ french ] = "Emplacement" ;
+ Text [ dutch ] = "Plaats" ;
+ Text [ portuguese ] = "Lugar" ;
+ Text[ chinese_simplified ] = "λÖÃ";
+ Text[ russian ] = "Ëîêàëèçàöèÿ";
+ Text[ polish ] = "Lokalizacja";
+ Text[ japanese ] = "êŠ";
+ Text[ chinese_traditional ] = "¦ì¸m";
+ Text[ arabic ] = "ÇáãæÞÚ";
+ Text[ greek ] = "ÈÝóç";
+ Text[ korean ] = "À§Ä¡";
+ Text[ turkish ] = "Yer";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_LOCATION
+ {
+ Pos = MAP_APPFONT ( 60 , 51 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_COMMENT
+ {
+ Pos = MAP_APPFONT ( 12 , 62 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Kommentar" ;
+ Text [ ENGLISH ] = "Comment" ;
+ Text [ english_us ] = "Comment" ;
+ Text [ portuguese_brazilian ] = "Kommentar" ;
+ Text [ swedish ] = "Kommentar" ;
+ Text [ danish ] = "Kommentar" ;
+ Text [ italian ] = "Commento" ;
+ Text [ spanish ] = "Comentario" ;
+ Text [ french ] = "Commentaire" ;
+ Text [ dutch ] = "Commentaar" ;
+ Text [ portuguese ] = "Comentário" ;
+ Text[ chinese_simplified ] = "×¢½â";
+ Text[ russian ] = "Êîììåíòàðèé";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "ºÒÝÄ";
+ Text[ chinese_traditional ] = "ª`¸Ñ";
+ Text[ arabic ] = "ÊÚáíÞ";
+ Text[ greek ] = "Ó÷üëéï";
+ Text[ korean ] = "¸Þ¸ð";
+ Text[ turkish ] = "Açýklama";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_COMMENT
+ {
+ Pos = MAP_APPFONT ( 60 , 62 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ CheckBox CBX_FILEPRINT
+ {
+ Pos = MAP_APPFONT ( 12 , 77 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ Text = "Ausdruck ~in Datei" ;
+ Text [ ENGLISH ] = "Print to f~ile" ;
+ Text [ english_us ] = "Print to file" ;
+ Text [ portuguese_brazilian ] = "Ausdruck ~in Datei" ;
+ Text [ swedish ] = "Skriv ut till ~fil" ;
+ Text [ danish ] = "Udskrift til fil" ;
+ Text [ italian ] = "Stampa su ~file" ;
+ Text [ spanish ] = "Imprimir ~en archivo" ;
+ Text [ french ] = "Imprimer dans un ~fichier " ;
+ Text [ dutch ] = "Afdrukken in ~bestand" ;
+ Text [ portuguese ] = "Imprimir em ~ficheiro" ;
+ Text[ chinese_simplified ] = "´òÓ¡³ÉÎļþ";
+ Text[ russian ] = "Ïå÷àòü â ôàéë";
+ Text[ polish ] = "Drukuj do pliku";
+ Text[ japanese ] = "̧²Ù‚Öo—Í";
+ Text[ chinese_traditional ] = "¦C¦L¦¨ÀÉ®×";
+ Text[ arabic ] = "ØÈÇÚÉ Åáì ãáÝ";
+ Text[ greek ] = "Åêôýðùóç óå áñ÷åßï";
+ Text[ korean ] = "ÆÄÀÏ·Î Àμâ";
+ Text[ turkish ] = "D~osyaya yazdýr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_PRINTFILE
+ {
+ Pos = MAP_APPFONT ( 90 , 77 ) ;
+ Size = MAP_APPFONT ( 141 , 12 ) ;
+ };
+ PushButton BTN_BROWSE
+ {
+ Pos = MAP_APPFONT ( 234 , 75 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ Text = "~..." ;
+ };
+ GroupBox GRP_PRINTRANGE
+ {
+ Pos = MAP_APPFONT ( 6 , 96 ) ;
+ Size = MAP_APPFONT ( 117 , 47 ) ;
+ Text = "Druckbereich" ;
+ Text [ ENGLISH ] = "Print range" ;
+ Text [ english_us ] = "Print range" ;
+ Text [ portuguese_brazilian ] = "Druckbereich" ;
+ Text [ swedish ] = "Utskriftsområde" ;
+ Text [ danish ] = "Udskriftsområde" ;
+ Text [ italian ] = "Area di stampa" ;
+ Text [ spanish ] = "Área de impresión" ;
+ Text [ french ] = "Zone d'impression" ;
+ Text [ dutch ] = "Afdrukbereik" ;
+ Text [ portuguese ] = "Área de impressão" ;
+ Text[ chinese_simplified ] = "´òÓ¡ÇøÓò";
+ Text[ russian ] = "Îáëàñòü ïå÷àòè";
+ Text[ polish ] = "Zakres wydruku";
+ Text[ japanese ] = "ˆóü”͈Í";
+ Text[ chinese_traditional ] = "¦C¦L­S³ò";
+ Text[ arabic ] = "äØÇÞ ÇáØÈÇÚÉ";
+ Text[ greek ] = "Ðåñéï÷Þ åêôýðùóçò";
+ Text[ korean ] = "Àμ⠿µ¿ª";
+ Text[ turkish ] = "Yazdýrma alaný";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_ALL
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Alles" ;
+ Text [ ENGLISH ] = "~All" ;
+ Text [ portuguese ] = "~Tudo" ;
+ Text [ english_us ] = "All" ;
+ Text [ portuguese_brazilian ] = "~Alles" ;
+ Text [ swedish ] = "~Allt" ;
+ Text [ danish ] = "Alt" ;
+ Text [ italian ] = "~Tutto" ;
+ Text [ spanish ] = "~Todo" ;
+ Text [ french ] = "~Tout" ;
+ Text [ dutch ] = "~Alles" ;
+ Text[ chinese_simplified ] = "È«²¿";
+ Text[ russian ] = "~Âñå";
+ Text[ polish ] = "Wszystko";
+ Text[ japanese ] = "‚·‚ׂÄ";
+ Text[ chinese_traditional ] = "¥þ³¡";
+ Text[ arabic ] = "Çáßá";
+ Text[ greek ] = "¼ëá";
+ Text[ korean ] = "ÀüºÎ";
+ Text[ turkish ] = "~Tümü";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_PAGES
+ {
+ Pos = MAP_APPFONT ( 12 , 117 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Seiten" ;
+ Text [ ENGLISH ] = "Pa~ges" ;
+ Text [ portuguese ] = "~Páginas" ;
+ Text [ english_us ] = "Pages" ;
+ Text [ portuguese_brazilian ] = "~Seiten" ;
+ Text [ swedish ] = "~Sidor" ;
+ Text [ danish ] = "Sider" ;
+ Text [ italian ] = "~Pagine" ;
+ Text [ spanish ] = "~Páginas" ;
+ Text [ french ] = "P~ages" ;
+ Text [ dutch ] = "~Pagina" ;
+ Text[ chinese_simplified ] = "Ò³";
+ Text[ russian ] = "~Ñòðàíèöû";
+ Text[ polish ] = "Strony";
+ Text[ japanese ] = "Íß°¼ÞŽw’è";
+ Text[ chinese_traditional ] = "­¶";
+ Text[ arabic ] = "ÕÝÍÇÊ";
+ Text[ greek ] = "Óåëßäåò";
+ Text[ korean ] = "ÆäÀÌÁö";
+ Text[ turkish ] = "~Sayfa";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_SELECTION
+ {
+ Pos = MAP_APPFONT ( 12 , 129 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "A~uswahl" ;
+ Text [ ENGLISH ] = "~Selection" ;
+ Text [ portuguese ] = "~Selecção" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ portuguese_brazilian ] = "A~uswahl" ;
+ Text [ swedish ] = "~Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Scelta" ;
+ Text [ spanish ] = "~Selección" ;
+ Text [ french ] = "~Sélection" ;
+ Text [ dutch ] = "~Selectie" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûäåëåíèå";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð‚µ‚½•”•ª";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÇáÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_PAGES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 116 ) ;
+ Size = MAP_APPFONT ( 57 , 12 ) ;
+ };
+ GroupBox GRP_COPIES
+ {
+ Pos = MAP_APPFONT ( 129 , 96 ) ;
+ Size = MAP_APPFONT ( 125 , 47 ) ;
+ Text = "Kopien" ;
+ Text [ ENGLISH ] = "Copies" ;
+ Text [ english_us ] = "Copies" ;
+ Text [ portuguese_brazilian ] = "Kopien" ;
+ Text [ swedish ] = "Kopior" ;
+ Text [ danish ] = "Kopier" ;
+ Text [ italian ] = "Copia" ;
+ Text [ spanish ] = "Copias" ;
+ Text [ french ] = "Copies" ;
+ Text [ dutch ] = "Kopieën" ;
+ Text [ portuguese ] = "Cópias" ;
+ Text[ chinese_simplified ] = "·ÝÊý";
+ Text[ russian ] = "Êîïèè";
+ Text[ polish ] = "Kopie";
+ Text[ japanese ] = "ˆóü•””";
+ Text[ chinese_traditional ] = "¥ó¼Æ";
+ Text[ arabic ] = "äÓÎ";
+ Text[ greek ] = "Áíôßãñáöá";
+ Text[ korean ] = "º¹»ç";
+ Text[ turkish ] = "Kopya";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_COPIES
+ {
+ Pos = MAP_APPFONT ( 135 , 106 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ DeltaLang = < Default ; Default ; Default ; Default ; > ;
+ DeltaLang [ ENGLISH ] = < Default ; Default ; 19 ; Default ; > ;
+ Text = "E~xemplare" ;
+ Text [ ENGLISH ] = "Number of ~copies" ;
+ Text [ english_us ] = "Number of copies" ;
+ Text [ portuguese_brazilian ] = "E~xemplare" ;
+ Text [ swedish ] = "E~xemplar" ;
+ Text [ danish ] = "Antal kopier" ;
+ Text [ italian ] = "~Numero di copie" ;
+ Text [ spanish ] = "~Ejemplares" ;
+ Text [ french ] = "E~xemplaire(s)" ;
+ Text [ dutch ] = "E~xemplaren" ;
+ Text [ portuguese ] = "E~xemplares" ;
+ Text[ chinese_simplified ] = "´òÓ¡·ÝÊý";
+ Text[ russian ] = "Ýêçåìïëÿðà(îâ)";
+ Text[ polish ] = "Egzemplarze";
+ Text[ japanese ] = "•””";
+ Text[ chinese_traditional ] = "¦C¦L¥ó¼Æ";
+ Text[ arabic ] = "ÚÏÏ ÇáäÓÎ";
+ Text[ greek ] = "Áíôß~ãñáöá";
+ Text[ korean ] = "º¹»çº» ¼ö";
+ Text[ turkish ] = "~Kopya sayýsý";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_COPIES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 201 , 105 ) ;
+ Size = MAP_APPFONT ( 39 , 12 ) ;
+ DeltaLang = < Default ; Default ; Default ; Default ; > ;
+ DeltaLang [ ENGLISH ] = < 1 ; Default ; -1 ; Default ; > ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 9999 ;
+ StrictFormat = TRUE ;
+ First = 1 ;
+ Last = 9999 ;
+ };
+ CheckBox CBX_COLLATE
+ {
+ Pos = MAP_APPFONT ( 201 , 123 ) ;
+ Size = MAP_APPFONT ( 47 , 10 ) ;
+ DeltaLang = < Default ; Default ; Default ; Default ; > ;
+ DeltaLang [ ENGLISH ] = < 2 ; Default ; Default ; Default ; > ;
+ Text = "S~ortieren" ;
+ Text [ ENGLISH ] = "C~ollate" ;
+ Text [ english_us ] = "Co~llate" ;
+ Text [ portuguese_brazilian ] = "S~ortieren" ;
+ Text [ swedish ] = "S~ortera" ;
+ Text [ danish ] = "Sorter" ;
+ Text [ italian ] = "~Ordina" ;
+ Text [ spanish ] = "~Ordenar" ;
+ Text [ french ] = "T~rier" ;
+ Text [ dutch ] = "S~orteren" ;
+ Text [ portuguese ] = "~Ordenar" ;
+ Text[ chinese_simplified ] = "ÅÅÐò(~L)";
+ Text[ russian ] = "Ñîðòèðîâàòü";
+ Text[ polish ] = "Sortuj";
+ Text[ japanese ] = "•”’PˆÊ‚ňóü(~L)";
+ Text[ chinese_traditional ] = "±Æ§Ç(~L)";
+ Text[ arabic ] = "ÊÑÊíÈ ÇáäÓÎ";
+ Text[ greek ] = "Ôáîéíüìçóç";
+ Text[ korean ] = "´ëÁ¶(~L)";
+ Text[ turkish ] = "S~ýrala";
+ Text[ language_user1 ] = " ";
+ };
+ FixedImage IMG_COLLATE
+ {
+ Pos = MAP_APPFONT ( 132 , 118 ) ;
+ Size = MAP_APPFONT ( 67 , 22 ) ;
+ Fixed = Image
+ {
+ ImageBitmap = Bitmap { File = "collate.bmp" ; };
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ };
+ Hide = TRUE ;
+ };
+ FixedImage IMG_NOT_COLLATE
+ {
+ Pos = MAP_APPFONT ( 132 , 118 ) ;
+ Size = MAP_APPFONT ( 67 , 22 ) ;
+ Fixed = Image
+ {
+ ImageBitmap = Bitmap { File = "ncollate.bmp" ; };
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ };
+ Hide = TRUE ;
+ };
+ PushButton BTN_OPTIONS
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zusätze... : Zusõtze... */
+ /* ### ACHTUNG: Neuer Text in Resource? Zusätze... : Zusõtze... */
+ Text = "~Zusätze..." ;
+ Text [ ENGLISH ] = "Op~tions..." ;
+ Text [ portuguese ] = "Opçõe~s..." ;
+ Text [ english_us ] = "~Options..." ;
+ Text [ portuguese_brazilian ] = "Zusätze..." ;
+ Text [ swedish ] = "F~ler..." ;
+ Text [ danish ] = "Flere..." ;
+ Text [ italian ] = "E~xtra..." ;
+ Text [ spanish ] = "~Opciones..." ;
+ Text [ french ] = "~Options..." ;
+ Text [ dutch ] = "~Overige..." ;
+ Text[ chinese_simplified ] = "ÆäËû(~O)...";
+ Text[ russian ] = "Ïàðàìåòðû...";
+ Text[ polish ] = "Dodatki...";
+ Text[ japanese ] = "µÌß¼®Ý(~O)...";
+ Text[ chinese_traditional ] = "¨ä¥L(~O)...";
+ Text[ arabic ] = "ÎíÇÑÇÊ...";
+ Text[ greek ] = "Ðñüóèåôá...";
+ Text[ korean ] = "¿É¼Ç(~O)...";
+ Text[ turkish ] = "~Seçenekler...";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 95 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 148 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 204 , 149 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_simplified ] = "´òÓ¡";
+ Text[ russian ] = "Ïå÷àòü";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "ˆóü";
+ Text[ chinese_traditional ] = "¦C¦L";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "Àμâ";
+ Text[ turkish ] = "Yazdýr";
+ Text[ language_user1 ] = " ";
+};
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
new file mode 100644
index 000000000000..2300821d6613
--- /dev/null
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -0,0 +1,444 @@
+/*************************************************************************
+ *
+ * $RCSfile: prnsetup.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _VCL_PRINT_HXX
+#include <vcl/print.hxx>
+#endif
+
+#pragma hdrstop
+
+#include <svtdata.hxx>
+#include "prnsetup.hrc"
+#include <prnsetup.hxx>
+
+// =======================================================================
+
+void ImplFillPrnDlgListBox( const Printer* pPrinter,
+ ListBox* pBox, PushButton* pPropBtn )
+{
+ ImplFreePrnDlgListBox( pBox );
+
+ USHORT nCount = Printer::GetQueueCount();
+ if ( nCount )
+ {
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ const QueueInfo& rInfo = Printer::GetQueueInfo( i, FALSE );
+ USHORT nPos = pBox->InsertEntry( rInfo.GetPrinterName() );
+ if ( nPos != LISTBOX_ERROR )
+ pBox->SetEntryData( nPos, new QueueInfo( rInfo ) );
+ }
+
+ pBox->SelectEntry( pPrinter->GetName() );
+ }
+
+ pBox->Enable( nCount != 0 );
+ pPropBtn->Enable( pPrinter->HasSupport( SUPPORT_SETUPDIALOG ) );
+}
+
+// -----------------------------------------------------------------------
+
+void ImplFreePrnDlgListBox( ListBox* pBox, BOOL bClear )
+{
+ USHORT nEntryCount = pBox->GetEntryCount();
+ for ( USHORT i = 0; i < nEntryCount; i++ )
+ delete (QueueInfo*)pBox->GetEntryData( i );
+
+ if ( bClear )
+ pBox->Clear();
+}
+
+// -----------------------------------------------------------------------
+
+Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn,
+ Printer* pPrinter, Printer* pTempPrinter )
+{
+ if ( pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ const QueueInfo& rInfo = *((QueueInfo*)(pBox->GetEntryData( pBox->GetSelectEntryPos() )));
+
+ if ( !pTempPrinter )
+ {
+ if ( (pPrinter->GetName() == rInfo.GetPrinterName()) &&
+ (pPrinter->GetDriverName() == rInfo.GetDriver()) )
+ pTempPrinter = new Printer( pPrinter->GetJobSetup() );
+ else
+ pTempPrinter = new Printer( rInfo );
+ }
+ else
+ {
+ if ( (pTempPrinter->GetName() != rInfo.GetPrinterName()) ||
+ (pTempPrinter->GetDriverName() != rInfo.GetDriver()) )
+ {
+ delete pTempPrinter;
+ pTempPrinter = new Printer( rInfo );
+ }
+ }
+
+ pPropBtn->Enable( pTempPrinter->HasSupport( SUPPORT_SETUPDIALOG ) );
+ }
+ else
+ pPropBtn->Disable();
+
+ return pTempPrinter;
+}
+
+// -----------------------------------------------------------------------
+
+Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter )
+{
+ XubString aPrnName;
+ if ( pTempPrinter )
+ aPrnName = pTempPrinter->GetName();
+ else
+ aPrnName = pPrinter->GetName();
+
+ BOOL bFound = FALSE;
+ USHORT nCount = Printer::GetQueueCount();
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ if ( aPrnName == Printer::GetQueueInfo( i, FALSE ).GetPrinterName() )
+ {
+ bFound = TRUE;
+ break;
+ }
+ }
+
+ if ( !bFound )
+ {
+ if ( pTempPrinter )
+ delete pTempPrinter;
+ pTempPrinter = new Printer;
+ }
+
+ return pTempPrinter;
+}
+
+// -----------------------------------------------------------------------
+
+void ImplPrnDlgUpdateQueueInfo( ListBox* pBox, QueueInfo& rInfo )
+{
+ if ( pBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rInfo = *((QueueInfo*)(pBox->GetEntryData( pBox->GetSelectEntryPos() )));
+
+ USHORT nCount = Printer::GetQueueCount();
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ const QueueInfo& rTempInfo = Printer::GetQueueInfo( i, FALSE );
+ if ( (rInfo.GetPrinterName() == rTempInfo.GetPrinterName()) &&
+ (rInfo.GetDriver() == rTempInfo.GetDriver()) )
+ {
+ rInfo = Printer::GetQueueInfo( i );
+ break;
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+static void ImplPrnDlgAddString( XubString& rStr, const XubString& rAddStr )
+{
+ if ( rStr.Len() )
+ rStr.AppendAscii( "; " );
+ rStr += rAddStr;
+}
+
+// -----------------------------------------------------------------------
+
+static void ImplPrnDlgAddResString( XubString& rStr, USHORT nResId )
+{
+ SvtResId aResId( nResId );
+ XubString aAddStr( aResId );
+ ImplPrnDlgAddString( rStr, aAddStr );
+}
+
+// -----------------------------------------------------------------------
+
+XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
+{
+ XubString aStr;
+ ULONG nStatus = rInfo.GetStatus();
+
+ // Default-Printer
+ if ( rInfo.GetPrinterName().Len() &&
+ (rInfo.GetPrinterName() == Printer::GetDefaultPrinterName()) )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_DEFPRINTER );
+
+ // Status
+ if ( nStatus & QUEUE_STATUS_READY )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_READY );
+ if ( nStatus & QUEUE_STATUS_PAUSED )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAUSED );
+ if ( nStatus & QUEUE_STATUS_PENDING_DELETION )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PENDING );
+ if ( nStatus & QUEUE_STATUS_BUSY )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_BUSY );
+ if ( nStatus & QUEUE_STATUS_INITIALIZING )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_INITIALIZING );
+ if ( nStatus & QUEUE_STATUS_WAITING )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_WAITING );
+ if ( nStatus & QUEUE_STATUS_WARMING_UP )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_WARMING_UP );
+ if ( nStatus & QUEUE_STATUS_PROCESSING )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PROCESSING );
+ if ( nStatus & QUEUE_STATUS_PRINTING )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PRINTING );
+ if ( nStatus & QUEUE_STATUS_OFFLINE )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OFFLINE );
+ if ( nStatus & QUEUE_STATUS_ERROR )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_ERROR );
+ if ( nStatus & QUEUE_STATUS_SERVER_UNKNOWN )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_SERVER_UNKNOWN );
+ if ( nStatus & QUEUE_STATUS_PAPER_JAM )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_JAM );
+ if ( nStatus & QUEUE_STATUS_PAPER_OUT )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_OUT );
+ if ( nStatus & QUEUE_STATUS_MANUAL_FEED )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_MANUAL_FEED );
+ if ( nStatus & QUEUE_STATUS_PAPER_PROBLEM )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_PROBLEM );
+ if ( nStatus & QUEUE_STATUS_IO_ACTIVE )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_IO_ACTIVE );
+ if ( nStatus & QUEUE_STATUS_OUTPUT_BIN_FULL )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OUTPUT_BIN_FULL );
+ if ( nStatus & QUEUE_STATUS_TONER_LOW )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_TONER_LOW );
+ if ( nStatus & QUEUE_STATUS_NO_TONER )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_NO_TONER );
+ if ( nStatus & QUEUE_STATUS_PAGE_PUNT )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAGE_PUNT );
+ if ( nStatus & QUEUE_STATUS_USER_INTERVENTION )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_USER_INTERVENTION );
+ if ( nStatus & QUEUE_STATUS_OUT_OF_MEMORY )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OUT_OF_MEMORY );
+ if ( nStatus & QUEUE_STATUS_DOOR_OPEN )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_DOOR_OPEN );
+ if ( nStatus & QUEUE_STATUS_POWER_SAVE )
+ ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_POWER_SAVE );
+
+ // Anzahl Jobs
+ ULONG nJobs = rInfo.GetJobs();
+ if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) )
+ {
+ XubString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) );
+ XubString aJobs( XubString::CreateFromInt32( nJobs ) );
+ aJobStr.SearchAndReplaceAscii( "%d", aJobs );
+ ImplPrnDlgAddString( aStr, aJobStr );
+ }
+
+ return aStr;
+}
+
+// =======================================================================
+
+PrinterSetupDialog::PrinterSetupDialog( Window* pWindow ) :
+ ModalDialog ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRNSETUPDLG ) ),
+ maGrpPrinter ( this, SvtResId( GRP_PRINTER ) ),
+ maFtName ( this, SvtResId( FT_NAME ) ),
+ maLbName ( this, SvtResId( LB_NAMES ) ),
+ maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ),
+ maFtStatus ( this, SvtResId( FT_STATUS ) ),
+ maFiStatus ( this, SvtResId( FI_STATUS ) ),
+ maFtType ( this, SvtResId( FT_TYPE ) ),
+ maFiType ( this, SvtResId( FI_TYPE ) ),
+ maFtLocation ( this, SvtResId( FT_LOCATION ) ),
+ maFiLocation ( this, SvtResId( FI_LOCATION ) ),
+ maFtComment ( this, SvtResId( FT_COMMENT ) ),
+ maFiComment ( this, SvtResId( FI_COMMENT ) ),
+ maBtnOK ( this, SvtResId( BTN_OK ) ),
+ maBtnCancel ( this, SvtResId( BTN_CANCEL ) ),
+ maBtnHelp ( this, SvtResId( BTN_HELP ) )
+{
+ FreeResource();
+
+ mpPrinter = NULL;
+ mpTempPrinter = NULL;
+
+ maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE );
+ maStatusTimer.SetTimeoutHdl( LINK( this, PrinterSetupDialog, ImplStatusHdl ) );
+ maBtnProperties.SetClickHdl( LINK( this, PrinterSetupDialog, ImplPropertiesHdl ) );
+ maLbName.SetSelectHdl( LINK( this, PrinterSetupDialog, ImplChangePrinterHdl ) );
+}
+
+// -----------------------------------------------------------------------
+
+PrinterSetupDialog::~PrinterSetupDialog()
+{
+ ImplFreePrnDlgListBox( &maLbName, FALSE );
+ delete mpTempPrinter;
+}
+
+// -----------------------------------------------------------------------
+
+void PrinterSetupDialog::ImplSetInfo()
+{
+ const QueueInfo* pInfo = (QueueInfo*)(maLbName.GetEntryData( maLbName.GetSelectEntryPos() ));
+ if ( pInfo )
+ {
+ maFiType.SetText( pInfo->GetDriver() );
+ maFiLocation.SetText( pInfo->GetLocation() );
+ maFiComment.SetText( pInfo->GetComment() );
+ maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) );
+ }
+ else
+ {
+ XubString aTempStr;
+ maFiType.SetText( aTempStr );
+ maFiLocation.SetText( aTempStr );
+ maFiComment.SetText( aTempStr );
+ maFiStatus.SetText( aTempStr );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrinterSetupDialog, ImplStatusHdl, Timer*, EMPTYARG )
+{
+ QueueInfo aInfo;
+ ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo );
+ maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrinterSetupDialog, ImplPropertiesHdl, void*, EMPTYARG )
+{
+ if ( !mpTempPrinter )
+ mpTempPrinter = new Printer( mpPrinter->GetJobSetup() );
+ mpTempPrinter->Setup();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( PrinterSetupDialog, ImplChangePrinterHdl, void*, EMPTYARG )
+{
+ mpTempPrinter = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties,
+ mpPrinter, mpTempPrinter );
+ ImplSetInfo();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+long PrinterSetupDialog::Notify( NotifyEvent& rNEvt )
+{
+ if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() )
+ ImplStatusHdl( &maStatusTimer );
+
+ return ModalDialog::Notify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void PrinterSetupDialog::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( rDCEvt.GetType() == DATACHANGED_PRINTER )
+ {
+ mpTempPrinter = ImplPrnDlgUpdatePrinter( mpPrinter, mpTempPrinter );
+ Printer* pPrn;
+ if ( mpTempPrinter )
+ pPrn = mpTempPrinter;
+ else
+ pPrn = mpPrinter;
+ ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties );
+ ImplSetInfo();
+ }
+
+ ModalDialog::DataChanged( rDCEvt );
+}
+
+// -----------------------------------------------------------------------
+
+short PrinterSetupDialog::Execute()
+{
+ if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() )
+ {
+ DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" );
+ return FALSE;
+ }
+
+ ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties );
+ ImplSetInfo();
+ maStatusTimer.Start();
+
+ // Dialog starten
+ short nRet = ModalDialog::Execute();
+
+ // Wenn Dialog mit OK beendet wurde, dann die Daten updaten
+ if ( nRet == TRUE )
+ {
+ if ( mpTempPrinter )
+ mpPrinter->SetPrinterProps( mpTempPrinter );
+ }
+
+ maStatusTimer.Stop();
+
+ return nRet;
+}
diff --git a/svtools/source/dialogs/prnsetup.hrc b/svtools/source/dialogs/prnsetup.hrc
new file mode 100644
index 000000000000..4d5fede29c84
--- /dev/null
+++ b/svtools/source/dialogs/prnsetup.hrc
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: prnsetup.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <svtools.hrc>
+
+#define GRP_PRINTER 1
+#define LB_NAMES 2
+#define BTN_PROPERTIES 3
+#define FT_NAME 4
+#define FT_STATUS 5
+#define FI_STATUS 6
+#define FT_TYPE 7
+#define FI_TYPE 8
+#define FT_LOCATION 9
+#define FI_LOCATION 10
+#define FT_COMMENT 11
+#define FI_COMMENT 12
+
+#define BTN_OK 13
+#define BTN_CANCEL 14
+#define BTN_HELP 15
diff --git a/svtools/source/dialogs/prnsetup.src b/svtools/source/dialogs/prnsetup.src
new file mode 100644
index 000000000000..476d57e085a7
--- /dev/null
+++ b/svtools/source/dialogs/prnsetup.src
@@ -0,0 +1,966 @@
+/*************************************************************************
+ *
+ * $RCSfile: prnsetup.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "prnsetup.hrc"
+
+String STR_SVT_PRNDLG_READY
+{
+ Text = "Bereit" ;
+ Text [ ENGLISH ] = "Ready" ;
+ Text [ portuguese ] = "Pronto" ;
+ Text [ english_us ] = "Ready" ;
+ Text [ portuguese_brazilian ] = "Bereit" ;
+ Text [ swedish ] = "Redo" ;
+ Text [ danish ] = "Klar" ;
+ Text [ italian ] = "Pronto" ;
+ Text [ spanish ] = "Preparado" ;
+ Text [ french ] = "Disponible" ;
+ Text [ dutch ] = "Klaar" ;
+ Text[ chinese_simplified ] = "¾ÍÐ÷";
+ Text[ russian ] = "Ãîòîâ";
+ Text[ polish ] = "Gotowy";
+ Text[ japanese ] = "±²ÄÞØݸޒ†";
+ Text[ chinese_traditional ] = "´Nºü";
+ Text[ arabic ] = "ÌÇåÒÉ";
+ Text[ greek ] = "Óå åôïéìüôçôá";
+ Text[ korean ] = "Áغñ";
+ Text[ turkish ] = "Hazýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PAUSED
+{
+ Text = "Angehalten" ;
+ Text [ ENGLISH ] = "Paused" ;
+ Text [ portuguese ] = "Cancelado" ;
+ Text [ english_us ] = "Paused" ;
+ Text [ portuguese_brazilian ] = "Angehalten" ;
+ Text [ swedish ] = "Stoppad" ;
+ Text [ danish ] = "Stoppet" ;
+ Text [ italian ] = "Pausa" ;
+ Text [ spanish ] = "Detenido" ;
+ Text [ french ] = "Arrêté" ;
+ Text [ dutch ] = "Gestopt" ;
+ Text[ chinese_simplified ] = "ÔÝÍ£";
+ Text[ russian ] = "Îñòàíîâëåí";
+ Text[ polish ] = "Zatrzymane";
+ Text[ japanese ] = "’†’f";
+ Text[ chinese_traditional ] = "¼È°±";
+ Text[ arabic ] = "ãæÞæÝÉ";
+ Text[ greek ] = "ÄéáêïðÞ";
+ Text[ korean ] = "ÀϽÃÁ¤Áö";
+ Text[ turkish ] = "Durduruldu";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PENDING
+{
+ Text = "Löschen anstehend" ;
+ Text [ ENGLISH ] = "Pending deletion" ;
+ Text [ portuguese ] = "Eliminar pendente" ;
+ Text [ english_us ] = "Pending deletion" ;
+ Text [ portuguese_brazilian ] = "Löschen anstehend" ;
+ Text [ swedish ] = "Radering i vänteläge" ;
+ Text [ danish ] = "Slet igangværende" ;
+ Text [ italian ] = "Cancellazione in attesa" ;
+ Text [ spanish ] = "Eliminación pendiente" ;
+ Text [ french ] = "Suppression imminente" ;
+ Text [ dutch ] = "Wissen verwacht" ;
+ Text[ chinese_simplified ] = "ɾ³ýµÈºòµÄ";
+ Text[ russian ] = "Óäàëåíèå îòëîæåíî";
+ Text[ polish ] = "Oczekiwanie na usuniêcie";
+ Text[ japanese ] = "휂ð‘Ò‚Á‚Ä‚¢‚Ü‚·";
+ Text[ chinese_traditional ] = "§R°£µ¥­Ôªº";
+ Text[ arabic ] = "ÇáÍÐÝ ãÚáÞ";
+ Text[ greek ] = "ÄéáãñáöÞ óôç óõíÝ÷åéá";
+ Text[ korean ] = "´ë±âÁß ÀÛ¾÷ »èÁ¦";
+ Text[ turkish ] = "Silinmek üzere";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_BUSY
+{
+ Text = "Ausgelastet" ;
+ Text [ ENGLISH ] = "Busy" ;
+ Text [ portuguese ] = "Ocupado" ;
+ Text [ english_us ] = "Busy" ;
+ Text [ portuguese_brazilian ] = "Ausgelastet" ;
+ Text [ swedish ] = "Upptaget" ;
+ Text [ danish ] = "Optaget" ;
+ Text [ italian ] = "Sovraccarico" ;
+ Text [ spanish ] = "Ocupado" ;
+ Text [ french ] = "Système occupé" ;
+ Text [ dutch ] = "Bezig" ;
+ Text[ chinese_simplified ] = "æµ";
+ Text[ russian ] = "Â äåéñòâèè";
+ Text[ polish ] = "Zajêty";
+ Text[ japanese ] = "ËÞ¼Þ°ó‘Ô";
+ Text[ chinese_traditional ] = "¦£¸L";
+ Text[ arabic ] = "ãÔÛæáÉ";
+ Text[ greek ] = "Áðáó÷ïëçìÝíïò";
+ Text[ korean ] = "»ç¿ëÁß";
+ Text[ turkish ] = "Meþgul";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_INITIALIZING
+{
+ Text = "Initialisieren" ;
+ Text [ ENGLISH ] = "Initialzing" ;
+ Text [ portuguese ] = "Inicializar" ;
+ Text [ english_us ] = "Initializing" ;
+ Text [ portuguese_brazilian ] = "Initialisieren" ;
+ Text [ swedish ] = "Initierar" ;
+ Text [ danish ] = "Initialiserer" ;
+ Text [ italian ] = "Inizializza" ;
+ Text [ spanish ] = "Inicializar" ;
+ Text [ french ] = "Initialisation" ;
+ Text [ dutch ] = "Initialiseren" ;
+ Text[ chinese_simplified ] = "³õʼ»¯";
+ Text[ russian ] = "Èíèöèàëèçèðîâàòü";
+ Text[ polish ] = "Inicjacja";
+ Text[ japanese ] = "‰Šú‰»";
+ Text[ chinese_traditional ] = "ªì©l¤Æ";
+ Text[ arabic ] = "ÊåíÆÉ";
+ Text[ greek ] = "Áñ÷éêïðïßçóç";
+ Text[ korean ] = "ÃʱâÈ­";
+ Text[ turkish ] = "Baþlat";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_WAITING
+{
+ Text = "Wartend" ;
+ Text [ ENGLISH ] = "Waiting" ;
+ Text [ portuguese ] = "Esperando" ;
+ Text [ english_us ] = "Waiting" ;
+ Text [ portuguese_brazilian ] = "Wartend" ;
+ Text [ swedish ] = "Väntar" ;
+ Text [ danish ] = "Venter" ;
+ Text [ italian ] = "Attesa" ;
+ Text [ spanish ] = "En espera" ;
+ Text [ french ] = "En attente" ;
+ Text [ dutch ] = "Wachtend" ;
+ Text[ chinese_simplified ] = "µÈºò";
+ Text[ russian ] = "Â îæèäàíèè";
+ Text[ polish ] = "Oczekiwanie";
+ Text[ japanese ] = "‘Ò‹@’†";
+ Text[ chinese_traditional ] = "µ¥­Ô";
+ Text[ arabic ] = "ÇäÊÙÇÑ";
+ Text[ greek ] = "ÁíáìïíÞ";
+ Text[ korean ] = "´ë±âÁß";
+ Text[ turkish ] = "Beklemede";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_WARMING_UP
+{
+ Text = "Anlaufen" ;
+ Text [ ENGLISH ] = "Warming up" ;
+ Text [ portuguese ] = "Aquecimento" ;
+ Text [ english_us ] = "Warming up" ;
+ Text [ portuguese_brazilian ] = "Anlaufen" ;
+ Text [ swedish ] = "Startar" ;
+ Text [ danish ] = "Varmer op" ;
+ Text [ italian ] = "In avvio" ;
+ Text [ spanish ] = "Arranque" ;
+ Text [ french ] = "Préchauffage" ;
+ Text [ dutch ] = "Beginnen" ;
+ Text[ chinese_simplified ] = "Ô¤ÈÈ";
+ Text[ russian ] = "Çàïóñê";
+ Text[ polish ] = "Rozgrzewanie";
+ Text[ japanese ] = "€”õ’†";
+ Text[ chinese_traditional ] = "¹w¼ö";
+ Text[ arabic ] = "ÇÓÊÚÏÇÏ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "Ðñïåôïéìáóßá";
+ Text[ korean ] = "ÁغñÁß";
+ Text[ turkish ] = "Isýnýyor";
+};
+String STR_SVT_PRNDLG_PROCESSING
+{
+ Text = "Verarbeiten" ;
+ Text [ ENGLISH ] = "Processing" ;
+ Text [ portuguese ] = "Processamento" ;
+ Text [ english_us ] = "Processing" ;
+ Text [ portuguese_brazilian ] = "Verarbeiten" ;
+ Text [ swedish ] = "Bearbeta" ;
+ Text [ danish ] = "Behandler" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "Procesar" ;
+ Text [ french ] = "Modifier" ;
+ Text [ dutch ] = "Verwerken" ;
+ Text[ chinese_simplified ] = "´¦Àí";
+ Text[ russian ] = "Îáðàáîòêà";
+ Text[ polish ] = "Opracuj";
+ Text[ japanese ] = "ˆ—";
+ Text[ chinese_traditional ] = "³B²z";
+ Text[ arabic ] = "ãÚÇáÌÉ";
+ Text[ greek ] = "Åðåîåñãáóßá";
+ Text[ korean ] = "ÁøÇàÁß";
+ Text[ turkish ] = "Ýþleniyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PRINTING
+{
+ Text = "Drucken" ;
+ Text [ ENGLISH ] = "Printing" ;
+ Text [ portuguese ] = "Imprimindo" ;
+ Text [ english_us ] = "Printing" ;
+ Text [ portuguese_brazilian ] = "Drucken" ;
+ Text [ swedish ] = "Skriv ut" ;
+ Text [ danish ] = "Udskriv" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ spanish ] = "Imprimir" ;
+ Text [ french ] = "Imprimer" ;
+ Text [ dutch ] = "Printwn" ;
+ Text[ chinese_simplified ] = "´òÓ¡";
+ Text[ russian ] = "Ïå÷àòü";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "ˆóü";
+ Text[ chinese_traditional ] = "¦C¦L";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "ÀμâÁß";
+ Text[ turkish ] = "Yazdýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_OFFLINE
+{
+ Text = "Offline" ;
+ Text [ ENGLISH ] = "Offline" ;
+ Text [ portuguese ] = "Offline" ;
+ Text [ english_us ] = "Offline" ;
+ Text [ portuguese_brazilian ] = "Offline" ;
+ Text [ swedish ] = "Offline" ;
+ Text [ danish ] = "Offline" ;
+ Text [ italian ] = "Offline" ;
+ Text [ spanish ] = "Desconectado" ;
+ Text [ french ] = "Hors ligne" ;
+ Text [ dutch ] = "Offline" ;
+ Text[ chinese_simplified ] = "ÍÑ»ú";
+ Text[ russian ] = "Offline";
+ Text[ polish ] = "Offline";
+ Text[ japanese ] = "µÌײÝ";
+ Text[ chinese_traditional ] = "³s½u";
+ Text[ arabic ] = "ÛíÑ ãÊÕá";
+ Text[ greek ] = "×ùñßò óýíäåóç";
+ Text[ korean ] = "¿ÀÇÁ¶óÀÎ";
+ Text[ turkish ] = "Çevrimdýþý";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_ERROR
+{
+ Text = "Fehler" ;
+ Text [ ENGLISH ] = "Error" ;
+ Text [ portuguese ] = "Erro" ;
+ Text [ english_us ] = "Error" ;
+ Text [ portuguese_brazilian ] = "Fehler" ;
+ Text [ swedish ] = "Fel" ;
+ Text [ danish ] = "Fejl" ;
+ Text [ italian ] = "Errore" ;
+ Text [ spanish ] = "Error" ;
+ Text [ french ] = "Erreur" ;
+ Text [ dutch ] = "Fout" ;
+ Text[ chinese_simplified ] = "´íÎó";
+ Text[ russian ] = "Îøèáêà";
+ Text[ polish ] = "B³¹d";
+ Text[ japanese ] = "´×°";
+ Text[ chinese_traditional ] = "¿ù»~";
+ Text[ arabic ] = "ÎØÃ";
+ Text[ greek ] = "ÓöÜëìá";
+ Text[ korean ] = "¿À·ù";
+ Text[ turkish ] = "Hata";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_SERVER_UNKNOWN
+{
+ Text = "Unbekannter Server" ;
+ Text [ ENGLISH ] = "Unknown Server" ;
+ Text [ portuguese ] = "Servidor desconhecido" ;
+ Text [ english_us ] = "Unknown Server" ;
+ Text [ portuguese_brazilian ] = "Unbekannter Server" ;
+ Text [ swedish ] = "Obekant server" ;
+ Text [ danish ] = "Ukendt server" ;
+ Text [ italian ] = "Server sconosciuto" ;
+ Text [ spanish ] = "Servidor desconocido" ;
+ Text [ french ] = "Serveur inconnu" ;
+ Text [ dutch ] = "Onbekende server" ;
+ Text[ chinese_simplified ] = "²»Ã÷µÄ·þÎñÆ÷";
+ Text[ russian ] = "Íåèçâåñòíûé ñåðâåð";
+ Text[ polish ] = "Nieznany serwer";
+ Text[ japanese ] = "•s–¾‚Ì»°ÊÞ°";
+ Text[ chinese_traditional ] = "¤£©úªº¦øªA¾¹";
+ Text[ arabic ] = "ãÒæøÏ ÛíÑ ãÚÑæÝ";
+ Text[ greek ] = "¢ãíùóôïò äéáêïìéóôÞò";
+ Text[ korean ] = "¾Ë¼ö¾ø´Â ¼­¹ö";
+ Text[ turkish ] = "Bilinmeyen sunucu";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PAPER_JAM
+{
+ Text = "Papierstau" ;
+ Text [ ENGLISH ] = "Paper jam" ;
+ Text [ portuguese ] = "Engarrafamento de papel" ;
+ Text [ english_us ] = "Paper jam" ;
+ Text [ portuguese_brazilian ] = "Papierstau" ;
+ Text [ swedish ] = "Papperskö" ;
+ Text [ danish ] = "Papirstop" ;
+ Text [ italian ] = "Inceppamento" ;
+ Text [ spanish ] = "Bloqueo de papel" ;
+ Text [ french ] = "Bourrage" ;
+ Text [ dutch ] = "Papieropstopping" ;
+ Text[ chinese_simplified ] = "¿¨Ö½";
+ Text[ russian ] = "Çàåäàíèå áóìàãè";
+ Text[ polish ] = "Papier zablokowany";
+ Text[ japanese ] = "—pŽ†‹l‚Ü‚è";
+ Text[ chinese_traditional ] = "¥d¯È";
+ Text[ arabic ] = "ÊßÏÓ ÇáæÑÞ";
+ Text[ greek ] = "ÌðëïêÜñéóìá ÷áñôéïý";
+ Text[ korean ] = "¿ëÁö °É¸²";
+ Text[ turkish ] = "Kaðýt sýkýþmasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PAPER_OUT
+{
+ Text = "Papiermangel" ;
+ Text [ ENGLISH ] = "Paper out" ;
+ Text [ portuguese ] = "Falta de papel" ;
+ Text [ english_us ] = "Not enough paper" ;
+ Text [ portuguese_brazilian ] = "Papiermangel" ;
+ Text [ swedish ] = "Det saknas papper" ;
+ Text [ danish ] = "Ikke nok papir" ;
+ Text [ italian ] = "Carta esaurita" ;
+ Text [ spanish ] = "Falta de papel" ;
+ Text [ french ] = "Manque de papier" ;
+ Text [ dutch ] = "Geen papier" ;
+ Text[ chinese_simplified ] = "Ö½ÓÃÍê";
+ Text[ russian ] = "Íåõâàòêà áóìàãè";
+ Text[ polish ] = "Brak papieru";
+ Text[ japanese ] = "—pŽ†•s‘«";
+ Text[ chinese_traditional ] = "¯È¥Î§¹";
+ Text[ arabic ] = "äÞÕ Ýí ÇáæÑÞ";
+ Text[ greek ] = "¸ëëåéøç ÷áñôéïý";
+ Text[ korean ] = "¿ëÁö°¡ ºÎÁ·ÇÕ´Ï´Ù.";
+ Text[ turkish ] = "Yeterli miktarda kaðýt yok";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_MANUAL_FEED
+{
+ Text = "Manuelle Papierzufuhr" ;
+ Text [ ENGLISH ] = "Manual feed" ;
+ Text [ portuguese ] = "Alimentação manual" ;
+ Text [ english_us ] = "Manual feed" ;
+ Text [ portuguese_brazilian ] = "Manuelle Papierzufuhr" ;
+ Text [ swedish ] = "Manuell pappersinmatning" ;
+ Text [ danish ] = "Manuel papirfødning" ;
+ Text [ italian ] = "Alimentazione carta manuale" ;
+ Text [ spanish ] = "Alimentación manual" ;
+ Text [ french ] = "Alimentation manuelle" ;
+ Text [ dutch ] = "Handmatige papiertoevoer" ;
+ Text[ chinese_simplified ] = "ÊÖ¹¤ËÍÖ½";
+ Text[ russian ] = "Ðó÷íàÿ ïîäà÷à áóìàãè";
+ Text[ polish ] = "Rêczne podawanie papieru";
+ Text[ japanese ] = "Žè“®‚Å—pŽ†‹Ÿ‹‹";
+ Text[ chinese_traditional ] = "¤â¤u°e¯È";
+ Text[ arabic ] = "ÇáÅãÏÇÏ ÈÇáæÑÞ íÏæíÇð";
+ Text[ greek ] = "×åéñïêßíçôïò åöïäéáóìüò ÷áñôéïý";
+ Text[ korean ] = "¼öµ¿ ±ÞÁö";
+ Text[ turkish ] = "El ile besleme";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_PAPER_PROBLEM
+{
+ Text = "Papierproblem" ;
+ Text [ ENGLISH ] = "Paper problem" ;
+ Text [ portuguese ] = "Problemas com papel" ;
+ Text [ english_us ] = "Paper problem" ;
+ Text [ portuguese_brazilian ] = "Papierproblem" ;
+ Text [ swedish ] = "Pappersproblem" ;
+ Text [ danish ] = "Papirproblem" ;
+ Text [ italian ] = "Errore carta" ;
+ Text [ spanish ] = "Problema de papel" ;
+ Text [ french ] = "Problème d'allimentation de papier" ;
+ Text [ dutch ] = "Papierprobleem" ;
+ Text[ chinese_simplified ] = "Ö½ÕÅÎÊÌâ";
+ Text[ russian ] = "Ïðîáëåìà ñ áóìàãîé";
+ Text[ polish ] = "Problem z papierem";
+ Text[ japanese ] = "—pŽ†‚Ì–â‘è";
+ Text[ chinese_traditional ] = "¯È±i°ÝÃD";
+ Text[ arabic ] = "ãÔßáÉ Ýí ÇáæÑÞ";
+ Text[ greek ] = "Ðñüâëçìá ìå ôï ÷áñôß";
+ Text[ korean ] = "¿ëÁö ¹®Á¦";
+ Text[ turkish ] = "Kaðýt sorunu";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_IO_ACTIVE
+{
+ Text = "E/A aktiv" ;
+ Text [ ENGLISH ] = "I/O active" ;
+ Text [ portuguese ] = "I/O activos" ;
+ Text [ english_us ] = "I/O active" ;
+ Text [ portuguese_brazilian ] = "E/A aktiv" ;
+ Text [ swedish ] = "I/O aktiv" ;
+ Text [ danish ] = "I/O aktiv" ;
+ Text [ italian ] = "I/O attivo" ;
+ Text [ spanish ] = "I/O activos" ;
+ Text [ french ] = "E/S active" ;
+ Text [ dutch ] = "I/O actief" ;
+ Text[ chinese_simplified ] = "¼¤»îÊäÈë/Êä³ö";
+ Text[ russian ] = "Àêòèâíûé Âõîä/Âûõîä";
+ Text[ polish ] = "We/Wy aktywne";
+ Text[ japanese ] = "I/O ±¸Ã¨ÌÞ";
+ Text[ chinese_traditional ] = "¿E¬¡¿é¤J/¿é¥X";
+ Text[ arabic ] = "ÇáÅÏÎÇá/ÇáÅÎÑÇÌ äÔØ";
+ Text[ greek ] = "Åéó/Åî åíåñãÜ";
+ Text[ korean ] = "I/O È°¼º";
+ Text[ turkish ] = "G/Ç aktif";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_OUTPUT_BIN_FULL
+{
+ Text = "Ausgabefach ist voll" ;
+ Text [ ENGLISH ] = "Output bin full" ;
+ Text [ portuguese ] = "Cesto de saída está cheio" ;
+ Text [ english_us ] = "Output bin full" ;
+ Text [ portuguese_brazilian ] = "Ausgabefach ist voll" ;
+ Text [ swedish ] = "Utgångsfacket är fullt" ;
+ Text [ danish ] = "Output-bakken er fyldt" ;
+ Text [ italian ] = "Il vano di uscita è pieno" ;
+ Text [ spanish ] = "La papelera de salida está llena" ;
+ Text [ french ] = "Le bac de sortie est plein" ;
+ Text [ dutch ] = "Postvak UIT is vol" ;
+ Text[ chinese_simplified ] = "Êä³ö»º³åÇøÒçÂú";
+ Text[ russian ] = "Óñòðîéñòâî âûäà÷è çàïîëíåíî";
+ Text[ polish ] = "Zasobnik wyjœciowy zape³niony";
+ Text[ japanese ] = "ˆóü±³ÄÌ߯ėp‚Ì—eŠí‚ª‚¢‚Á‚Ï‚¢‚Å‚·B";
+ Text[ chinese_traditional ] = "¿é¥X½w¨R°Ï·¸º¡";
+ Text[ arabic ] = "ÏÑÌ ÇáÅÎÑÇÌ ããÊáÆ";
+ Text[ greek ] = "Ôï ôìÞìá åîáãùãÞò åßíáé ðëÞñåò";
+ Text[ korean ] = "Ãâ·ÂÇÔÀÌ °¡µæ Âü";
+ Text[ turkish ] = "Çýktý çekmecesi doldu";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_TONER_LOW
+{
+ Text = "Niedriger Tonerstand" ;
+ Text [ ENGLISH ] = "Towner low" ;
+ Text [ portuguese ] = "Pouco toner" ;
+ Text [ english_us ] = "Toner low" ;
+ Text [ portuguese_brazilian ] = "Niedriger Tonerstand" ;
+ Text [ swedish ] = "Lite toner" ;
+ Text [ danish ] = "Næsten ingen toner" ;
+ Text [ italian ] = "Livello del toner basso" ;
+ Text [ spanish ] = "Tóner bajo" ;
+ Text [ french ] = "Remplissez du toner" ;
+ Text [ dutch ] = "Lage tonerstand" ;
+ Text[ chinese_simplified ] = "Ä«·Û²»×ã";
+ Text[ russian ] = "Íèçêîå ñîñòîÿíèå òîíåðà";
+ Text[ polish ] = "Ma³o tonera";
+ Text[ japanese ] = "ÄÅ°‚ÌŽc—Ê‚ª­‚È‚­‚È‚Á‚Ä‚¢‚Ü‚·";
+ Text[ chinese_traditional ] = "¾¥¯»¤£¨¬";
+ Text[ arabic ] = "ÇäÎÝÇÖ ãÓÍæÞ ÇáÍÈÑ";
+ Text[ greek ] = "×áìçëÞ óôÜèìç ôïõ Toner";
+ Text[ korean ] = "Åä³Ê°¡ Àû½À´Ï´Ù.";
+ Text[ turkish ] = "Toner azaldý";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_NO_TONER
+{
+ Text = "Kein Toner" ;
+ Text [ ENGLISH ] = "No toner" ;
+ Text [ portuguese ] = "Sem toner" ;
+ Text [ english_us ] = "No toner" ;
+ Text [ portuguese_brazilian ] = "Kein Toner" ;
+ Text [ swedish ] = "Toner slut" ;
+ Text [ danish ] = "Ingen toner" ;
+ Text [ italian ] = "Manca il toner" ;
+ Text [ spanish ] = "No hay tóner" ;
+ Text [ french ] = "Pas de toner" ;
+ Text [ dutch ] = "Geen toner" ;
+ Text[ chinese_simplified ] = "Ä«·ÛÓÃÍê";
+ Text[ russian ] = "Íåò òîíåðà";
+ Text[ polish ] = "Brak tonera";
+ Text[ japanese ] = "ÄÅ°‚ª‚ ‚è‚Ü‚¹‚ñB";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "¾¥¯»¥Î§¹";
+ Text[ arabic ] = "áÇ íæÌÏ ãÓÍæÞ ÇáÍÈÑ";
+ Text[ greek ] = "Äåí õðÜñ÷åé Ôoner";
+ Text[ korean ] = "Åä³Ê°¡ ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Toner bitti";
+};
+String STR_SVT_PRNDLG_PAGE_PUNT
+{
+ Text = "Seitenverwurf" ;
+ Text [ ENGLISH ] = "Page punt" ;
+ Text [ portuguese ] = "Eliminar página" ;
+ Text [ english_us ] = "Delete Page" ;
+ Text [ portuguese_brazilian ] = "Seitenverwurf" ;
+ Text [ swedish ] = "Kassera sida" ;
+ Text [ danish ] = "Kasser side" ;
+ Text [ italian ] = "Rigetta pagina" ;
+ Text [ spanish ] = "Eliminar página" ;
+ Text [ french ] = "Suppression de page" ;
+ Text [ dutch ] = "Pagina's uitzonderen" ;
+ Text[ chinese_simplified ] = "ɾ³ýÒ³";
+ Text[ russian ] = "Óäàëåíèå ñòðàíèöû";
+ Text[ polish ] = "Usuñ stronê";
+ Text[ japanese ] = "Íß°¼Þíœ";
+ Text[ chinese_traditional ] = "§R°£­¶";
+ Text[ arabic ] = "ÍÐÝ ÕÝÍÉ";
+ Text[ greek ] = "ÄéáãñáöÞ óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö »èÁ¦";
+ Text[ turkish ] = "Sayfayý sil";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_USER_INTERVENTION
+{
+ Text = "Benutzerzugriff notwendig" ;
+ Text [ ENGLISH ] = "User intervention necessary" ;
+ Text [ portuguese ] = "Necessária intervenção do utilizador" ;
+ Text [ english_us ] = "User intervention necessary" ;
+ Text [ portuguese_brazilian ] = "Benutzerzugriff notwendig" ;
+ Text [ swedish ] = "Åtkomst nödvändigt för användaren " ;
+ Text [ danish ] = "Brugerhandling krævet" ;
+ Text [ italian ] = "È necessario l'accesso utente" ;
+ Text [ spanish ] = "Intervención necesaria del usuario " ;
+ Text [ french ] = "Intervention de l'utilisateur requise" ;
+ Text [ dutch ] = "Ingrijpen door gebruiker noodzakelijk" ;
+ Text[ chinese_simplified ] = "ÐèҪʹÓÃÕßÉ趨";
+ Text[ russian ] = "Íåîáõîäèìî âìåøàòåëüñòâî ïîëüçîâàòåëÿ";
+ Text[ polish ] = "Konieczna interwencja u¿ytkownika";
+ Text[ japanese ] = "Õ°»Þ°‚̱¸¾½‚ª•K—v";
+ Text[ chinese_traditional ] = "»Ý­n¦Û­q";
+ Text[ arabic ] = "ãä ÇáÖÑæÑí Ãä íÊÏÎá ÇáãÓÊÎÏã";
+ Text[ greek ] = "ÐáñÝìâáóç ôïõ ÷ñÞóôç áíáãêáßá";
+ Text[ korean ] = "»ç¿ëÀÚ °³ÀÔÀÌ ÇÊ¿äÇÔ";
+ Text[ turkish ] = "Kullanýcý müdahalesi gerekiyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_OUT_OF_MEMORY
+{
+ Text = "Nicht genügend Speicher" ;
+ Text [ ENGLISH ] = "Out of memory" ;
+ Text [ portuguese ] = "Memória insuficiente" ;
+ Text [ english_us ] = "Insufficient memory" ;
+ Text [ portuguese_brazilian ] = "Nicht genügend Speicher" ;
+ Text [ swedish ] = "Ej tillräckligt med minne" ;
+ Text [ danish ] = "Ikke nok hukommelse" ;
+ Text [ italian ] = "Non c'è abbastanza memoria" ;
+ Text [ spanish ] = "Memoria insuficiente" ;
+ Text [ french ] = "Mémoire insuffisante" ;
+ Text [ dutch ] = "Niet voldoende opslagruimte" ;
+ Text[ chinese_simplified ] = "ÄÚ´æ²»×ã";
+ Text[ russian ] = "Íåäîñòàòî÷íî ïàìÿòè";
+ Text[ polish ] = "Nie wystarczy pamiêci";
+ Text[ japanese ] = "\\•ª‚ÈÒÓØ‚ª‚ ‚è‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "°O¾ÐÅ餣¨¬";
+ Text[ arabic ] = "ÇáÐÇßÑÉ ÛíÑ ßÇÝíÉ";
+ Text[ greek ] = "Ç ìíÞìç äåí åðáñêåß";
+ Text[ korean ] = "¸Þ¸ð¸®°¡ ºÎÁ·ÇÕ´Ï´Ù.";
+ Text[ turkish ] = "Bellek yeterli deðil";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_DOOR_OPEN
+{
+ Text = "Abdeckung offen" ;
+ Text [ ENGLISH ] = "Door open" ;
+ Text [ portuguese ] = "Capa aberta" ;
+ Text [ english_us ] = "Cover open" ;
+ Text [ portuguese_brazilian ] = "Abdeckung offen" ;
+ Text [ swedish ] = "Luckan är öppen" ;
+ Text [ danish ] = "Låget er åben" ;
+ Text [ italian ] = "Apri copertura" ;
+ Text [ spanish ] = "Abrir cubierta" ;
+ Text [ french ] = "Boîtier ouvert" ;
+ Text [ dutch ] = "Afdekking boven" ;
+ Text[ chinese_simplified ] = "»¤¸Ç³¨¿ª";
+ Text[ russian ] = "Êðûøêà îòêðûòà";
+ Text[ polish ] = "Pokrywa otwarta";
+ Text[ japanese ] = "ÌßØÝÀ°‚ÌŠW‚ªŠJ‚¢‚Ä‚¢‚Ü‚·";
+ Text[ chinese_traditional ] = "Å@»\\´¯¶}";
+ Text[ arabic ] = "ÇáÛØÇÁ ãÝÊæÍ";
+ Text[ greek ] = "ÊÜëõììá áíïé÷ôü";
+ Text[ korean ] = "µ¤°³¸¦ ¿ÀÇ»óÅ·Î";
+ Text[ turkish ] = "Kapak açýk";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_POWER_SAVE
+{
+ Text = "Energiesparmodus" ;
+ Text [ ENGLISH ] = "Power save" ;
+ Text [ portuguese ] = "Modo poupança de energia" ;
+ Text [ english_us ] = "Power save mode" ;
+ Text [ portuguese_brazilian ] = "Energiesparmodus" ;
+ Text [ swedish ] = "Energiesparläge" ;
+ Text [ danish ] = "Energisparende modus" ;
+ Text [ italian ] = "Modo risparmio energetico" ;
+ Text [ spanish ] = "Modo de ahorro energético" ;
+ Text [ french ] = "Mode économie d'énergie" ;
+ Text [ dutch ] = "Energiespaarmodus" ;
+ Text[ chinese_simplified ] = "½ÚÔ¼µçԴģʽ";
+ Text[ russian ] = "Ðåæèì ýêîíîìèè ýëåêòðîýíåðãèè";
+ Text[ polish ] = "Tryb oszczêdzania energii";
+ Text[ japanese ] = "´Èٷްߌ¸Ó°ÄÞ";
+ Text[ chinese_traditional ] = "¸`¬ù¹q·½¼Ò¦¡";
+ Text[ arabic ] = "æÖÚ ÊæÝíÑ ÇáØÇÞÉ";
+ Text[ greek ] = "ÊáôÜóôáóç åîïéêïíüìçóçò åíÝñãåéáò";
+ Text[ korean ] = "Àü¿ø ÀúÀå ¸ðµå";
+ Text[ turkish ] = "Enerji tasarruf kipi";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_DEFPRINTER
+{
+ Text = "Standarddrucker" ;
+ Text [ ENGLISH ] = "Default printer" ;
+ Text [ portuguese ] = "Impressora-padrão" ;
+ Text [ english_us ] = "Default printer" ;
+ Text [ portuguese_brazilian ] = "Standarddrucker" ;
+ Text [ swedish ] = "Standardskrivare" ;
+ Text [ danish ] = "Standardprinter" ;
+ Text [ italian ] = "Stampante predefinta" ;
+ Text [ spanish ] = "Predeterminada" ;
+ Text [ french ] = "Imprimante par défaut" ;
+ Text [ dutch ] = "Standaardprinter" ;
+ Text[ chinese_simplified ] = "ĬÈÏ´òÓ¡»ú";
+ Text[ russian ] = "Ñòàíäàðòíûé ïðèíòåð";
+ Text[ polish ] = "Drukarka domyœlna";
+ Text[ japanese ] = "•W€ÌßØÝÀ";
+ Text[ chinese_traditional ] = "Àq»{¦Lªí¾÷";
+ Text[ arabic ] = "ÇáØÇÈÚÉ ÇáÇÝÊÑÇÖíÉ";
+ Text[ greek ] = "ÐñïåðéëåãìÝíïò åêôõðùôÞò";
+ Text[ korean ] = "±âº» ÇÁ¸°ÅÍ";
+ Text[ turkish ] = "Standart yazýcý";
+ Text[ language_user1 ] = " ";
+};
+String STR_SVT_PRNDLG_JOBCOUNT
+{
+ Text = "%d Dokumente" ;
+ Text [ ENGLISH ] = "%d documents" ;
+ Text [ portuguese ] = "%d documentos" ;
+ Text [ english_us ] = "%d documents" ;
+ Text [ portuguese_brazilian ] = "%d Dokumente" ;
+ Text [ swedish ] = "%d dokument" ;
+ Text [ danish ] = "%d dokumenter" ;
+ Text [ italian ] = "%d documenti" ;
+ Text [ spanish ] = "%d documentos" ;
+ Text [ french ] = "%d documents" ;
+ Text [ dutch ] = "%d documenten" ;
+ Text[ chinese_simplified ] = "%d Îĵµ";
+ Text[ russian ] = "%d äîêóìåíòà(îâ)";
+ Text[ polish ] = "%d dokumenty";
+ Text[ japanese ] = "%d‚ÌÄÞ·­ÒÝÄ";
+ Text[ chinese_traditional ] = "%d ¤å¥ó";
+ Text[ arabic ] = "ãÓÊäÏÇÊ%d ";
+ Text[ greek ] = "%d Ýããñáöá";
+ Text[ korean ] = "%d ¹®¼­";
+ Text[ turkish ] = "%d belge";
+ Text[ language_user1 ] = " ";
+};
+
+ModalDialog DLG_SVT_PRNDLG_PRNSETUPDLG
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 260 , 104 ) ;
+ Text = "Drucker einrichten" ;
+ Text [ ENGLISH ] = "Printer Setup" ;
+ Text [ english_us ] = "Printer Setup" ;
+ Text [ portuguese_brazilian ] = "Drucker einrichten" ;
+ Text [ swedish ] = "Installera skrivare" ;
+ Text [ danish ] = "Indstil printer" ;
+ Text [ italian ] = "Imposta stampante" ;
+ Text [ spanish ] = "Configurar impresora" ;
+ Text [ french ] = "Imprimante sélectionnée" ;
+ Text [ dutch ] = "Printer instellen" ;
+ Text [ portuguese ] = "Configurar impressora" ;
+ GroupBox GRP_PRINTER
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 75 ) ;
+ Text = "Drucker" ;
+ Text [ ENGLISH ] = "Printer" ;
+ Text [ english_us ] = "Printer" ;
+ Text [ portuguese_brazilian ] = "Drucker" ;
+ Text [ swedish ] = "Skrivare" ;
+ Text [ danish ] = "Printer" ;
+ Text [ italian ] = "Stampante" ;
+ Text [ spanish ] = "Impresora" ;
+ Text [ french ] = "Imprimante" ;
+ Text [ dutch ] = "Printer" ;
+ Text [ portuguese ] = "Impressora" ;
+ Text[ chinese_simplified ] = "´òÓ¡»ú";
+ Text[ russian ] = "Ïðèíòåð";
+ Text[ polish ] = "Drukarka";
+ Text[ japanese ] = "ÌßØÝÀ";
+ Text[ chinese_traditional ] = "¦Lªí¾÷";
+ Text[ arabic ] = "ÇáØÇÈÚÉ";
+ Text[ greek ] = "ÅêôõðùôÞò";
+ Text[ korean ] = "ÇÁ¸°ÅÍ";
+ Text[ turkish ] = "Yazýcý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Name" ;
+ Text [ ENGLISH ] = "~Name" ;
+ Text [ english_us ] = "~Name" ;
+ Text [ portuguese_brazilian ] = "~Name" ;
+ Text [ swedish ] = "~Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ spanish ] = "~Nombre" ;
+ Text [ french ] = "~Nom" ;
+ Text [ dutch ] = "~Naam" ;
+ Text [ portuguese ] = "~Nome" ;
+ Text[ chinese_simplified ] = "Ãû³Æ(~N)";
+ Text[ russian ] = "~Èìÿ";
+ Text[ polish ] = "Nazwa";
+ Text[ japanese ] = "–¼‘O(~N)";
+ Text[ chinese_traditional ] = "¦WºÙ(~N)";
+ Text[ arabic ] = "ÇáÇÓã";
+ Text[ greek ] = "¼íïìá";
+ Text[ korean ] = "À̸§(~N)";
+ Text[ turkish ] = "~Ad";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_NAMES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 12 ) ;
+ Size = MAP_APPFONT ( 125 , 80 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ PushButton BTN_PROPERTIES
+ {
+ Pos = MAP_APPFONT ( 188 , 12 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Eigenschaften..." ;
+ Text [ ENGLISH ] = "~Properties..." ;
+ Text [ portuguese ] = "~Propriedades..." ;
+ Text [ english_us ] = "Propert~ies..." ;
+ Text [ portuguese_brazilian ] = "~Eigenschaften..." ;
+ Text [ swedish ] = "~Egenskaper..." ;
+ Text [ danish ] = "Egenskaber..." ;
+ Text [ italian ] = "~Proprietà..." ;
+ Text [ spanish ] = "~Propiedades..." ;
+ Text [ french ] = "~Propriétés..." ;
+ Text [ dutch ] = "~Eigenschappen..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~I)...";
+ Text[ russian ] = "~Ñâîéñòâà...";
+ Text[ polish ] = "W³aœciwoœci...";
+ Text[ japanese ] = "ÌßÛÊßè(~I)...";
+ Text[ chinese_traditional ] = "ÄÝ©Ê(~I)...";
+ Text[ arabic ] = "ÎÕÇÆÕ...";
+ Text[ greek ] = "Éäéüôçôåò...";
+ Text[ korean ] = "µî·ÏÁ¤º¸(~I)...";
+ Text[ turkish ] = "~Özellikler...";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_STATUS
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Status" ;
+ Text [ ENGLISH ] = "Status" ;
+ Text [ english_us ] = "Status" ;
+ Text [ portuguese_brazilian ] = "Status" ;
+ Text [ swedish ] = "Status" ;
+ Text [ danish ] = "Status" ;
+ Text [ italian ] = "Stato" ;
+ Text [ spanish ] = "Estado" ;
+ Text [ french ] = "État" ;
+ Text [ dutch ] = "Status" ;
+ Text [ portuguese ] = "Estado" ;
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = "Ñîñòîÿíèå";
+ Text[ polish ] = "Stan";
+ Text[ japanese ] = "½Ã°À½";
+ Text[ chinese_traditional ] = "ª¬ºA";
+ Text[ arabic ] = "ÇáÍÇáÉ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "»óÅÂ";
+ Text[ turkish ] = "Durum";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_STATUS
+ {
+ Pos = MAP_APPFONT ( 60 , 29 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Typ" ;
+ Text [ ENGLISH ] = "Type" ;
+ Text [ english_us ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Typ" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "Type" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "À²Ìß";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "ÇüÅÂ";
+ Text[ turkish ] = "Tip";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_TYPE
+ {
+ Pos = MAP_APPFONT ( 60 , 40 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_LOCATION
+ {
+ Pos = MAP_APPFONT ( 12 , 51 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Ort" ;
+ Text [ ENGLISH ] = "Location" ;
+ Text [ english_us ] = "Location" ;
+ Text [ portuguese_brazilian ] = "Ort" ;
+ Text [ swedish ] = "Plats" ;
+ Text [ danish ] = "Placering" ;
+ Text [ italian ] = "Percorso" ;
+ Text [ spanish ] = "Ubicación" ;
+ Text [ french ] = "Emplacement" ;
+ Text [ dutch ] = "Plaats" ;
+ Text [ portuguese ] = "Lugar" ;
+ Text[ chinese_simplified ] = "λÖÃ";
+ Text[ russian ] = "Ìåñòî";
+ Text[ polish ] = "Lokalizacja";
+ Text[ japanese ] = "êŠ";
+ Text[ chinese_traditional ] = "¦ì¸m";
+ Text[ arabic ] = "ÇáãæÞÚ";
+ Text[ greek ] = "Ôïðïèåóßá";
+ Text[ korean ] = "À§Ä¡";
+ Text[ turkish ] = "Yer";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_LOCATION
+ {
+ Pos = MAP_APPFONT ( 60 , 51 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ FixedText FT_COMMENT
+ {
+ Pos = MAP_APPFONT ( 12 , 62 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Kommentar" ;
+ Text [ ENGLISH ] = "Comment" ;
+ Text [ english_us ] = "Comment" ;
+ Text [ portuguese_brazilian ] = "Kommentar" ;
+ Text [ swedish ] = "Kommentar" ;
+ Text [ danish ] = "Kommentar" ;
+ Text [ italian ] = "Commento" ;
+ Text [ spanish ] = "Comentario" ;
+ Text [ french ] = "Commentaire" ;
+ Text [ dutch ] = "Commentaar" ;
+ Text [ portuguese ] = "Comentário" ;
+ Text[ chinese_simplified ] = "×¢½â";
+ Text[ russian ] = "Êîììåíòàðèé";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "ºÒÝÄ";
+ Text[ chinese_traditional ] = "ª`¸Ñ";
+ Text[ arabic ] = "ÊÚáíÞ";
+ Text[ greek ] = "Ó÷üëéï";
+ Text[ korean ] = "¸Þ¸ð";
+ Text[ turkish ] = "Açýklama";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_COMMENT
+ {
+ Pos = MAP_APPFONT ( 60 , 62 ) ;
+ Size = MAP_APPFONT ( 188 , 10 ) ;
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 95 , 84 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 148 , 84 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 204 , 84 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_simplified ] = "É趨´òÓ¡»ú";
+ Text[ russian ] = "Óñòàíîâèòü ïðèíòåð";
+ Text[ polish ] = "Ustaw drukarkê";
+ Text[ japanese ] = "ÌßØÝÀÝ’è";
+ Text[ chinese_traditional ] = "³]©w¦Lªí¾÷";
+ Text[ arabic ] = "ÅÚÏÇÏ ÇáØÇÈÚÉ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "ÅãêáôÜóôáóç åêôõðùôÞ";
+ Text[ korean ] = "ÇÁ¸°ÅÍ ¼³Á¤";
+ Text[ turkish ] = "Yazýcý ayarlarý";
+};
diff --git a/svtools/source/dialogs/propctrl.cxx b/svtools/source/dialogs/propctrl.cxx
new file mode 100644
index 000000000000..f2e5959937b1
--- /dev/null
+++ b/svtools/source/dialogs/propctrl.cxx
@@ -0,0 +1,534 @@
+/*************************************************************************
+ *
+ * $RCSfile: propctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _USR_INTROSP_HXX
+#include <usr/inspect.hxx>
+#endif
+#ifndef _USR_SERINFO_HXX
+#include <usr/serinfo.hxx>
+#endif
+#ifndef _USR_INTROSP_HXX
+#include <usr/introsp.hxx>
+#endif
+
+#include <propctrl.hxx>
+#include <property.hxx>
+
+
+// Controller-Implementation
+class PropertyEditorControler_Impl : public SvPropertyDataControl
+{
+ XIntrospectionAccessRef mxUnoAccess;
+ PropertySequence mPropSeq;
+ XPropertyEditorRef mxEditor;
+ SvPropertyBox* mpPropBox;
+ UsrAny maUnoObj;
+
+public:
+ // Provisorisch direkt Window mitgeben
+ PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ );
+ //SimplePropertyEditor_Impl( void );
+
+ // Objekt zum Editieren setzen, dies loest das Eintragen
+ // der Properties in die PropertyBox aus
+ void setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj,
+ /* HACK fuer History-Interface*/String aPath, BOOL bBack=FALSE, BOOL bForward=FALSE );
+
+ /* SPAETER
+ SMART_UNO_DECLARATION(ImplIntrospection,UsrObject);
+
+ // Methoden von XInterface
+ XInterface * queryInterface( Uik aUik );
+ XIdlClassRef getIdlClass();
+ */
+
+ // Methoden von SvPropertyDataControl
+ virtual void Modified( const String& aName,
+ const String& aVal,
+ void* pData);
+
+ virtual void Clicked( const String& aName,
+ const String& aVal,
+ void* pData);
+
+ virtual void Commit( const String& aName,
+ const String& aVal,
+ void* pData);
+
+ virtual void Select( const String& aName,
+ void* pData);
+
+ virtual void LinkClicked(const String& aName,
+ void* pData);
+
+ // TODO: Das muss raus, sehr unglueckliche Schnittstelle
+ // PropertyBox erzwingt Zustand des Controllers
+ virtual String GetTheCorrectProperty() const;
+};
+
+// Methoden von XPropertyEditor
+PropertyEditorControler_Impl::PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ )
+{
+ mpPropBox = pPropBox_;
+}
+
+void PropertyEditorControler_Impl::setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj,
+ /* HACK fuer History-Interface*/ String aPath, BOOL bBack, BOOL bForward )
+{
+ static XIntrospectionRef xIntrospection;
+
+ // Ohne Fenster laeuft gar nix
+ if( !mpPropBox )
+ return;
+
+ // Fenster aufraeumen
+ mpPropBox->ClearAll();
+
+ // Editor und Objekt übernehmen
+ mxEditor = xEditor_;
+ maUnoObj = aToEditObj;
+
+ if( !xIntrospection.is() )
+ {
+ // Introspection-Service holen
+ XServiceManagerRef xServiceManager = getGlobalServiceManager();
+ XServiceProviderRef xProv = xServiceManager->getServiceProvider
+ ( "com.sun.star.beans.Introspection", UikSequence(), UikSequence() );
+ xIntrospection = (XIntrospection *)xProv->newInstance()
+ ->queryInterface( XIntrospection::getSmartUik() );
+ }
+ if( !xIntrospection.is() )
+ return;
+
+ // und unspecten
+ mxUnoAccess = xIntrospection->inspect( maUnoObj );
+ if( !mxUnoAccess.Is() )
+ return;
+
+ // Uns als Controler anmelden
+ mpPropBox->SetController( this );
+
+ // Properties anlegen
+ mPropSeq = mxUnoAccess->getProperties();
+ UINT32 nPropCount = mPropSeq.getLen();
+ const Property* pProps = mPropSeq.getConstArray();
+
+ // 1. Seite anlegen
+ USHORT nPropPageId = mpPropBox->AppendPage("Properties");
+
+ // Beim Eintragen solls nicht flimmern
+ mpPropBox->DisableUpdate();
+
+ // Dummy-Properties fuer Path und Navigation
+ SvPropertyData aProperty;
+ if( aPath.Len() )
+ {
+ // Interface und Structs werden Hyperlinks
+ aProperty.bIsHyperLink = FALSE;
+ aProperty.bIsLocked = TRUE;
+ aProperty.bHasVisibleXButton = FALSE;
+ aProperty.eKind = KOC_EDIT;
+ aProperty.pControl = NULL;
+ aProperty.pDataPtr = NULL;
+ aProperty.aName = "Path";
+ aProperty.aValue = aPath;
+ mpPropBox->InsertEntry( aProperty );
+ }
+ if( bBack || bForward )
+ {
+ // Interface und Structs werden Hyperlinks
+ aProperty.bIsHyperLink = TRUE;
+ aProperty.bIsLocked = TRUE;
+ // HACK, solange Hyperlink nicht funktioniert
+ aProperty.bHasVisibleXButton = aProperty.bIsHyperLink;
+ aProperty.eKind = KOC_EDIT;
+ UINT32 iHandle;
+ aProperty.pControl = NULL;
+ if( bBack )
+ {
+ iHandle = 1000001;
+ aProperty.pDataPtr = (void*)iHandle;
+ aProperty.aName = "<-";
+ aProperty.aValue = "Back";
+ mpPropBox->InsertEntry( aProperty );
+ }
+ if( bForward )
+ {
+ iHandle = 1000000;
+ aProperty.pDataPtr = (void*)iHandle;
+ aProperty.aName = "->";
+ aProperty.aValue = "Forward";
+ mpPropBox->InsertEntry( aProperty );
+ }
+ }
+
+ // Properties eintragen
+ // TODO: Wo kommen die Strings her
+ UINT32 i;
+ for( i = 0 ; i < nPropCount ; i++ )
+ {
+ const Property& rProp = pProps[ i ];
+
+ // TypeClass des Property ermitteln
+ XIdlClassRef xPropClass = rProp.Type;
+ if( !xPropClass.is() )
+ {
+ DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" )
+ return;
+ }
+ TypeClass eType = xPropClass->getTypeClass();
+
+ // Interface und Structs werden Hyperlinks
+ aProperty.bIsHyperLink = ( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT );
+ aProperty.bIsLocked = ((rProp.Attributes & PROPERTY_READONLY) != 0 );
+
+ // HACK, solange Hyperlink nicht funktioniert
+ aProperty.bHasVisibleXButton = aProperty.bIsHyperLink;
+
+ // Wert holen und in String wandeln
+ UsrAny aVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, i );
+ String aStrVal = AnyToString( aVal );
+
+ // Properties reinbraten
+ aProperty.eKind = KOC_EDIT;
+ aProperty.aName = rProp.Name;
+ aProperty.aValue = aStrVal;
+ aProperty.pDataPtr = (void*)i;
+ aProperty.pControl = NULL;
+ //aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count());
+ //aProperty.theValues.Insert(new String("2"),aProperty.theValues.Count());
+ //aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count());
+ //aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count());
+ mpPropBox->InsertEntry( aProperty );
+ }
+
+ // 2. Seite fuer Listener
+ // TODO: Wo kommen die Eintraege her
+ USHORT nListenerPageId = mpPropBox->AppendPage("Listener");
+
+ XIdlClassSequence aSupportedListenerSeq = mxUnoAccess->getSupportedListeners();
+ const XIdlClassRef* pListenerArray = aSupportedListenerSeq.getConstArray();
+ UINT32 nIfaceCount = aSupportedListenerSeq.getLen();
+
+ // Property-Data vorfuellen
+ aProperty.eKind = KOC_EDIT;
+ //aProperty.eKind = KOC_UNDEFINED;
+ aProperty.aValue = "Listener-Value";
+ aProperty.bHasVisibleXButton = TRUE;
+ // TEST
+ //aProperty.bIsHyperLink = TRUE;
+ aProperty.bIsHyperLink = FALSE;
+ aProperty.bIsLocked = TRUE;
+ //aProperty.bIsLocked = FALSE;
+ aProperty.pDataPtr = NULL;
+ aProperty.pControl = NULL;
+
+ for( UINT32 j = 0 ; j < nIfaceCount ; j++ )
+ {
+ const XIdlClassRef& rxIfaceClass = pListenerArray[j];
+ aProperty.aName = rxIfaceClass->getName();
+ mpPropBox->InsertEntry( aProperty );
+ }
+ mpPropBox->EnableUpdate();
+ mpPropBox->SetPage( nPropPageId );
+}
+
+void PropertyEditorControler_Impl::Modified
+( const String& aName, const String& aVal, void* pData)
+{
+}
+
+void PropertyEditorControler_Impl::Clicked
+( const String& aName, const String& aVal, void* pData)
+{
+ // HACK, solange LinkClicked nicht funktioniert
+ UINT32 iPos = (UINT32)pData;
+ UINT32 nPropCount = mPropSeq.getLen();
+ if( iPos >= nPropCount )
+ {
+ // Spezial-IDs fuer forward/back?
+ BOOL bForward = (iPos == 1000000);
+ BOOL bBack = (iPos == 1000001);
+ if( bForward || bBack )
+ {
+ // Unterstuetzt der PropertyEditor das?
+ XPropertyEditorNavigationRef xPropEdNav = (XPropertyEditorNavigation*)
+ mxEditor->queryInterface( XPropertyEditorNavigation::getSmartUik() );
+ if( xPropEdNav.is() )
+ {
+ if( bForward )
+ xPropEdNav->forward();
+ else
+ xPropEdNav->back();
+ }
+ }
+ return;
+ }
+
+ const Property* pProps = mPropSeq.getConstArray();
+ const Property& rProp = pProps[ iPos ];
+ XIdlClassRef xPropClass = rProp.Type;
+ if( !xPropClass.is() )
+ {
+ DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" )
+ return;
+ }
+ TypeClass eType = xPropClass->getTypeClass();
+ if( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT )
+ LinkClicked( aName, pData );
+}
+
+void PropertyEditorControler_Impl::Commit
+( const String& aName, const String& aVal, void* pData)
+{
+ UINT32 iPos = (UINT32)pData;
+ UINT32 nPropCount = mPropSeq.getLen();
+ if( iPos >= nPropCount )
+ return;
+
+ // String in Property-Typ wandeln
+ const Property* pProps = mPropSeq.getConstArray();
+ const Property& rProp = pProps[ iPos ];
+ XIdlClassRef xPropClass = rProp.Type;
+ if( !xPropClass.is() )
+ {
+ DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" )
+ return;
+ }
+ TypeClass eType = xPropClass->getTypeClass();
+ UsrAny aValue = StringToAny( aVal, eType );
+
+ // Wert setzen
+ mxUnoAccess->setPropertyValueByIndex( maUnoObj, iPos, aValue );
+
+ // Wert neu holen und ggf. neu setzen
+ UsrAny aNewVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos );
+ String aNewStrVal = AnyToString( aNewVal );
+ if( aNewStrVal != aVal )
+ mpPropBox->SetPropertyValue( aName, aNewStrVal );
+}
+
+void PropertyEditorControler_Impl::Select
+( const String& aName, void* pData)
+{
+}
+
+void PropertyEditorControler_Impl::LinkClicked(const String& aName, void* pData)
+{
+ UINT32 iPos = (UINT32)pData;
+ UINT32 nPropCount = mPropSeq.getLen();
+ if( iPos >= nPropCount )
+ return;
+
+ // Wert holen und an Master-Controller zurueckgeben
+ UsrAny aNewObj = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos );
+ mxEditor->setObject( aNewObj, aName );
+}
+
+
+// TODO: Das muss raus, sehr unglueckliche Schnittstelle
+// PropertyBox erzwingt Zustand des Controllers
+String PropertyEditorControler_Impl::GetTheCorrectProperty() const
+{
+ return String();
+}
+
+
+SMART_UNO_IMPLEMENTATION(SimplePropertyEditor_Impl,UsrObject);
+
+// Methoden von XInterface
+XInterface * SimplePropertyEditor_Impl::queryInterface( Uik aUik )
+{
+ if( aUik == XPropertyEditor::getSmartUik() )
+ return (XPropertyEditor *)this;
+ if( aUik == XPropertyEditorNavigation::getSmartUik() )
+ return (XPropertyEditorNavigation *)this;
+ return UsrObject::queryInterface( aUik );
+}
+
+XIdlClassRef SimplePropertyEditor_Impl::getIdlClass()
+{
+ // TODO: Unterstuetzen
+ return NULL;
+}
+
+
+// Methoden von SimplePropertyEditor_Impl
+SimplePropertyEditor_Impl::SimplePropertyEditor_Impl( Window *pParent )
+ : maHistorySeq( 10 ), maHistoryNames( 10 ), bSimpleHistory( FALSE )
+{
+ //XVCLComponent xC = pParent->getVCLComponent
+ //xC->addVCLComponentListener( MyListener )
+
+ pActiveControler = NULL;
+ mpPropBox = new SvPropertyBox( pParent );
+ mpPropBox->Show();
+
+ long cxOut = pParent->GetOutputSizePixel().Width();
+ long cyOut = pParent->GetOutputSizePixel().Height();
+ Size aSize( cxOut, cyOut );
+ mpPropBox->SetPosSizePixel( Point( 0, 0 ), aSize );
+
+ mnHistoryCount = 0;
+ mnActualHistoryLevel = -1;
+}
+
+SimplePropertyEditor_Impl::~SimplePropertyEditor_Impl()
+{
+ delete mpPropBox;
+ if( pActiveControler )
+ delete pActiveControler;
+}
+
+// Private Methode zum Anlegen/Aktivieren der Controller
+void SimplePropertyEditor_Impl::showObject( const UsrAny& aToShowObj )
+{
+ if( pActiveControler )
+ delete pActiveControler;
+
+ // Neuen Controller auf der Wiese anlegen (TODO: Controller cachen?)
+ pActiveControler = new PropertyEditorControler_Impl( mpPropBox );
+
+ XPropertyEditorRef xThis = (XPropertyEditor *)this;
+ pActiveControler->setObject( xThis, aToShowObj,
+ /*aPath*/bSimpleHistory ? getPath() : String(),
+ /*bBack*/bSimpleHistory && mnActualHistoryLevel > 0,
+ /*bForward*/bSimpleHistory && (INT32)mnHistoryCount > mnActualHistoryLevel );
+}
+
+String SimplePropertyEditor_Impl::getPath( void )
+{
+ String aRetStr;
+ const String* pStr = maHistoryNames.getConstArray();
+ for( INT32 i = 0 ; i <= mnActualHistoryLevel ; i++ )
+ {
+ String aName = pStr[i];
+
+ // Root speziell behandeln
+ if( i == 0 )
+ {
+ aRetStr += aName;
+ }
+ else
+ {
+ // Ist es ein Index?
+ long l = (long)aName;
+ String aNumStr( l );
+ if( aNumStr == aName )
+ {
+ aRetStr += '[';
+ aRetStr += aName;
+ aRetStr += ']';
+ }
+ else
+ {
+ aRetStr += '.';
+ aRetStr += aName;
+ }
+ }
+ }
+ return aRetStr;
+}
+
+// Methoden von XPropertyEditor
+void SimplePropertyEditor_Impl::setObject( const UsrAny& aToEditObj, const XubString& aObjName )
+{
+ // History pflegen
+ mnActualHistoryLevel++;
+ mnHistoryCount = (UINT32)mnActualHistoryLevel;
+ UINT32 iHistorySize = maHistorySeq.getLen();
+ if( mnHistoryCount > iHistorySize )
+ {
+ maHistorySeq.realloc( iHistorySize + 10 );
+ maHistoryNames.realloc( iHistorySize + 10 );
+ }
+
+ // Neues Object eintragen
+ maHistorySeq.getArray()[ mnHistoryCount ] = aToEditObj;
+ maHistoryNames.getArray()[ mnHistoryCount ] = aObjName;
+
+ // Object anzeigen
+ showObject( aToEditObj );
+}
+
+// Methoden von PropertyEditorNavigation
+void SimplePropertyEditor_Impl::forward(void)
+{
+ if( (INT32)mnHistoryCount > mnActualHistoryLevel )
+ {
+ // Naechstes Object darstellen
+ mnActualHistoryLevel++;
+ showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] );
+ }
+}
+
+void SimplePropertyEditor_Impl::back(void)
+{
+ if( mnActualHistoryLevel > 0 )
+ {
+ // Voriges Object darstellen
+ mnActualHistoryLevel--;
+ showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] );
+ }
+}
+
+
diff --git a/svtools/source/dialogs/property.cxx b/svtools/source/dialogs/property.cxx
new file mode 100644
index 000000000000..5c0ce590c08c
--- /dev/null
+++ b/svtools/source/dialogs/property.cxx
@@ -0,0 +1,1582 @@
+/*************************************************************************
+ *
+ * $RCSfile: property.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef PCH
+#include "ui_pch.hxx"
+#endif
+
+#pragma hdrstop
+
+//------------------------------------------------------------------
+
+//#include "Svitems.hxx"
+
+#include "property.hxx"
+/*
+#include "property.hrc"
+#include "Scresid.hxx"
+*/
+#define FRAME_OFFSET 4
+
+
+SvXPropertyControl::SvXPropertyControl( Window* pParent, WinBits nWinStyle)
+ : Control(pParent,nWinStyle)
+{
+}
+
+SvXPropertyControl::SvXPropertyControl( Window* pParent, const ResId& rResId )
+ : Control(pParent,rResId )
+{
+}
+
+//------------------------------------------------------------------
+
+SvXPropertyEdit::SvXPropertyEdit( Window* pParent, WinBits nWinStyle)
+ : SvXPropertyControl(pParent,nWinStyle),
+ aEdit(this,WB_BORDER | WB_TABSTOP)
+{
+ pListener=NULL;
+ aEdit.SetModifyHdl(
+ LINK( this, SvXPropertyEdit, ModifiedHdl ));
+ aEdit.SetGetFocusHdl(
+ LINK( this, SvXPropertyEdit, GetFocusHdl));
+ aEdit.SetLoseFocusHdl(
+ LINK( this, SvXPropertyEdit, LoseFocusHdl));
+
+ aEdit.Show();
+}
+
+SvXPropertyEdit::SvXPropertyEdit( Window* pParent, const ResId& rResId)
+ : SvXPropertyControl(pParent,rResId),
+ aEdit(this,WB_BORDER | WB_TABSTOP)
+{
+ pListener=NULL;
+ aEdit.SetModifyHdl(
+ LINK( this, SvXPropertyEdit, ModifiedHdl ));
+ aEdit.SetGetFocusHdl(
+ LINK( this, SvXPropertyEdit, GetFocusHdl));
+ aEdit.SetLoseFocusHdl(
+ LINK( this, SvXPropertyEdit, LoseFocusHdl));
+
+ Size aSize=GetSizePixel();
+ SetCtrSize(aSize);
+ aEdit.Show();
+}
+
+void SvXPropertyEdit::SetSvXPropertyCtrListener(SvXPropertyCtrListener* pCtrListener)
+{
+ pListener=pCtrListener;
+}
+
+SvXPropertyCtrListener* SvXPropertyEdit::GetSvXPropertyCtrListener()
+{
+ return pListener;
+}
+
+
+void SvXPropertyEdit::SetCtrSize(const Size& rSize)
+{
+ SetSizePixel(rSize);
+ Size aSize=GetOutputSizePixel();
+ Point aPos(0,0);
+ aEdit.SetPosPixel(aPos);
+ aEdit.SetSizePixel(aSize);
+}
+
+void SvXPropertyEdit::SetLocked(BOOL bLocked)
+{
+ if(bLocked)
+ Disable();
+ else
+ Enable();
+}
+
+void SvXPropertyEdit::SetProperty(const String &rString)
+{
+ aEdit.SetText(rString);
+}
+
+String SvXPropertyEdit::GetProperty() const
+{
+ return aEdit.GetText();
+}
+
+BOOL SvXPropertyEdit::HasList()
+{
+ return FALSE;
+};
+
+
+void SvXPropertyEdit::ClearList()
+{
+ return;
+}
+void SvXPropertyEdit::InsertEntry( const String& rString,USHORT nPos)
+{
+ return;
+}
+
+void SvXPropertyEdit::SetMyName(const String &rString)
+{
+ aName=rString;
+}
+
+String SvXPropertyEdit::GetMyName()const
+{
+ return aName;
+}
+
+void SvXPropertyEdit::SetMyData(void* pDat)
+{
+ pData=pDat;
+}
+
+void* SvXPropertyEdit::GetMyData()
+{
+ return pData;
+}
+
+
+IMPL_LINK( SvXPropertyEdit, ModifiedHdl, Edit*, pEd )
+{
+ if(pListener!=NULL)
+ pListener->Modified(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyEdit, GetFocusHdl, Edit*, pEd )
+{
+ if(pListener!=NULL)
+ pListener->GetFocus(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyEdit, LoseFocusHdl, Edit*, pEd )
+{
+ if(pListener!=NULL)
+ pListener->LoseFocus(this);
+ return 0;
+}
+
+//------------------------------------------------------------------
+
+SvXPropertyListBox::SvXPropertyListBox( Window* pParent, WinBits nWinStyle)
+ : SvXPropertyControl(pParent,nWinStyle),
+ aListBox(this,WB_BORDER | WB_DROPDOWN | WB_TABSTOP)
+{
+ pListener=NULL;
+ aListBox.SetSelectHdl(
+ LINK( this, SvXPropertyListBox, ModifiedHdl ));
+ aListBox.SetGetFocusHdl(
+ LINK( this, SvXPropertyListBox, GetFocusHdl));
+ aListBox.SetLoseFocusHdl(
+ LINK( this, SvXPropertyListBox, LoseFocusHdl));
+ aListBox.Show();
+}
+
+SvXPropertyListBox::SvXPropertyListBox( Window* pParent, const ResId& rResId)
+ : SvXPropertyControl(pParent,rResId),
+ aListBox(this,WB_BORDER | WB_DROPDOWN | WB_TABSTOP)
+{
+ pListener=NULL;
+ aListBox.SetSelectHdl(
+ LINK( this, SvXPropertyListBox, ModifiedHdl ));
+ aListBox.SetGetFocusHdl(
+ LINK( this, SvXPropertyListBox, GetFocusHdl));
+ aListBox.SetLoseFocusHdl(
+ LINK( this, SvXPropertyListBox, LoseFocusHdl));
+
+ Size aSize=GetSizePixel();
+ SetCtrSize(aSize);
+ aListBox.Show();
+}
+
+void SvXPropertyListBox::SetSvXPropertyCtrListener(SvXPropertyCtrListener* pCtrListener)
+{
+ pListener=pCtrListener;
+}
+
+SvXPropertyCtrListener* SvXPropertyListBox::GetSvXPropertyCtrListener()
+{
+ return pListener;
+}
+
+
+void SvXPropertyListBox::SetCtrSize(const Size& rSize)
+{
+ SetSizePixel(rSize);
+ Size aSize=GetOutputSizePixel();
+ Point aPos(0,0);
+ aListBox.SetPosPixel(aPos);
+ aListBox.SetSizePixel(aSize);
+}
+
+void SvXPropertyListBox::SetLocked(BOOL bLocked)
+{
+ if(bLocked)
+ Disable();
+ else
+ Enable();
+}
+
+void SvXPropertyListBox::SetProperty(const String &rString)
+{
+ aListBox.SelectEntry(rString);
+}
+
+String SvXPropertyListBox::GetProperty()const
+{
+ return aListBox.GetSelectEntry();
+}
+
+BOOL SvXPropertyListBox::HasList()
+{
+ return TRUE;
+}
+
+
+void SvXPropertyListBox::ClearList()
+{
+ aListBox.Clear();
+}
+
+void SvXPropertyListBox::InsertEntry( const String& rString,USHORT nPos)
+{
+ aListBox.InsertEntry(rString,nPos);
+}
+
+void SvXPropertyListBox::SetMyName(const String &rString)
+{
+ aName=rString;
+}
+
+String SvXPropertyListBox::GetMyName()const
+{
+ return aName;
+}
+
+void SvXPropertyListBox::SetMyData(void* pDat)
+{
+ pData=pDat;
+}
+
+void* SvXPropertyListBox::GetMyData()
+{
+ return pData;
+}
+
+IMPL_LINK( SvXPropertyListBox, ModifiedHdl, ListBox*, pLB )
+{
+ if(pListener!=NULL)
+ pListener->Modified(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyListBox, GetFocusHdl, ListBox*, pLB )
+{
+ if(pListener!=NULL)
+ pListener->GetFocus(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyListBox, LoseFocusHdl, ListBox*, pLB )
+{
+ if(pListener!=NULL)
+ pListener->LoseFocus(this);
+ return 0;
+}
+
+//------------------------------------------------------------------
+
+
+SvXPropertyComboBox::SvXPropertyComboBox( Window* pParent, WinBits nWinStyle)
+ : SvXPropertyControl(pParent,nWinStyle),
+ aComboBox(this,WB_BORDER | WB_DROPDOWN | WB_TABSTOP)
+{
+ pListener=NULL;
+ aComboBox.SetModifyHdl(
+ LINK( this, SvXPropertyComboBox, ModifiedHdl ));
+ aComboBox.SetGetFocusHdl(
+ LINK( this, SvXPropertyComboBox, GetFocusHdl));
+ aComboBox.SetLoseFocusHdl(
+ LINK( this, SvXPropertyComboBox, LoseFocusHdl));
+ aComboBox.Show();
+}
+
+SvXPropertyComboBox::SvXPropertyComboBox( Window* pParent, const ResId& rResId)
+ : SvXPropertyControl(pParent,rResId),
+ aComboBox(this,WB_BORDER | WB_DROPDOWN | WB_TABSTOP)
+{
+ pListener=NULL;
+ aComboBox.SetModifyHdl(
+ LINK( this, SvXPropertyComboBox, ModifiedHdl ));
+ aComboBox.SetGetFocusHdl(
+ LINK( this, SvXPropertyComboBox, GetFocusHdl));
+ aComboBox.SetLoseFocusHdl(
+ LINK( this, SvXPropertyComboBox, LoseFocusHdl));
+
+ Size aSize=GetSizePixel();
+ SetCtrSize(aSize);
+ aComboBox.Show();
+}
+
+void SvXPropertyComboBox::SetLocked(BOOL bLocked)
+{
+ if(bLocked)
+ Disable();
+ else
+ Enable();
+}
+
+void SvXPropertyComboBox::SetSvXPropertyCtrListener(SvXPropertyCtrListener* pCtrListener)
+{
+ pListener=pCtrListener;
+}
+
+SvXPropertyCtrListener* SvXPropertyComboBox::GetSvXPropertyCtrListener()
+{
+ return pListener;
+}
+
+
+void SvXPropertyComboBox::SetCtrSize(const Size& rSize)
+{
+ SetSizePixel(rSize);
+ Size aSize=GetOutputSizePixel();
+ Point aPos(0,0);
+ aComboBox.SetPosPixel(aPos);
+ aComboBox.SetSizePixel(aSize);
+}
+
+
+void SvXPropertyComboBox::SetProperty(const String &rString)
+{
+ aComboBox.SetText(rString);
+}
+
+String SvXPropertyComboBox::GetProperty() const
+{
+ return aComboBox.GetText();
+}
+
+BOOL SvXPropertyComboBox::HasList()
+{
+ return TRUE;
+}
+
+void SvXPropertyComboBox::ClearList()
+{
+ aComboBox.Clear();
+}
+
+void SvXPropertyComboBox::InsertEntry( const String& rString,USHORT nPos)
+{
+ aComboBox.InsertEntry(rString,nPos);
+}
+
+void SvXPropertyComboBox::SetMyName(const String &rString)
+{
+ aName=rString;
+}
+
+String SvXPropertyComboBox::GetMyName()const
+{
+ return aName;
+}
+
+void SvXPropertyComboBox::SetMyData(void* pDat)
+{
+ pData=pDat;
+}
+
+void* SvXPropertyComboBox::GetMyData()
+{
+ return pData;
+}
+
+IMPL_LINK( SvXPropertyComboBox, ModifiedHdl, ComboBox*, pCB )
+{
+ if(pListener!=NULL)
+ pListener->Modified(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyComboBox, GetFocusHdl, ComboBox*, pCB )
+{
+ if(pListener!=NULL)
+ pListener->GetFocus(this);
+ return 0;
+}
+
+IMPL_LINK( SvXPropertyComboBox, LoseFocusHdl, ComboBox*, pCB )
+{
+ if(pListener!=NULL)
+ pListener->LoseFocus(this);
+ return 0;
+}
+//------------------------------------------------------------------
+
+SvPropertyLine::SvPropertyLine( Window* pParent,WinBits nWinStyle)
+ : Control(pParent,nWinStyle),
+ aName(this,WB_BORDER),
+ aXButton(this,WB_BORDER),
+ pSvXPropertyControl(NULL),
+ bIsLocked(FALSE),
+ bIsHyperlink(FALSE)
+{
+ bNeedsRepaint = TRUE;
+ bHasXButton = FALSE;
+ aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
+ aName.Show();
+ aXButton.Show();
+ eKindOfCtr = KOC_UNDEFINED;
+ Wallpaper aWall = GetBackground();
+ aWall.SetColor( Color( COL_TRANSPARENT ) );
+ SetBackground( aWall );
+}
+
+SvPropertyLine::SvPropertyLine( Window* pParent,const ResId& rResId )
+ : Control(pParent,rResId),
+ aName (this,WB_BORDER),
+ aXButton (this,WB_BORDER),
+ pSvXPropertyControl(NULL),
+ bIsLocked(FALSE),
+ bIsHyperlink(FALSE)
+{
+ bNeedsRepaint = TRUE;
+ bHasXButton = FALSE;
+ eKindOfCtr = KOC_UNDEFINED;
+ aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
+ aName.Show();
+ aXButton.Show();
+ Wallpaper aWall = GetBackground();
+ aWall.SetColor( Color( COL_TRANSPARENT ) );
+ SetBackground( aWall );
+ Resize();
+}
+
+void SvPropertyLine::SetSvXPropertyControl(SvXPropertyControl* pXControl)
+{
+ pSvXPropertyControl=pXControl;
+ pSvXPropertyControl->Show();
+ Resize();
+}
+
+SvXPropertyControl* SvPropertyLine::GetSvXPropertyControl()
+{
+ return pSvXPropertyControl;
+}
+
+void SvPropertyLine::Resize()
+{
+ Size aSize=GetOutputSizePixel();
+ Size a2Size=aSize;
+
+ aSize.Width()=nNameWidth;
+ a2Size.Width()-=nNameWidth;
+
+ Point aPos(0,0);
+ aName.SetPosPixel(aPos);
+ aName.SetSizePixel(aSize);
+
+ USHORT nXButtonWidth=0;
+
+ if(bHasXButton)
+ {
+ nXButtonWidth=(USHORT)aSize.Height();
+ }
+ a2Size.Width()=a2Size.Width()-nXButtonWidth;
+
+ aPos.X()+=aSize.Width();
+
+ if(pSvXPropertyControl!=NULL)
+ {
+ pSvXPropertyControl->SetPosPixel(aPos);
+ pSvXPropertyControl->SetCtrSize(a2Size);
+ }
+
+ if(bHasXButton)
+ {
+ aPos.X()=GetOutputSizePixel().Width()
+ -nXButtonWidth;
+ aSize.Width()=nXButtonWidth;
+ aXButton .SetSizePixel(aSize);
+ aXButton .SetPosPixel(aPos);
+ }
+}
+
+void SvPropertyLine::SetNeedsRepaint(BOOL bFlag)
+{
+ bNeedsRepaint=bFlag;
+}
+
+BOOL SvPropertyLine::NeedsRepaint()
+{
+ return bNeedsRepaint;
+}
+
+void SvPropertyLine::SetName(const String& rString )
+{
+ aName.SetText(rString);
+ aName.Invalidate();
+}
+
+String SvPropertyLine::GetName() const
+{
+ return aName.GetText();
+}
+
+void SvPropertyLine::SetKindOfControl(eKindOfControl eKOC)
+{
+ eKindOfCtr=eKOC;
+}
+
+eKindOfControl SvPropertyLine::GetKindOfControl()
+{
+ return eKindOfCtr;
+}
+
+void SvPropertyLine::ShowXButton()
+{
+ bHasXButton=TRUE;
+ aXButton.Show();
+ Resize();
+}
+void SvPropertyLine::HideXButton()
+{
+ bHasXButton=FALSE;
+ aXButton.Hide();
+ Resize();
+}
+BOOL SvPropertyLine::IsVisibleXButton()
+{
+ return bHasXButton;
+}
+
+void SvPropertyLine::ShowAsHyperLink(BOOL nFlag)
+{
+ bIsHyperlink=nFlag;
+ if(nFlag)
+ {
+ Font aFont=GetFont();
+ aFont.SetUnderline(UNDERLINE_SINGLE);
+ aFont.SetColor(Color(COL_BLUE));
+ aName.SetFont(aFont);
+ }
+ else
+ {
+ Font aFont=GetFont();
+ aName.SetFont(aFont);
+ }
+}
+
+BOOL SvPropertyLine::IsShownAsHyperlink()
+{
+ return bIsHyperlink;
+}
+
+void SvPropertyLine::Locked(BOOL nFlag)
+{
+ bIsLocked=nFlag;
+ if(pSvXPropertyControl!=NULL)
+ pSvXPropertyControl->SetLocked(nFlag);
+}
+
+BOOL SvPropertyLine::IsLocked()
+{
+ return bIsLocked;
+}
+
+void SvPropertyLine::SetNameWidth(USHORT nWidth)
+{
+ nNameWidth=nWidth;
+ Resize();
+}
+
+void SvPropertyLine::SetClickHdl(const Link& rLink)
+{
+ aXButton.SetClickHdl(rLink );
+}
+
+//----------------------------------------------------------
+
+SvXPropEvListener::SvXPropEvListener()
+{
+ pTheActiveControl=NULL;
+}
+
+void SvXPropEvListener::Modified (SvXPropertyControl *pSvXPCtr)
+{
+ pTheActiveControl=pSvXPCtr;
+ aModifyLink.Call(this);
+}
+
+void SvXPropEvListener::GetFocus (SvXPropertyControl *pSvXPCtr)
+{
+ pTheActiveControl=pSvXPCtr;
+ aGetFocusLink.Call(this);
+}
+
+void SvXPropEvListener::LoseFocus (SvXPropertyControl *pSvXPCtr)
+{
+ pTheActiveControl=pSvXPCtr;
+ aLoseFocusLink.Call(this);
+}
+
+void SvXPropEvListener::KeyInput (SvXPropertyControl *pSvXPCtr,const KeyCode& theKeyCode)
+{
+ pTheActiveControl=pSvXPCtr;
+ aKeyCode=theKeyCode;
+ aKeyInputLink.Call(this);
+}
+
+SvXPropertyControl * SvXPropEvListener::GetPropertyControl()
+{
+ return pTheActiveControl;
+}
+
+KeyCode SvXPropEvListener::GetKeyCode() const
+{
+ return aKeyCode;
+}
+
+//------------------------------------------------------------------
+
+SvListBoxForProperties::SvListBoxForProperties( Window* pParent, WinBits nWinStyle)
+ : Control(pParent,nWinStyle),
+ aVScroll(this,WB_VSCROLL|WB_REPEAT|WB_DRAG),
+ aPlayGround(this,WB_DIALOGCONTROL),
+ pPropDataControl(NULL)
+{
+
+ aListener.SetModifyHdl (LINK( this, SvListBoxForProperties, ModifyHdl));
+ aListener.SetGetFocusHdl (LINK( this, SvListBoxForProperties, GetFocusHdl));
+ aListener.SetLoseFocusHdl(LINK( this, SvListBoxForProperties,LoseFocusHdl));
+ aListener.SetKeyInputHdl (LINK( this, SvListBoxForProperties, KeyInputHdl));
+
+ nYOffset=0;
+ nTheNameSize=0;
+ ListBox aListBox(this,WB_DROPDOWN);
+ aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
+ nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ Wallpaper aWall = aPlayGround.GetBackground();
+ aWall.SetColor( Color( COL_TRANSPARENT ) );
+ aPlayGround.SetBackground( aWall );
+ aPlayGround.Show();
+ aVScroll.Hide();
+ aVScroll.SetScrollHdl(
+ LINK( this, SvListBoxForProperties, ScrollHdl ));
+
+}
+
+
+SvListBoxForProperties::SvListBoxForProperties( Window* pParent, const ResId& rResId )
+ : Control(pParent,rResId),
+ aVScroll(this,WB_VSCROLL|WB_REPEAT|WB_DRAG),
+ aPlayGround(this,0),
+ pPropDataControl(NULL)
+{
+ nTheNameSize=0;
+ nYOffset=0;
+ ListBox aListBox(this,WB_DROPDOWN);
+ aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
+ nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ Wallpaper aWall = aPlayGround.GetBackground();
+ aWall.SetColor( Color( COL_TRANSPARENT ) );
+ aPlayGround.SetBackground( aWall );
+ aPlayGround.Show();
+ aVScroll.Hide();
+ aVScroll.SetScrollHdl( LINK( this, SvListBoxForProperties, ScrollHdl ) );
+ UpdateVScroll();
+ Resize();
+}
+
+SvListBoxForProperties::~SvListBoxForProperties()
+{
+ Clear();
+}
+
+void SvListBoxForProperties::Clear()
+{
+ for(USHORT i=0;i<PLineArray.Count();i++)
+ {
+ SvPropertyLine* pPropLine=PLineArray[i];
+
+ switch(pPropLine->GetKindOfControl())
+ {
+ case KOC_LISTBOX:
+ case KOC_COMBOBOX:
+ case KOC_EDIT: delete pPropLine->GetSvXPropertyControl();
+ break;
+ }
+ delete pPropLine;
+ }
+ PLineArray.Remove(0,PLineArray.Count());
+}
+
+
+void SvListBoxForProperties::Resize()
+{
+ Size aSize=GetOutputSizePixel();
+ Size a2Size=aSize;
+ Size aVScrollSize;
+
+ if(aVScroll.IsVisible())
+ {
+ Point aPos(0,0);
+ aVScrollSize=aVScroll.GetSizePixel();
+ aVScrollSize.Height()=aSize.Height();
+ a2Size.Width()-=aVScrollSize.Width();
+ aPos.X()=a2Size.Width();
+ aVScroll.SetPosPixel(aPos);
+ aVScroll.SetSizePixel(aVScrollSize);
+ }
+
+ aPlayGround.SetPosPixel(Point(0,0));
+ aPlayGround.SetSizePixel(a2Size);
+ UpdatePosNSize();
+}
+
+void SvListBoxForProperties::SetController( SvPropertyDataControl *pPDC)
+{
+ pPropDataControl=pPDC;
+}
+
+USHORT SvListBoxForProperties::CalcVisibleLines()
+{
+ Size aSize=aPlayGround.GetOutputSizePixel();
+ USHORT nResult=0;
+ if(nRowHeight!=0)
+ nResult=(USHORT) aSize.Height()/nRowHeight;
+
+ return nResult;
+}
+
+void SvListBoxForProperties::UpdateVScroll()
+{
+ USHORT nLines=CalcVisibleLines();
+ aVScroll.SetPageSize(nLines-1);
+ aVScroll.SetVisibleSize(nLines-1);
+ aVScroll.SetRange(Range(0,PLineArray.Count()-1));
+ if(PLineArray.Count()<=nLines)
+ {
+ aVScroll.Hide();
+ }
+ else
+ {
+ BOOL bFlag=aVScroll.IsVisible();
+ aVScroll.Show();
+ if(!bFlag)Resize();
+ }
+
+
+}
+
+void SvListBoxForProperties::UpdatePosNSize()
+{
+ Point aPos(0,nYOffset);
+
+ for(USHORT i=0; i<PLineArray.Count();i++)
+ {
+ if((PLineArray[i])->NeedsRepaint())
+ {
+ (PLineArray[i])->SetPosPixel(aPos);
+ Size aSize=aPlayGround.GetOutputSizePixel();
+ aSize.Height()=nRowHeight;
+ (PLineArray[i])->SetSizePixel(aSize);
+ (PLineArray[i])->SetNameWidth(nTheNameSize+2*FRAME_OFFSET);
+ (PLineArray[i])->Invalidate();
+ (PLineArray[i])->Update();
+ (PLineArray[i])->Show();
+ (PLineArray[i])->SetNeedsRepaint(FALSE);
+ }
+ else
+ {
+ if((PLineArray[i])->IsVisible())
+ {
+ Size aSize=aPlayGround.GetOutputSizePixel();
+ aSize.Height()=nRowHeight;
+ (PLineArray[i])->SetSizePixel(aSize);
+ (PLineArray[i])->SetNameWidth(nTheNameSize+2*FRAME_OFFSET);
+ (PLineArray[i])->Invalidate();
+ }
+ }
+
+ aPos.Y()+=nRowHeight;
+ }
+ aPlayGround.Invalidate();
+ aPlayGround.Update();
+}
+
+void SvListBoxForProperties::UpdatePlayGround()
+{
+ Point aPos(0,0);
+ long nThumbPos=aVScroll.GetThumbPos();
+ long nLines=aVScroll.GetPageSize();
+ long nDelta=aVScroll.GetDelta();
+
+ USHORT nStart,nEnd;
+ Size aSize=aPlayGround.GetOutputSizePixel();
+ Point aPEnd;
+ aPEnd.X()=aSize.Width();
+
+ if(nDelta>0)
+ {
+ nStart=(USHORT)(nThumbPos+nLines+1-nDelta);
+ nEnd=(USHORT)(nThumbPos+nLines);
+ aPos.Y()=(nLines+1-nDelta)*nRowHeight;
+ }
+ else
+ {
+ nStart=(USHORT)nThumbPos;
+ nEnd=(USHORT)(nThumbPos-nDelta);
+ aPEnd.Y()=(nThumbPos-nDelta)*nRowHeight;;
+ }
+
+ aSize.Height()=nRowHeight;
+
+ nDelta=-nDelta*nRowHeight;
+
+ aPlayGround.Scroll(0,nDelta,SCROLL_CHILDREN);
+
+ for(USHORT i=nStart; i<=nEnd;i++)
+ {
+ (PLineArray[i])->SetPosSizePixel(aPos,aSize);
+ (PLineArray[i])->SetNameWidth(nTheNameSize+2*FRAME_OFFSET);
+ (PLineArray[i])->Show();
+ aPos.Y()+=nRowHeight;
+ }
+ aPlayGround.Update();
+}
+
+void SvListBoxForProperties::UpdateAll()
+{
+ UpdatePosNSize();
+ UpdatePlayGround();
+ //UpdateVScroll();
+}
+
+void SvListBoxForProperties::DisableUpdate()
+{
+ bUpdate=FALSE;
+}
+
+void SvListBoxForProperties::EnableUpdate()
+{
+ bUpdate=TRUE;
+ UpdateAll();
+}
+
+void SvListBoxForProperties::SetPropertyValue( const String & rEntryName, const String & rValue )
+{
+ USHORT i, iEnd = PLineArray.Count();
+ for( i = 0 ; i < iEnd ; i++ )
+ {
+ SvPropertyLine* pPropLine = PLineArray[ i ];
+ SvXPropertyControl* pSvXPCtr=pPropLine->GetSvXPropertyControl();
+ if( pSvXPCtr && pSvXPCtr->GetMyName() == rEntryName )
+ {
+ pSvXPCtr->SetProperty( rValue );
+ }
+ }
+}
+
+USHORT SvListBoxForProperties::AppendEntry( const SvPropertyData& aPropData)
+{
+ return InsertEntry(aPropData);
+}
+
+USHORT SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, USHORT nPos)
+{
+ USHORT nInsPos=nPos;
+ SvPropertyLine* pPropLine=new SvPropertyLine(&aPlayGround,WB_TABSTOP | WB_DIALOGCONTROL);
+
+ long nThumbPos=aVScroll.GetThumbPos();
+ long nLines=aVScroll.GetPageSize();
+
+ if(nPos==LISTBOX_APPEND)
+ {
+ nInsPos=PLineArray.Count();
+ PLineArray.Insert(pPropLine,nInsPos);
+ }
+ else
+ {
+ PLineArray.Insert(pPropLine,nPos);
+ }
+ pPropLine->SetNameWidth(nTheNameSize);
+ UpdateVScroll();
+ UpdatePosNSize();
+ ChangeEntry(aPropData,nInsPos);
+ return nInsPos;
+}
+
+void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHORT nPos)
+{
+ if(nPos<PLineArray.Count())
+ {
+ SvPropertyLine* pPropLine=PLineArray[nPos];
+
+ switch(pPropLine->GetKindOfControl())
+ {
+ case KOC_LISTBOX:
+ case KOC_COMBOBOX:
+ case KOC_EDIT: delete pPropLine->GetSvXPropertyControl();
+ break;
+ }
+
+ switch(aPropData.eKind)
+ {
+ case KOC_LISTBOX:
+ pPropLine->SetSvXPropertyControl(
+ new SvXPropertyComboBox(pPropLine,WB_TABSTOP));
+ pPropLine->SetKindOfControl(aPropData.eKind);
+ break;
+ case KOC_COMBOBOX:
+ pPropLine->SetSvXPropertyControl(
+ new SvXPropertyComboBox(pPropLine,WB_TABSTOP));
+ pPropLine->SetKindOfControl(aPropData.eKind);
+ break;
+ case KOC_EDIT:
+ pPropLine->SetSvXPropertyControl(
+ new SvXPropertyEdit(pPropLine,WB_TABSTOP));
+ pPropLine->SetKindOfControl(aPropData.eKind);
+ break;
+ case KOC_USERDEFINED:
+ pPropLine->SetSvXPropertyControl(aPropData.pControl);
+ aPropData.pControl->SetParent(pPropLine);
+ pPropLine->SetKindOfControl(aPropData.eKind);
+ break;
+ default:
+ pPropLine->SetSvXPropertyControl(NULL);
+ pPropLine->SetKindOfControl(KOC_UNDEFINED);
+ break;
+ }
+
+ SvXPropertyControl* pSvXPCtr=pPropLine->GetSvXPropertyControl();
+
+ if(pSvXPCtr!=NULL)
+ {
+ pSvXPCtr->SetSvXPropertyCtrListener(&aListener);
+ pSvXPCtr->SetProperty(aPropData.aValue);
+ pSvXPCtr->SetMyData(aPropData.pDataPtr);
+ pSvXPCtr->SetMyName(aPropData.aName);
+
+ if(pSvXPCtr->HasList())
+ {
+ for(int i=0;i<aPropData.theValues.Count();i++)
+ {
+ pSvXPCtr->InsertEntry(*(aPropData.theValues[i]));
+ }
+ }
+ }
+
+ pPropLine->SetName(aPropData.aName);
+
+ USHORT nTextWidth=(USHORT)aPlayGround.GetTextWidth(aPropData.aName);
+
+ if ( nTheNameSize < nTextWidth )
+ nTheNameSize = nTextWidth;
+
+ if ( aPropData.bHasVisibleXButton )
+ {
+ pPropLine->SetClickHdl(LINK( this, SvListBoxForProperties, ClickHdl ) );
+ pPropLine->ShowXButton();
+ }
+ else
+ pPropLine->HideXButton();
+
+ pPropLine->Locked(aPropData.bIsLocked);
+
+ pPropLine->ShowAsHyperLink(aPropData.bIsHyperLink);
+ pPropLine->SetData(aPropData.pDataPtr);
+ }
+}
+
+USHORT SvListBoxForProperties::GetFirstVisibleEntry()
+{
+ return 0;
+}
+void SvListBoxForProperties::SetFirstVisibleEntry(USHORT nPos)
+{
+ return;
+}
+
+void SvListBoxForProperties::SetSelectedEntry(USHORT nPos)
+{
+ return;
+}
+
+USHORT SvListBoxForProperties::GetSelectedEntry()
+{
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, ScrollHdl, ScrollBar*, pSB )
+{
+ if(pSB!=NULL)
+ {
+ long nDelta=aVScroll.GetDelta();
+ nYOffset=-aVScroll.GetThumbPos()*nRowHeight;
+ //aPlayGround.SetUpdateMode(FALSE);
+
+ long nThumbPos=aVScroll.GetThumbPos();
+ long nLines=aVScroll.GetPageSize();
+
+ UpdatePlayGround();
+
+ for(int i=nThumbPos-nDelta; i<nThumbPos+nLines-nDelta;i++)
+ {
+ if(i>=nThumbPos && i<=nThumbPos+nLines)
+ {
+ (PLineArray[i])->SetNeedsRepaint(TRUE);
+ }
+ else
+ {
+ (PLineArray[i])->Hide();
+ (PLineArray[i])->SetNeedsRepaint(FALSE);
+ }
+ }
+ }
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, ClickHdl, PushButton*,pPB)
+{
+ if(pPB!=NULL)
+ {
+ SvPropertyLine *pPropLine=(SvPropertyLine *)pPB->GetParent();
+ SvXPropertyControl* pSvXPCtr=pPropLine->GetSvXPropertyControl();
+ pPropDataControl->Clicked(pSvXPCtr->GetMyName(),
+ pSvXPCtr->GetProperty(),pSvXPCtr->GetMyData());
+ }
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, ModifyHdl,SvXPropEvListener*, pSvXPEvL)
+{
+ if(pSvXPEvL!=NULL && pPropDataControl!=NULL)
+ {
+
+ SvXPropertyControl* pSvXPCtr=aListener.GetPropertyControl();
+
+ pPropDataControl->Modified(pSvXPCtr->GetMyName(),
+ pSvXPCtr->GetProperty(),pSvXPCtr->GetMyData());
+
+ }
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, GetFocusHdl,SvXPropEvListener*, pSvXPEvL)
+{
+ if(pSvXPEvL!=NULL && pPropDataControl!=NULL)
+ {
+ SvXPropertyControl* pSvXPCtr=aListener.GetPropertyControl();
+
+ pPropDataControl->Select(pSvXPCtr->GetMyName(),pSvXPCtr->GetMyData());
+ }
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, LoseFocusHdl,SvXPropEvListener*, pSvXPEvL)
+{
+ if(pSvXPEvL!=NULL && pPropDataControl!=NULL)
+ {
+ SvXPropertyControl* pSvXPCtr=aListener.GetPropertyControl();
+
+ pPropDataControl->Commit(pSvXPCtr->GetMyName(),
+ pSvXPCtr->GetProperty(),pSvXPCtr->GetMyData());
+ /*
+ {
+ pSvXPCtr->SetProperty(
+ pPropDataControl->GetTheCorrectProperty());
+ }
+ */
+ }
+ return 0;
+}
+
+IMPL_LINK( SvListBoxForProperties, KeyInputHdl,SvXPropEvListener*, pSvXPEvL)
+{
+ if(pSvXPEvL!=NULL && pPropDataControl!=NULL)
+ {
+ SvXPropertyControl* pSvXPCtr=aListener.GetPropertyControl();
+ }
+ return 0;
+}
+
+
+
+
+SvTabPageForProperties::SvTabPageForProperties(Window* pParent,WinBits nWinStyle)
+ : TabPage(pParent,nWinStyle),
+ aLbProp(this)
+{
+ aLbProp.Show();
+}
+
+void SvTabPageForProperties::Resize()
+{
+ Point aPos(3,3);
+ Size aSize=GetOutputSizePixel();
+ aSize.Width()-=6;
+ aSize.Height()-=6;
+
+ aLbProp.SetPosSizePixel(aPos,aSize);
+}
+
+SvListBoxForProperties* SvTabPageForProperties::GetTheListBox()
+{
+ return &aLbProp;
+}
+
+
+SvPropertyBox::SvPropertyBox( Window* pParent, WinBits nWinStyle)
+ : Control(pParent,nWinStyle),
+ aTabControl(this)
+{
+ aTabControl.Show();
+}
+
+SvPropertyBox::SvPropertyBox( Window* pParent, const ResId& rResId )
+ : Control(pParent,rResId),
+ aTabControl(this)
+{
+ aTabControl.Show();
+ Resize();
+}
+
+SvPropertyBox::~SvPropertyBox()
+{
+ ClearAll();
+}
+
+
+void SvPropertyBox::ClearAll()
+{
+ USHORT nCount=aTabControl.GetPageCount();
+
+ for(USHORT i=nCount;i>=1;i--)
+ {
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(i);
+ aTabControl.RemovePage(i);
+ delete pPage;
+ }
+}
+
+
+void SvPropertyBox::Resize()
+{
+ Point aPos(3,3);
+ Size aSize=GetOutputSizePixel();
+ aSize.Width()-=6;
+ aSize.Height()-=6;
+
+ aTabControl.SetPosSizePixel(aPos,aSize);
+
+ USHORT nCount=aTabControl.GetPageCount();
+
+ aSize=aTabControl.GetOutputSizePixel();
+ for(USHORT i=1;i<=nCount;i++)
+ {
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(i);
+ pPage->SetSizePixel(aSize);
+ }
+
+}
+
+
+USHORT SvPropertyBox::AppendPage( const String & rText )
+{
+ USHORT nId=aTabControl.GetPageCount()+1;
+ aTabControl.InsertPage( nId,rText);
+ SvTabPageForProperties* pPage=new SvTabPageForProperties(&aTabControl);
+ pPage->SetSizePixel(aTabControl.GetOutputSizePixel());
+ pPage->GetTheListBox()->SetController(pThePropDataCtr);
+ aTabControl.SetTabPage( nId, pPage);
+ aTabControl.SetCurPageId(nId);
+ return nId;
+}
+
+void SvPropertyBox::SetPage( USHORT nId)
+{
+ aTabControl.SetCurPageId(nId);
+}
+
+USHORT SvPropertyBox::GetCurPage()
+{
+ return aTabControl.GetCurPageId();
+}
+
+USHORT SvPropertyBox::CalcVisibleLines()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ return pPage->GetTheListBox()->CalcVisibleLines();
+}
+void SvPropertyBox::EnableUpdate()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->EnableUpdate();
+}
+
+void SvPropertyBox::DisableUpdate()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->DisableUpdate();
+}
+
+void SvPropertyBox::SetController(SvPropertyDataControl *pDataCtr)
+{
+ pThePropDataCtr=pDataCtr;
+ USHORT nCount=aTabControl.GetPageCount();
+
+ for(USHORT i=1;i<=nCount;i++)
+ {
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(i);
+
+ pPage->GetTheListBox()->SetController(pThePropDataCtr);
+ }
+
+}
+
+USHORT SvPropertyBox::InsertEntry( const SvPropertyData& rData, USHORT nPos)
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ return pPage->GetTheListBox()->InsertEntry(rData,nPos);
+}
+
+void SvPropertyBox::ChangeEntry( const SvPropertyData& rData, USHORT nPos)
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->ChangeEntry(rData,nPos);
+}
+
+USHORT SvPropertyBox::AppendEntry( const SvPropertyData& rData)
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ return pPage->GetTheListBox()->AppendEntry(rData);
+}
+
+void SvPropertyBox::SetPropertyValue( const String & rEntryName, const String & rValue )
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->SetPropertyValue( rEntryName, rValue );
+}
+
+void SvPropertyBox::SetFirstVisibleEntry(USHORT nPos)
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->SetFirstVisibleEntry(nPos);
+}
+USHORT SvPropertyBox::GetFirstVisibleEntry()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ return pPage->GetTheListBox()->GetFirstVisibleEntry();
+}
+
+void SvPropertyBox::SetSelectedEntry(USHORT nPos)
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->SetSelectedEntry(nPos);
+}
+USHORT SvPropertyBox::GetSelectedEntry()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ return pPage->GetTheListBox()->GetSelectedEntry();
+}
+
+void SvPropertyBox::ClearTable()
+{
+ SvTabPageForProperties* pPage=(SvTabPageForProperties*)
+ aTabControl.GetTabPage(aTabControl.GetCurPageId());
+ pPage->GetTheListBox()->Clear();
+}
+
+
+void SvBasicPropertyDataControl::Modified(const String& aName,
+ const String& aVal,void* pData)
+{
+ aEntryName=aName;
+ aEntryProperty=aVal;
+ pTheData=pData;
+ aModifyLink.Call(this);
+}
+
+void SvBasicPropertyDataControl::Clicked( const String& aName,
+ const String& aVal,
+ void* pData) //Xtension-Button pressed
+{
+ aEntryName=aName;
+ aEntryProperty=aVal;
+ pTheData=pData;
+ aClickedLink.Call(this);
+}
+
+void SvBasicPropertyDataControl::Commit( const String& aName,
+ const String& aVal,
+ void* pData) //User accept changes
+{
+ aEntryName=aName;
+ aEntryProperty=aVal;
+ pTheData=pData;
+ aCommitLink.Call(this);
+}
+
+void SvBasicPropertyDataControl::Select( const String& aName,
+ void* pData) //User select new Row
+{
+ aEntryName=aName;
+ pTheData=pData;
+ aSelectLink.Call(this);
+}
+
+void SvBasicPropertyDataControl::LinkClicked(const String& aName, void* pData)
+{
+}
+
+
+String SvBasicPropertyDataControl::GetName() const //Tell's the name of the Property
+{
+ return aEntryName;
+}
+
+String SvBasicPropertyDataControl::GetProperty() const //Tell's the content of the Property
+{
+ return aEntryProperty;
+}
+
+void* SvBasicPropertyDataControl::GetData() //Tell's the storage
+{
+ return pTheData;
+}
+
+/*
+String SvBasicPropertyDataControl::GetTheCorrectProperty() const
+{
+ return aCorrectProperty;
+}
+*/
+
+void SvBasicPropertyDataControl::SetTheCorrectProperty(const String& aString)
+{
+ aCorrectProperty=aString;
+}
+
+void SvBasicPropertyDataControl::SetIsCorrect(BOOL nFlag)
+{
+ bCorrectness=nFlag;
+}
+
+
+
+//========================================================================
+// Property-Dialog:
+/* zum TESTEN im CALC*/
+//========================================================================
+/*
+ScPropertyDlg::ScPropertyDlg( Window* pParent) :
+ ModalDialog ( pParent, ScResId( RID_SCDLG_PROPERTIES) ),
+ aPropListBox ( this, ResId( CTR_PROPLINE) ),
+ aKindOfListBox (this,ResId( LB_KIND_OF_PROP)),
+ aModAnswer (this,ResId(FT_ANSMOD )),
+ aClickAnswer (this,ResId(FT_ANSCLICK )),
+ aCommitAnswer (this,ResId(FT_ANSCOMMIT)),
+ aSelectAnswer (this,ResId(FT_ANSSELECT)),
+ anOk(this,ResId( BTN_OK)),
+ aCancel(this,ResId( BTN_CANCEL))
+{
+ FreeResource();
+
+ aKindOfListBox.SelectEntryPos(0);
+ aKindOfListBox.SetSelectHdl(
+ LINK( this, ScPropertyDlg, ModifiedHdl ));
+ nCount=0;
+ nClickCount=0;
+
+ String aString("Don't know ");
+
+ aBaProDatCtr.SetModifyHdl (LINK( this, ScPropertyDlg, RowModifiedHdl ));
+ aBaProDatCtr.SetClickedHdl(LINK( this, ScPropertyDlg, ClickHdl ));
+ aBaProDatCtr.SetCommitHdl (LINK( this, ScPropertyDlg, SelectHdl ));
+ aBaProDatCtr.SetSelectHdl (LINK( this, ScPropertyDlg, CommitHdl ));
+
+ aPropListBox.SetController(&aBaProDatCtr);
+
+ USHORT nPageId=aPropListBox.AppendPage("YabbaDabbaDo");
+ aPropListBox.SetPage(nPageId);
+ aProperty.eKind=KOC_EDIT;
+ aProperty.aName=aString;
+ aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aValue=sizeof ComboBox;
+ aProperty.bHasVisibleXButton=FALSE;
+ aProperty.bIsHyperLink=FALSE;
+ aProperty.bIsLocked=FALSE;
+ aProperty.pDataPtr=NULL;
+ aProperty.pControl=NULL;
+ aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count());
+ aProperty.theValues.Insert(new String("2"),aProperty.theValues.Count());
+ aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count());
+ aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count());
+ aPropListBox.InsertEntry(aProperty);
+ aProperty.bHasVisibleXButton=TRUE;
+ aProperty.aName=aString;
+ aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aValue="42";
+ aProperty.eKind=KOC_LISTBOX;
+ aPropListBox.InsertEntry(aProperty);
+ aProperty.aName=aString;
+ aProperty.aName+=String((USHORT)++nCount);
+ aProperty.eKind=KOC_COMBOBOX;
+ aProperty.bHasVisibleXButton=FALSE;
+ aPropListBox.InsertEntry(aProperty);
+}
+
+ScPropertyDlg::~ScPropertyDlg()
+{
+ delete aProperty.theValues[0];
+ delete aProperty.theValues[1];
+ delete aProperty.theValues[2];
+ delete aProperty.theValues[3];
+}
+
+IMPL_LINK( ScPropertyDlg, ModifiedHdl, ListBox*, pLB )
+{
+ if(pLB!=NULL)
+ {
+ String aString("Don't know ");
+ aProperty.aName=aString;
+ aProperty.aName+=String((USHORT)++nCount);
+ if(nCount>20)
+ {
+ String aStr("Yabba ");
+ aStr+=aPropListBox.GetCurPage();
+ USHORT nPageId=aPropListBox.AppendPage(aStr);
+ aPropListBox.SetPage(nPageId);
+ nCount=0;
+ }
+
+ aProperty.eKind=(eKindOfControl)(aKindOfListBox.GetSelectEntryPos()+1);
+ aProperty.bHasVisibleXButton=FALSE;
+ if((nCount % 5)==0) aProperty.bHasVisibleXButton=TRUE;
+ aPropListBox.InsertEntry(aProperty);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScPropertyDlg, RowModifiedHdl, SvBasicPropertyDataControl* ,pProCtr)
+{
+ if(pProCtr!=NULL)
+ {
+ aModAnswer.SetText(aBaProDatCtr.GetProperty());
+ aModAnswer.Invalidate();
+ aBaProDatCtr.SetIsCorrect(TRUE);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScPropertyDlg, CommitHdl, SvBasicPropertyDataControl*,pProCtr)
+{
+ if(pProCtr!=NULL)
+ {
+ aCommitAnswer.SetText(aBaProDatCtr.GetProperty());
+ aCommitAnswer.Invalidate();
+ aBaProDatCtr.SetIsCorrect(TRUE);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScPropertyDlg, ClickHdl, SvBasicPropertyDataControl*,pProCtr)
+{
+ if(pProCtr!=NULL)
+ {
+ aClickAnswer.SetText(aBaProDatCtr.GetName());
+ aClickAnswer.Invalidate();
+ aBaProDatCtr.SetIsCorrect(TRUE);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScPropertyDlg, SelectHdl, SvBasicPropertyDataControl*,pProCtr)
+{
+ if(pProCtr!=NULL)
+ {
+ aSelectAnswer.SetText(aBaProDatCtr.GetName());
+ aSelectAnswer.Invalidate();
+ aBaProDatCtr.SetIsCorrect(TRUE);
+ }
+ return 0;
+}
+*/
+
+
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
new file mode 100644
index 000000000000..1382624638fc
--- /dev/null
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -0,0 +1,678 @@
+/*************************************************************************
+ *
+ * $RCSfile: wizdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:58:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVT_WIZDLG_CXX
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _VCL_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _VCL_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _VCL_TABPAGE_HXX
+#include <vcl/tabpage.hxx>
+#endif
+
+#ifndef _SVT_WIZDLG_HXX
+#include <wizdlg.hxx>
+#endif
+
+// =======================================================================
+
+#define WIZARDDIALOG_BUTTON_OFFSET_Y 6
+#define WIZARDDIALOG_BUTTON_DLGOFFSET_X 6
+#define WIZARDDIALOG_LINE_DLGOFFSET_X 6
+#define WIZARDDIALOG_VIEW_DLGOFFSET_X 6
+#define WIZARDDIALOG_VIEW_DLGOFFSET_Y 6
+
+// =======================================================================
+
+struct ImplWizPageData
+{
+ ImplWizPageData* mpNext;
+ TabPage* mpPage;
+};
+
+// -----------------------------------------------------------------------
+
+struct ImplWizButtonData
+{
+ ImplWizButtonData* mpNext;
+ Button* mpButton;
+ long mnOffset;
+};
+
+// =======================================================================
+
+void WizardDialog::ImplInitData()
+{
+ mpFirstPage = NULL;
+ mpFirstBtn = NULL;
+ mpFixedLine = NULL;
+ mpCurTabPage = NULL;
+ mpPrevBtn = NULL;
+ mpNextBtn = NULL;
+ mpViewWindow = NULL;
+ mnCurLevel = 0;
+ meViewAlign = WINDOWALIGN_LEFT;
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ImplCalcSize( Size& rSize )
+{
+ // ButtonBar-Hoehe berechnen
+ long nMaxHeight = 0;
+ ImplWizButtonData* pBtnData = mpFirstBtn;
+ while ( pBtnData )
+ {
+ long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
+ if ( nBtnHeight > nMaxHeight )
+ nMaxHeight = nBtnHeight;
+ pBtnData = pBtnData->mpNext;
+ }
+ if ( nMaxHeight )
+ nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2;
+ if ( mpFixedLine && mpFixedLine->IsVisible() )
+ nMaxHeight += mpFixedLine->GetSizePixel().Height();
+ rSize.Height() += nMaxHeight;
+
+ // View-Window-Groesse dazurechnen
+ if ( mpViewWindow && mpViewWindow->IsVisible() )
+ {
+ Size aViewSize = mpViewWindow->GetSizePixel();
+ if ( meViewAlign == WINDOWALIGN_TOP )
+ rSize.Height() += aViewSize.Height();
+ else if ( meViewAlign == WINDOWALIGN_LEFT )
+ rSize.Width() += aViewSize.Width();
+ else if ( meViewAlign == WINDOWALIGN_BOTTOM )
+ rSize.Height() += aViewSize.Height();
+ else if ( meViewAlign == WINDOWALIGN_RIGHT )
+ rSize.Width() += aViewSize.Width();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ImplPosCtrls()
+{
+ Size aDlgSize = GetOutputSizePixel();
+ long nBtnWidth = 0;
+ long nMaxHeight = 0;
+ long nOffY = aDlgSize.Height();
+
+ ImplWizButtonData* pBtnData = mpFirstBtn;
+ while ( pBtnData )
+ {
+ Size aBtnSize = pBtnData->mpButton->GetSizePixel();
+ long nBtnHeight = aBtnSize.Height();
+ if ( nBtnHeight > nMaxHeight )
+ nMaxHeight = nBtnHeight;
+ nBtnWidth += aBtnSize.Width();
+ nBtnWidth += pBtnData->mnOffset;
+ pBtnData = pBtnData->mpNext;
+ }
+
+ if ( nMaxHeight )
+ {
+ long nOffX = aDlgSize.Width()-nBtnWidth-WIZARDDIALOG_BUTTON_DLGOFFSET_X;
+ nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y+nMaxHeight;
+
+ pBtnData = mpFirstBtn;
+ while ( pBtnData )
+ {
+ Size aBtnSize = pBtnData->mpButton->GetSizePixel();
+ Point aPos( nOffX, nOffY+((nMaxHeight-aBtnSize.Height())/2) );
+ pBtnData->mpButton->SetPosPixel( aPos );
+ nOffX += aBtnSize.Width();
+ nOffX += pBtnData->mnOffset;
+ pBtnData = pBtnData->mpNext;
+ }
+
+ nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y;
+ }
+
+ if ( mpFixedLine && mpFixedLine->IsVisible() )
+ {
+ nOffY -= mpFixedLine->GetSizePixel().Height();
+ mpFixedLine->SetPosSizePixel( WIZARDDIALOG_LINE_DLGOFFSET_X, nOffY,
+ aDlgSize.Width()-(WIZARDDIALOG_LINE_DLGOFFSET_X*2), 0,
+ WINDOW_POSSIZE_POS | WINDOW_POSSIZE_WIDTH );
+ }
+
+ if ( mpViewWindow && mpViewWindow->IsVisible() )
+ {
+ long nViewOffX = 0;
+ long nViewOffY = 0;
+ long nViewWidth = 0;
+ long nViewHeight = 0;
+ long nDlgHeight = nOffY;
+ USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ if ( meViewAlign == WINDOWALIGN_TOP )
+ {
+ nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2);
+ nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
+ }
+ else if ( meViewAlign == WINDOWALIGN_LEFT )
+ {
+ nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2);
+ nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
+ }
+ else if ( meViewAlign == WINDOWALIGN_BOTTOM )
+ {
+ nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ nViewOffY = nDlgHeight-mpViewWindow->GetSizePixel().Height()-WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2);
+ nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
+ }
+ else if ( meViewAlign == WINDOWALIGN_RIGHT )
+ {
+ nViewOffX = aDlgSize.Width()-mpViewWindow->GetSizePixel().Width()-WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2);
+ nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
+ }
+ mpViewWindow->SetPosSizePixel( nViewOffX, nViewOffY,
+ nViewWidth, nViewHeight,
+ nViewPosFlags );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ImplPosTabPage()
+{
+ if ( !mpCurTabPage )
+ return;
+
+ // ButtonBar-Hoehe berechnen
+ long nMaxHeight = 0;
+ ImplWizButtonData* pBtnData = mpFirstBtn;
+ while ( pBtnData )
+ {
+ long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height();
+ if ( nBtnHeight > nMaxHeight )
+ nMaxHeight = nBtnHeight;
+ pBtnData = pBtnData->mpNext;
+ }
+ if ( nMaxHeight )
+ nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2;
+ if ( mpFixedLine && mpFixedLine->IsVisible() )
+ nMaxHeight += mpFixedLine->GetSizePixel().Height();
+
+ // TabPage positionieren
+ Size aDlgSize = GetOutputSizePixel();
+ aDlgSize.Height() -= nMaxHeight;
+ long nOffX = 0;
+ long nOffY = 0;
+ if ( mpViewWindow && mpViewWindow->IsVisible() )
+ {
+ Size aViewSize = mpViewWindow->GetSizePixel();
+ if ( meViewAlign == WINDOWALIGN_TOP )
+ {
+ nOffY += aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ }
+ else if ( meViewAlign == WINDOWALIGN_LEFT )
+ {
+ nOffX += aViewSize.Width()+WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ aDlgSize.Width() -= aViewSize.Width()+WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ }
+ else if ( meViewAlign == WINDOWALIGN_BOTTOM )
+ aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y;
+ else if ( meViewAlign == WINDOWALIGN_RIGHT )
+ aDlgSize.Width() -= aViewSize.Width()+WIZARDDIALOG_VIEW_DLGOFFSET_X;
+ }
+ Point aPos( nOffX, nOffY );
+ mpCurTabPage->SetPosSizePixel( aPos, aDlgSize );
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ImplShowTabPage( TabPage* pTabPage )
+{
+ if ( mpCurTabPage == pTabPage )
+ return;
+
+ TabPage* pOldTabPage = mpCurTabPage;
+ if ( pOldTabPage )
+ pOldTabPage->DeactivatePage();
+
+ mpCurTabPage = pTabPage;
+ if ( pTabPage )
+ {
+ ImplPosTabPage();
+ pTabPage->ActivatePage();
+ pTabPage->Show();
+ }
+
+ if ( pOldTabPage )
+ pOldTabPage->Hide();
+}
+
+// -----------------------------------------------------------------------
+
+TabPage* WizardDialog::ImplGetPage( USHORT nLevel ) const
+{
+ USHORT nTempLevel = 0;
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData )
+ {
+ if ( (nTempLevel == nLevel) || !pPageData->mpNext )
+ break;
+
+ nTempLevel++;
+ pPageData = pPageData->mpNext;
+ }
+
+ if ( pPageData )
+ return pPageData->mpPage;
+ return NULL;
+}
+
+// =======================================================================
+
+WizardDialog::WizardDialog( Window* pParent, WinBits nStyle ) :
+ ModalDialog( pParent, nStyle )
+{
+ ImplInitData();
+}
+
+// -----------------------------------------------------------------------
+
+WizardDialog::WizardDialog( Window* pParent, const ResId& rResId ) :
+ ModalDialog( pParent, rResId )
+{
+ ImplInitData();
+}
+
+// -----------------------------------------------------------------------
+
+WizardDialog::~WizardDialog()
+{
+ if ( mpFixedLine )
+ delete mpFixedLine;
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::Resize()
+{
+ if ( IsReallyShown() && !IsInInitShow() )
+ {
+ ImplPosCtrls();
+ ImplPosTabPage();
+ }
+
+ Dialog::Resize();
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_INITSHOW )
+ {
+ if ( IsDefaultSize() )
+ {
+ Size aDlgSize = GetPageSizePixel();
+ if ( !aDlgSize.Width() || !aDlgSize.Height() )
+ {
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData )
+ {
+ if ( pPageData->mpPage )
+ {
+ Size aPageSize = pPageData->mpPage->GetSizePixel();
+ if ( aPageSize.Width() > aDlgSize.Width() )
+ aDlgSize.Width() = aPageSize.Width();
+ if ( aPageSize.Height() > aDlgSize.Height() )
+ aDlgSize.Height() = aPageSize.Height();
+ }
+
+ pPageData = pPageData->mpNext;
+ }
+ }
+ ImplCalcSize( aDlgSize );
+ SetOutputSizePixel( aDlgSize );
+ }
+
+ ImplPosCtrls();
+ ImplPosTabPage();
+ ImplShowTabPage( ImplGetPage( mnCurLevel ) );
+ }
+
+ Dialog::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+long WizardDialog::Notify( NotifyEvent& rNEvt )
+{
+ if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+ KeyCode aKeyCode = pKEvt->GetKeyCode();
+ USHORT nKeyCode = aKeyCode.GetCode();
+
+ if ( aKeyCode.IsMod1() )
+ {
+ if ( aKeyCode.IsShift() || (nKeyCode == KEY_PAGEUP) )
+ {
+ if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
+ {
+ if ( mpPrevBtn->IsVisible() &&
+ mpPrevBtn->IsEnabled() && mpPrevBtn->IsInputEnabled() )
+ {
+ mpPrevBtn->SetPressed( TRUE );
+ mpPrevBtn->SetPressed( FALSE );
+ mpPrevBtn->Click();
+ }
+ return TRUE;
+ }
+ }
+ else
+ {
+ if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
+ {
+ if ( mpNextBtn->IsVisible() &&
+ mpNextBtn->IsEnabled() && mpNextBtn->IsInputEnabled() )
+ {
+ mpNextBtn->SetPressed( TRUE );
+ mpNextBtn->SetPressed( FALSE );
+ mpNextBtn->Click();
+ }
+ return TRUE;
+ }
+ }
+ }
+ }
+
+ return Dialog::Notify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ActivatePage()
+{
+ maActivateHdl.Call( this );
+}
+
+// -----------------------------------------------------------------------
+
+long WizardDialog::DeactivatePage()
+{
+ if ( maDeactivateHdl.IsSet() )
+ return maDeactivateHdl.Call( this );
+ else
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WizardDialog::ShowNextPage()
+{
+ return ShowPage( mnCurLevel+1 );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WizardDialog::ShowPrevPage()
+{
+ if ( !mnCurLevel )
+ return FALSE;
+ return ShowPage( mnCurLevel-1 );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WizardDialog::ShowPage( USHORT nLevel )
+{
+ if ( DeactivatePage() )
+ {
+ mnCurLevel = nLevel;
+ ActivatePage();
+ ImplShowTabPage( ImplGetPage( mnCurLevel ) );
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WizardDialog::Finnish( long nResult )
+{
+ if ( DeactivatePage() )
+ {
+ if ( mpCurTabPage )
+ mpCurTabPage->DeactivatePage();
+
+ if ( IsInExecute() )
+ EndDialog( nResult );
+ else if ( GetStyle() & WB_CLOSEABLE )
+ Close();
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::AddPage( TabPage* pPage )
+{
+ ImplWizPageData* pNewPageData = new ImplWizPageData;
+ pNewPageData->mpNext = NULL;
+ pNewPageData->mpPage = pPage;
+
+ if ( !mpFirstPage )
+ mpFirstPage = pNewPageData;
+ else
+ {
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData->mpNext )
+ pPageData = pPageData->mpNext;
+ pPageData->mpNext = pNewPageData;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::RemovePage( TabPage* pPage )
+{
+ ImplWizPageData* pPrevPageData = NULL;
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData )
+ {
+ if ( pPageData->mpPage == pPage )
+ {
+ if ( pPrevPageData )
+ pPrevPageData->mpNext = pPageData->mpNext;
+ else
+ mpFirstPage = pPageData->mpNext;
+ if ( pPage == mpCurTabPage )
+ mpCurTabPage = NULL;
+ delete pPageData;
+ return;
+ }
+
+ pPrevPageData = pPageData;
+ pPageData = pPageData->mpNext;
+ }
+
+ DBG_ERROR( "WizardDialog::RemovePage() - Page not in list" );
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::SetPage( USHORT nLevel, TabPage* pPage )
+{
+ USHORT nTempLevel = 0;
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData )
+ {
+ if ( (nTempLevel == nLevel) || !pPageData->mpNext )
+ break;
+
+ nTempLevel++;
+ pPageData = pPageData->mpNext;
+ }
+
+ if ( pPageData )
+ {
+ if ( pPageData->mpPage == mpCurTabPage )
+ mpCurTabPage = NULL;
+ pPageData->mpPage = pPage;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+TabPage* WizardDialog::GetPage( USHORT nLevel ) const
+{
+ USHORT nTempLevel = 0;
+ ImplWizPageData* pPageData = mpFirstPage;
+ while ( pPageData )
+ {
+ if ( nTempLevel == nLevel )
+ return pPageData->mpPage;
+
+ nTempLevel++;
+ pPageData = pPageData->mpNext;
+ }
+
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::AddButton( Button* pButton, long nOffset )
+{
+ ImplWizButtonData* pNewBtnData = new ImplWizButtonData;
+ pNewBtnData->mpNext = NULL;
+ pNewBtnData->mpButton = pButton;
+ pNewBtnData->mnOffset = nOffset;
+
+ if ( !mpFirstBtn )
+ mpFirstBtn = pNewBtnData;
+ else
+ {
+ ImplWizButtonData* pBtnData = mpFirstBtn;
+ while ( pBtnData->mpNext )
+ pBtnData = pBtnData->mpNext;
+ pBtnData->mpNext = pNewBtnData;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::RemoveButton( Button* pButton )
+{
+ ImplWizButtonData* pPrevBtnData = NULL;
+ ImplWizButtonData* pBtnData = mpFirstBtn;
+ while ( pBtnData )
+ {
+ if ( pBtnData->mpButton == pButton )
+ {
+ if ( pPrevBtnData )
+ pPrevBtnData->mpNext = pBtnData->mpNext;
+ else
+ mpFirstBtn = pBtnData->mpNext;
+ delete pBtnData;
+ return;
+ }
+
+ pPrevBtnData = pBtnData;
+ pBtnData = pBtnData->mpNext;
+ }
+
+ DBG_ERROR( "WizardDialog::RemoveButton() - Button not in list" );
+}
+
+// -----------------------------------------------------------------------
+
+void WizardDialog::ShowButtonFixedLine( BOOL bVisible )
+{
+ if ( !mpFixedLine )
+ {
+ if ( !bVisible )
+ return;
+
+ mpFixedLine = new FixedLine( this );
+ }
+
+ mpFixedLine->Show( bVisible );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WizardDialog::IsButtonFixedLineVisible()
+{
+ return (mpFixedLine && mpFixedLine->IsVisible());
+}