diff options
Diffstat (limited to 'svtools')
298 files changed, 159381 insertions, 0 deletions
diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx new file mode 100644 index 000000000000..bd2fc1cf65bc --- /dev/null +++ b/svtools/bmpmaker/bmp.cxx @@ -0,0 +1,903 @@ +/************************************************************************* + * + * $RCSfile: bmp.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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 <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <string.h> +#include <tools/stream.hxx> +#include <tools/fsys.hxx> +#include <tools/new.hxx> +#include <vcl/svapp.hxx> +#include <vcl/window.hxx> +#include <vcl/wrkwin.hxx> +#include <vcl/dialog.hxx> +#include <vcl/menu.hxx> +#include <vcl/config.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/edit.hxx> +#include <vcl/group.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/virdev.hxx> +#include <vcl/bmpacc.hxx> +#include <solar.hrc> +#include <filedlg.hxx> +#include "bmp.hrc" + +// ----------- +// - Defines - +// ----------- + +#define SOLAR_PATH "s:\\solenv\\res" +#define LANG_ALL "Alle Sprachen" +#define FILETEST(FileEntry) ((FileEntry).Exists()) + +// -------------- +// - Exit codes - +// -------------- + +#define EXIT_NOERROR 0 +#define EXIT_MISSING_BITMAP 1 +#define EXIT_NOSRSFILE 2 +#define EXIT_NOIMGLIST 3 +#define EXIT_DIMENSIONERROR 4 +#define EXIT_IOERROR 5 +#define EXIT_COMMONERROR 6 +#define EXIT_MISSING_RESOURCE 7 +#define EXIT_COLORDEPTHERROR 8 + +// ----------- +// - Globals - +// ----------- + +char LangDir[][ 9 ] = { "deut", "enus", "fren", "ital", "dtch", "span", "dan", "swed", "port", "japn", "chinsim", "chintrad", "russ", "pol", "arab", "greek", "korean" , "turk" }; +USHORT LangNum[] = { 49, 1, 33, 39, 31, 34, 45, 46, 03, 81, 86, 88, 07, 48, 96, 30, 82, 90}; + +// ------------ +// - LangInfo - +// ------------ + +struct LangInfo +{ + String maLangDir; + USHORT mnLangNum; + + LangInfo( const String& rLangDir, USHORT nLangNum ) : maLangDir( rLangDir ), mnLangNum( nLangNum ) {} +}; + +// ---------- +// - BmpApp - +// ---------- + +class BmpWin; + +class BmpApp : public Application +{ +private: + + BmpWin* pBmpWin; + String aOutputFileName; + BYTE cExitCode; + + DECL_LINK( Select, Menu* pMenu ); + + BOOL GetCommandOption( const String& rSwitch, String& rSwitchParam ); + +public: + + void Main( ); + void SetExitCode( BYTE cExit ) + { + if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) ) + cExitCode = cExit; + } +}; + +// ----------------------------------------------------------------------- + +BmpApp aBmpApp; + +// ---------- +// - Pathes - +// ---------- + +class Pathes : public ModalDialog +{ + OKButton aBtnOk; + CancelButton aBtnCancel; + GroupBox aGrpPath; + FixedText aFtSrs; + FixedText aFtRes; + FixedText aFtOut; + Edit aEdtSrs; + PushButton aBtnSrs; + Edit aEdtRes; + PushButton aBtnRes; + Edit aEdtOut; + PushButton aBtnOut; + GroupBox aGrpLang; + ListBox aLbLang; + + DECL_LINK( ClickSrsHdl, void* ); + DECL_LINK( ClickResHdl, void* ); + DECL_LINK( ClickOutHdl, void* ); + + +public: + + Pathes( Window* pParent, + const String& rSrsPath, + const String& rResPath, + const String& rOutPath, + const USHORT nLang ); + + String GetSrsPath() const { return aEdtSrs.GetText(); } + String GetResPath() const { return aEdtRes.GetText(); } + String GetOutPath() const { return aEdtOut.GetText(); } + + USHORT GetLangNum() const { return aLbLang.GetSelectEntryPos(); } +}; + +// ---------- +// - BmpWin - +// ---------- + +class BmpWin : public WorkWindow +{ + VirtualDevice aDev; + ListBox aLB; + Bitmap aOutBmp; + Size aOneSize; + Size aTotSize; + Point aPos; + SvFileStream* pSRS; + ULONG nTotCount; + USHORT nPos; + + void DoIt( SvStream& rStm, DirEntry&, DirEntry&, String&, String&, const LangInfo& rLang ); + +public: + + BmpWin( Window* pParent, WinBits nWinStyle ); + + void Resize(); + void StartCreation( const String& rSRSName, const String& rInName, + const String& rOutName, const LangInfo& rLang ); + + void SetMode( BOOL bMode ) { aLB.SetUpdateMode( bMode ); } + void ClearInfo(); + void WriteInfo( const String& rText, BYTE cExitCode = EXIT_NOERROR ); +}; + +// ---------- +// - BmpApp - +// ---------- + +BOOL BmpApp::GetCommandOption( const String& rSwitch, String& rFollowingParam ) +{ + BOOL bRet = FALSE; + + for( long i = 0, nCount = GetCommandLineParamCount(); ( i < nCount ) && !bRet; i++ ) + { + String aTestStr( '-' ); + + for( long n = 0; ( n < 2 ) && !bRet; n++ ) + { + aTestStr += rSwitch; + + if( aTestStr.CompareIgnoreCaseToAscii( GetCommandLineParam( i ) ) == COMPARE_EQUAL ) + { + bRet = TRUE; + + if( i < ( nCount - 1 ) ) + rFollowingParam = GetCommandLineParam( i + 1 ); + else + rFollowingParam = String(); + } + + if( 0 == n ) + aTestStr = '/'; + } + } + + return bRet; +} + +// ----------------------------------------------------------------------------- + +void BmpApp::Main( ) +{ + ResMgr* pAppResMgr = NULL; + String aLangDir; + String aOutName; + int nCmdCount = GetCommandLineParamCount(); + USHORT nCurCmd = 0; + + cExitCode = EXIT_NOERROR; + + // Param1: filename of *.srs input file with image lists + // Param2: path to local bitmaps + // Param3: output directory + // Param4: Langugage dependent directory + + if( nCmdCount >= 3 ) + { + const String aSrsName( GetCommandLineParam( nCurCmd++ ) ); + const String aInName( GetCommandLineParam( nCurCmd++ ) ); + aOutName = GetCommandLineParam( nCurCmd++ ); + + pBmpWin = new BmpWin( NULL, WB_APP | WB_STDWORK ); + pBmpWin->ClearInfo(); + + if( nCurCmd < nCmdCount ) + { +#if 0 + GetCommandOption( 'l', aLangDir ); +#else + aLangDir = GetCommandLineParam( nCurCmd++ ); +#endif + GetCommandOption( 'f', aOutputFileName ); + + if( aLangDir.Len() && ( aLangDir.CompareIgnoreCaseToAscii( "all" ) == COMPARE_EQUAL ) ) + { + for ( USHORT i = 0, nCount = ( sizeof( LangNum ) / sizeof( LangNum[ 0 ] ) ); i < nCount; i++ ) + pBmpWin->StartCreation( aSrsName, aInName, aOutName, LangInfo( String( LangDir[ i ], RTL_TEXTENCODING_UTF8 ), LangNum[ i ] ) ); + } + else + { + pBmpWin->StartCreation( aSrsName, aInName, aOutName, LangInfo( aLangDir, DirEntry( aOutName ).GetName().ToInt32() ) ); + } + } + else + pBmpWin->StartCreation( aSrsName, aInName, aOutName, LangInfo( String( LangDir[ 0 ], RTL_TEXTENCODING_UTF8 ), LangNum[ 0 ] ) ); + } + else + { + ResMgr* pAppResMgr = new ResMgr( String( RTL_CONSTASCII_USTRINGPARAM( "bmp.res" ) ), NULL, NULL ); + MenuBar aMB; + PopupMenu aPB; + + Resource::SetResManager( pAppResMgr ); + + aMB.InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~ImageList" ) ) ); + aPB.InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM( "~Erstellen..." ) ) ); + aPB.InsertSeparator(); + aPB.InsertItem( 2, String( RTL_CONSTASCII_USTRINGPARAM( "~Beenden" ) ) ); + + aMB.SetPopupMenu( 1, &aPB ); + aMB.SetSelectHdl( LINK( this, BmpApp, Select ) ); + + pBmpWin = new BmpWin( NULL, WB_APP | WB_STDWORK ); + pBmpWin->SetMenuBar( &aMB ); + pBmpWin->Show(); + + Execute(); + delete pBmpWin; + } + + Resource::SetResManager( NULL ); + delete pAppResMgr; + + if( ( EXIT_NOERROR == cExitCode ) && aOutputFileName.Len() && aOutName.Len() ) + { + SvFileStream aOStm( aOutputFileName, STREAM_WRITE | STREAM_TRUNC ); + ByteString aStr( "Successfully generated ImageList(s) in: " ); + + aOStm.WriteLine( aStr.Append( ByteString( aOutName, RTL_TEXTENCODING_UTF8 ) ) ); + aOStm.Close(); + } + + if ( EXIT_NOERROR != cExitCode ) + raise( SIGABRT ); + return; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( BmpApp, Select, Menu*, pMenu ) +{ + if ( pMenu->GetCurItemId() == 1 ) + { + Config aCfg; + aCfg.SetGroup( "Path-Entries" ); + + String aSrsPath( String::CreateFromAscii( aCfg.ReadKey( "SRS", ByteString() ).GetBuffer() ) ); + String aResPath( String::CreateFromAscii( aCfg.ReadKey( "RES", ByteString() ).GetBuffer() ) ); + String aOutPath( String::CreateFromAscii( aCfg.ReadKey( "OUT", ByteString() ).GetBuffer() ) ); + USHORT nLanguage = (USHORT) aCfg.ReadKey( "LNG", '1' ).ToInt32(); + Pathes aPathDlg( pBmpWin, aSrsPath, aResPath, aOutPath, nLanguage ); + + if ( aPathDlg.Execute() == RET_OK ) + { + aCfg.WriteKey( "SRS", ByteString( aSrsPath = String( aPathDlg.GetSrsPath() ), RTL_TEXTENCODING_UTF8 ) ); + aCfg.WriteKey( "RES", ByteString( aResPath = String( aPathDlg.GetResPath() ), RTL_TEXTENCODING_UTF8 ) ); + aCfg.WriteKey( "OUT", ByteString( aOutPath = String( aPathDlg.GetOutPath() ), RTL_TEXTENCODING_UTF8 ) ); + aCfg.WriteKey( "LNG", ByteString::CreateFromInt32( nLanguage = aPathDlg.GetLangNum() ) ); + + pBmpWin->ClearInfo(); + + if ( !nLanguage ) + { + for ( USHORT i = 0, nCount = ( sizeof( LangNum ) / sizeof( LangNum[ 0 ] ) ); i < nCount; i++ ) + pBmpWin->StartCreation( aSrsPath, aResPath, aOutPath, LangInfo( String( RTL_CONSTASCII_USTRINGPARAM( "deut" ) ), 49 ) ); + } + else + pBmpWin->StartCreation( aSrsPath, aResPath, aOutPath, LangInfo( String( RTL_CONSTASCII_USTRINGPARAM( LangDir[ nLanguage - 1 ] ) ), LangNum[ nLanguage - 1 ] ) ); + + pBmpWin->WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "DONE!" ) ) ); + } + } + else if( pMenu->GetCurItemId() == 2 ) + Quit(); + + return 0; +} + +// ---------- +// - Pathes - +// ---------- + +Pathes::Pathes( Window* pParent, + const String& rSrsPath, + const String& rResPath, + const String& rOutPath, + const USHORT nLang ) : + ModalDialog ( pParent, ResId( DLG_PATH ) ), + aGrpPath ( this, ResId( GRP_PATH ) ), + aFtSrs ( this, ResId( FT_SRS ) ), + aFtRes ( this, ResId( FT_RES ) ), + aFtOut ( this, ResId( FT_OUT ) ), + aEdtSrs ( this, ResId( EDT_SRS ) ), + aBtnSrs ( this, ResId( BTN_SRS ) ), + aEdtRes ( this, ResId( EDT_RES ) ), + aBtnRes ( this, ResId( BTN_RES ) ), + aEdtOut ( this, ResId( EDT_OUT ) ), + aBtnOut ( this, ResId( BTN_OUT ) ), + aGrpLang ( this, ResId( GRP_LANG ) ), + aLbLang ( this, ResId( LB_LANG ) ), + aBtnOk ( this, ResId( BTN_OK ) ), + aBtnCancel ( this, ResId( BTN_CANCEL ) ) +{ + FreeResource(); + + aBtnSrs.SetClickHdl( LINK( this, Pathes, ClickSrsHdl ) ); + aBtnRes.SetClickHdl( LINK( this, Pathes, ClickResHdl ) ); + aBtnOut.SetClickHdl( LINK( this, Pathes, ClickOutHdl ) ); + + aEdtSrs.SetText( rSrsPath ); + aEdtRes.SetText( rResPath ); + aEdtOut.SetText( rOutPath ); + aEdtSrs.GrabFocus(); + + aLbLang.InsertEntry( String( RTL_CONSTASCII_USTRINGPARAM( LANG_ALL ) ), 0 ); + for( USHORT i = 1, nCount = ( sizeof( LangNum ) / sizeof( LangNum[ 0 ] ) ); i <= nCount; i++ ) + aLbLang.InsertEntry( String::CreateFromInt32( LangNum[ i - 1 ] ), i ); + + aLbLang.SelectEntryPos( nLang ); +} + +// ----------------------------------------------------------------------------- + +IMPL_LINK( Pathes, ClickSrsHdl, void*, p ) +{ + FileDialog aFileDlg( this, WB_OPEN | WB_3DLOOK ); + DirEntry aPath( aEdtSrs.GetText() ); + + aFileDlg.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "SRS-Datei mit Imagelisten laden" ) ) ); + aPath += DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "*.srs" ) ) ); + aFileDlg.SetPath( aPath.GetFull() ); + if ( aFileDlg.Execute() == RET_OK ) + aEdtSrs.SetText( aFileDlg.GetPath() ); + + return 0L; +} + +// ----------------------------------------------------------------------------- + +IMPL_LINK( Pathes, ClickResHdl, void*, p ) +{ + PathDialog aPathDlg( this, WB_OPEN | WB_3DLOOK ); + + aPathDlg.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Quellpfad BMP-Dateien" ) ) ); + if ( aPathDlg.Execute() == RET_OK ) + aEdtRes.SetText( aPathDlg.GetPath() ); + + return 0L; +} + +// ----------------------------------------------------------------------------- + +IMPL_LINK( Pathes, ClickOutHdl, void*, p ) +{ + PathDialog aPathDlg( this, WB_OPEN | WB_3DLOOK ); + + aPathDlg.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Zielpfad BMP-Dateien" ) ) ); + if ( aPathDlg.Execute() == RET_OK ) + aEdtOut.SetText( aPathDlg.GetPath() ); + + return 0L; +} + +// ---------- +// - BmpWin - +// ---------- + +BmpWin::BmpWin(Window* pParent, WinBits aWinStyle) : + WorkWindow ( pParent, aWinStyle ), + aLB ( this, WB_HSCROLL | WB_VSCROLL ), + nPos ( 0 ) +{ + SetText( String( RTL_CONSTASCII_USTRINGPARAM( "SVX - BmpMaker" ) ) ); + aLB.SetUpdateMode( TRUE ); + aLB.Show(); +} + +// ----------------------------------------------------------------------- + +void BmpWin::StartCreation( const String& rSRSName, const String& rInName, + const String& rOutName, const LangInfo& rLang ) +{ + DirEntry aFileName( rSRSName ); + DirEntry aInDir( rInName ); + DirEntry aOutDir( rOutName ); + BOOL bDone = FALSE; + + aFileName.ToAbs(); + aInDir.ToAbs(); + aOutDir.ToAbs(); + + pSRS = new SvFileStream ( aFileName.GetFull(), STREAM_STD_READ ); + + if( pSRS->GetError() ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Kein SRS file!" ) ), EXIT_NOSRSFILE ); + else + { + String aText; + ByteString aByteText; + BOOL bLangDep = FALSE; + + do + { + do + { + if (!pSRS->ReadLine(aByteText)) + break; + } + while ( aByteText.Search( "ImageList" ) == STRING_NOTFOUND ); + + do + { + if (!pSRS->ReadLine( aByteText ) ) + break; + } + while ( aByteText.Search( "File" ) == STRING_NOTFOUND ); + aText = String::CreateFromAscii( aByteText.GetBuffer() ); + + USHORT nStart = aText.Search('"') + 1; + USHORT nEnd = aText.Search( '"', nStart+1 ); + String aName( aText, nStart, nEnd-nStart ); + String aPrefix( aName, 0, 2 ); + + do + { + if( !bLangDep && + aByteText.Search( "File" ) != STRING_NOTFOUND && + aByteText.Search( '[' ) != STRING_NOTFOUND && + aByteText.Search( ']' ) != STRING_NOTFOUND ) + { + bLangDep = TRUE; + } + + if (!pSRS->ReadLine(aByteText)) + break; + } + while (aByteText.Search( "IdList" ) == STRING_NOTFOUND ); + aText = String::CreateFromAscii( aByteText.GetBuffer() ); + + // if image list is not language dependent, + // don't do anything for languages except german + if( aText.Len() ) + { + bDone = TRUE; + DoIt( *pSRS, aInDir, aOutDir, aPrefix, aName, rLang ); + } + else if( ( rLang.mnLangNum != 49 ) && !bLangDep ) + { + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "INFO: ImageList is not language dependent! Nothing to do for this language." ) ) ); + bDone = TRUE; + } + } + while ( aText.Len() ); + } + + if( !bDone ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: No ImageList found in SRS file!" ) ), EXIT_NOIMGLIST ); + + delete pSRS; +} + +// ----------------------------------------------------------------------- + +void BmpWin::DoIt( SvStream& rStm, DirEntry& rIn, DirEntry& rOut, String& rPrefix, + String& rName, const LangInfo& rLang ) +{ + String aResPath; + const char* pResPath = getenv( "SOLARSRC" ); + + if( pResPath ) + { + String aString( String::CreateFromAscii( ByteString( pResPath ).GetBuffer() ) ); + aResPath = ( DirEntry( aString ) += DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "res" ) ) ) ).GetFull(); + } + else + { + aResPath.Assign( String( RTL_CONSTASCII_USTRINGPARAM( "o:\\" ) ) ); + aResPath.Append( String::CreateFromInt32( SOLARUPD ) ); + aResPath.Append( String( RTL_CONSTASCII_USTRINGPARAM( "\\res" ) ) ); + } + + SvFileStream aOutStream; + Bitmap aTotalBmp; + Bitmap aBmp; + Size aSize; + String aText; + String aString; + String aName( rName ); + String aFileName; + ULONG nSRSPos; + long nBmpPos = 0L; + USHORT nId; + USHORT nN = 1; + DirEntry aInPath( rIn + DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "x.bmp" ) ) ) ); + DirEntry aOutFile( rOut ); + DirEntry SolarPath1( aResPath ); + DirEntry SolarPath2( aResPath ); + String aDefaultName( rPrefix ); aDefaultName.Append( String( RTL_CONSTASCII_USTRINGPARAM( "00000.bmp" ) ) ); + BOOL bInserted = FALSE; + BOOL bFirst = TRUE; + + // Falls nicht deutsch, noch die Vorwahlnummer hintenran + if( rLang.mnLangNum != 49 ) + { + String aNumStr( String::CreateFromInt32( rLang.mnLangNum ) ); + + if( aNumStr.Len() == 1 ) + aNumStr.Insert( '0', 0 ); + + aName = DirEntry( aName ).GetBase(); + aName += aNumStr; + aName += String( RTL_CONSTASCII_USTRINGPARAM( ".bmp" ) ); + SolarPath1 += rLang.maLangDir; + } + + aOutFile += DirEntry( aName ); + + // Die Namen werden spaeter ersetzt + SolarPath1 += DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "x.bmp" ) ) ); + SolarPath2 += DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "x.bmp" ) ) ); + + // Anzahl der Bitmaps bestimmen + for ( nTotCount = 0UL, nSRSPos = pSRS->Tell(); aText.Search( '}' ) == STRING_NOTFOUND; ) + { + ByteString aTmp; + + if ( !pSRS->ReadLine( aTmp ) ) + break; + + aText.Assign( String::CreateFromAscii( aTmp.GetBuffer() ) ); + aText.EraseLeadingChars( ' ' ); + aText.EraseLeadingChars( '\t' ); + aText.EraseAllChars( ';' ); + + if ( ByteString( aText, RTL_TEXTENCODING_UTF8 ).IsNumericAscii() ) + nTotCount++; + } + + if( !nTotCount ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "WARNING: No imagelist resource found: " ) ).Append( aString ), EXIT_MISSING_RESOURCE ); + + // Wieder an Anfang und los gehts + aText = String(); + pSRS->Seek( nSRSPos ); + + // write info + String aInfo( RTL_CONSTASCII_USTRINGPARAM( "CREATING ImageList for language: " ) ); + aInfo += rLang.maLangDir; + aInfo += String( RTL_CONSTASCII_USTRINGPARAM( " [ " ) ); + aInfo += aInPath.GetPath().GetFull(); + aInfo += String( RTL_CONSTASCII_USTRINGPARAM( "; " ) ); + aInfo += SolarPath1.GetPath().GetFull(); + if( SolarPath2 != SolarPath1 ) + { + aInfo += String( RTL_CONSTASCII_USTRINGPARAM( "; " ) ); + aInfo += SolarPath2.GetPath().GetFull(); + } + aInfo += String( RTL_CONSTASCII_USTRINGPARAM( " ]" ) ); + WriteInfo( aInfo ); + + for ( ; aText.Search( '}' ) == STRING_NOTFOUND; ) + { + ByteString aTmp; + + if ( !pSRS->ReadLine( aTmp ) ) + break; + + aText.Assign( String::CreateFromAscii( aTmp.GetBuffer() ) ); + aText.EraseLeadingChars( ' ' ); + aText.EraseLeadingChars( '\t' ); + aText.EraseAllChars( ';' ); + + aTmp = ByteString( aText, RTL_TEXTENCODING_UTF8 ); + + if( aTmp.IsNumericAscii() ) + { + nId = atoi( aTmp.GetBuffer() ); + + if ( nId < 10000 ) + { + const String aTmp( aText ); + + aText.Assign( String::CreateFromInt32( 0 ) ); + aText.Append( aTmp ); + } + + aString.Assign( rPrefix ); + aString.Append( aText ); + aString.Append( String( RTL_CONSTASCII_USTRINGPARAM( ".bmp" ) ) ); + aInPath.SetName( aString ); + } + else + continue; + + if( !FILETEST( aInPath ) ) + { + // Falls nicht deutsch, suchen wir zuerst im jeweiligen Sprach-Unterverz. + if( rLang.mnLangNum != 49 ) + { + SolarPath1.SetName( aString ); + + if ( !FILETEST( SolarPath1 ) ) + { + SolarPath2.SetName( aString ); + + if( !FILETEST( SolarPath2 ) ) + aBmp = Bitmap(); + else + { + SvFileStream aIStm( aFileName = SolarPath2.GetFull(), STREAM_READ ); + aIStm >> aBmp; + } + } + else + { + SvFileStream aIStm( aFileName = SolarPath1.GetFull(), STREAM_READ ); + aIStm >> aBmp; + } + } + else + { + SolarPath2.SetName( aString ); + + if( !FILETEST( SolarPath2 ) ) + aBmp = Bitmap(); + else + { + SvFileStream aIStm( aFileName = SolarPath2.GetFull(), STREAM_READ ); + aIStm >> aBmp; + } + } + } + else + { + SvFileStream aIStm( aFileName = aInPath.GetFull(), STREAM_READ ); + aIStm >> aBmp; + } + + aSize = aBmp.GetSizePixel(); + + // falls Bitmap defekt ist, malen wir ein rotes Kreuz + if( !aSize.Width() || !aSize.Height() ) + { + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "WARNING: Bitmap is missing: " ) ).Append( aString ), EXIT_MISSING_BITMAP ); + + aSize = aOneSize; + + if( aSize.Width() && aSize.Height() ) + { + aBmp = Bitmap( aSize, !!aTotalBmp ? aTotalBmp.GetBitCount() : 4 ); + aBmp.Erase( COL_WHITE ); + + BitmapWriteAccess* pAcc = aBmp.AcquireWriteAccess(); + + if( pAcc ) + { + Point aPoint; + const Rectangle aRect( aPoint, aOneSize ); + + pAcc->SetLineColor( Color( COL_LIGHTRED ) ); + pAcc->DrawRect( aRect ); + pAcc->DrawLine( aRect.TopLeft(), aRect.BottomRight() ); + pAcc->DrawLine( aRect.TopRight(), aRect.BottomLeft() ); + aBmp.ReleaseAccess( pAcc ); + } + } + } + + // Beim ersten Mal Zugriffs-Bitmap mit der + // richtigen Groesse, 4Bit und der Standardpalette anlegen + if( bFirst && aSize.Width() && aSize.Height() ) + { + aTotSize = aOneSize = aSize; + aTotSize.Width() *= nTotCount; + aTotalBmp = Bitmap( aTotSize, 4 ); + bFirst = FALSE; + } + + if( ( aSize.Width() > aOneSize.Width() ) || ( aSize.Height() > aOneSize.Height() ) ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Different dimensions in file: " ) ).Append( aString ), EXIT_DIMENSIONERROR ); + else if( aBmp.GetBitCount() != aTotalBmp.GetBitCount() ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Different color depth in file: ") ).Append( aString ), EXIT_COLORDEPTHERROR ); + else + { + const Rectangle aDst( Point( nBmpPos * aOneSize.Width(), 0L ), aSize ); + Point aPoint; + const Rectangle aSrc( aPoint, aSize ); + + if( !!aTotalBmp && !!aBmp && !aDst.IsEmpty() && !aSrc.IsEmpty() ) + aTotalBmp.CopyPixel( aDst, aSrc, &aBmp ); + } + + nBmpPos++; + + GetpApp()->Reschedule(); + } + + if ( !!aTotalBmp && aTotSize.Width() && aTotSize.Height() ) + { + const String aFile( aOutFile.GetFull() ); + + aOutStream.Open( aFile, STREAM_WRITE | STREAM_TRUNC ); + + if( !aOutStream.IsOpen() ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Could not open output file: " ) ).Append( aFile ), EXIT_IOERROR ); + else + { + aOutStream << aTotalBmp; + + if( aOutStream.GetError() ) + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Could not write to output file: " ) ).Append( aFile ), EXIT_IOERROR ); + else + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "Successfully generated ImageList " ) ).Append( aFile ) ); + + aOutStream.Close(); + } + } + else + WriteInfo( String( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Could not generate " ) ).Append( aOutFile.GetFull() ), EXIT_COMMONERROR ); + + WriteInfo( ' ' ); +} + +// ----------------------------------------------------------------------- + +void BmpWin::Resize() +{ + aLB.SetPosSizePixel( Point(), GetOutputSizePixel() ); +} + +// ----------------------------------------------------------------------- + +void BmpWin::WriteInfo( const String& rText, BYTE cExitCode ) +{ + aLB.InsertEntry( rText, nPos ); + aLB.SelectEntryPos( nPos++ ); + + if( EXIT_NOERROR != cExitCode ) + aBmpApp.SetExitCode( cExitCode ); + +#ifdef UNX + ByteString aText( rText, RTL_TEXTENCODING_UTF8 ); + aText.Append( "\r\n" ); + fprintf( stderr, aText.GetBuffer() ); +#else + FILE* fp = fopen( "bmp.err", "a+" ); + + if( fp ) + { + ByteString aText( rText, RTL_TEXTENCODING_UTF8 ); + aText.Append( "\n" ); + fprintf( fp, aText.GetBuffer() ); + fclose(fp); + } +#endif + +/* +#ifdef WNT + if( AllocConsole() ) + { + HANDLE hHdl = GetStdHandle( STD_OUTPUT_HANDLE ); + + if( hHdl ) + { + CONSOLE_SCREEN_BUFFER_INFO aInfo; + + if( GetConsoleScreenBufferInfo( hHdl, &aInfo ) ) + { + long nTest = 0; + } + } + } +#endif +*/ +} + +// ----------------------------------------------------------------------- + +void BmpWin::ClearInfo() +{ + aLB.Clear(); + Invalidate(); + nPos = 0; +} + + diff --git a/svtools/bmpmaker/bmp.hrc b/svtools/bmpmaker/bmp.hrc new file mode 100644 index 000000000000..55dd3c35b43f --- /dev/null +++ b/svtools/bmpmaker/bmp.hrc @@ -0,0 +1,78 @@ +/************************************************************************* + * + * $RCSfile: bmp.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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_PATH 256 + +#define GRP_PATH 1 +#define FT_SRS 1 +#define FT_RES 2 +#define FT_OUT 3 +#define EDT_SRS 1 +#define EDT_RES 2 +#define EDT_OUT 3 +#define BTN_SRS 1 +#define BTN_RES 2 +#define BTN_OUT 3 +#define BTN_OK 1 +#define BTN_CANCEL 1 + +#define GRP_LANG 2 +#define LB_LANG 1 diff --git a/svtools/bmpmaker/bmp.src b/svtools/bmpmaker/bmp.src new file mode 100644 index 000000000000..4763c3c6fe91 --- /dev/null +++ b/svtools/bmpmaker/bmp.src @@ -0,0 +1,150 @@ +/************************************************************************* + * + * $RCSfile: bmp.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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 "bmp.hrc" +ModalDialog DLG_PATH { + OutputSize = TRUE; + SVLook = TRUE; + Size = MAP_APPFONT( 301, 104 ); + Text = "Pfad-Einstellungen"; + Moveable = TRUE; + Closeable = TRUE; + GroupBox GRP_PATH { + Pos = MAP_APPFONT( 6, 3 ); + Size = MAP_APPFONT( 243, 59 ); + Text = "Pfade"; + }; + FixedText FT_SRS { + Pos = MAP_APPFONT( 12, 16 ); + Size = MAP_APPFONT( 50, 10 ); + Text = "SRS-Datei (inkl.Pfad):"; + }; + FixedText FT_OUT { + Pos = MAP_APPFONT( 12, 46 ); + Size = MAP_APPFONT( 50, 10 ); + Text = "Ausgabe-Pfad:"; + }; + FixedText FT_RES { + Pos = MAP_APPFONT( 12, 31 ); + Size = MAP_APPFONT( 50, 10 ); + Text = "Bitmap-Pfad:"; + }; + Edit EDT_SRS { + Border = TRUE; + Pos = MAP_APPFONT( 65, 14 ); + Size = MAP_APPFONT( 160, 12 ); + TabStop = TRUE; + }; + Edit EDT_RES { + Border = TRUE; + Pos = MAP_APPFONT( 65, 29 ); + Size = MAP_APPFONT( 160, 12 ); + TabStop = TRUE; + }; + Edit EDT_OUT { + Border = TRUE; + Pos = MAP_APPFONT( 65, 44 ); + Size = MAP_APPFONT( 160, 12 ); + TabStop = TRUE; + }; + PushButton BTN_SRS { + Pos = MAP_APPFONT( 228, 14 ); + Size = MAP_APPFONT( 15, 12 ); + Text = "..."; + TabStop = TRUE; + }; + PushButton BTN_RES { + Pos = MAP_APPFONT( 228, 29 ); + Size = MAP_APPFONT( 15, 12 ); + Text = "..."; + TabStop = TRUE; + }; + PushButton BTN_OUT { + Pos = MAP_APPFONT( 228, 44 ); + Size = MAP_APPFONT( 15, 12 ); + Text = "..."; + TabStop = TRUE; + }; + OKButton BTN_OK { + Pos = MAP_APPFONT( 255, 6 ); + Size = MAP_APPFONT( 40, 12 ); + TabStop = TRUE; + DefButton = TRUE; + }; + CancelButton BTN_CANCEL { + Pos = MAP_APPFONT( 255, 21 ); + Size = MAP_APPFONT( 40, 12 ); + TabStop = TRUE; + }; + GroupBox GRP_LANG { + Pos = MAP_APPFONT( 6, 65 ); + Size = MAP_APPFONT( 243, 33 ); + Text = "Sprache"; + }; + ListBox LB_LANG { + Border = TRUE; + Pos = MAP_APPFONT( 12, 76 ); + Size = MAP_APPFONT( 231, 70 ); + TabStop = TRUE; + DropDown = TRUE; + VScroll = TRUE; + }; +}; diff --git a/svtools/bmpmaker/makefile.mk b/svtools/bmpmaker/makefile.mk new file mode 100644 index 000000000000..68db191f561b --- /dev/null +++ b/svtools/bmpmaker/makefile.mk @@ -0,0 +1,135 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ +# +# 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=bmpmaker +TARGET=bmp +LIBTARGET=NO + +# --- Settings ----------------------------------------------------- + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# --- Files -------------------------------------------------------- + +OBJFILES= $(OBJ)$/bmp.obj + +SRC1FILES= bmp.src +SRS1NAME=bmp +RES1TARGET=bmp +SRS1FILES=$(SRS)$/bmp.srs + +APP1TARGET= $(TARGET) + +.IF "$(GUI)" == "MAC" +MACRES= $(SV_RES)MPWToolCfrg.r -d SVTOOLNAME="¶"SV TOOL¶"" +.ENDIF + +APP1STDLIBS = \ + $(SVLIB) \ + $(TOOLSLIB) \ + $(VOSLIB) \ + $(SALLIB) + +.IF "$(COM)"=="GCC" || "$(GUI)"=="WNT" +APP1STDLIBS+=$(CPPULIB) +.ENDIF + +APP1DEPN= $(L)$/itools.lib $(SVLIBDEPEND) +APP1OBJS= $(OBJFILES) + +APP1BASE=0x10000000 + +.IF "$(GUI)"!="UNX" +APP1STDLIBS+= svtool.lib +.ELSE +APP1STDLIBS+= -lsvt$(UPD)$(DLLSUFFIX) +APP1STDLIBS+= -lsvl$(UPD)$(DLLSUFFIX) +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + +# ------------------------------------------------------------------ +# OS2 +# ------------------------------------------------------------------ + +.IF "$(GUI)" == "OS2" + +$(MISC)$/$(TARGET).def: + echo NAME $(TARGET) WINDOWAPI >$@ + echo DESCRIPTION 'BMP' >>$@ +.IF "$(COM)" != "BLC" + echo STUB 'os2STUB.EXE' >>$@ +.ENDIF + echo EXETYPE OS2 >>$@ + echo PROTMODE >>$@ + echo CODE PRELOAD >>$@ + echo DATA PRELOAD MULTIPLE >>$@ + echo HEAPSIZE 8192 >>$@ + echo STACKSIZE 32768 >>$@ + +.ENDIF diff --git a/svtools/inc/adrparse.hxx b/svtools/inc/adrparse.hxx new file mode 100644 index 000000000000..8417009b08c7 --- /dev/null +++ b/svtools/inc/adrparse.hxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * $RCSfile: adrparse.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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 _ADRPARSE_HXX +#define _ADRPARSE_HXX + +#ifndef _LIST_HXX +#include <tools/list.hxx> +#endif +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif + +//============================================================================ +struct SvAddressEntry_Impl +{ + UniString m_aAddrSpec; + UniString m_aRealName; + + SvAddressEntry_Impl() {}; + SvAddressEntry_Impl(UniString const & rTheAddrSpec, + UniString const & rTheRealName): + m_aAddrSpec(rTheAddrSpec), m_aRealName(rTheRealName) {} +}; + +//============================================================================ +DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl *); + +//============================================================================ +class SvAddressParser +{ + friend class SvAddressParser_Impl; + + SvAddressEntry_Impl m_aFirst; + SvAddressList_Impl m_aRest; + bool m_bHasFirst; + +public: + SvAddressParser(UniString const & rInput); + + ~SvAddressParser(); + + sal_Int32 Count() const { return m_bHasFirst ? m_aRest.Count() + 1 : 0; } + + inline UniString const & GetEmailAddress(sal_Int32 nIndex) const; + + inline UniString const &GetRealName(sal_Int32 nIndex) const; + + /** Create an RFC 822 <mailbox> (i.e., 'e-mail address'). + + @param rPhrase Either an empty string (the <mailbox> will have no + <phrase> an will be of the form <addr-spec>), or some text that will + become the <phrase> part of a <phrase route-addr> form <mailbox>. Non + US-ASCII characters within the text are put into a <qouted-string> + verbatim, so the result may actually not be a valid RFC 822 <mailbox>, + but a more human-readable representation. + + @param rAddrSpec A valid RFC 822 <addr-spec>. (An RFC 822 <mailbox> + including a <route> cannot be created by this method.) + + @param rMailbox If this method returns true, this parameter returns + the created RFC 822 <mailbox> (rather, a more human-readable + representation thereof). Otherwise, this parameter is not modified. + + @return True, if rAddrSpec is a valid RFC 822 <addr-spec>. + */ + static bool createRFC822Mailbox(String const & rPhrase, + String const & rAddrSpec, + String & rMailbox); +}; + +inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex) + const +{ + return nIndex == 0 ? m_aFirst.m_aAddrSpec : + m_aRest.GetObject(nIndex - 1)->m_aAddrSpec; +} + +inline UniString const & SvAddressParser::GetRealName(sal_Int32 nIndex) const +{ + return nIndex == 0 ? m_aFirst.m_aRealName : + m_aRest.GetObject(nIndex - 1)->m_aRealName; +} + +#endif // _ADRPARSE_HXX + diff --git a/svtools/inc/calendar.hxx b/svtools/inc/calendar.hxx new file mode 100644 index 000000000000..08fce282b501 --- /dev/null +++ b/svtools/inc/calendar.hxx @@ -0,0 +1,521 @@ +/************************************************************************* + * + * $RCSfile: calendar.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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 _CALENDAR_HXX +#define _CALENDAR_HXX + +#ifndef _INTN_HXX +#include <tools/intn.hxx> +#endif +#ifndef _CTRL_HXX +#include <vcl/ctrl.hxx> +#endif +#ifndef _TIMER_HXX +#include <vcl/timer.hxx> +#endif +#ifndef _FIELD_HXX +#include <vcl/field.hxx> +#endif + +class Table; +class MouseEvent; +class TrackingEvent; +class KeyEvent; +class HelpEvent; +class DataChangedEvent; +class FloatingWindow; +class PushButton; +struct ImplDateInfo; +class ImplDateTable; +class ImplCFieldFloatWin; + +/************************************************************************* + +Beschreibung +============ + +class Calendar + +Diese Klasse erlaubt die Auswahl eines Datum. Der Datumsbereich der +angezeigt wird, ist der, der durch die Klasse Date vorgegeben ist. +Es werden soviele Monate angezeigt, wie die Ausgabeflaeche des +Controls vorgibt. Der Anwender kann zwischen den Monaten ueber ein +ContextMenu (Bei Click auf den Monatstitel) oder durch 2 ScrollButtons +zwischen den Monaten wechseln. + +-------------------------------------------------------------------------- + +WinBits + +WB_BORDER Um das Fenster wird ein Border gezeichnet. +WB_TABSTOP Tastatursteuerung ist moeglich. Der Focus wird + sich geholt, wenn mit der Maus in das + Control geklickt wird. +WB_QUICKHELPSHOWSDATEINFO DateInfo auch bei QuickInfo als BalloonHelp zeigen +WB_BOLDTEXT Formatiert wird nach fetten Texten und + DIB_BOLD wird bei AddDateInfo() ausgewertet +WB_FRAMEINFO Formatiert wird so, das Frame-Info angezeigt + werden kann und die FrameColor bei AddDateInfo() + ausgewertet wird +WB_RANGESELECT Es koennen mehrere Tage selektiert werden, die + jedoch alle zusammenhaengend sein muessen +WB_MULTISELECT Es koennen mehrere Tage selektiert werden +WB_WEEKNUMBER Es werden die Wochentage mit angezeigt + +-------------------------------------------------------------------------- + +Mit SetCurDate() / GetCurDate() wird das ausgewaehlte Datum gesetzt und +abgefragt. Wenn der Anwnder ein Datum selektiert hat, wird Select() +gerufen. Bei einem Doppelklick auf ein Datum wird DoubleClick() gerufen. + +-------------------------------------------------------------------------- + +Mit CalcWindowSizePixel() kann die Groesse des Fensters in Pixel fuer +die Darstellung einer bestimmte Anzahl von Monaten berechnet werden. + +-------------------------------------------------------------------------- + +Mit SetSaturdayColor() kann eine spezielle Farbe fuer Sonnabende gesetzt +werden und mit SetSundayColor() eine fuer Sonntage. Mit AddDateInfo() +koennen Tage speziell gekennzeichnet werden. Dabei kann man einem +einzelnen Datum eine andere Farbe geben (zum Beispiel fuer Feiertage) +oder diese Umranden (zum Beispiel fuer Termine). Wenn beim Datum +kein Jahr angegeben wird, wird der Tag in jedem Jahr benutzt. Mit +AddDateInfo() kann auch jedem Datum ein Text mitgegeben werden, der +dann angezeigt wird, wenn Balloon-Hilfe an ist. Um nicht alle Jahre +mit entsprechenden Daten zu versorgen, wird der RequestDateInfo()- +Handler gerufen, wenn ein neues Jahr angezeigt wird. Es kann dann +im Handler mit GetRequestYear() das Jahr abgefragt werden. + +-------------------------------------------------------------------------- + +Um ein ContextMenu zu einem Datum anzuzeigen, muss man den Command-Handler +ueberlagern. Mit GetDate() kann zur Mouse-Position das Datum ermittelt +werden. Bei Tastaturausloesung sollte das aktuelle Datum genommen werden. +Wenn ein ContextMenu angezeigt wird, darf der Handler der Basisklasse nicht +gerufen werden. + +-------------------------------------------------------------------------- + +Bei Mehrfachselektion WB_RANGESELECT oder WB_MULTISELECT kann mit +SelectDate()/SelectDateRange() Datumsbereiche selektiert/deselektiert +werden. SelectDateRange() gilt inkl. EndDatum. Mit SetNoSelection() kann +alles deselektiert werden. SetCurDate() selektiert bei Mehrfachselektion +jedoch nicht das Datum mit, sondern gibt nur das Focus-Rechteck vor. + +Den selektierten Bereich kann man mit GetSelectDateCount()/GetSelectDate() +abgefragt werden oder der Status von einem Datum kann mit IsDateSelected() +abgefragt werden. + +Waehrend der Anwender am selektieren ist, wird der SelectionChanging()- +Handler gerufen. In diesem kann der selektierte Bereich angepasst werden, +wenn man beispielsweise den Bereich eingrenzen oder erweitern will. Der +Bereich wird mit SelectDate()/SelectDateRange() umgesetzt und mit +GetSelectDateCount()/GetSelectDate() abgefragt. Wenn man wissen moechte, +in welche Richtung selektiert wird, kann dies ueber IsSelectLeft() +abgefragt werden. TRUE bedeutet eine Selektion nach links oder oben, +FALSE eine Selektion nach rechts oder unten. + +-------------------------------------------------------------------------- + +Wenn sich der Date-Range-Bereich anpasst und man dort die Selektion +uebernehmen will, sollte dies nur gemacht werden, wenn +IsScrollDateRangeChanged() TRUE zurueckliefert. Denn diese Methode liefert +TRUE zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons +ausgeloest wurde. Bei FALSE wurde dies durch Resize(), Methoden-Aufrufen +oder durch Beendigung einer Selektion ausgeloest. + +*************************************************************************/ + +// ------------------ +// - Calendar-Types - +// ------------------ + +#define WB_QUICKHELPSHOWSDATEINFO ((WinBits)0x00004000) +#define WB_BOLDTEXT ((WinBits)0x00008000) +#define WB_FRAMEINFO ((WinBits)0x00010000) +#define WB_WEEKNUMBER ((WinBits)0x00020000) +// Muss mit den WinBits beim TabBar uebereinstimmen oder mal +// nach \vcl\inc\wintypes.hxx verlagert werden +#ifndef WB_RANGESELECT +#define WB_RANGESELECT ((WinBits)0x00200000) +#endif +#ifndef WB_MULTISELECT +#define WB_MULTISELECT ((WinBits)0x00400000) +#endif + +#define DIB_BOLD ((USHORT)0x0001) + +// ------------ +// - Calendar - +// ------------ + +class Calendar : public Control +{ +private: + ImplDateTable* mpDateTable; + Table* mpSelectTable; + Table* mpOldSelectTable; + Table* mpRestoreSelectTable; + XubString* mpDayText[31]; + XubString maDayText; + XubString maWeekText; + International maIntn; + Rectangle maPrevRect; + Rectangle maNextRect; + String maDayOfWeekText; + long mnDayOfWeekAry[7]; + Date maOldFormatFirstDate; + Date maOldFormatLastDate; + Date maFirstDate; + Date maOldFirstDate; + Date maCurDate; + Date maOldCurDate; + Date maAnchorDate; + Date maDropDate; + Color maSelColor; + Color maOtherColor; + Color* mpStandardColor; + Color* mpSaturdayColor; + Color* mpSundayColor; + ULONG mnDayCount; + long mnDaysOffX; + long mnWeekDayOffY; + long mnDaysOffY; + long mnMonthHeight; + long mnMonthWidth; + long mnMonthPerLine; + long mnLines; + long mnDayWidth; + long mnDayHeight; + long mnWeekWidth; + long mnDummy2; + long mnDummy3; + long mnDummy4; + WinBits mnWinStyle; + USHORT mnFirstYear; + USHORT mnLastYear; + USHORT mnRequestYear; + BOOL mbCalc:1, + mbFormat:1, + mbDrag:1, + mbSelection:1, + mbMultiSelection:1, + mbWeekSel:1, + mbUnSel:1, + mbMenuDown:1, + mbSpinDown:1, + mbPrevIn:1, + mbNextIn:1, + mbDirect:1, + mbInSelChange:1, + mbTravelSelect:1, + mbScrollDateRange:1, + mbSelLeft:1, + mbAllSel:1, + mbDropPos:1; + Link maSelectionChangingHdl; + Link maDateRangeChangedHdl; + Link maRequestDateInfoHdl; + Link maDoubleClickHdl; + Link maSelectHdl; + Timer maDragScrollTimer; + USHORT mnDragScrollHitTest; + +#ifdef _SV_CALENDAR_CXX + void ImplInit( WinBits nWinStyle ); + void ImplInitSettings(); + void ImplGetWeekFont( Font& rFont ) const; + void ImplFormat(); + USHORT ImplHitTest( const Point& rPos, Date& rDate ) const; + void ImplDrawSpin( BOOL bDrawPrev = TRUE, BOOL bDrawNext = TRUE ); + void ImplDrawDate( long nX, long nY, + USHORT nDay, USHORT nMonth, USHORT nYear, + DayOfWeek eDayOfWeek, + BOOL bBack = TRUE, BOOL bOther = FALSE, + ULONG nToday = 0 ); + void ImplDraw( BOOL bPaint = FALSE ); + void ImplUpdateDate( const Date& rDate ); + void ImplUpdateSelection( Table* pOld ); + void ImplMouseSelect( const Date& rDate, USHORT nHitTest, + BOOL bMove, BOOL bExpand, BOOL bExtended ); + void ImplUpdate( BOOL bCalcNew = FALSE ); + void ImplScroll( BOOL bPrev ); + void ImplInvertDropPos(); + void ImplShowMenu( const Point& rPos, const Date& rDate ); + void ImplTracking( const Point& rPos, BOOL bRepeat ); + void ImplEndTracking( const Point& rPos, BOOL bCancel ); +#endif + +protected: + BOOL ShowDropPos( const Point& rPos, Date& rDate ); + void HideDropPos(); + + DECL_STATIC_LINK( Calendar, ScrollHdl, Timer *); + +public: + Calendar( Window* pParent, WinBits nWinStyle = 0 ); + Calendar( Window* pParent, const ResId& rResId ); + ~Calendar(); + + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void Command( const CommandEvent& rCEvt ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + virtual void SelectionChanging(); + virtual void DateRangeChanged(); + virtual void RequestDateInfo(); + virtual void DoubleClick(); + virtual void Select(); + + void SetInternational( const International& rIntn ); + const International& GetInternational() const { return maIntn; } + + void SelectDate( const Date& rDate, BOOL bSelect = TRUE ); + void SelectDateRange( const Date& rStartDate, const Date& rEndDate, + BOOL bSelect = TRUE ); + void SetNoSelection(); + BOOL IsDateSelected( const Date& rDate ) const; + ULONG GetSelectDateCount() const; + Date GetSelectDate( ULONG nIndex = 0 ) const; + void EnableCallEverySelect( BOOL bEvery = TRUE ) { mbAllSel = bEvery; } + BOOL IsCallEverySelectEnabled() const { return mbAllSel; } + + USHORT GetRequestYear() const { return mnRequestYear; } + void SetCurDate( const Date& rNewDate ); + Date GetCurDate() const { return maCurDate; } + void SetFirstDate( const Date& rNewFirstDate ); + Date GetFirstDate() const { return maFirstDate; } + Date GetLastDate() const { return maFirstDate+mnDayCount; } + ULONG GetDayCount() const { return mnDayCount; } + Date GetFirstMonth() const; + Date GetLastMonth() const; + USHORT GetMonthCount() const; + BOOL GetDate( const Point& rPos, Date& rDate ) const; + Rectangle GetDateRect( const Date& rDate ) const; + BOOL GetDropDate( Date& rDate ) const; + + long GetCurMonthPerLine() const { return mnMonthPerLine; } + long GetCurLines() const { return mnLines; } + + void SetStandardColor( const Color& rColor ); + const Color& GetStandardColor() const; + void SetSaturdayColor( const Color& rColor ); + const Color& GetSaturdayColor() const; + void SetSundayColor( const Color& rColor ); + const Color& GetSundayColor() const; + + void AddDateInfo( const Date& rDate, const XubString& rText, + const Color* pTextColor = NULL, + const Color* pFrameColor = NULL, + USHORT nFlags = 0 ); + void RemoveDateInfo( const Date& rDate ); + void ClearDateInfo(); + XubString GetDateInfoText( const Date& rDate ); + + void StartSelection(); + void EndSelection(); + + BOOL IsTravelSelect() const { return mbTravelSelect; } + BOOL IsScrollDateRangeChanged() const { return mbScrollDateRange; } + BOOL IsSelectLeft() const { return mbSelLeft; } + + Size CalcWindowSizePixel( long nCalcMonthPerLine = 1, + long nCalcLines = 1 ) const; + + void SetSelectionChangingHdl( const Link& rLink ) { maSelectionChangingHdl = rLink; } + const Link& GetSelectionChangingHdl() const { return maSelectionChangingHdl; } + void SetDateRangeChangedHdl( const Link& rLink ) { maDateRangeChangedHdl = rLink; } + const Link& GetDateRangeChangedHdl() const { return maDateRangeChangedHdl; } + void SetRequestDateInfoHdl( const Link& rLink ) { maRequestDateInfoHdl = rLink; } + const Link& GetRequestDateInfoHdl() const { return maRequestDateInfoHdl; } + void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } + const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } +}; + +inline const Color& Calendar::GetStandardColor() const +{ + if ( mpStandardColor ) + return *mpStandardColor; + else + return GetFont().GetColor(); +} + +inline const Color& Calendar::GetSaturdayColor() const +{ + if ( mpSaturdayColor ) + return *mpSaturdayColor; + else + return GetFont().GetColor(); +} + +inline const Color& Calendar::GetSundayColor() const +{ + if ( mpSundayColor ) + return *mpSundayColor; + else + return GetFont().GetColor(); +} + +/************************************************************************* + +Beschreibung +============ + +class CalendarField + +Bei dieser Klasse handelt es sich um ein DateField, wo ueber einen +DropDown-Button ueber das Calendar-Control ein Datum ausgewaehlt werden +kann. + +-------------------------------------------------------------------------- + +WinBits + +Siehe DateField + +Die Vorgaben fuer das CalendarControl koennen ueber SetCalendarStyle() +gesetzt werden. + +-------------------------------------------------------------------------- + +Mit EnableToday()/EnableNone() kann ein Today-Button und ein None-Button +enabled werden. + +-------------------------------------------------------------------------- + +Wenn mit SetCalendarStyle() WB_RANGESELECT gesetzt wird, koennen im +Calendar auch mehrere Tage selektiert werden. Da immer nur das Start-Datum +in das Feld uebernommen wird, sollte dann im Select-Handler mit +GetCalendar() der Calendar abgefragt werden und an dem mit +GetSelectDateCount()/GetSelectDate() der selektierte Bereich abgefragt +werden, um beispielsweise diese dann in ein weiteres Feld zu uebernehmen. + +-------------------------------------------------------------------------- + +Wenn ein abgeleiteter Calendar verwendet werden soll, kann am +CalendarField die Methode CreateCalendar() ueberlagert werden und +dort ein eigener Calendar erzeugt werden. + +*************************************************************************/ + +// ----------------- +// - CalendarField - +// ----------------- + +class CalendarField : public DateField +{ +private: + ImplCFieldFloatWin* mpFloatWin; + Calendar* mpCalendar; + WinBits mnCalendarStyle; + PushButton* mpTodayBtn; + PushButton* mpNoneBtn; + Date maDefaultDate; + BOOL mbToday; + BOOL mbNone; + Link maSelectHdl; + +#ifdef _SV_CALENDAR_CXX + DECL_LINK( ImplSelectHdl, Calendar* ); + DECL_LINK( ImplClickHdl, PushButton* ); + DECL_LINK( ImplPopupModeEndHdl, FloatingWindow* ); +#endif + +public: + CalendarField( Window* pParent, WinBits nWinStyle ); + CalendarField( Window* pParent, const ResId& rResId ); + ~CalendarField(); + + virtual void Select(); + + virtual BOOL ShowDropDown( BOOL bShow ); + virtual Calendar* CreateCalendar( Window* pParent ); + Calendar* GetCalendar(); + + void SetDefaultDate( const Date& rDate ) { maDefaultDate = rDate; } + Date GetDefaultDate() const { return maDefaultDate; } + + void EnableToday( BOOL bToday = TRUE ) { mbToday = bToday; } + BOOL IsTodayEnabled() const { return mbToday; } + void EnableNone( BOOL bNone = TRUE ) { mbNone = bNone; } + BOOL IsNoneEnabled() const { return mbNone; } + + void SetCalendarStyle( WinBits nStyle ) { mnCalendarStyle = nStyle; } + WinBits GetCalendarStyle() const { return mnCalendarStyle; } + + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } +}; + +#endif // _CALENDAR_HXX diff --git a/svtools/inc/cntnrsrt.hxx b/svtools/inc/cntnrsrt.hxx new file mode 100644 index 000000000000..d3cc20bc18dd --- /dev/null +++ b/svtools/inc/cntnrsrt.hxx @@ -0,0 +1,210 @@ +/************************************************************************* + * + * $RCSfile: cntnrsrt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:49 $ + * + * 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 _CNTRSRT_HXX +#define _CNTRSRT_HXX + +#if 0 +*********************************************************************** +* +* Hier folgt die Beschreibung fuer die exportierten Makros: +* +* DECLARE_CONTAINER_SORT( ClassName, Type ) +* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) +* +* Definiert eine von Container abgeleitete Klasse "ClassName", +* in der die Elemente des Typs "Type" sortiert enthalten sind. +* Dazu muss einer Funktion "SortFunc" definiert sein, die als +* Paramter zwei "const Type&" erwartet und 0 zurueckgibt, wenn +* beide gleich sind, -1 wenn der erste Paramter kleiner ist als +* der zweite und +1 wenn der erste Paramter groesser ist als +* der zweite. +* +* Die Zugriffs-Methoden entsprechen in etwa denen der Container- +* Klasse, mit Ausnahme von Insert, DeleteAndDestroy und Seek_Entry, +* der den SV-Pointer-Arrays entsprechen. +* +* DECLARE_CONTAINER_SORT_DEL( ClassName, Type ) +* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) +* +* Wie DECLARE_CONTAINER_SORT, nur dass beim Aufruf des Destruktors +* alle im Conatiner vorhandenen Objekte geloescht werden. +* +#endif + +#ifndef _CONTNR_HXX //autogen +#include <tools/contnr.hxx> +#endif + +#define DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ClassName( const ClassName& ); \ + ClassName& operator =( const ClassName& ); \ +public: \ + Container::Count; \ + \ + ClassName( USHORT nInitSize, USHORT nReSize ) : \ + Container( CONTAINER_MAXBLOCKSIZE, nInitSize, nReSize ) {} \ + \ + BOOL Insert( Type* pObj ); \ + \ + Type *Remove( ULONG nPos ) \ + { return (Type *)Container::Remove( nPos ); } \ + \ + Type *Remove( Type* pObj ); \ + \ + void DeleteAndDestroy( ULONG nPos ) \ + { \ + Type *pObj = Remove( nPos ); \ + if( pObj ) \ + delete pObj; \ + } \ + \ + void DeleteAndDestroy() \ + { while( Count() ) DeleteAndDestroy( 0 ); } \ + \ + Type* GetObject( ULONG nPos ) const \ + { return (Type *)Container::GetObject( nPos ); } \ + \ + Type* operator[]( ULONG nPos ) const \ + { return GetObject(nPos); } \ + \ + BOOL Seek_Entry( const Type *pObj, ULONG* pPos ) const; \ + \ + ULONG GetPos( const Type* pObj ) const; \ + + +#define DECLARE_CONTAINER_SORT( ClassName, Type ) \ +class ClassName : private Container \ +{ \ + DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ~ClassName() {} \ +}; \ + + +#define DECLARE_CONTAINER_SORT_DEL( ClassName, Type ) \ +class ClassName : private Container \ +{ \ + DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ~ClassName() { DeleteAndDestroy(); } \ +}; \ + + +#define IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) \ +BOOL ClassName::Insert( Type *pObj ) \ +{ \ + ULONG nPos; \ + BOOL bExist; \ + if( ! ( bExist = Seek_Entry( pObj, &nPos ) ) ) \ + Container::Insert( pObj, nPos ); \ + return !bExist; \ +} \ + \ +Type *ClassName::Remove( Type* pObj ) \ +{ \ + ULONG nPos; \ + if( Seek_Entry( pObj, &nPos ) ) \ + return Remove( nPos ); \ + else \ + return 0; \ +} \ + \ +ULONG ClassName::GetPos( const Type* pObj ) const \ +{ \ + ULONG nPos; \ + if( Seek_Entry( pObj, &nPos ) ) \ + return nPos; \ + else \ + return CONTAINER_ENTRY_NOTFOUND; \ +} \ + \ +BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \ +{ \ + register ULONG nO = Count(), \ + nM, \ + nU = 0; \ + if( nO > 0 ) \ + { \ + nO--; \ + while( nU <= nO ) \ + { \ + nM = nU + ( nO - nU ) / 2; \ + int nCmp = SortFunc( *GetObject(nM), *pObj ); \ + \ + if( 0 == nCmp ) \ + { \ + if( pPos ) *pPos = nM; \ + return TRUE; \ + } \ + else if( nCmp < 0 ) \ + nU = nM + 1; \ + else if( nM == 0 ) \ + { \ + if( pPos ) *pPos = nU; \ + return FALSE; \ + } \ + else \ + nO = nM - 1; \ + } \ + } \ + if( pPos ) *pPos = nU; \ + return FALSE; \ +} \ + +#endif diff --git a/svtools/inc/cntwids.hrc b/svtools/inc/cntwids.hrc new file mode 100644 index 000000000000..652cc9304367 --- /dev/null +++ b/svtools/inc/cntwids.hrc @@ -0,0 +1,549 @@ +/************************************************************************* + * + * $RCSfile: cntwids.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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): _______________________________________ + * + * + ************************************************************************/ +//========================================================================= +// +// WID-definitions for CHAOS +// +// (C) 1997 StarDivision GmbH, Hamburg, Germany +// $Author: hr $ $Date: 2000-09-18 16:58:50 $ $Revision: 1.1.1.1 $ +// $Logfile: T:/svtools/inc/cntwids.hrv $ $Workfile: CNTWIDS.HRC $ +// +//========================================================================= + +#ifndef _CNTWIDS_HRC +#define _CNTWIDS_HRC + +#ifndef OLD_CHAOS +#define TF_NEW_TABPAGES +#define CNT_COOL_ABO +#endif + +//========================================================================= +// ARGS, MSG, ALL, FOLDER, BOXALL, BOXEXT +//========================================================================= + +#define WID_CHAOS_START 500 + +//FUNC MSG +#define WID_MARK_THREAD_MARKED (499) +#define WID_MARK_THREAD_UNMARKED (498) + +// ARGS +#define WID_DUMMY_ARG1 (WID_CHAOS_START + 0) +#define WID_FACTORY_NO (WID_CHAOS_START + 1) +#define WID_FACTORY_NAME (WID_CHAOS_START + 2) +#define WID_NEWS_XREF (WID_CHAOS_START + 3) +#define WID_CREATION_FLAGS (WID_CHAOS_START + 4) +#define WID_FACTORY_HELP_ID (WID_CHAOS_START + 5) + +//FUNC MSG +#define WID_MSG_START (WID_CHAOS_START + 6) +#define WID_MAIL_REPLY (WID_CHAOS_START + 6) +#define WID_POST_REPLY (WID_CHAOS_START + 7) +#define WID_FORWARD (WID_CHAOS_START + 8) +#define WID_MARK_THREAD_READ (WID_CHAOS_START + 9) +#define WID_HIDE_THREAD (WID_CHAOS_START + 10) +#define WID_HIDE_AUTHOR (WID_CHAOS_START + 11) +#define WID_HIDE_SUBJECT (WID_CHAOS_START + 12) +#define WID_RESEND_MSG (WID_CHAOS_START + 13) +#define WID_MARK_THREAD_UNREAD (WID_CHAOS_START + 14) + +//PROP MSG +#define WID_PRIORITY (WID_CHAOS_START + 15) +#define WID_RULE_APPLIED (WID_CHAOS_START + 16) +#define WID_MSG_LOCK (WID_CHAOS_START + 17) +#define WID_SEEN_STATUS (WID_CHAOS_START + 18) +#define WID_REPLY_TO (WID_CHAOS_START + 19) +#define WID_IN_REPLY_TO (WID_CHAOS_START + 20) + +#define WID_MESSAGE_ID (WID_CHAOS_START + 21) +#define WID_BCC (WID_CHAOS_START + 22) +#define WID_CC (WID_CHAOS_START + 23) +#define WID_TO (WID_CHAOS_START + 24) +#define WID_FROM (WID_CHAOS_START + 25) +#define WID_TITLE (WID_CHAOS_START + 26) +#define WID_SUBJECT WID_TITLE // only here to prevent panic, should be removed +#define WID_MESSAGEBODY (WID_CHAOS_START + 27) + +#define WID_REFERENCES (WID_CHAOS_START + 28) +#define WID_NEWSGROUPS (WID_CHAOS_START + 29) +#define WID_NEWS_XREFLIST (WID_CHAOS_START + 30) + +#define WID_OUTMSGINTERNALSTATE (WID_CHAOS_START + 31) +#define WID_RECIPIENTLIST (WID_CHAOS_START + 32) +#define WID_MSG_END (WID_CHAOS_START + 32) + +//FUNC ALL +#define WID_ALL_START (WID_CHAOS_START + 33) +#define WID_DEFAULT (WID_CHAOS_START + 33) +#define WID_OPEN (WID_CHAOS_START + 34) +#define WID_DELETE (WID_CHAOS_START + 35) +#define WID_CUT (WID_CHAOS_START + 36) +#define WID_COPY (WID_CHAOS_START + 37) +#define WID_PASTE (WID_CHAOS_START + 38) +#define WID_RENAME (WID_CHAOS_START + 39) + +#define WID_HAS_DATA (WID_CHAOS_START + 40) +#define WID_GETDATA (WID_CHAOS_START + 41) +#define WID_PUTDATA (WID_CHAOS_START + 42) + +//PROP ALL +#define WID_INTERIM_URL (WID_CHAOS_START + 43) +#define WID_CONTENT_TYPE (WID_CHAOS_START + 44) + +#define WID_OWN_URL (WID_CHAOS_START + 45) +#define WID_REAL_URL (WID_CHAOS_START + 46) +#define WID_OBSOLETE_TITLE (WID_CHAOS_START + 47) +#define WID_FLAG_READONLY (WID_CHAOS_START + 48) + +#define WID_REFERED_URL (WID_CHAOS_START + 49) +#define WID_REFERER_COUNT (WID_CHAOS_START + 50) +#define WID_FLAG_IS_FOLDER (WID_CHAOS_START + 51) +#define WID_FLAG_HAS_FOLDER (WID_CHAOS_START + 52) +#define WID_FLAG_IS_MESSAGE (WID_CHAOS_START + 53) +#define WID_FLAG_IS_DOCUMENT (WID_FLAG_IS_MESSAGE) +#define WID_FLAG_HAS_MESSAGES (WID_CHAOS_START + 54) + +#define WID_DATE_CREATED (WID_CHAOS_START + 55) +#define WID_DATE_MODIFIED (WID_CHAOS_START + 56) +#define WID_VIEW_DESCRIPTION (WID_CHAOS_START + 57) +#define WID_IS_READ (WID_CHAOS_START + 58) +#define WID_IS_MARKED (WID_CHAOS_START + 59) +#define WID_ALL_END (WID_CHAOS_START + 59) + +//FUNC FOLDER +#define WID_FOLDER_START (WID_CHAOS_START + 60) +#define WID_SYNCHRONIZE (WID_CHAOS_START + 60) +#define WID_CREATE_NEW (WID_CHAOS_START + 61) +#define WID_INSERT (WID_CHAOS_START + 62) +#define WID_UPDATE (WID_CHAOS_START + 63) +#define WID_IMPORT (WID_CHAOS_START + 64) + +//PROP FOLDER VIEW +#define WID_DUMMY_PROPFOLDERVIEW1 (WID_CHAOS_START + 65) +#define WID_THREADING (WID_CHAOS_START + 66) +#define WID_MSG_COLUMN_INFO /* obsolete */ (WID_CHAOS_START + 67) +#define WID_FLD_COLUMN_INFO /* obsolete */ (WID_CHAOS_START + 68) +#define WID_FOLDERVIEW_MODE (WID_CHAOS_START + 69) +#define WID_MESSAGEVIEW_MODE (WID_CHAOS_START + 70) +#define WID_SENTMESSAGEVIEW_MODE (WID_CHAOS_START + 71) +#define WID_SORTING (WID_CHAOS_START + 72) +#define WID_THREADED (WID_CHAOS_START + 73) +#define WID_FILTERED (WID_CHAOS_START + 74) +#define WID_RULES (WID_CHAOS_START + 75) +#define WID_SUBSCRNEWSGROUPCOUNT (WID_CHAOS_START + 76) +#define WID_FLAG_SUBSCRIBED (WID_CHAOS_START + 77) +#define WID_FLAG_SUPPORTMODE (WID_CHAOS_START + 78) + +//PROP FOLDER DIR +#define WID_DUMMY_FOLDERDIR1 (WID_CHAOS_START + 79) +#define WID_TOTALCONTENTCOUNT (WID_CHAOS_START + 80) +#define WID_NEWSGROUPCOUNT /* ??? */ (WID_CHAOS_START + 81) +#define WID_ARTICLECOUNT /* ??? */ (WID_CHAOS_START + 82) +#define WID_KNOWN_RANGES (WID_CHAOS_START + 83) +#define WID_IMAPFOLDERINFO (WID_CHAOS_START + 84) + +//PROP FOLDER USER +#define WID_DUMMY_FOLDERUSER1 (WID_CHAOS_START + 85) +#define WID_SEENCONTENTCOUNT (WID_CHAOS_START + 86) +#define WID_UNREAD_ARTICLECOUNT (WID_SEENCONTENTCOUNT) +#define WID_SENTCONTENTCOUNT (WID_SEENCONTENTCOUNT) +#define WID_READ_RANGES (WID_CHAOS_START + 87) +#define WID_MARK_RANGES (WID_CHAOS_START + 88) +#define WID_FOLDER_END (WID_CHAOS_START + 88) + +//PROP BOXALL +#define WID_BOXALL_START (WID_CHAOS_START + 89) +// Used for d&d of View Storages... +#define WID_PREPARE_MOVE (WID_CHAOS_START + 89) +#define WID_OUTTRAY_WANTED (WID_CHAOS_START + 90) +#define WID_USERNAME (WID_CHAOS_START + 91) +#define WID_PASSWORD (WID_CHAOS_START + 92) +#define WID_SERVERNAME (WID_CHAOS_START + 93) +#define WID_SERVERPORT (WID_CHAOS_START + 94) +// obsolete +#define WID_MAILSEND_USERNAME (WID_CHAOS_START + 95) +#define WID_MAILSEND_PASSWORD (WID_CHAOS_START + 96) +#define WID_MAILSEND_SERVERNAME (WID_CHAOS_START + 97) +#define WID_NEWSSEND_USERNAME (WID_CHAOS_START + 98) +#define WID_NEWSSEND_PASSWORD (WID_CHAOS_START + 99) +#define WID_NEWSSEND_SERVERNAME (WID_CHAOS_START + 100) +// end obsolete +#define WID_SERVERBASE (WID_CHAOS_START + 101) +// not used +#define WID_SMTP_GATEWAY (WID_CHAOS_START + 102) + +// -> ..._DEFAULT +// obsolete +#define WID_FROM_DEFAULT (WID_CHAOS_START + 103) +// obsolete +#define WID_REPLY_TO_DEFAULT (WID_CHAOS_START + 104) + +#define WID_AUTOUPDATE_INTERVAL (WID_CHAOS_START + 105) +#define WID_UPDATE_ENABLED (WID_CHAOS_START + 106) +#define WID_BOXALL_END (WID_CHAOS_START + 106) + +//PROP BOX RNMGR +#define WID_BOXEXT_START (WID_CHAOS_START + 107) +#define WID_CONNECTION_MODE (WID_CHAOS_START + 107) +#define WID_NEWS_GROUPLIST (WID_CHAOS_START + 108) +#ifdef OLD_CHAOS +#define WID_BOX_CONNECTION_PROP (WID_CHAOS_START + 109) +#else +#define WID_MESSAGE_STOREMODE (WID_CHAOS_START + 109) +#endif +#define WID_DELETE_ON_SERVER (WID_CHAOS_START + 110) + +//PROP BOX USER + +//PROP BOX OUT DIR +#define WID_OUTMSGEXTERNALSTATE (WID_CHAOS_START + 111) + +//PROP RNM +#define WID_RNM_UPDATETIMER_LIST (WID_CHAOS_START + 112) +#define WID_BOXEXT_END (WID_CHAOS_START + 112) + +////////////////////////////////////////////////////////////////////////// +// MISC - Added after initial pool version +////////////////////////////////////////////////////////////////////////// + +// PROP BOX +#define WID_SERVER_RANGES (WID_CHAOS_START + 113) +#define WID_LAST_UPDATE (WID_CHAOS_START + 114) +#define WID_LAST_MSGID (WID_CHAOS_START + 115) +#define WID_LAST_UID (WID_CHAOS_START + 116) + +// FUNC ALL +#define WID_UNDELETE (WID_CHAOS_START + 117) +#define WID_CLOSE (WID_CHAOS_START + 118) +#define WID_REOPEN (WID_CHAOS_START + 119) + +// PROP RNM +#define WID_RNM_FILECONVERSION_LIST (WID_CHAOS_START + 120) + +// PROP FOLDER +#define WID_SHOW_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 121) +#define WID_SHOW_MSGS_TIMELIMIT (WID_CHAOS_START + 122) +#define WID_STORE_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 123) +#define WID_STORE_MSGS_TIMELIMIT (WID_CHAOS_START + 124) + +// PROP BOX +#define WID_MSG_COLUMN_WIDTHS /* obsolete */(WID_CHAOS_START + 125) + +#ifdef OLD_CHAOS + +#define WID_CHAOS_END (WID_CHAOS_START + 125) + +#else + +////////////////////////////////////////////////////////////////////////// +// WID's added after SO 4.0 release ( SUPD > 364 ) +////////////////////////////////////////////////////////////////////////// + +// PROP ALL +#define WID_PROPERTYLIST (WID_CHAOS_START + 126) + +// PROP BOXALL +#define WID_BOXALL_START2 (WID_CHAOS_START + 127) +#define WID_SEND_PUBLIC_PROT_ID (WID_CHAOS_START + 127) +#define WID_SEND_PRIVATE_PROT_ID (WID_CHAOS_START + 128) +#define WID_SEND_PUBLIC_OUTBOXPROPS (WID_CHAOS_START + 129) +#define WID_SEND_PRIVATE_OUTBOXPROPS (WID_CHAOS_START + 130) +#define WID_SEND_SERVERNAME (WID_CHAOS_START + 131) +#define WID_SEND_USERNAME (WID_CHAOS_START + 132) +#define WID_SEND_PASSWORD (WID_CHAOS_START + 133) +#define WID_SEND_REPLY_TO_DEFAULT (WID_CHAOS_START + 134) +#define WID_SEND_FROM_DEFAULT (WID_CHAOS_START + 135) +#define WID_VIM_POPATH (WID_CHAOS_START + 136) +#define WID_SEND_VIM_POPATH (WID_CHAOS_START + 137) +#define WID_PURGE (WID_CHAOS_START + 138) +#define WID_CLEAN_CACHE (WID_CHAOS_START + 139) +#define WID_SEARCH (WID_CHAOS_START + 140) +#define WID_JOURNAL (WID_CHAOS_START + 141) +#define WID_LOCALBASE (WID_CHAOS_START + 142) +#define WID_BOXALL_END2 (WID_CHAOS_START + 142) + +// PROP DOCUMENT +#define WID_DOCUMENT_HEADER (WID_CHAOS_START + 143) +#define WID_DOCUMENT_BODY (WID_CHAOS_START + 144) +#define WID_DOCUMENT_SIZE (WID_CHAOS_START + 145) + +// PROP ALL +#define WID_SIZE WID_DOCUMENT_SIZE + +// PROP PROJECT +#define WID_PRJ_MEDIUM (WID_CHAOS_START + 146) +#define WID_PRJ_FILENAMECONVENTION (WID_CHAOS_START + 147) + +// PROP FSYS +#define WID_FSYS_DISKSPACE_LEFT (WID_CHAOS_START + 148) +#define WID_TRANSFER (WID_CHAOS_START + 149) + +// PROP ALL +#define WID_KEYWORDS (WID_CHAOS_START + 150) +#define WID_IS_PROTECTED (WID_CHAOS_START + 151) + +// PROP SEARCH +#define WID_SEARCH_CRITERIA (WID_CHAOS_START + 152) +#define WID_SEARCH_LOCATIONS (WID_CHAOS_START + 153) +#define WID_SEARCH_RECURSIVE (WID_CHAOS_START + 154) +#define WID_SEARCH_FOLDER_VIEW (WID_CHAOS_START + 155) +#define WID_SEARCH_DOCUMENT_VIEW (WID_CHAOS_START + 156) + +// PROP Channel +#define WID_SCHEDULE_RANGE (WID_CHAOS_START + 157) +#define WID_ALLOWED_SCHEDULE_RANGE (WID_CHAOS_START + 158) +#define WID_TARGET_URL (WID_CHAOS_START + 159) +#define WID_FREQUENCY (WID_CHAOS_START + 160) + +// PROP HTTP +#define WID_HTTP_CONNECTION_LIMIT (WID_CHAOS_START + 161) +#define WID_HTTP_COOKIE_MANAGER (WID_CHAOS_START + 162) + +// PROP Channel +#define WID_COLUMN_NEXT_UPD (WID_CHAOS_START + 163) +#define WID_CRAWL_STATUS (WID_CHAOS_START + 164) +#define WID_CRAWL_LEVEL (WID_CHAOS_START + 165) +#define WID_CRAWL_MODE (WID_CHAOS_START + 166) +// WID_CRAWL_MAX_VOLUME shall be removed in the future! +// --> WID_SIZE_LIMIT +#define WID_CRAWL_MAX_VOLUME (WID_CHAOS_START + 167) +#define WID_CRAWL_IMAGE (WID_CHAOS_START + 168) +#define WID_CRAWL_LINK_OUT (WID_CHAOS_START + 169) +#define WID_NOTIFICATION_MODE (WID_CHAOS_START + 170) +#define WID_NOTIFICATION_ADDRESS (WID_CHAOS_START + 171) + +// PROP BOXALL +#define WID_ACCOUNT (WID_CHAOS_START + 172) + +// PROP FSYS +#define WID_FSYS_KIND (WID_CHAOS_START + 173) +#define WID_FSYS_FLAGS (WID_CHAOS_START + 174) + +// PROP FOLDER +#define WID_VIEWDATA /* obsolete */ (WID_CHAOS_START + 175) + +// PROP FSYS +#define WID_WHO_IS_MASTER (WID_CHAOS_START + 176) + +// FUNC HTTP +#define WID_HTTP_POST (WID_CHAOS_START + 177) + +// PROP ALL +#define WID_SUPPORTED_FUNCS (WID_CHAOS_START + 178) +#define WID_SIZE_LIMIT (WID_CHAOS_START + 179) + +// PROP FOLDER +#define WID_MARKED_DOCUMENT_COUNT (WID_CHAOS_START + 180) +#define WID_FOLDER_COUNT (WID_CHAOS_START + 181) + +// PROP FSYS +#define WID_FSYS_SHOW_HIDDEN (WID_CHAOS_START + 182) + +// TRASHCAN +#define WID_TRASHCAN_START (WID_CHAOS_START + 183) +#define WID_TRASHCAN_EMPTY_TRASH (WID_CHAOS_START + 183) +#define WID_TRASHCAN_FLAG_AUTODELETE (WID_CHAOS_START + 184) +#define WID_TRASHCAN_FLAG_CONFIRMEMPTY (WID_CHAOS_START + 185) +#define WID_TRASHCAN_DUMMY1 (WID_CHAOS_START + 186) +#define WID_TRASHCAN_DUMMY2 (WID_CHAOS_START + 187) +#define WID_TRASHCAN_END (WID_CHAOS_START + 187) + +// TRASH +#define WID_TRASH_START (WID_CHAOS_START + 188) +#define WID_TRASH_RESTORE (WID_CHAOS_START + 188) +#define WID_TRASH_ORIGIN (WID_CHAOS_START + 189) +#define WID_TRASH_DUMMY2 (WID_CHAOS_START + 190) +#define WID_TRASH_END (WID_CHAOS_START + 190) + +// PROP ALL +#define WID_TARGET_FRAMES (WID_CHAOS_START + 191) + +// FUNC FOLDER +#define WID_EXPORT (WID_CHAOS_START + 192) + +// COMPONENT +#define WID_COMPONENT_COMMAND (WID_CHAOS_START + 193) +#define WID_COMPONENT_MENU (WID_CHAOS_START + 194) + +// PROP Channel +#define WID_HREF (WID_CHAOS_START + 195) + +// PROP FOLDER (VIEW) +#define WID_VIEW_START (WID_CHAOS_START + 196) +#define WID_VIEW_COLS_BEAMER (WID_CHAOS_START + 196) +#define WID_VIEW_COLS_FILEDLG (WID_CHAOS_START + 197) +#define WID_VIEW_COLS_FLDWIN (WID_CHAOS_START + 198) +#define WID_VIEW_MODE_FLDWIN (WID_CHAOS_START + 199) +#define WID_VIEW_LAYOUT_FLDWIN (WID_CHAOS_START + 200) +#define WID_VIEW_ICON_POS_FLDWIN (WID_CHAOS_START + 201) +#define WID_VIEW_SORT_BEAMER (WID_CHAOS_START + 202) +#define WID_VIEW_SORT_FILEDLG (WID_CHAOS_START + 203) +#define WID_VIEW_SORT_FLDWIN_DETAILS (WID_CHAOS_START + 204) +#define WID_VIEW_SORT_FLDWIN_ICON (WID_CHAOS_START + 205) +#define WID_VIEW_WINDOW_POS_FLDWIN (WID_CHAOS_START + 206) +#define WID_VIEW_END (WID_CHAOS_START + 206) + +// PROP ALL +#define WID_IS_INVALID (WID_CHAOS_START + 207) + +// PROP Channel +#define WID_VIEW_TIPHELP (WID_CHAOS_START + 208) +#define WID_PUBLISHER_SCHEDULE (WID_CHAOS_START + 209) +#define WID_GETMODE (WID_CHAOS_START + 210) +#define WID_READ_OFFLINE (WID_CHAOS_START + 211) + +// PROP ALL +#define WID_ALL_START2 (WID_CHAOS_START + 212) +#define WID_REAL_NAME (WID_CHAOS_START + 212) +#define WID_FLAG_UPDATE_ON_OPEN (WID_CHAOS_START + 213) +#define WID_ACTION_LIST (WID_CHAOS_START + 214) +#define WID_EDIT_STRING (WID_CHAOS_START + 215) +#define WID_SET_AS_DEFAULT (WID_CHAOS_START + 216) +#define WID_ALL_END2 (WID_CHAOS_START + 216) + +// PROP FOLDER (VIEW) +#define WID_VIEW2_START (WID_CHAOS_START + 217) +#define WID_VIEW2_FLD_PIC (WID_CHAOS_START + 217) +#define WID_FLAG_EXPANDED (WID_CHAOS_START + 218) +#define WID_CHILD_DEFAULTS (WID_CHAOS_START + 219) +#define WID_VIEW2_END (WID_CHAOS_START + 219) + +// PROP HTTP +#define WID_HTTP_KEEP_EXPIRED (WID_CHAOS_START + 220) +#define WID_HTTP_VERIFY_MODE (WID_CHAOS_START + 221) +#define WID_HTTP_NOCACHE_LIST (WID_CHAOS_START + 222) +#define WID_HTTP_REFERER (WID_CHAOS_START + 223) + +// PROP FSYS +#define WID_FSYS_START (WID_CHAOS_START + 224) +#define WID_FSYS_VALUE_FOLDER (WID_CHAOS_START + 224) +#define WID_FSYS_SHOW_EXTENSION (WID_CHAOS_START + 225) +#define WID_VALUE_ADDED_MODE (WID_CHAOS_START + 226) +#define WID_FSYS_DUMMY3 (WID_CHAOS_START + 227) +#define WID_FSYS_DUMMY4 (WID_CHAOS_START + 228) +#define WID_FSYS_END (WID_CHAOS_START + 228) + +// FUNC HTTP +#define WID_HTTP_GET_COOKIE (WID_CHAOS_START + 229) +#define WID_HTTP_SET_COOKIE (WID_CHAOS_START + 230) + +// PROP HTTP +#define WID_HTTP_COOKIE (WID_CHAOS_START + 231) +#define WID_HTTP_DUMMY_1 (WID_CHAOS_START + 232) + +////////////////////////////////////////////////////////////////////////// +// WID's added after SO 5.0 release ( SUPD > 505 ) +////////////////////////////////////////////////////////////////////////// + +// PROP FOLDER +#define WID_FOLDER_START2 (WID_CHAOS_START + 233) +#define WID_USER_SORT_CRITERIUM (WID_CHAOS_START + 233) +#define WID_HEADER_CONFIG (WID_CHAOS_START + 234) +#define WID_GROUPVIEW_CONFIG (WID_CHAOS_START + 235) +#define WID_FLD_WEBVIEW_TEMPLATE (WID_CHAOS_START + 236) +// eigene Iconpositionen fuer den Explorer, da er noch +// keinen eigenen View-Storage hat +#define WID_VIEW_ICON_POS_GRPWIN (WID_CHAOS_START + 237) +#define WID_FOLDER_END2 (WID_CHAOS_START + 237) + +// PROP ALL +#define WID_SHOW_IN_EXPLORER (WID_CHAOS_START + 238) + +// PROP FOLDER (VIEW) +#define WID_VIEW3_START (WID_CHAOS_START + 239) +#define WID_FLD_FONT (WID_CHAOS_START + 239) +#define WID_FLD_WEBVIEW_USE_GLOBAL (WID_CHAOS_START + 240) +#define WID_VIEW3_DUMMY2 (WID_CHAOS_START + 241) +#define WID_VIEW3_DUMMY3 (WID_CHAOS_START + 242) +#define WID_VIEW3_END (WID_CHAOS_START + 242) + +// PROP FTP +#define WID_FTP_ACCOUNT (WID_CHAOS_START + 243) + +// PROP FOLDER +#define WID_STORE_MARKED (WID_CHAOS_START + 244) + +// REPLICATION ( Currently only here to have file compatibility between +// SO51 Client and SO51 Server, for which the functionality +// first shall be implemented ). +#define WID_REPLICATION_1 (WID_CHAOS_START + 245) +#define WID_REPLICATION_2 (WID_CHAOS_START + 246) +#define WID_REPLICATION_3 (WID_CHAOS_START + 247) +#define WID_REPLICATION_4 (WID_CHAOS_START + 248) +#define WID_REPLICATION_5 (WID_CHAOS_START + 249) + +// PROP SEARCH +#define WID_SEARCH_INDIRECTIONS (WID_CHAOS_START + 250) + +// PROP ALL +#define WID_SEND_FORMATS (WID_CHAOS_START + 251) +#define WID_SEND_COPY_TARGET (WID_CHAOS_START + 252) + +// FUNC ALL +#define WID_TRANSFER_RESULT (WID_CHAOS_START + 253) + +// END +#define WID_CHAOS_END (WID_CHAOS_START + 253) + +#endif /* OLD_CHAOS */ + +#endif /* !_CNTWIDS_HRC */ diff --git a/svtools/inc/ctrlbox.hxx b/svtools/inc/ctrlbox.hxx new file mode 100644 index 000000000000..81f469abd27c --- /dev/null +++ b/svtools/inc/ctrlbox.hxx @@ -0,0 +1,524 @@ +/************************************************************************* + * + * $RCSfile: ctrlbox.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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 _CTRLBOX_HXX +#define _CTRLBOX_HXX + +#ifndef _INTN_HXX +#include <tools/intn.hxx> +#endif +#ifndef _LSTBOX_HXX +#include <vcl/lstbox.hxx> +#endif +#ifndef _COMBOBOX_HXX +#include <vcl/combobox.hxx> +#endif +#ifndef _IMAGE_HXX +#include <vcl/image.hxx> +#endif +#ifndef _VIRDEV_HXX +#include <vcl/virdev.hxx> +#endif +#ifndef _METRIC_HXX +#include <vcl/metric.hxx> +#endif +#ifndef _FIELD_HXX +#include <vcl/field.hxx> +#endif + +class ImplFontList; +class ImpColorList; +class ImpLineList; +class FontList; + +/************************************************************************* + +Beschreibung +============ + +class ColorListBox + +Beschreibung + +Erlaubt die Auswahl von Farben. + +-------------------------------------------------------------------------- + +class LineListBox + +Beschreibung + +Erlaubt die Auswahl von Linien-Styles und Groessen. Es ist darauf zu achten, +das vor dem ersten Insert die Units und die Fesntergroesse gesetzt sein +muessen. An Unit wird Point und mm unterstuetzt und als SourceUnit Point, +mm und Twips. Alle Angaben muessen in 100teln der jeweiligen Einheit +vorliegen. + +Line1 ist aeussere, Line2 die innere und Distance die Distanz zwischen +den beiden Linien. Wenn Line2 = 0 ist, wird nur Line1 angezeigt. Als +Default sind sowohl Source als auch Ziel-Unit FUNIT_POINT. + +Mit SetColor() kann die Linienfarbe eingestellt werden. + +Anmerkungen und Ausnahmen + +Gegenueber einer normalen ListBox, koennen keine User-Daten gesetzt +werden. Ausserdem sollte wenn der UpdateMode ausgeschaltet ist, keine +Daten abgefragt oder die Selektion gesetzt werden, da in diesem Zustand +die Daten nicht definiert sind. Wenn der UpdateMode ausgeschaltet ist, +sollte der Rueckgabewert bei Insert nicht ausgewertet werden, da er keine +Bedeutung hat. Ausserdem darf nicht das WinBit WB_SORT gesetzt sein. + +-------------------------------------------------------------------------- + +class FontNameBox + +Beschreibung + +Erlaubt die Auswahl von Fonts. Die ListBox wird mit Fill gefuellt, wo +ein Pointer auf eine FontList uebergeben werden muss. + +Mit EnableWYSIWYG() kann man einstellen, das die Fontnamen in Ihrer Schrift +angezeigt werden und mit EnableSymbols() kann eingestellt werden, das +vor dem Namen ueber ein Symbol angezeigt wird, ob es sich um eine +Drucker oder Bildschirmschrift handelt. + +Querverweise + +FontList; FontStyleBox; FontSizeBox; FontNameMenu + +-------------------------------------------------------------------------- + +class FontStyleBox + +Beschreibung + +Erlaubt die Auswahl eines FontStyles. Mit Fill wird die ListBox mit +den Styles zum uebergebenen Font gefuellt. Nachgebildete Styles werden +immer mit eingefuegt (kann sich aber noch aendern, da vielleicht +nicht alle Applikationen [StarDraw,Formel,FontWork] mit Syntetic-Fonts +umgehen koennen). Bei Fill bleibt vorherige Name soweit wie moeglich +erhalten. + +Fuer DontKnow sollte die FontStyleBox mit String() gefuellt werden. +Dann enthaellt die Liste die Standardattribute. Der Style, der gerade +angezeigt wird, muss gegebenenfalls noch vom Programm zurueckgesetzt werden. + +Querverweise + +FontList; FontNameBox; FontSizeBox; FontStyleMenu + +-------------------------------------------------------------------------- + +class FontSizeBox + +Beschreibung + +Erlaubt die Auswahl von Fontgroessen. Werte werden ueber GetValue() +abgefragt und ueber SetValue() gesetzt. Fill fuellt die ListBox mit den +Groessen zum uebergebenen Font. Alle Groessen werden in 10tel Point +angegeben. Die FontListe, die bei Fill uebergeben wird, muss bis zum +naechsten Fill-Aufruf erhalten bleiben. + +Zusaetzlich erlaubt die FontSizeBox noch einen Relative-Mode. Dieser +dient dazu, Prozent-Werte eingeben zu koennen. Dies kann zum Beispiel +nuetzlich sein, wenn man die Box in einem Vorlagen-Dialog anbietet. +Dieser Modus ist nur anschaltbar, jedoch nicht wieder abschaltbar. + +Fuer DontKnow sollte die FontSizeBox mit FontInfo() gefuellt werden. +Dann enthaellt die Liste die Standardgroessen. Die Groesse, die gerade +angezeigt wird, muss gegebenenfalls noch vom Programm zurueckgesetzt werden. + +Querverweise + +FontList; FontNameBox; FontStyleBox; FontSizeMenu + +*************************************************************************/ + +// ---------------- +// - ColorListBox - +// ---------------- + +class ColorListBox : public ListBox +{ + ImpColorList* pColorList; // Separate Liste, falls UserDaten von aussen verwendet werden. + Size aImageSize; + +#ifdef _CTRLBOX_CXX + void ImplInit(); + void ImplDestroyColorEntries(); +#endif + +public: + ColorListBox( Window* pParent, + WinBits nWinStyle = WB_BORDER ); + ColorListBox( Window* pParent, const ResId& rResId ); + virtual ~ColorListBox(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + USHORT InsertEntry( const XubString& rStr, + USHORT nPos = LISTBOX_APPEND ); + USHORT InsertEntry( const Color& rColor, const XubString& rStr, + USHORT nPos = LISTBOX_APPEND ); + void RemoveEntry( USHORT nPos ); + void Clear(); + void CopyEntries( const ColorListBox& rBox ); + + USHORT GetEntryPos( const XubString& rStr ) const + { return ListBox::GetEntryPos( rStr ); } + + USHORT GetEntryPos( const Color& rColor ) const; + Color GetEntryColor( USHORT nPos ) const; + Size GetImageSize() const { return aImageSize; } + + void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE ) + { ListBox::SelectEntry( rStr, bSelect ); } + void SelectEntry( const Color& rColor, BOOL bSelect = TRUE ); + XubString GetSelectEntry( USHORT nSelIndex = 0 ) const + { return ListBox::GetSelectEntry( nSelIndex ); } + Color GetSelectEntryColor( USHORT nSelIndex = 0 ) const; + BOOL IsEntrySelected( const XubString& rStr ) const + { return ListBox::IsEntrySelected( rStr ); } + + BOOL IsEntrySelected( const Color& rColor ) const; + +private: + // Wegen einigen Compilern hier nocheinmal private deklariert, da + // ansonsten die Compiler diese als Default-Funktionen implementieren + ColorListBox( const ColorListBox& ); + ColorListBox& operator =( const ColorListBox& ); + USHORT GetEntryPos( const void* pData ) const; + void SetEntryData( USHORT nPos, void* pNewData ); + void* GetEntryData( USHORT nPos ) const; +}; + +inline void ColorListBox::SelectEntry( const Color& rColor, BOOL bSelect ) +{ + USHORT nPos = GetEntryPos( rColor ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + ListBox::SelectEntryPos( nPos, bSelect ); +} + +inline BOOL ColorListBox::IsEntrySelected( const Color& rColor ) const +{ + USHORT nPos = GetEntryPos( rColor ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return IsEntryPosSelected( nPos ); + else + return FALSE; +} + +inline Color ColorListBox::GetSelectEntryColor( USHORT nSelIndex ) const +{ + USHORT nPos = GetSelectEntryPos( nSelIndex ); + Color aColor; + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + aColor = GetEntryColor( nPos ); + return aColor; +} + +// --------------- +// - LineListBox - +// --------------- + +class LineListBox : public ListBox +{ + ImpLineList* pLineList; + VirtualDevice aVirDev; + International aIntn; + Size aTxtSize; + Color aColor; + FieldUnit eUnit; + FieldUnit eSourceUnit; + +#ifdef _CTRLBOX_CXX + void ImpGetLine( long nLine1, long nLine2, long nDistance, + Bitmap& rBmp, XubString& rStr ); + void ImplInit(); +#endif + +public: + LineListBox( Window* pParent, + WinBits nWinStyle = WB_BORDER ); + LineListBox( Window* pParent, const ResId& rResId ); + virtual ~LineListBox(); + + USHORT InsertEntry( const XubString& rStr, + USHORT nPos = LISTBOX_APPEND ); + USHORT InsertEntry( long nLine1, long nLine2 = 0, + long nDistance = 0, + USHORT nPos = LISTBOX_APPEND ); + void RemoveEntry( USHORT nPos ); + void Clear(); + + USHORT GetEntryPos( const XubString& rStr ) const + { return ListBox::GetEntryPos( rStr ); } + USHORT GetEntryPos( long nLine1, long nLine2 = 0, + long nDistance = 0 ) const; + long GetEntryLine1( USHORT nPos ) const; + long GetEntryLine2( USHORT nPos ) const; + long GetEntryDistance( USHORT nPos ) const; + + void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE ) + { ListBox::SelectEntry( rStr, bSelect ); } + void SelectEntry( long nLine1, long nLine2 = 0, + long nDistance = 0, BOOL bSelect = TRUE ); + long GetSelectEntryLine1( USHORT nSelIndex = 0 ) const; + long GetSelectEntryLine2( USHORT nSelIndex = 0 ) const; + long GetSelectEntryDistance( USHORT nSelIndex = 0 ) const; + BOOL IsEntrySelected( const XubString& rStr ) const + { return ListBox::IsEntrySelected( rStr ); } + BOOL IsEntrySelected( long nLine1, long nLine2 = 0, + long nDistance = 0 ) const; + + void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; } + FieldUnit GetUnit() const { return eUnit; } + void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; } + FieldUnit GetSourceUnit() const { return eSourceUnit; } + + void SetColor( const Color& rColor ); + Color GetColor() const { return aColor; } + +private: + // Wegen einigen Compilern hier nocheinmal private deklariert, da + // ansonsten die Compiler diese als Default-Funktionen implementieren + LineListBox( const LineListBox& ); + LineListBox& operator =( const LineListBox& ); + USHORT GetEntryPos( const void* pData ) const; + void SetEntryData( USHORT nPos, void* pNewData ); + void* GetEntryData( USHORT nPos ) const; +}; + +inline void LineListBox::SelectEntry( long nLine1, long nLine2, + long nDistance, BOOL bSelect ) +{ + USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + ListBox::SelectEntryPos( nPos, bSelect ); +} + +inline long LineListBox::GetSelectEntryLine1( USHORT nSelIndex ) const +{ + USHORT nPos = GetSelectEntryPos( nSelIndex ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return GetEntryLine1( nPos ); + else + return 0; +} + +inline long LineListBox::GetSelectEntryLine2( USHORT nSelIndex ) const +{ + USHORT nPos = GetSelectEntryPos( nSelIndex ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return GetEntryLine2( nPos ); + else + return 0; +} + +inline long LineListBox::GetSelectEntryDistance( USHORT nSelIndex ) const +{ + USHORT nPos = GetSelectEntryPos( nSelIndex ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return GetEntryDistance( nPos ); + else + return 0; +} + +inline BOOL LineListBox::IsEntrySelected( long nLine1, long nLine2, + long nDistance ) const +{ + USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + return IsEntryPosSelected( nPos ); + else + return FALSE; +} + +// --------------- +// - FontNameBox - +// --------------- + +class FontNameBox : public ComboBox +{ +private: + ImplFontList* mpFontList; + Image maImagePrinterFont; + Image maImageBitmapFont; + Image maImageScalableFont; + BOOL mbWYSIWYG; + BOOL mbSymbols; + +#ifdef _CTRLBOX_CXX + void ImplCalcUserItemSize(); + void ImplDestroyFontList(); +#endif + +public: + FontNameBox( Window* pParent, + WinBits nWinStyle = WB_SORT ); + FontNameBox( Window* pParent, const ResId& rResId ); + virtual ~FontNameBox(); + + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + void Fill( const FontList* pList ); + + void EnableWYSIWYG( BOOL bEnable = TRUE ); + BOOL IsWYSIWYGEnabled() const { return mbWYSIWYG; } + + void EnableSymbols( BOOL bEnable = TRUE ); + BOOL IsSymbolsEnabled() const { return mbSymbols; } + +private: + // Wegen einigen Compilern hier nocheinmal private deklariert, da + // ansonsten die Compiler diese als Default-Funktionen implementieren + FontNameBox( const FontNameBox& ); + FontNameBox& operator =( const FontNameBox& ); +}; + +// ---------------- +// - FontStyleBox - +// ---------------- + +class FontStyleBox : public ComboBox +{ + XubString aLastStyle; + +public: + FontStyleBox( Window* pParent, WinBits nWinStyle = 0 ); + FontStyleBox( Window* pParent, const ResId& rResId ); + virtual ~FontStyleBox(); + + virtual void Select(); + virtual void LoseFocus(); + virtual void Modify(); + + void SetText( const XubString& rText ); + void Fill( const XubString& rName, const FontList* pList ); + +private: + // Wegen einigen Compilern hier nocheinmal private deklariert, da + // ansonsten die Compiler diese als Default-Funktionen implementieren + FontStyleBox( const FontStyleBox& ); + FontStyleBox& operator =( const FontStyleBox& ); +}; + +inline void FontStyleBox::SetText( const XubString& rText ) +{ + aLastStyle = rText; + ComboBox::SetText( rText ); +} + +// --------------- +// - FontSizeBox - +// --------------- + +class FontSizeBox : public MetricBox +{ + FontInfo aFontInfo; + const FontList* pFontList; + USHORT nRelMin; + USHORT nRelMax; + USHORT nRelStep; + short nPtRelMin; + short nPtRelMax; + short nPtRelStep; + BOOL bRelativeMode:1, + bRelative:1, + bPtRelative:1, + bStdSize:1; + +#ifdef _CTRLBOX_CXX + void ImplInit(); +#endif + +protected: + virtual XubString CreateFieldText( long nValue ) const; + +public: + FontSizeBox( Window* pParent, WinBits nWinStyle = 0 ); + FontSizeBox( Window* pParent, const ResId& rResId ); + virtual ~FontSizeBox(); + + void Modify(); + + void Fill( const FontInfo& rInfo, const FontList* pList ); + + void EnableRelativeMode( USHORT nMin = 50, USHORT nMax = 150, + USHORT nStep = 5 ); + void EnablePtRelativeMode( short nMin = -200, short nMax = 200, + short nStep = 10 ); + BOOL IsRelativeMode() const { return bRelativeMode; } + void SetRelative( BOOL bRelative = FALSE ); + BOOL IsRelative() const { return bRelative; } + BOOL IsPtRelative() const { return bPtRelative; } + void SetPtRelative( BOOL bPtRel = TRUE ) + { bPtRelative = bPtRel; SetRelative( TRUE ); } + +private: + // Wegen einigen Compilern hier nocheinmal private deklariert, da + // ansonsten die Compiler diese als Default-Funktionen implementieren + FontSizeBox( const FontSizeBox& ); + FontSizeBox& operator =( const FontSizeBox& ); +}; + +#endif // _CTRLBOX_HXX diff --git a/svtools/inc/ctrltool.hxx b/svtools/inc/ctrltool.hxx new file mode 100644 index 000000000000..dbb6f1831577 --- /dev/null +++ b/svtools/inc/ctrltool.hxx @@ -0,0 +1,257 @@ +/************************************************************************* + * + * $RCSfile: ctrltool.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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 _CTRLTOOL_HXX +#define _CTRLTOOL_HXX + +#ifndef _SAL_TYPES_H +#include <sal/types.h> +#endif +#ifndef _LIST_HXX +#include <tools/list.hxx> +#endif +#ifndef _METRIC_HXX +#include <vcl/metric.hxx> +#endif + +class ImplFontListNameInfo; + +/************************************************************************* + +Beschreibung +============ + +class FontList + +Diese Klasse verwaltet alle Fonts, die auf einem oder zwei Ausgabegeraeten +dargestellt werden koennen. Zusaetzlich bietet die Klasse Methoden an, um +aus Fett und Kursiv den StyleName zu generieren oder aus einem Stylename +die fehlenden Attribute. Zusaetzlich kann diese Klasse syntetisch nachgebildete +Fonts verarbeiten. Diese Klasse kann mit verschiedenen Standard-Controls und +Standard-Menus zusammenarbeiten. + +Querverweise + +class FontNameBox, class FontStyleBox, class FontSizeBox, +class FontNameMenu, class FontStyleMenu, class FontSizeMenu + +-------------------------------------------------------------------------- + +FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2 = NULL, + BOOL bAll = TRUE ); + +Konstruktor der Klasse FontList. Vom uebergebenen OutputDevice werden die +entsprechenden Fonts abgefragt. Das OutputDevice muss solange existieren, +wie auch die Klasse FontList existiert. Optional kann noch ein 2tes +Ausgabedevice uebergeben werden, damit man zum Beispiel die Fonts von +einem Drucker und dem Bildschirm zusammen in einer FontListe verwalten kann +und somit auch den FontListen und FontMenus die Fonts von beiden OutputDevices +zu uebergeben. Auch das pDevice2 muss solange existieren, wie die Klasse +FontList existiert. + +Das OutputDevice, welches als erstes uebergeben wird, sollte das bevorzugte +sein. Dies sollte im normalfall der Drucker sein. Denn wenn 2 verschiede +Device-Schriften (eine fuer Drucker und eine fuer den Bildschirm) vorhanden +sind, wird die vom uebergebenen Device "pDevice" bevorzugt. + +Mit dem dritten Parameter kann man angeben, ob nur skalierbare Schriften +abgefragt werden sollen oder alle. Wenn TRUE uebergeben wird, werden auch +Bitmap-Schriften mit abgefragt. Bei FALSE werden Vector-Schriften und +scalierbare Schriften abgefragt. + +-------------------------------------------------------------------------- + +String FontList::GetStyleName( const FontInfo& rInfo ) const; + +Diese Methode gibt den StyleName von einer FontInfo zurueck. Falls kein +StyleName gesetzt ist, wird aus den gesetzten Attributen ein entsprechender +Name generiert, der dem Anwender praesentiert werden kann. + +-------------------------------------------------------------------------- + +XubString FontList::GetFontMapText( const FontInfo& rInfo ) const; + +Diese Methode gibt einen Matchstring zurueck, der dem Anwender +anzeigen soll, welche Probleme es mit diesem Font geben kann. + +-------------------------------------------------------------------------- + +FontInfo FontList::Get( const String& rName, const String& rStyleName ) const; + +Diese Methode sucht aus dem uebergebenen Namen und dem uebergebenen StyleName +die entsprechende FontInfo-Struktur raus. Der Stylename kann in dieser +Methode auch ein syntetischer sein. In diesem Fall werden die entsprechenden +Werte in der FontInfo-Struktur entsprechend gesetzt. Wenn ein StyleName +uebergeben wird, kann jedoch eine FontInfo-Struktur ohne Stylename +zurueckgegeben werden. Um den StyleName dem Anwender zu repraesentieren, +muss GetStyleName() mit dieser FontInfo-Struktur aufgerufen werden. + +Querverweise + +FontList::GetStyleName() + +-------------------------------------------------------------------------- + +FontInfo FontList::Get( const String& rName, FontWeight eWeight, + FontItalic eItalic ) const; + +Diese Methode sucht aus dem uebergebenen Namen und den uebergebenen Styles +die entsprechende FontInfo-Struktur raus. Diese Methode kann auch eine +FontInfo-Struktur ohne Stylename zurueckgegeben. Um den StyleName dem +Anwender zu repraesentieren, muss GetStyleName() mit dieser FontInfo-Struktur +aufgerufen werden. + +Querverweise + +FontList::GetStyleName() + +-------------------------------------------------------------------------- + +const long* FontList::GetSizeAry( const FontInfo& rInfo ) const; + +Diese Methode liefert zum uebergebenen Font die vorhandenen Groessen. +Falls es sich dabei um einen skalierbaren Font handelt, werden Standard- +Groessen zurueckgegeben. Das Array enthaelt die Hoehen des Fonts in 10tel +Point. Der letzte Wert des Array ist 0. Das Array, was zurueckgegeben wird, +wird von der FontList wieder zerstoert. Nach dem Aufruf der naechsten Methode +von der FontList, sollte deshalb das Array nicht mehr referenziert werden. + +*************************************************************************/ + +// ------------ +// - FontList - +// ------------ + +#define FONTLIST_FONTINFO_NOTFOUND ((USHORT)0xFFFF) + +#define FONTLIST_FONTNAMETYPE_PRINTER ((USHORT)0x0001) +#define FONTLIST_FONTNAMETYPE_SCREEN ((USHORT)0x0002) +#define FONTLIST_FONTNAMETYPE_SCALABLE ((USHORT)0x0004) + +class FontList : private List +{ +private: + XubString maMapBoth; + XubString maMapPrinterOnly; + XubString maMapScreenOnly; + XubString maMapSizeNotAvailable; + XubString maMapStyleNotAvailable; + XubString maMapNotAvailable; + XubString maLight; + XubString maLightItalic; + XubString maNormal; + XubString maNormalItalic; + XubString maBold; + XubString maBoldItalic; + XubString maBlack; + XubString maBlackItalic; + long* mpSizeAry; + OutputDevice* mpDev; + OutputDevice* mpDev2; + +#ifdef CTRLTOOL_CXX + ImplFontListNameInfo* ImplFind( const XubString& rSearchName, ULONG* pIndex ) const; + ImplFontListNameInfo* ImplFindByName( const XubString& rStr ) const; + void ImplInsertFonts( OutputDevice* pDev, BOOL bAll, + BOOL bInsertData ); +#endif + +public: + FontList( OutputDevice* pDevice, + OutputDevice* pDevice2 = NULL, + BOOL bAll = TRUE ); + ~FontList(); + + OutputDevice* GetDevice() const { return mpDev; } + OutputDevice* GetDevice2() const { return mpDev2; } + XubString GetFontMapText( const FontInfo& rInfo ) const; + USHORT GetFontNameType( const XubString& rFontName ) const; + + const XubString& GetNormalStr() const { return maNormal; } + const XubString& GetItalicStr() const { return maNormalItalic; } + const XubString& GetBoldStr() const { return maBold; } + const XubString& GetBoldItalicStr() const { return maBoldItalic; } + XubString GetStyleName( const FontInfo& rInfo ) const; + + FontInfo Get( const XubString& rName, + const XubString& rStyleName ) const; + FontInfo Get( const XubString& rName, + FontWeight eWeight, + FontItalic eItalic ) const; + + BOOL IsAvailable( const XubString& rName ) const; + USHORT GetFontNameCount() const + { return (USHORT)List::Count(); } + const FontInfo& GetFontName( USHORT nFont ) const; + USHORT GetFontNameType( USHORT nFont ) const; + sal_Handle GetFirstFontInfo( const XubString& rName ) const; + sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const; + const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const; + + const long* GetSizeAry( const FontInfo& rInfo ) const; + static const long* GetStdSizeAry(); + +private: + FontList( const FontList& ); + FontList& operator =( const FontList& ); +}; + +#endif // _CTRLTOOL_HXX diff --git a/svtools/inc/expander.hxx b/svtools/inc/expander.hxx new file mode 100644 index 000000000000..2b2ab15a320f --- /dev/null +++ b/svtools/inc/expander.hxx @@ -0,0 +1,131 @@ +/************************************************************************* + * + * $RCSfile: expander.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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_EXPANDER_HXX +#define _SV_EXPANDER_HXX + +#ifndef _SV_CTRL_HXX +#include <vcl/ctrl.hxx> +#endif + +#ifndef _SV_IMAGE_HXX +#include <vcl/image.hxx> +#endif + +enum SvExpanderStateType +{ + EST_MIN=1, + EST_PLUS=2, + EST_MIN_DOWN=3, + EST_PLUS_DOWN=4, + EST_NONE=5, + EST_MIN_DIS=6, + EST_PLUS_DIS=7, + EST_MIN_DOWN_DIS=8, + EST_PLUS_DOWN_DIS=9 +}; + +class SvExpander: public Control +{ +private: + Point aImagePos; + Point aTextPos; + Image aActiveImage; + Rectangle maFocusRect; + ImageList maExpanderImages; + BOOL mbIsExpanded; + BOOL mbHasFocusRect; + BOOL mbIsInMouseDown; + Link maToggleHdl; + SvExpanderStateType eType; + +protected: + + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void KeyUp( const KeyEvent& rKEvt ); + + virtual void Click(); + virtual void Resize(); + +public: + SvExpander( Window* pParent, WinBits nStyle = 0 ); + SvExpander( Window* pParent, const ResId& rResId ); + + BOOL IsExpanded() {return mbIsExpanded;} + + void SetToExpanded(BOOL bFlag=TRUE); + + void SetExpanderImage( SvExpanderStateType eType); + Image GetExpanderImage(SvExpanderStateType eType); + Size GetMinSize() const; + + void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; } + const Link& GetToggleHdl() const { return maToggleHdl; } +}; + + + +#endif diff --git a/svtools/inc/filectrl.hrc b/svtools/inc/filectrl.hrc new file mode 100644 index 000000000000..4b50d373bada --- /dev/null +++ b/svtools/inc/filectrl.hrc @@ -0,0 +1,68 @@ +/************************************************************************* + * + * $RCSfile: filectrl.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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_FILECTRL_HRC +#define _SV_FILECTRL_HRC + +#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?! + +#endif + diff --git a/svtools/inc/filectrl.hxx b/svtools/inc/filectrl.hxx new file mode 100644 index 000000000000..396d7d30b665 --- /dev/null +++ b/svtools/inc/filectrl.hxx @@ -0,0 +1,155 @@ +/************************************************************************* + * + * $RCSfile: filectrl.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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_FILECTRL_HXX +#define _SV_FILECTRL_HXX + +#ifndef _SV_WINDOW_HXX +#include <vcl/window.hxx> +#endif +#ifndef _SV_EDIT_HXX +#include <vcl/edit.hxx> +#endif +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif + + +#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?! + +// Flags for FileControl +typedef USHORT FileControlMode; +#define FILECTRL_RESIZEBUTTONBYPATHLEN ((USHORT)0x0001)//if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely + + +// Flags for internal use of FileControl +typedef USHORT FileControlMode_Internal; +#define FILECTRL_INRESIZE ((USHORT)0x0001) +#define FILECTRL_ORIGINALBUTTONTEXT ((USHORT)0x0002) + + +class VclFileDialog; +class FileDialog; +class FileControl : public Window +{ +private: + Edit maEdit; + PushButton maButton; + + String maButtonText; + BOOL mbOpenDlg; + + VclFileDialog* mpVclDlg; + FileDialog* mpFDlg; + + Link maDialogCreatedHdl; + + FileControlMode mnFlags; + FileControlMode_Internal mnInternalFlags; + +protected: + void Resize(); + void GetFocus(); + void StateChanged( StateChangedType nType ); + WinBits ImplInitStyle( WinBits nStyle ); + DECL_LINK( ButtonHdl, PushButton* ); + +public: + FileControl( Window* pParent, WinBits nStyle, FileControlMode = 0 ); + ~FileControl(); + + Edit& GetEdit() { return maEdit; } + PushButton& GetButton() { return maButton; } + + void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags ); + + void SetOpenDialog( BOOL bOpen ) { mbOpenDlg = bOpen; } + BOOL IsOpenDialog() const { return mbOpenDlg; } + + void SetText( const XubString& rStr ); + XubString GetText() const; + UniString GetSelectedText() const { return maEdit.GetSelected(); } + + void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); } + Selection GetSelection() const { return maEdit.GetSelection(); } + + void SetReadOnly( BOOL bReadOnly = TRUE ) { maEdit.SetReadOnly( bReadOnly ); } + BOOL IsReadOnly() const { return maEdit.IsReadOnly(); } + + //------ + //manipulate the Button-Text: + XubString GetButtonText() const { return maButtonText; } + void SetButtonText( const XubString& rStr ); + void ResetButtonText(); + + //------ + //use this to manipulate the dialog bevore executing it: + void SetDialogCreatedHdl( const Link& rLink ) { maDialogCreatedHdl = rLink; } + const Link& GetDialogCreatedHdl() const { return maDialogCreatedHdl; } + + //only use the next two methods in 'DialogCreatedHdl' and don't store the dialog-pointer + VclFileDialog* GetVclFileDialog() const { return mpVclDlg; } + FileDialog* GetFileDialog() const { return mpFDlg; } + //------ +}; + +#endif + diff --git a/svtools/inc/filedlg.hxx b/svtools/inc/filedlg.hxx new file mode 100644 index 000000000000..7e4fcbe758b8 --- /dev/null +++ b/svtools/inc/filedlg.hxx @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: filedlg.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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 _SVT_FILEDLG_HXX +#define _SVT_FILEDLG_HXX + +#ifndef _DIALOG_HXX +#include <vcl/dialog.hxx> +#endif + +class Edit; +class ImpSvFileDlg; + +// -------------- +// - SvPathDialog - +// -------------- + +class PathDialog : public ModalDialog +{ +private: + friend class FileDialog; // Imp... + + ImpSvFileDlg* pImpFileDlg; // Implementation + Link aOKHdlLink; // Link zum OK-Handler + +protected: + UniString aDfltExt; // Default - Extension + +public: + PathDialog( Window* pParent, WinBits nWinStyle = 0, BOOL bCreateDir = TRUE ); + ~PathDialog(); + + virtual long OK(); + + void SetPath( const UniString& rNewPath ); + void SetPath( const Edit& rEdit ); + UniString GetPath() const; + + void SetOKHdl( const Link& rLink ) { aOKHdlLink = rLink; } + const Link& GetOKHdl() const { return aOKHdlLink; } + + virtual short Execute(); +}; + +// -------------- +// - SvFileDialog - +// -------------- + +class FileDialog : public PathDialog +{ +private: + Link aFileHdlLink; // Link zum FileSelect-Handler + Link aFilterHdlLink; // Link zum FilterSelect-Handler + +public: + FileDialog( Window* pParent, WinBits nWinStyle ); + ~FileDialog(); + + virtual void FileSelect(); + virtual void FilterSelect(); + + void SetDefaultExt( const UniString& rExt ) { aDfltExt = rExt; } + const UniString& GetDefaultExt() const { return aDfltExt; } + void AddFilter( const UniString& rFilter, const UniString& rType ); + void AddFilter( const UniString& rFilter, const UniString& rType, + const UniString& rSysType ); + void RemoveFilter( const UniString& rFilter ); + void RemoveAllFilter(); + void SetCurFilter( const UniString& rFilter ); + UniString GetCurFilter() const; + USHORT GetFilterCount() const; + UniString GetFilterName( USHORT nPos ) const; + UniString GetFilterType( USHORT nPos ) const; + + void SetFileSelectHdl( const Link& rLink ) { aFileHdlLink = rLink; } + const Link& GetFileSelectHdl() const { return aFileHdlLink; } + void SetFilterSelectHdl( const Link& rLink ) { aFilterHdlLink = rLink; } + const Link& GetFilterSelectHdl() const { return aFilterHdlLink; } + + void SetOkButtonText( const UniString& rText ); + void SetCancelButtonText( const UniString& rText ); +}; + +#endif // _FILEDLG_HXX diff --git a/svtools/inc/flbytes.hxx b/svtools/inc/flbytes.hxx new file mode 100644 index 000000000000..001965c4a051 --- /dev/null +++ b/svtools/inc/flbytes.hxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * $RCSfile: flbytes.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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 _FLBYTES_HXX +#define _FLBYTES_HXX + +#ifndef _TOOLS_DEBUG_HXX +#include <tools/debug.hxx> +#endif +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif + +//============================================================================ +class SvFillLockBytes : public SvLockBytes +{ + SvLockBytesRef xLockBytes; + ULONG nFilledSize; + BOOL bTerminated; + BOOL bSync; +public: + TYPEINFO(); + + SvFillLockBytes( SvLockBytes* pLockBytes ); + virtual ErrCode ReadAt( + ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pRead ) const; + virtual ErrCode WriteAt( + ULONG nPos, const void* pBuffer, ULONG nCount, ULONG* pWritten ); + virtual ErrCode Flush() const; + virtual ErrCode SetSize( ULONG nSize ); + virtual ErrCode LockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode UnlockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; + ErrCode FillAppend( const void* pBuffer, ULONG nCount, ULONG *pWritten ); + ULONG Tell() const { return nFilledSize; } + void Seek( ULONG nPos ) { nFilledSize = nPos; } + + void Terminate(); +}; + +SV_DECL_IMPL_REF( SvFillLockBytes ) + +//============================================================================ +class SvSyncLockBytes: public SvOpenLockBytes +{ + SvAsyncLockBytesRef m_xAsyncLockBytes; + +public: + TYPEINFO(); + + /// Create a synchronous wrapper around existing asynchronous lock bytes. + /// + /// @param pTheAsyncLockBytes Must not be null. + inline SvSyncLockBytes(SvAsyncLockBytes * pTheAsyncLockBytes); + + /// Create a synchronous wrapper around an existing stream. + /// + /// @descr This is like first creating asynchronous lock bytes around the + /// stream and than creating a synchronous wrapper around the asynchronous + /// lock bytes. + /// + /// @param pStream Must not be null. + /// + /// @param bOwner True if these lock bytes own the stream (delete it on + /// destruction). + SvSyncLockBytes(SvStream * pStream, BOOL bOwner): + m_xAsyncLockBytes(new SvAsyncLockBytes(pStream, bOwner)) {} + + virtual const SvStream * GetStream() const + { return m_xAsyncLockBytes->GetStream(); } + + virtual void SetSynchronMode(BOOL bSync = TRUE) + { m_xAsyncLockBytes->SetSynchronMode(bSync); } + + virtual BOOL IsSynchronMode() const + { return m_xAsyncLockBytes->IsSynchronMode(); } + + virtual ErrCode ReadAt(ULONG nPos, void * pBuffer, ULONG nCount, + ULONG * pRead) const; + + virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount, + ULONG * pWritten); + + virtual ErrCode Flush() const { return m_xAsyncLockBytes->Flush(); } + + virtual ErrCode SetSize(ULONG nSize) + { return m_xAsyncLockBytes->SetSize(nSize); } + + virtual ErrCode LockRegion(ULONG nPos, ULONG nCount, LockType eType) + { return m_xAsyncLockBytes->LockRegion(nPos, nCount, eType); } + + virtual ErrCode UnlockRegion(ULONG nPos, ULONG nCount, LockType eType) + { return m_xAsyncLockBytes->UnlockRegion(nPos, nCount, eType); } + + virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag eFlag) + const + { return m_xAsyncLockBytes->Stat(pStat, eFlag); } + + virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount, + ULONG * pWritten) + { return m_xAsyncLockBytes->FillAppend(pBuffer, nCount, pWritten); } + + virtual ULONG Tell() const { return m_xAsyncLockBytes->Tell(); } + + virtual ULONG Seek(ULONG nPos) + { return m_xAsyncLockBytes->Seek(nPos); } + + virtual void Terminate() { m_xAsyncLockBytes->Terminate(); } +}; + +inline SvSyncLockBytes::SvSyncLockBytes(SvAsyncLockBytes * + pTheAsyncLockBytes): + m_xAsyncLockBytes(pTheAsyncLockBytes) +{ + DBG_ASSERT(m_xAsyncLockBytes.Is(), + "SvSyncLockBytes::SvSyncLockBytes(): Null"); +} + +SV_DECL_IMPL_REF(SvSyncLockBytes); + +//============================================================================ +struct SvCompositeLockBytes_Impl; +class SvCompositeLockBytes : public SvLockBytes +{ + SvCompositeLockBytes_Impl* pImpl; +public: + TYPEINFO(); + + SvCompositeLockBytes( ); + ~SvCompositeLockBytes(); + + void Append( SvLockBytes* pLockBytes, ULONG nPos, ULONG nOffset ); + ULONG RelativeOffset( ULONG nPos ) const; + void SetIsPending( BOOL bSet ); + SvLockBytes* GetLastLockBytes() const; + + virtual ErrCode ReadAt( + ULONG nPos, void* pBuffer, ULONG nCount, ULONG* pRead ) const; + virtual ErrCode WriteAt( + ULONG nPos, const void* pBuffer, ULONG nCount, ULONG* pWritten ); + virtual ErrCode Flush() const; + virtual ErrCode SetSize( ULONG nSize ); + virtual ErrCode LockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode UnlockRegion( ULONG nPos, ULONG nCount, LockType ); + virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; +}; + +SV_DECL_IMPL_REF( SvCompositeLockBytes ) + + +#endif diff --git a/svtools/inc/fltdefs.hxx b/svtools/inc/fltdefs.hxx new file mode 100644 index 000000000000..4cdf1b8f11f9 --- /dev/null +++ b/svtools/inc/fltdefs.hxx @@ -0,0 +1,196 @@ +/************************************************************************* + * + * $RCSfile: fltdefs.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:50 $ + * + * 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 _SOLAR_H +#include <tools/solar.h> +#endif +#include <vcl/bitmap.hxx> + +#include <string.h> + +#ifndef _FLTDEFS_HXX +#define _FLTDEFS_HXX + + +#if defined ( WIN ) || defined ( WNT ) + +#define RGBQUAD RGBQUADWIN + +typedef struct RGBQUAD +{ + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; + + RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) : + rgbBlue ( cBlue ), + rgbGreen ( cGreen ), + rgbRed ( cRed ), + rgbReserved ( 0 ) {}; +} RGBQUAD; + + +#ifdef WIN +typedef BYTE huge* PDIBBYTE; +#define MEMCPY hmemcpy +#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalLock(GlobalAlloc(GHND,(nSize)))) +#define GLOBALHANDLE(pPointer) ((HGLOBAL)GlobalHandle((*((size_t*)&(pPointer)+1)))) +#define GLOBALFREE(pPointer) (GlobalUnlock(GLOBALHANDLE((pPointer)))) +#define MEMSET( pDst, cByte, nCount ) \ +{ \ + PDIBBYTE pTmp = (PDIBBYTE) pDst; \ + for ( ULONG i = 0; i < nCount; i++ )\ + *pTmp++ = cByte; \ +} + +#else + +typedef BYTE* PDIBBYTE; +#define MEMCPY memcpy +#define MEMSET memset +#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalAlloc(GMEM_FIXED,(nSize))) +#define GLOBALFREE(pPointer) (GlobalFree((HGLOBAL)pPointer)) +#define GLOBALHANDLE(pPointer) ((HGLOBAL)(pPointer)) + +#endif +#else + +typedef BYTE* PDIBBYTE; +#define MEMCPY memcpy +#define MEMSET memset +#define GLOBALALLOC(nSize) ((PDIBBYTE)new BYTE[(nSize)]) +#define GLOBALFREE(pPointer) (delete[] (pPointer)) + +#endif + + +#if defined ( OS2 ) || defined ( UNX ) || defined ( MAC ) +void ReadBitmap( SvStream& rIStream, Bitmap& rBmp, USHORT nDefaultHeight = 0, ULONG nOffBits = 0 ); +void ReplaceInfoHeader( SvStream& rStm, BYTE* pBuffer ); + +#ifdef OS2 +#define RGBQUAD RGBQUADOS2 +#define BITMAPFILEHEADER BITMAPFILEHEADEROS2 +#define PBITMAPFILEHEADER PBITMAPFILEHEADEROS2 +#define BITMAPINFOHEADER BITMAPINFOHEADEROS2 +#define PBITMAPINFOHEADER PBITMAPINFOHEADEROS2 +#define BITMAPINFO BITMAPINFOOS2 +#define PBITMAPINFO PBITMAPINFOOS2 +#endif + +#if defined(MAC) && (defined(powerc) || defined (__powerc)) +#pragma options align=mac68k +#endif + +typedef struct RGBQUAD +{ + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; + + RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) : + rgbBlue ( cBlue ), + rgbGreen ( cGreen ), + rgbRed ( cRed ), + rgbReserved ( 0 ) {}; +} RGBQUAD; + +typedef struct BITMAPFILEHEADER +{ + UINT16 bfType; + UINT32 bfSize; + UINT16 bfReserved1; + UINT16 bfReserved2; + UINT32 bfOffBits; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER* PBITMAPFILEHEADER; + +typedef struct BITMAPINFOHEADER +{ + UINT32 biSize; + UINT32 biWidth; + UINT32 biHeight; + UINT16 biPlanes; + UINT16 biBitCount; + UINT32 biCompression; + UINT32 biSizeImage; + UINT32 biXPelsPerMeter; + UINT32 biYPelsPerMeter; + UINT32 biClrUsed; + UINT32 biClrImportant; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER* PBITMAPINFOHEADER; + +typedef struct BITMAPINFO +{ + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO; +typedef BITMAPINFO* PBITMAPINFO; + +#if defined(MAC) && (defined(powerc) || defined (__powerc)) +#pragma options align=reset +#endif + +#endif +#endif diff --git a/svtools/inc/gifread.hxx b/svtools/inc/gifread.hxx new file mode 100644 index 000000000000..7ec231f890d1 --- /dev/null +++ b/svtools/inc/gifread.hxx @@ -0,0 +1,269 @@ +/************************************************************************* + * + * $RCSfile: gifread.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _GIFREAD_HXX +#define _GIFREAD_HXX + +#ifdef VCL + +#ifndef _GRAPH_HXX +#include <vcl/graph.hxx> +#endif +#ifndef _BMPACC_HXX +#include <vcl/bmpacc.hxx> +#endif + +#else // VCL + +#ifndef _GEN_HXX +#include <tools/gen.hxx> +#endif +#ifndef _FLTDEFS_HXX +#include "fltdefs.hxx" +#endif + +#endif // VCL + +#ifdef _GIFPRIVATE + +// --------- +// - Enums - +// --------- + +enum GIFAction +{ + GLOBAL_HEADER_READING, + MARKER_READING, + EXTENSION_READING, + LOCAL_HEADER_READING, + FIRST_BLOCK_READING, + NEXT_BLOCK_READING, + ABORT_READING, + END_READING +}; + +// ------------------------------------------------------------------------ + +enum ReadState +{ + GIFREAD_OK, + GIFREAD_ERROR, + GIFREAD_NEED_MORE +}; + +// ------------- +// - GIFReader - +// ------------- + +class GIFLZWDecompressor; + +#ifdef VCL + +class SvStream; + +class GIFReader : public GraphicReader +{ + Graphic aImGraphic; + Animation aAnimation; + Bitmap aBmp8; + Bitmap aBmp1; + BitmapPalette aGPalette; + BitmapPalette aLPalette; + SvStream& rIStm; + void* pCallerData; + HPBYTE pSrcBuf; + GIFLZWDecompressor* pDecomp; + BitmapWriteAccess* pAcc8; + BitmapWriteAccess* pAcc1; + long nYAcc; + long nLastPos; + ULONG nLogWidth100; + ULONG nLogHeight100; + USHORT nTimer; + USHORT nGlobalWidth; // maximale Bildbreite aus Header + USHORT nGlobalHeight; // maximale Bildhoehe aus Header + USHORT nImageWidth; // maximale Bildbreite aus Header + USHORT nImageHeight; // maximale Bildhoehe aus Header + USHORT nImagePosX; + USHORT nImagePosY; + USHORT nImageX; // maximale Bildbreite aus Header + USHORT nImageY; // maximale Bildhoehe aus Header + USHORT nLastImageY; + USHORT nLastInterCount; + USHORT nLoops; + GIFAction eActAction; + BOOL bStatus; + BOOL bGCTransparent; // Ob das Bild Transparent ist, wenn ja: + BOOL bInterlaced; + BOOL bOverreadBlock; + BOOL bImGraphicReady; + BOOL bGlobalPalette; + BYTE nBackgroundColor; // Hintergrundfarbe + BYTE nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig + BYTE nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku) + BYTE cTransIndex1; + BYTE cNonTransIndex1; + + void ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ); + void ClearImageExtensions(); + BOOL CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, BOOL bWatchForBackgroundColor ); + BOOL ReadGlobalHeader(); + BOOL ReadExtension(); + BOOL ReadLocalHeader(); + ULONG ReadNextBlock(); + void FillImages( HPBYTE pBytes, ULONG nCount ); + void CreateNewBitmaps(); + BOOL ProcessGIF(); + +public: + + ReadState ReadGIF( Graphic& rGraphic ); + const Graphic& GetIntermediateGraphic(); + + GIFReader( SvStream& rStm, void* pCallData ); + virtual ~GIFReader(); +}; + +#else // VCL + +class GIFReader : public GraphicReader +{ + Graphic aImGraphic; + Animation aAnimation; + SvStream& rIStm; + void* pCallerData; + ULONG* pGPalette; // Format: 0x00RRGGBB, Groesse des Feldes: immer 256 + BYTE* pPalEntryFlag; + PDIBBYTE pDIB; + PDIBBYTE pDIBBytes; + PDIBBYTE pMonoDIB; + PDIBBYTE pMonoDIBBytes; + PDIBBYTE pSrcBuf; + PDIBBYTE pRow8; + PDIBBYTE pRow1; + PDIBBYTE pFile; + PDIBBYTE pMonoFile; + GIFLZWDecompressor* pDecomp; + long nLastPos; + long nWidthAl8; + long nWidthAl1; + long nTotal; + long nMonoTotal; + USHORT nTimer; + USHORT nGlobalWidth; // maximale Bildbreite aus Header + USHORT nGlobalHeight; // maximale Bildhoehe aus Header + USHORT nImageWidth; // maximale Bildbreite aus Header + USHORT nImageHeight; // maximale Bildhoehe aus Header + USHORT nImagePosX; + USHORT nImagePosY; + USHORT nImageX; // maximale Bildbreite aus Header + USHORT nImageY; // maximale Bildhoehe aus Header + USHORT nLastImageY; + USHORT nGPaletteSize; // Anzahl der belegten Eintraege in pPalette + USHORT nBlackIndex; + USHORT nLastInterCount; + USHORT nLoops; + GIFAction eActAction; + BOOL bStatic; // zeigt an, ob die GIF-Grafik animiert oder statisch ist + BOOL bStatus; + BOOL bDestTransparent; + BOOL bLocalDestTransparent; + BOOL bGCTransparent; // Ob das Bild Transparent ist, wenn ja: + BOOL bInterlaced; + BOOL bOverreadBlock; + BOOL bImGraphicReady; + BOOL bGlobalPalette; + BOOL bGIF89; + BYTE nBackgroundColor; // Hintergrundfarbe + BYTE nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig + BYTE nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku) + + USHORT ReadPaletteEntries( ULONG* pPal, USHORT nNumEntries ); + void ClearImageExtensions(); + BOOL CreateBitmaps( long nWidth, long nHeight, ULONG* pDIBPal, + USHORT nPalCount, BOOL bWatchForBackgroundColor ); + BOOL ReadGlobalHeader(); + BOOL ReadExtension(); + BOOL ReadLocalHeader(); + USHORT ReadNextBlock(); + void FillImages( PDIBBYTE pBytes, ULONG nCount ); + void CreateNewBitmaps(); + BOOL ProcessGIF(); + +public: + + ReadState ReadGIF( Graphic& rGraphic ); + const Graphic& GetIntermediateGraphic(); + + GIFReader( SvStream& rStm, void* pCallData ); + virtual ~GIFReader(); +}; + +#endif // VCL +#endif // _GIFPRIVATE + +// ------------- +// - ImportGIF - +// ------------- + + BOOL ImportGIF( SvStream& rStream, Graphic& rGraphic, void* pCallerData ); + +#endif // _GIFREAD_HXX diff --git a/svtools/inc/gradwrap.hxx b/svtools/inc/gradwrap.hxx new file mode 100644 index 000000000000..de8918c3afbb --- /dev/null +++ b/svtools/inc/gradwrap.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * $RCSfile: gradwrap.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _SVGEN_HXX +#include <svgen.hxx> +#endif + + +/****************************************************************************** +|* +|* class GradientWrapper +|* +|* Ersterstellung: KA 24.11.95 +|* letzte Aenderung: KA 24.11.95 +|* +|* Zeck: dient beim MetaFile-Export dazu, die eigentliche Berechungs- +|* funktionalitaet zu kapseln. Das Schreiben der Records fuer +|* die unterschiedlichen File-Formate geschieht ueber LinkHandler. +|* +|* Klassen, die diesen Wrapper benutzen, muessen drei Linkhandler +|* zur Verfuegung stellen, die im Ctor uebergeben werden: +|* +|* 1. Linkhandler zum Schreiben eines Records fuer Polygonausgabe +|* 2. Linkhandler zum Schreiben eines Records fuer PolyPolygonausgabe +|* 3. Linkhandler zum Schreiben eines Records fuer Setzen der Brush +|* +\******************************************************************************/ + + +class GradientWrapper +{ + Link aDrawPolyRecordHdl; + Link aDrawPolyPolyRecordHdl; + Link aSetFillInBrushRecordHdl; + + GradientWrapper() {}; + + +public: + GradientWrapper(const Link& rDrawPolyRecordHdl, + const Link& rDrawPolyPolyRecordHdl, + const Link& rSetFillInBrushHdl); + ~GradientWrapper(); + + + void WriteLinearGradient(const Rectangle& rRect, + const Gradient& rGradient); + void WriteRadialGradient(const Rectangle& rRect, + const Gradient& rGradient); + void WriteRectGradient(const Rectangle& rRect, + const Gradient& rGradient); +}; diff --git a/svtools/inc/htmlkywd.hxx b/svtools/inc/htmlkywd.hxx new file mode 100644 index 000000000000..c94a1978d584 --- /dev/null +++ b/svtools/inc/htmlkywd.hxx @@ -0,0 +1,716 @@ +/************************************************************************* + * + * $RCSfile: htmlkywd.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _HTMLKYWD_HXX +#define _HTMLKYWD_HXX + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +#ifndef SVTOOLS_CONSTASCII_DECL +#define SVTOOLS_CONSTASCII_DECL( n, s ) n[sizeof(s)] +#endif +#ifndef SVTOOLS_CONSTASCII_DEF +#define SVTOOLS_CONSTASCII_DEF( n, s ) n[sizeof(s)] = s +#endif + + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_doctype32, + "HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"" ); + + +// diese werden nur eingeschaltet +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_area, "AREA" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_base, "BASE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_comment, "!--" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_doctype, "!DOCTYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_embed, "EMBED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_figureoverlay, "OVERLAY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_horzrule, "HR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_horztab, "TAB" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_image, "IMG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_image2, "IMAGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_input, "INPUT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_isindex, "ISINDEX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_linebreak, "BR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_li, "LI" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_link, "LINK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_meta, "META" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_nextid, "NEXTID" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_nobr, "NOBR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_of, "OF" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_option, "OPTION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_param, "PARAM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_range, "RANGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_spacer, "SPACER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_wbr, "WBR" ); + +// diese werden wieder abgeschaltet +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_abbreviation, "ABBREV" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_above, "ABOVE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_acronym, "ACRONYM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_address, "ADDRESS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_anchor, "A" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_applet, "APPLET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_array, "ARRAY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_author, "AU" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_banner, "BANNER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_bar, "BAR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_basefont, "BASEFONT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_below, "BELOW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_bigprint, "BIG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_blink, "BLINK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_blockquote, "BLOCKQUOTE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_blockquote30, "BQ" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_body, "BODY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_bold, "B" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_boldtext, "BT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_box, "BOX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_caption, "CAPTION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_center, "CENTER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_citiation, "CITE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_code, "CODE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_col, "COL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_colgroup, "COLGROUP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_credit, "CREDIT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_dd, "DD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_deflist, "DL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_deletedtext, "DEL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_dirlist, "DIR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_division, "DIV" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_dot, "DOT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_doubledot, "DDOT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_dt, "DT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_emphasis, "EM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_figure, "FIG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_font, "FONT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_footnote, "FN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_form, "FORM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_frame, "FRAME" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_frameset, "FRAMESET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_hat, "HAT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head1, "H1" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head2, "H2" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head3, "H3" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head4, "H4" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head5, "H5" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head6, "H6" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_head, "HEAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_html, "HTML" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_iframe, "IFRAME" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ilayer, "ILAYER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_insertedtext, "INS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_italic, "I" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_item, "ITEM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_keyboard, "KBD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_language, "LANG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_layer, "LAYER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_listheader, "LH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_map, "MAP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_math, "MATH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_menulist, "MENU" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_multicol, "MULTICOL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_noembed, "NOEMBED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_noframe, "NOFRAME" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_noframes, "NOFRAMES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_noscript, "NOSCRIPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_note, "NOTE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_orderlist, "OL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_parabreak, "P" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_person, "PERSON" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_plaintext, "T" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_preformtxt, "PRE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_root, "ROOT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_row, "ROW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sample, "SAMP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_script, "SCRIPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_select, "SELECT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_shortquote, "Q" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_smallprint, "SMALL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_span, "SPAN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_squareroot, "AQRT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_strikethrough, "S" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_strong, "STRONG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_style, "STYLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_subscript, "SUB" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_superscript, "SUP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_table, "TABLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tablerow, "TR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tabledata, "TD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tableheader, "TH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tbody, "TBODY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_teletype, "TT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_text, "TEXT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_textarea, "TEXTAREA" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_textflow, "TEXTFLOW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tfoot, "TFOOT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_thead, "THEAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_tilde, "TILDE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_title, "TITLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_underline, "U" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_unorderlist, "UL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_variable, "VAR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_vector, "VEC" ); + +// obsolete features +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_xmp, "XMP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_listing, "LISTING" ); + +// proposed features +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_definstance, "DFN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_strike, "STRIKE" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_bgsound, "BGSOUND" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_comment2, "COMMENT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_marquee, "MARQUEE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_plaintext2, "PLAINTEXT" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdfield, "SDFIELD" ); + +// die Namen fuer alle Zeichen +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_lt, "lt" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_gt, "gt" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_amp, "amp" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_quot, "quot" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Aacute, "Aacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Agrave, "Agrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Acirc, "Acirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Atilde, "Atilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Aring, "Aring" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Auml, "Auml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_AElig, "AElig" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ccedil, "Ccedil" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Eacute, "Eacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Egrave, "Egrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ecirc, "Ecirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Euml, "Euml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Iacute, "Iacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Igrave, "Igrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Icirc, "Icirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Iuml, "Iuml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_ETH, "ETH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ntilde, "Ntilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Oacute, "Oacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ograve, "Ograve" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ocirc, "Ocirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Otilde, "Otilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ouml, "Ouml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Oslash, "Oslash" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Uacute, "Uacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ugrave, "Ugrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Ucirc, "Ucirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Uuml, "Uuml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_Yacute, "Yacute" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_THORN, "THORN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_szlig, "szlig" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_aacute, "aacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_agrave, "agrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_acirc, "acirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_atilde, "atilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_aring, "aring" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_auml, "auml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_aelig, "aelig" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ccedil, "ccedil" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_eacute, "eacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_egrave, "egrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ecirc, "ecirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_euml, "euml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_iacute, "iacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_igrave, "igrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_icirc, "icirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_iuml, "iuml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_eth, "eth" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ntilde, "ntilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_oacute, "oacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ograve, "ograve" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ocirc, "ocirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_otilde, "otilde" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ouml, "ouml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_oslash, "oslash" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_uacute, "uacute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ugrave, "ugrave" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ucirc, "ucirc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_uuml, "uuml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_yacute, "yacute" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_thorn, "thorn" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_yuml, "yuml" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_acute, "acute" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_brvbar, "brvbar" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_cedil, "cedil" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_cent, "cent" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_copy, "copy" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_curren, "curren" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_deg, "deg" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_divide, "divide" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_frac12, "frac12" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_frac14, "frac14" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_frac34, "frac34" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_iexcl, "iexcl" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_iquest, "iquest" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_laquo, "laquo" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_macr, "macr" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_micro, "micro" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_middot, "middot" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_nbsp, "nbsp" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_not, "not" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ordf, "ordf" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_ordm, "ordm" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_para, "para" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_plusmn, "plusmn" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_pound, "pound" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_raquo, "raquo" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_reg, "reg" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_sect, "sect" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_shy, "shy" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_sup1, "sup1" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_sup2, "sup2" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_sup3, "sup3" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_times, "times" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_uml, "uml" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_yen, "yen" ); + +// Netscape kennt noch ein paar in Grossbuchstaben ... +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_LT, "LT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_GT, "GT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_AMP, "AMP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_C_QUOT, "QUOT" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_COPY, "COPY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_S_REG, "REG" ); + +// HTML Attribut-Token (=Optionen) + +// Attribute ohne Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_box, "BOX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_checked, "CHECKED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_compact, "COMPACT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_continue, "CONTINUE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_controls, "CONTROLS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_declare, "DECLARE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_disabled, "DISABLED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_folded, "FOLDED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_ismap, "ISMAP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_mayscript, "MAYSCRIPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_multiple, "MULTIPLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_noflow, "NOFLOW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_nohref, "NOHREF" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_noresize, "NORESIZE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_noshade, "NOSHADE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_nowrap, "NOWRAP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_plain, "PLAIN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdfixed, "SDFIXED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_selected, "SELECTED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_shapes, "SHAPES" ); + +// Attribute mit einem String als Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_above, "ABOVE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_accesskey, "ACCESSKEY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_accept, "ACCEPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_add_date, "ADD_DATE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_alt, "ALT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_axes, "AXES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_axis, "AXIS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_below, "BELOW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_char, "CHAR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_class, "CLASS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_clip, "CLIP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_code, "CODE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_codetype, "CODETYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_colspec, "COLSPEC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_content, "CONTENT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_coords, "COORDS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_dp, "DP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_enctype, "ENCTYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_error, "ERROR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_face, "FACE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_frameborder, "FRAMEBORDER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_httpequiv, "HTTP-EQUIV" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_language, "LANGUAGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_last_modified, "LAST_MODIFIED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_last_visit, "LAST_VISIT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_md, "MD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_n, "N" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_name, "NAME" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_notation, "NOTATION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_prompt, "PROMPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_shape, "SHAPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_standby, "STANDBY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_style, "STYLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_title, "TITLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_value, "VALUE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDval, "SDVAL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDnum, "SDNUM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdlibrary, "SDLIBRARY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdmodule, "SDMODULE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdevent, "SDEVENT-" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdaddparam, "SDADDPARAM-" ); + +// Attribute mit einem SGML-Identifier als Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_from, "FROM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_id, "ID" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_target, "TARGET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_to, "TO" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_until, "UNTIL" ); + +// Attribute mit einem URI als Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_action, "ACTION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_background, "BACKGROUND" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_classid, "CLASSID" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_codebase, "CODEBASE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_data, "DATA" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_dynsrc, "DYNSRC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_dynsync, "DYNSYNC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_imagemap, "IMAGEMAP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_href, "HREF" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_lowsrc, "LOWSRC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_script, "SCRIPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_src, "SRC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_usemap, "USEMAP" ); + +// Attribute mit Entity-Namen als Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_dingbat, "DINGBAT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sym, "SYM" ); + +// Attribute mit einer Farbe als Wert (alle Netscape) +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_alink, "ALINK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_bgcolor, "BGCOLOR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_bordercolor, "BORDERCOLOR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_bordercolorlight, "BORDERCOLORLIGHT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_bordercolordark, "BORDERCOLORDARK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_color, "COLOR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_link, "LINK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_text, "TEXT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_vlink, "VLINK" ); + +// Attribute mit einem numerischen Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_border, "BORDER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_cellspacing, "CELLSPACING" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_cellpadding, "CELLPADDING" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_charoff, "CHAROFF" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_colspan, "COLSPAN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_framespacing, "FRAMESPACING" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_gutter, "GUTTER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_indent, "INDENT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_height, "HEIGHT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_hspace, "HSPACE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_left, "LEFT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_leftmargin, "LEFTMARGIN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_loop, "LOOP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_marginheight, "MARGINHEIGHT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_marginwidth, "MARGINWIDTH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_max, "MAX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_maxlength, "MAXLENGTH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_min, "MIN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_pagex, "PAGEX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_pagey, "PAGEY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_pointsize, "POINT-SIZE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_rowspan, "ROWSPAN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_scrollamount, "SCROLLAMOUNT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_scrolldelay, "SCROLLDELAY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_seqnum, "SEQNUM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_skip, "SKIP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_span, "SPAN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_tabindex, "TABINDEX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_top, "TOP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_topmargin, "TOPMARGIN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_vspace, "VSPACE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_weight, "WEIGHT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_width, "WIDTH" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_x, "X" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_y, "Y" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_zindex, "Z-INDEX" ); + +// Attribute mit Enum-Werten +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_behavior, "BEHAVIOR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_bgproperties, "BGPROPERTIES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_clear, "CLEAR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_dir, "DIR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_direction, "DIRECTION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_format, "FORMAT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_frame, "FRAME" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_lang, "LANG" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_method, "METHOD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_palette, "PALETTE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_rel, "REL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_rev, "REV" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_rules, "RULES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_scrolling, "SCROLLING" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_sdreadonly, "READONLY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_subtype, "SUBTYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_type, "TYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_valign, "VALIGN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_valuetype, "VALUETYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_visibility, "VISIBILITY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_wrap, "WRAP" ); + +// Attribute mit Script-Code als Wert +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onblur, "ONBLUR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onchange, "ONCHANGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onclick, "ONCLICK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onfocus, "ONFOCUS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onload, "ONLOAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onmouseover, "ONMOUSEOVER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onreset, "ONRESET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onselect, "ONSELECT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onsubmit, "ONSUBMIT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onunload, "ONUNLOAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onabort, "ONABORT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onerror, "ONERROR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_onmouseout, "ONMOUSEOUT" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonblur, "SDONBLUR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonchange, "SDONCHANGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonclick, "SDONCLICK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonfocus, "SDONFOCUS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonload, "SDONLOAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonmouseover, "SDONMOUSEOVER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonreset, "SDONRESET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonselect, "SDONSELECT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonsubmit, "SDONSUBMIT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonunload, "SDONUNLOAD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonabort, "SDONABORT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonerror, "SDONERROR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_SDonmouseout, "SDONMOUSEOUT" ); + +// Attribute mit Kontext-abhaengigen Werten +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_align, "ALIGN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_cols, "COLS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_rows, "ROWS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_start, "START" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_size, "SIZE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_O_units, "UNITS" ); + + +// Werte von <INPUT TYPE=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_text, "TEXT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_password, "PASSWORD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_checkbox, "CHECKBOX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_radio, "RADIO" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_range, "RANGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_scribble, "SCRIBBLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_file, "FILE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_hidden, "HIDDEN" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_submit, "SUBMIT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_image, "IMAGE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_reset, "RESET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_IT_button, "BUTTON" ); + +// Werte von <TABLE FRAME=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_void, "VOID" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_above, "ABOVE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_below, "BELOW" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_hsides, "HSIDES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_lhs, "LHS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_rhs, "RHS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_vsides, "VSIDES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_box, "BOX" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TF_border, "BORDER" ); + +// Werte von <TABLE RULES=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TR_none, "NONE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TR_groups, "GROUPS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TR_rows, "ROWS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TR_cols, "COLS" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_TR_all, "ALL" ); + +// Werte von <P, H?, TR, TH, TD ALIGN=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_left, "LEFT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_center, "CENTER" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_middle, "MIDDLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_right, "RIGHT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_justify, "JUSTIFY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_char, "CHAR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_all, "ALL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_AL_none, "NONE" ); + +// Werte von <TR VALIGN=...>, <IMG ALIGN=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_top, "TOP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_middle, "MIDDLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_bottom, "BOTTOM" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_baseline, "BASELINE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_texttop, "TEXTTOP" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_absmiddle, "ABSMIDDLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_VA_absbottom, "ABSBOTTOM" ); + +// Werte von <AREA SHAPE=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_rect, "RECT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_rectangle, "RECTANGLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_circ, "CIRC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_circle, "CIRCLE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_poly, "POLY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_polygon, "POLYGON" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SH_default, "DEFAULT" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_starbasic, "STARBASIC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_javascript, "JAVASCRIPT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_javascript11, "JAVASCRIPT1.1" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_livescript, "LIVESCRIPT" ); +//extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_vbscript, "VBSCRIPT" ); +//extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_unused_javascript, "UNUSED JAVASCRIPT" ); +//extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LG_starone, "StarScript" ); + +// ein par Werte fuer unser StarBASIC-Support +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SB_library, "$LIBRARY:" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SB_module, "$MODULE:" ); + + +// Werte von <FORM METHOD=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_METHOD_get, "GET" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_METHOD_post, "POST" ); + +// Werte von <META CONTENT/HTTP-EQUIV=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_refresh, "REFRESH" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_generator, "GENERATOR" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_author, "AUTHOR" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_classification, "CLASSIFICATION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_description, "DESCRIPTION" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_keywords, "KEYWORDS" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_changed, "CHANGED" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_changedby, "CHANGEDBY" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_created, "CREATED" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_content_type, "CONTENT-TYPE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_content_script_type, "CONTENT-SCRIPT-TYPE" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_sdendnote, "SDENDNOTE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_META_sdfootnote, "SDFOOTNOTE" ); + +// Werte von <UL TYPE=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ULTYPE_disc, "DISC" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ULTYPE_square, "SQUARE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ULTYPE_circle, "CIRCLE" ); + +// Werte von <FRAMESET SCROLLING=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SCROLL_yes, "YES" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SCROLL_no, "NO" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SCROLL_auto, "AUTO" ); + +// Werte von <MULTICOL TYPE=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_MCTYPE_horizontal, "HORIZONTAL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_MCTYPE_vertical, "VERTICAL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_MCTYPE_box, "BOX" ); + +// Werte von <MARQUEE BEHAVIOUR=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_BEHAV_scroll, "SCROLL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_BEHAV_slide, "SLIDE" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_BEHAV_alternate, "ALTERNATE" ); + +// Werte von <MARQUEE LOOP=...> +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_LOOP_infinite, "INFINITE" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SPTYPE_block, "BLOCK" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SPTYPE_horizontal, "HORIZONTAL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_SPTYPE_vertical, "VERTICAL" ); + + +// interne Grafik-Namen +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_private_image, "private:image/" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_internal_gopher, "internal-gopher-" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_internal_icon, "internal-icon-" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_binary, "binary" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_image, "image" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_index, "index" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_menu, "menu" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_movie, "movie" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_sound, "sound" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_telnet, "telnet" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_text, "text" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_GOPHER_unknown, "unknown" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_ICON_baddata, "baddata" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_ICON_delayed, "delayed" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_ICON_embed, "embed" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_ICON_insecure, "insecure" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_INT_ICON_notfound, "notfound" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdendnote, "sdendnote" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdendnote_anc, "sdendnoteanc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdendnote_sym, "sdendnotesym" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdfootnote, "sdfootnote" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdfootnote_anc, "sdfootnoteanc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_sdfootnote_sym, "sdfootnotesym" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_FTN_anchor, "anc" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_FTN_symbol, "sym" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_WW_off, "OFF" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_WW_hard, "HARD" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_WW_soft, "SOFT" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_WW_virtual, "VIRTUAL" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_WW_physical, "PHYSICAL" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_on, "on" ); + +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ET_url, "application/x-www-form-urlencoded" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ET_multipart, "multipart/form-data" ); +extern sal_Char __FAR_DATA SVTOOLS_CONSTASCII_DECL( sHTML_ET_text, "text/plain" ); + + +#endif diff --git a/svtools/inc/htmltokn.h b/svtools/inc/htmltokn.h new file mode 100644 index 000000000000..9a46d8761989 --- /dev/null +++ b/svtools/inc/htmltokn.h @@ -0,0 +1,749 @@ +/************************************************************************* + * + * $RCSfile: htmltokn.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _HTMLTOKN_H +#define _HTMLTOKN_H + +#ifndef _SAL_TYPES_H_ +#include <sal/types.h> +#endif +#ifndef _SOLAR_h +#include <tools/solar.h> +#endif + +class String; + +// suche das Char zu dem CharNamen +sal_Unicode GetHTMLCharName( const String& rName ); + +// suche die TokenID zu dem Token +int GetHTMLToken( const String& rName ); + +// suche die TokenId zu einemm Attribut-Token +int GetHTMLOption( const String& rName ); + +// suche die 24-bit-Farbe zu einem Farbnamen (nicht gefunden = ULONG_MAX) +ULONG GetHTMLColor( const String& rName ); + +// beginnen immer ab 256, groesser als ein char +const int HTML_TOKEN_START = 0x100; +const int HTML_TOKEN_ONOFF = 0x200; +const int HTML_TOKEN_MICROSOFT = 0x1000; + +enum HTML_TOKEN_IDS +{ + HTML_TEXTTOKEN = HTML_TOKEN_START, + HTML_SINGLECHAR, + HTML_NEWPARA, + HTML_TABCHAR, + HTML_RAWDATA, + HTML_LINEFEEDCHAR, + + // diese werden nur eingeschaltet + HTML_AREA, // Netscape 2.0 + HTML_BASE, // HTML 3.0 + HTML_COMMENT, + HTML_DOCTYPE, + HTML_EMBED, // Netscape 2.0 </EMBED> ignorieren + HTML_FIGUREOVERLAY, // HTML 3.0 + HTML_HORZRULE, // </HR> ignorieren + HTML_HORZTAB, // HTML 3.0 + HTML_IMAGE, // </IMG> ignorieren + HTML_INPUT, // </INPUT> ignorieren + HTML_ISINDEX, // HTML 3.0 + HTML_LINEBREAK, // </BR> -> <BR> + HTML_LINK, // HTML 3.0 + HTML_META, // HTML 3.0 </META> ignorieren + HTML_NEXTID, // HTML 3.0 + HTML_OF, // HTML 3.0 + HTML_OPTION, // </OPTION> ignorieren + HTML_PARAM, // HotJava + HTML_RANGE, // HTML 3.0 + HTML_SPACER, // Netscape 3.0b5 // </SPACER> ignorieren + HTML_WBR, // Netscape + + // Tokens, die ueber HTML-Charakter erkannt werden + HTML_NONBREAKSPACE, + HTML_SOFTHYPH, + + // diese werden wieder abgeschaltet, + // der off-Wert liegt immer dahinter (+1) !! + HTML_ABBREVIATION_ON = HTML_TOKEN_ONOFF, // HTML 3.0 + HTML_ABBREVIATION_OFF, // HTML 3.0 + HTML_ABOVE_ON, // HTML 3.0 + HTML_ABOVE_OFF, // HTML 3.0 + HTML_ACRONYM_ON, // HTML 3.0 + HTML_ACRONYM_OFF, // HTML 3.0 + HTML_ADDRESS_ON, + HTML_ADDRESS_OFF, + HTML_ANCHOR_ON, + HTML_ANCHOR_OFF, + HTML_APPLET_ON, // HotJava + HTML_APPLET_OFF, // HotJava + HTML_ARRAY_ON, // HTML 3.0 + HTML_ARRAY_OFF, // HTML 3.0 + HTML_AUTHOR_ON, // HTML 3.0 + HTML_AUTHOR_OFF, // HTML 3.0 + HTML_BANNER_ON, // HTML 3.0 + HTML_BANNER_OFF, // HTML 3.0 + HTML_BAR_ON, // HTML 3.0 + HTML_BAR_OFF, // HTML 3.0 + HTML_BASEFONT_ON, // Netscape + HTML_BASEFONT_OFF, // Netscape + HTML_BELOW_ON, // HTML 3.0 + HTML_BELOW_OFF, // HTML 3.0 + HTML_BIGPRINT_ON, // HTML 3.0 + HTML_BIGPRINT_OFF, // HTML 3.0 + HTML_BLINK_ON, // Netscape + HTML_BLINK_OFF, // Netscape + HTML_BLOCKQUOTE30_ON, // HTML 3.0 + HTML_BLOCKQUOTE30_OFF, // HTML 3.0 + HTML_BLOCKQUOTE_ON, + HTML_BLOCKQUOTE_OFF, + HTML_BODY_ON, + HTML_BODY_OFF, + HTML_BOLDTEXT_ON, // HTML 3.0 + HTML_BOLDTEXT_OFF, // HTML 3.0 + HTML_BOLD_ON, + HTML_BOLD_OFF, + HTML_BOX_ON, // HTML 3.0 + HTML_BOX_OFF, // HTML 3.0 + HTML_CAPTION_ON, // HTML 3.0 + HTML_CAPTION_OFF, // HTML 3.0 + HTML_CENTER_ON, // Netscape + HTML_CENTER_OFF, // Netscape + HTML_CITIATION_ON, + HTML_CITIATION_OFF, + HTML_CODE_ON, + HTML_CODE_OFF, + HTML_COL_ON, // HTML3 Table Model Draft + HTML_COL_OFF, // HTML3 Table Model Draft + HTML_COLGROUP_ON, // HTML3 Table Model Draft + HTML_COLGROUP_OFF, // HTML3 Table Model Draft + HTML_CREDIT_ON, // HTML 3.0 + HTML_CREDIT_OFF, // HTML 3.0 + HTML_DD_ON, + HTML_DD_OFF, + HTML_DEFLIST_ON, + HTML_DEFLIST_OFF, + HTML_DELETEDTEXT_ON, // HTML 3.0 + HTML_DELETEDTEXT_OFF, // HTML 3.0 + HTML_DIRLIST_ON, + HTML_DIRLIST_OFF, + HTML_DIVISION_ON, // HTML 3.0 + HTML_DIVISION_OFF, // HTML 3.0 + HTML_DOT_ON, // HTML 3.0 + HTML_DOT_OFF, // HTML 3.0 + HTML_DOUBLEDOT_ON, // HTML 3.0 + HTML_DOUBLEDOT_OFF, // HTML 3.0 + HTML_DT_ON, + HTML_DT_OFF, + HTML_EMPHASIS_ON, + HTML_EMPHASIS_OFF, + HTML_FIGURE_ON, // HTML 3.0 + HTML_FIGURE_OFF, // HTML 3.0 + HTML_FONT_ON, // Netscape + HTML_FONT_OFF, // Netscape + HTML_FOOTNOTE_ON, // HTML 3.0 + HTML_FOOTNOTE_OFF, // HTML 3.0 + HTML_FORM_ON, + HTML_FORM_OFF, + HTML_FRAME_ON, // Netscape 2.0 + HTML_FRAME_OFF, // Netscape 2.0 + HTML_FRAMESET_ON, // Netscape 2.0 + HTML_FRAMESET_OFF, // Netscape 2.0 + HTML_HAT_ON, // HTML 3.0 + HTML_HAT_OFF, // HTML 3.0 + HTML_HEAD1_ON, + HTML_HEAD1_OFF, + HTML_HEAD2_ON, + HTML_HEAD2_OFF, + HTML_HEAD3_ON, + HTML_HEAD3_OFF, + HTML_HEAD4_ON, + HTML_HEAD4_OFF, + HTML_HEAD5_ON, + HTML_HEAD5_OFF, + HTML_HEAD6_ON, + HTML_HEAD6_OFF, + HTML_HEAD_ON, + HTML_HEAD_OFF, + HTML_HTML_ON, + HTML_HTML_OFF, + HTML_IFRAME_ON, // IE 3.0b2 + HTML_IFRAME_OFF, // IE 3.0b2 + HTML_ILAYER_ON, + HTML_ILAYER_OFF, + HTML_INSERTEDTEXT_ON, // HTML 3.0 + HTML_INSERTEDTEXT_OFF, // HTML 3.0 + HTML_ITALIC_ON, + HTML_ITALIC_OFF, + HTML_ITEM_ON, // HTML 3.0 + HTML_ITEM_OFF, // HTML 3.0 + HTML_KEYBOARD_ON, + HTML_KEYBOARD_OFF, + HTML_LAYER_ON, + HTML_LAYER_OFF, + HTML_LANGUAGE_ON, // HTML 3.0 + HTML_LANGUAGE_OFF, // HTML 3.0 + HTML_LISTHEADER_ON, // HTML 3.0 + HTML_LISTHEADER_OFF, // HTML 3.0 + HTML_LI_ON, + HTML_LI_OFF, + HTML_MAP_ON, // Netscape 2.0 + HTML_MAP_OFF, // Netscape 2.0 + HTML_MATH_ON, // HTML 3.0 + HTML_MATH_OFF, // HTML 3.0 + HTML_MENULIST_ON, + HTML_MENULIST_OFF, + HTML_MULTICOL_ON, // Netscape 3.0b5 + HTML_MULTICOL_OFF, // Netscape 3.0b5 + HTML_NOBR_ON, // Netscape + HTML_NOBR_OFF, // Netscape + HTML_NOEMBED_ON, // Netscape 2.0 + HTML_NOEMBED_OFF, // Netscape 2.0 + HTML_NOFRAMES_ON, // Netscape 2.0 + HTML_NOFRAMES_OFF, // Netscape 2.0 + HTML_NOSCRIPT_ON, // Netscape 2.0 + HTML_NOSCRIPT_OFF, // Netscape 3.0 + HTML_NOTE_ON, // HTML 3.0 + HTML_NOTE_OFF, // HTML 3.0 + HTML_ORDERLIST_ON, + HTML_ORDERLIST_OFF, + HTML_PARABREAK_ON, + HTML_PARABREAK_OFF, + HTML_PERSON_ON, // HTML 3.0 + HTML_PERSON_OFF, // HTML 3.0 + HTML_PLAINTEXT_ON, // HTML 3.0 + HTML_PLAINTEXT_OFF, // HTML 3.0 + HTML_PREFORMTXT_ON, + HTML_PREFORMTXT_OFF, + HTML_ROOT_ON, // HTML 3.0 + HTML_ROOT_OFF, // HTML 3.0 + HTML_ROW_ON, // HTML 3.0 + HTML_ROW_OFF, // HTML 3.0 + HTML_SAMPLE_ON, + HTML_SAMPLE_OFF, + HTML_SCRIPT_ON, // HTML 3.2 + HTML_SCRIPT_OFF, // HTML 3.2 + HTML_SELECT_ON, + HTML_SELECT_OFF, + HTML_SHORTQUOTE_ON, // HTML 3.0 + HTML_SHORTQUOTE_OFF, // HTML 3.0 + HTML_SMALLPRINT_ON, // HTML 3.0 + HTML_SMALLPRINT_OFF, // HTML 3.0 + HTML_SPAN_ON, // Style Sheets + HTML_SPAN_OFF, // Style Sheets + HTML_SQUAREROOT_ON, // HTML 3.0 + HTML_SQUAREROOT_OFF, // HTML 3.0 + HTML_STRIKETHROUGH_ON, // HTML 3.0 + HTML_STRIKETHROUGH_OFF, // HTML 3.0 + HTML_STRONG_ON, + HTML_STRONG_OFF, + HTML_STYLE_ON, // HTML 3.0 + HTML_STYLE_OFF, // HTML 3.0 + HTML_SUBSCRIPT_ON, // HTML 3.0 + HTML_SUBSCRIPT_OFF, // HTML 3.0 + HTML_SUPERSCRIPT_ON, // HTML 3.0 + HTML_SUPERSCRIPT_OFF, // HTML 3.0 + HTML_TABLE_ON, // HTML 3.0 + HTML_TABLE_OFF, // HTML 3.0 + HTML_TABLEDATA_ON, // HTML 3.0 + HTML_TABLEDATA_OFF, // HTML 3.0 + HTML_TABLEHEADER_ON, // HTML 3.0 + HTML_TABLEHEADER_OFF, // HTML 3.0 + HTML_TABLEROW_ON, // HTML 3.0 + HTML_TABLEROW_OFF, // HTML 3.0 + HTML_TBODY_ON, // HTML3 Table Model Draft + HTML_TBODY_OFF, // HTML3 Table Model Draft + HTML_TELETYPE_ON, + HTML_TELETYPE_OFF, + HTML_TEXTAREA_ON, + HTML_TEXTAREA_OFF, + HTML_TEXTFLOW_ON, // HTML 3.2 + HTML_TEXTFLOW_OFF, // HTML 3.2 + HTML_TEXT_ON, // HTML 3.0 + HTML_TEXT_OFF, // HTML 3.0 + HTML_TFOOT_ON, // HTML3 Table Model Draft + HTML_TFOOT_OFF, // HTML3 Table Model Draft + HTML_THEAD_ON, // HTML3 Table Model Draft + HTML_THEAD_OFF, // HTML3 Table Model Draft + HTML_TILDE_ON, // HTML 3.0 + HTML_TILDE_OFF, // HTML 3.0 + HTML_TITLE_ON, + HTML_TITLE_OFF, + HTML_UNDERLINE_ON, + HTML_UNDERLINE_OFF, + HTML_UNORDERLIST_ON, + HTML_UNORDERLIST_OFF, + HTML_VARIABLE_ON, + HTML_VARIABLE_OFF, + HTML_VECTOR_ON, // HTML 3.0 + HTML_VECTOR_OFF, // HTML 3.0 + + // obsolete features + HTML_XMP_ON, + HTML_XMP_OFF, + HTML_LISTING_ON, + HTML_LISTING_OFF, + + // proposed features + HTML_DEFINSTANCE_ON, + HTML_DEFINSTANCE_OFF, + HTML_STRIKE_ON, + HTML_STRIKE_OFF, + + HTML_UNKNOWNCONTROL_ON, + HTML_UNKNOWNCONTROL_OFF, + + HTML_BGSOUND = HTML_TOKEN_MICROSOFT|HTML_TOKEN_START, + + HTML_COMMENT2_ON = HTML_TOKEN_MICROSOFT|HTML_TOKEN_ONOFF, // HTML 2.0 ? + HTML_COMMENT2_OFF, // HTML 2.0 ? + HTML_MARQUEE_ON, + HTML_MARQUEE_OFF, + HTML_PLAINTEXT2_ON, // HTML 2.0 ? + HTML_PLAINTEXT2_OFF, // HTML 2.0 ? + + HTML_SDFIELD_ON, + HTML_SDFIELD_OFF +}; + +// HTML Attribut-Token (=Optionen) + +// beginnen immer ab 256, groesser als ein char +const int HTML_OPTION_START = 0x100; + +enum HTML_OPTION_IDS +{ +HTML_OPTION_BOOL_START = HTML_OPTION_START, + +// Attribute ohne Wert + HTML_O_BOX = HTML_OPTION_BOOL_START, + HTML_O_CHECKED, + HTML_O_COMPACT, + HTML_O_CONTINUE, + HTML_O_CONTROLS, // IExplorer 2.0 + HTML_O_DECLARE, // IExplorer 3.0b5 + HTML_O_DISABLED, + HTML_O_FOLDED, // Netscape internal + HTML_O_ISMAP, + HTML_O_MAYSCRIPT, // Netcape 3.0 + HTML_O_MULTIPLE, + HTML_O_NOFLOW, + HTML_O_NOHREF, // Netscape + HTML_O_NORESIZE, // Netscape 2.0 + HTML_O_NOSHADE, // Netscape + HTML_O_NOWRAP, + HTML_O_PLAIN, + HTML_O_SDFIXED, + HTML_O_SELECTED, + HTML_O_SHAPES, // IExplorer 3.0b5 +HTML_OPTION_BOOL_END, + +// Attribute mit einem String als Wert +HTML_OPTION_STRING_START = HTML_OPTION_BOOL_END, + HTML_O_ABOVE = HTML_OPTION_STRING_START, + HTML_O_ACCEPT, + HTML_O_ACCESSKEY, + HTML_O_ADD_DATE, // Netscape internal + HTML_O_ALT, + HTML_O_AXES, + HTML_O_AXIS, + HTML_O_BELOW, + HTML_O_CHAR, // HTML3 Table Model Draft + HTML_O_CLASS, + HTML_O_CLIP, + HTML_O_CODE, // HotJava + HTML_O_CODETYPE, + HTML_O_COLSPEC, + HTML_O_CONTENT, + HTML_O_COORDS, // Netscape 2.0 + HTML_O_DP, + HTML_O_ENCTYPE, + HTML_O_ERROR, + HTML_O_FACE, // IExplorer 2.0 + HTML_O_FRAMEBORDER, // IExplorer 3.0 + HTML_O_HTTPEQUIV, + HTML_O_LANGUAGE, // JavaScript + HTML_O_LAST_MODIFIED, // Netscape internal + HTML_O_LAST_VISIT, // Netscape internal + HTML_O_MD, + HTML_O_N, + HTML_O_NAME, + HTML_O_NOTATION, + HTML_O_PROMPT, + HTML_O_SHAPE, + HTML_O_STANDBY, + HTML_O_STYLE, // Style Sheets + HTML_O_TITLE, + HTML_O_VALUE, + HTML_O_SDVAL, // StarDiv NumberValue + HTML_O_SDNUM, // StarDiv NumberFormat + HTML_O_SDLIBRARY, + HTML_O_SDMODULE, +HTML_OPTION_STRING_END, + +// Attribute mit einem SGML-Identifier als Wert +HTML_OPTION_SGMLID_START = HTML_OPTION_STRING_END, + HTML_O_FROM = HTML_OPTION_SGMLID_START, + HTML_O_ID, + HTML_O_TARGET, // Netscape 2.0 + HTML_O_TO, + HTML_O_UNTIL, +HTML_OPTION_SGMLID_END, + +// Attribute mit einem URI als Wert +HTML_OPTION_URI_START = HTML_OPTION_SGMLID_END, + HTML_O_ACTION = HTML_OPTION_URI_START, + HTML_O_BACKGROUND, + HTML_O_CLASSID, + HTML_O_CODEBASE, // HotJava + HTML_O_DATA, + HTML_O_DYNSRC, // IExplorer 3.0 + HTML_O_DYNSYNC, // IExplorer 2.0 + HTML_O_IMAGEMAP, + HTML_O_HREF, + HTML_O_LOWSRC, // Netscape 3.0 + HTML_O_SCRIPT, + HTML_O_SRC, + HTML_O_USEMAP, // Netscape 2.0 +HTML_OPTION_URI_END, + +// Attribute mit Entity-Namen als Wert +HTML_OPTION_ENTITY_START = HTML_OPTION_URI_END, + HTML_O_DINGBAT = HTML_OPTION_ENTITY_START, + HTML_O_SYM, +HTML_OPTION_ENTITY_END, + +// Attribute mit einer Farbe als Wert (alle Netscape) +HTML_OPTION_COLOR_START = HTML_OPTION_ENTITY_END, + HTML_O_ALINK = HTML_OPTION_COLOR_START, + HTML_O_BGCOLOR, + HTML_O_BORDERCOLOR, // IExplorer 2.0 + HTML_O_BORDERCOLORLIGHT, // IExplorer 2.0 + HTML_O_BORDERCOLORDARK, // IExplorer 2.0 + HTML_O_COLOR, + HTML_O_LINK, + HTML_O_TEXT, + HTML_O_VLINK, +HTML_OPTION_COLOR_END, + +// Attribute mit einem numerischen Wert +HTML_OPTION_NUMBER_START = HTML_OPTION_COLOR_END, + HTML_O_BORDER = HTML_OPTION_NUMBER_START, + HTML_O_CELLSPACING, // HTML3 Table Model Draft + HTML_O_CELLPADDING, // HTML3 Table Model Draft + HTML_O_CHAROFF, // HTML3 Table Model Draft + HTML_O_COLSPAN, + HTML_O_FRAMESPACING, // IExplorer 3.0 + HTML_O_GUTTER, // Netscape 3.0b5 + HTML_O_INDENT, + HTML_O_HEIGHT, + HTML_O_HSPACE, // Netscape + HTML_O_LEFT, + HTML_O_LEFTMARGIN, // IExplorer 2.0 + HTML_O_LOOP, // IExplorer 2.0 + HTML_O_MARGINWIDTH, // Netscape 2.0 + HTML_O_MARGINHEIGHT, // Netscape 2.0 + HTML_O_MAX, + HTML_O_MAXLENGTH, + HTML_O_MIN, + HTML_O_PAGEX, + HTML_O_PAGEY, + HTML_O_POINTSIZE, + HTML_O_ROWSPAN, + HTML_O_SCROLLAMOUNT, // IExplorer 2.0 + HTML_O_SCROLLDELAY, // IExplorer 2.0 + HTML_O_SEQNUM, + HTML_O_SKIP, + HTML_O_SPAN, // HTML3 Table Model Draft + HTML_O_TABINDEX, + HTML_O_TOP, + HTML_O_TOPMARGIN, // IExplorer 2.0 + HTML_O_VSPACE, // Netscape + HTML_O_WEIGHT, + HTML_O_WIDTH, + HTML_O_X, + HTML_O_Y, + HTML_O_ZINDEX, +HTML_OPTION_NUMBER_END, + +// Attribute mit Enum-Werten +HTML_OPTION_ENUM_START = HTML_OPTION_NUMBER_END, + HTML_O_BEHAVIOR = HTML_OPTION_ENUM_START, // IExplorer 2.0 + HTML_O_BGPROPERTIES, // IExplorer 2.0 + HTML_O_CLEAR, + HTML_O_DIR, + HTML_O_DIRECTION, // IExplorer 2.0 + HTML_O_FORMAT, + HTML_O_FRAME, // HTML3 Table Model Draft + HTML_O_LANG, + HTML_O_METHOD, + HTML_O_PALETTE, + HTML_O_REL, + HTML_O_REV, + HTML_O_RULES, // HTML3 Table Model Draft + HTML_O_SCROLLING, // Netscape 2.0 + HTML_O_SDREADONLY, + HTML_O_SUBTYPE, + HTML_O_TYPE, + HTML_O_VALIGN, + HTML_O_VALUETYPE, + HTML_O_VISIBILITY, + HTML_O_WRAP, +HTML_OPTION_ENUM_END, + +// Attribute mit Script-Code als Wert +HTML_OPTION_SCRIPT_START = HTML_OPTION_ENUM_END, + HTML_O_ONABORT = HTML_OPTION_SCRIPT_START, // JavaScaript + HTML_O_ONBLUR, // JavaScript + HTML_O_ONCHANGE, // JavaScript + HTML_O_ONCLICK, // JavaScript + HTML_O_ONERROR, // JavaScript + HTML_O_ONFOCUS, // JavaScript + HTML_O_ONLOAD, // JavaScript + HTML_O_ONMOUSEOUT, // JavaScript + HTML_O_ONMOUSEOVER, // JavaScript + HTML_O_ONRESET, // JavaScript + HTML_O_ONSELECT, // JavaScript + HTML_O_ONSUBMIT, // JavaScript + HTML_O_ONUNLOAD, // JavaScript + + HTML_O_SDONABORT, // StarBasic + HTML_O_SDONBLUR, // StarBasic + HTML_O_SDONCHANGE, // StarBasic + HTML_O_SDONCLICK, // StarBasic + HTML_O_SDONERROR, // StarBasic + HTML_O_SDONFOCUS, // StarBasic + HTML_O_SDONLOAD, // StarBasic + HTML_O_SDONMOUSEOUT, // StarBasic + HTML_O_SDONMOUSEOVER, // StarBasic + HTML_O_SDONRESET, // StarBasic + HTML_O_SDONSELECT, // StarBasic + HTML_O_SDONSUBMIT, // StarBasic + HTML_O_SDONUNLOAD, // StarBasic +HTML_OPTION_SCRIPT_END, + +// Attribute mit Kontext-abhaengigen Werten +HTML_OPTION_CONTEXT_START = HTML_OPTION_SCRIPT_END, + HTML_O_ALIGN = HTML_OPTION_CONTEXT_START, + HTML_O_COLS, // Netscape 2.0 vs HTML 2.0 + HTML_O_ROWS, // Netscape 2.0 vs HTML 2.0 + HTML_O_SIZE, + HTML_O_START, + HTML_O_UNITS, +HTML_OPTION_CONTEXT_END, + +// eine unbekannte Option +HTML_O_UNKNOWN = HTML_OPTION_CONTEXT_END, +HTML_OPTION_END +}; + +/************************************************************************* + + Source Code Control System - Header + + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/svtools/inc/htmltokn.h,v 1.1.1.1 2000-09-18 16:58:51 hr Exp $ + + Source Code Control System - Update + + $Log: not supported by cvs2svn $ + Revision 1.44 2000/09/18 14:13:11 willem.vandorp + OpenOffice header added. + + Revision 1.43 2000/08/31 13:41:09 willem.vandorp + Header and footer replaced + + Revision 1.42 2000/03/20 14:19:38 mib + unicode + + Revision 1.41 1999/09/24 07:36:05 mib + SUPD < 550 => SUPD < 552 + + Revision 1.40 1999/09/17 12:37:47 mib + support of multiple and non system text encodings + + Revision 1.39 1998/12/17 10:23:12 MIB + #60137#: UTF-8-/UCS-2-Unterstuetzung fuer HTML + + + Rev 1.38 17 Dec 1998 11:23:12 MIB + #60137#: UTF-8-/UCS-2-Unterstuetzung fuer HTML + + Rev 1.37 08 Jul 1998 16:05:40 MIB + StarScript + + Rev 1.36 26 May 1998 18:05:52 MIB + TABINDEX/ACCESSKEY + + Rev 1.35 02 Mar 1998 08:48:20 MIB + SDFIXED-Option + + Rev 1.34 03 Jun 1997 15:33:40 MIB + NOEMBED + + Rev 1.33 30 May 1997 14:19:30 MIB + <NOBR> nun On/Off-Token + + Rev 1.32 21 May 1997 10:41:16 MIB + Netscape 4.0-Token + + Rev 1.31 10 Apr 1997 12:34:26 TRI + Kommar bei letzten Enumelement entfernt + + Rev 1.30 02 Apr 1997 12:34:30 MIB + MAYSCRIPT + + Rev 1.29 10 Feb 1997 18:38:52 ER + TableData Options SDVAL= und SDNUM= + + Rev 1.28 05 Feb 1997 12:59:40 MIB + Erweiterungen fuer SW-Felder + + Rev 1.27 29 Jan 1997 12:47:00 MIB + SDONRESET + + Rev 1.26 23 Jan 1997 09:11:56 MIB + nur Kommentare (zu fix #35163#) + + Rev 1.25 22 Jan 1997 09:16:22 MIB + onReset-Option + + Rev 1.24 15 Jan 1997 11:38:08 MIB + NOSCRIPT-Tag + + Rev 1.23 28 Nov 1996 11:10:32 JP + Tokens StarBasicEvents + + Rev 1.22 18 Nov 1996 12:42:42 JP + neue Events am Image/Link + + Rev 1.21 06 Nov 1996 10:32:14 MIB + BEHAVIOUR -> BEHAVIOR + + Rev 1.20 14 Oct 1996 16:04:30 RG + Kein letztes Komma in enums + + Rev 1.19 17 Jul 1996 12:56:36 MIB + neue Tags und Optionen + + Rev 1.18 12 Jun 1996 11:37:36 MIB + ein par neue Token und Optionen + + Rev 1.17 05 Jun 1996 12:37:40 MIB + ein par neue Strings, <TEXTFLOW> + + Rev 1.16 22 May 1996 10:01:28 MIB + Unterstuetzung von SCRIPT + + Rev 1.15 10 May 1996 12:50:24 MIB + FRAMESPACING und FRAMEBORDER + + Rev 1.14 25 Apr 1996 09:56:10 MIB + neue MS-IExplorer 2.0 Schluesselwoerter und Token + + Rev 1.13 18 Apr 1996 13:27:54 MIB + eine par neue Schluesselwoerter (BLINK, Netscape internal, erste des Explorer + + Rev 1.12 27 Mar 1996 10:08:40 MIB + zweiten Paramter von GetHTMLCharName() entfernt + + Rev 1.11 21 Mar 1996 10:43:30 MIB + Netscape 2.0 Elemente, Font-Farben, Verbesserungen bei PRE + + Rev 1.10 06 Mar 1996 12:45:16 MIB + End-Tags fuer DD und DT + + Rev 1.9 29 Feb 1996 12:51:24 MIB + Unterstuetzung von Farb-Optionen und anderes + + Rev 1.8 05 Feb 1996 13:55:52 MIB + neue Token des HTML3 Table Model Drafts vom 23.1.96 + + Rev 1.7 29 Jan 1996 18:58:32 MIB + TR, TH und TD sind nun ON/OFF-Token + + Rev 1.6 19 Jan 1996 18:39:12 MIB + Optionen werden im HTMLParser geparst + + Rev 1.5 17 Jan 1996 18:18:22 MIB + HTML 3.0 Element-Tokens + + Rev 1.4 06 Jul 1995 20:55:24 JP + neue Tags: HR, ADDRESS, SoftHyp, HardBlank + + Rev 1.3 05 May 1995 19:40:58 JP + neue Token fuer Netscape Unterstuetzung + + Rev 1.2 07 Apr 1995 00:31:18 JP + neue Funktionalitaet + + Rev 1.1 03 Apr 1995 12:43:12 JP + weitere Funktionalietaet implementiert + + Rev 1.0 31 Mar 1995 16:33:32 JP + Initial revision. + +*************************************************************************/ + +#endif + // _HTMLTOKN_H diff --git a/svtools/inc/inetdef.hxx b/svtools/inc/inetdef.hxx new file mode 100644 index 000000000000..cba42a0e5001 --- /dev/null +++ b/svtools/inc/inetdef.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * $RCSfile: inetdef.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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_INETDEF_HXX +#include <tools/inetdef.hxx> +#endif + diff --git a/svtools/inc/inetmsg.hxx b/svtools/inc/inetmsg.hxx new file mode 100644 index 000000000000..3cd17c06f090 --- /dev/null +++ b/svtools/inc/inetmsg.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * $RCSfile: inetmsg.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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_INETMSG_HXX +#include <tools/inetmsg.hxx> +#endif + diff --git a/svtools/inc/inetstrm.hxx b/svtools/inc/inetstrm.hxx new file mode 100644 index 000000000000..92a76aba6e21 --- /dev/null +++ b/svtools/inc/inetstrm.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * $RCSfile: inetstrm.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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_INETSTRM_HXX +#include <tools/inetstrm.hxx> +#endif + diff --git a/svtools/inc/iniadrtk.hxx b/svtools/inc/iniadrtk.hxx new file mode 100644 index 000000000000..8e4752502c03 --- /dev/null +++ b/svtools/inc/iniadrtk.hxx @@ -0,0 +1,94 @@ +/************************************************************************* + * + * $RCSfile: iniadrtk.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 SVTOOLS_INIADRTK_HXX +#define SVTOOLS_INIADRTK_HXX + +class String; + +//============================================================================ +enum AddressToken +{ + ADDRESS_COMPANY, + ADDRESS_STREET, + ADDRESS_COUNTRY, + ADDRESS_PLZ, + ADDRESS_CITY, + ADDRESS_TITLE, + ADDRESS_POSITION, + ADDRESS_TEL_PRIVATE, + ADDRESS_TEL_COMPANY, + ADDRESS_FAX, + ADDRESS_EMAIL, + ADDRESS_STATE, + ADDRESS_FATHERSNAME, + ADDRESS_APARTMENT +}; + +//============================================================================ +class SfxIniManagerAddressEntry +{ +public: + static String get(const String & rAddress, AddressToken eToken); +}; + +#endif // SVTOOLS_INIADRTK_HXX + diff --git a/svtools/inc/inidef.hxx b/svtools/inc/inidef.hxx new file mode 100644 index 000000000000..a06bca91c126 --- /dev/null +++ b/svtools/inc/inidef.hxx @@ -0,0 +1,177 @@ +/************************************************************************* + * + * $RCSfile: inidef.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _SFXINIDEF_HXX +#define _SFXINIDEF_HXX + +#ifndef _INIMGR_HXX +#include <iniman.hxx> +#endif + +class SfxIniEntry; +class SfxIniDefaulterList; +class SfxIniDefaultManager; + +#if __PRIVATE +#include "svarray.hxx" + +class SfxIniDefaulter; +SV_DECL_PTRARR( SfxIniDefaulterList, SfxIniDefaulter*, 0, 2 ); +#endif + +//======================================================================== + +class SfxIniDefaulter + +/* [Beschreibung] + + Instanzen dieser Klasse k"onnen (f"ur die Laufzeit eines Moduls, z.B. + einer DLL-Nutzung oder einer Applikation) angelegt werden, um Defaults + f"ur eine Anzahl von ini-Eintr"agen zu liefern. Diese Defaults werden + erfragt, wenn ein <SfxIniManager> einen Eintrag nicht in den ini-Files + finden kann. + + Defaults verschiedener <SfxIniDefaulter>-Instanzen d"urfen sich nicht + unterscheiden, da die Reihenfolge der Abarbeitung nicht definiert ist. + + Die Instanzen brauchen nicht zerst"ort zu werden, au\ser wenn der + dazugeh"orige Code entladen wird (load-on-demand DLLs). Sonst geschieht + dies automatisch beim Zerst"oren des <SfxIniDefaultManager>. +*/ + +{ + SfxIniDefaultManager* _pManager; + +public: + SfxIniDefaulter( SfxIniDefaultManager *pManager ); + ~SfxIniDefaulter(); + + virtual BOOL QueryDefault( String &aValue, + const SfxIniEntry &rEntry ) = 0; +}; + +//======================================================================== + +class SfxIniDefaultManager + +/* [Beschreibung] + + Genau eine Instanz dieser Klasse mu\s in jeder Application-Subklasse, + die diesen Mechanismus nutzen m"ochte, in deren Ctor angelegt werden + und sollte in deren Dtor zerst"ort werden. +*/ + +{ + SfxIniDefaulterList* _pList; + +public: + SfxIniDefaultManager(); + ~SfxIniDefaultManager(); + +#if __PRIVATE + void Insert( SfxIniDefaulter *pDefaulter ) + { _pList->C40_INSERT( SfxIniDefaulter, pDefaulter, _pList->Count() ); } + void Remove( SfxIniDefaulter *pDefaulter ) + { _pList->Remove( _pList->C40_GETPOS( SfxIniDefaulter, pDefaulter ) ); } + BOOL QueryDefault( String &aValue, + const SfxIniEntry &rEntry ); +#endif +}; + +//======================================================================== + +class SfxIniEntry + +/* [Beschreibung] + + Instanzen dieser Klasse beschreiben einen Eintrag eines Ini-Files, + um mit der Klasse <SfxIniDefaulter> erfragt werden zu k"onnen, falls + der <SfxIniManager> einen Eintrag nicht in den Ini-Files auffindet. +*/ + +{ +friend class SfxIniManager; + + const String& _aGroup; + const String& _aKey; + SfxIniGroup _eGroup; + SfxIniKey _eKey; + USHORT _nIndex; + +private: + SfxIniEntry( const String& aGroup, + const String& aKey, + SfxIniGroup eGroup, + SfxIniKey eKey, + USHORT nIndex ); + SfxIniEntry( const SfxIniEntry & ); // n.i. + SfxIniEntry& operator=( const SfxIniEntry & ); // n.i. + +public: + const String& GetGroupName() const { return _aGroup; } + SfxIniGroup GetGroup() const { return _eGroup; } + const String& GetKeyName() const { return _aKey; } + SfxIniKey GetKey() const { return _eKey; } + USHORT GetIndex() const { return _nIndex; } +}; + +#endif + diff --git a/svtools/inc/iniprop.hxx b/svtools/inc/iniprop.hxx new file mode 100644 index 000000000000..1b5ed8ccde46 --- /dev/null +++ b/svtools/inc/iniprop.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * $RCSfile: iniprop.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _SFXINIPROP_HXX +#define _SFXINIPROP_HXX + +#include <limits.h> + +#ifndef _RTTI_HXX //autogen +#include <tools/rtti.hxx> +#endif +#ifndef _APP_HXX +#include <vcl/svapp.hxx> +#endif + +class SfxIniManager; + +//------------------------------------------------------------------------ + +class SfxAppIniManagerProperty: public ApplicationProperty + +// fuer Application::Property(), um von ueberall an den AppIniManger zu kommen + +{ + SfxIniManager* _pIniManager; + +public: + TYPEINFO(); + SfxAppIniManagerProperty() + : _pIniManager(0) + {} + ~SfxAppIniManagerProperty(); + + SfxIniManager* GetIniManager() const { return _pIniManager; } + void SetIniManager( SfxIniManager *pIniManager ) + { _pIniManager = pIniManager; } +}; + + +#endif + diff --git a/svtools/inc/instrm.hxx b/svtools/inc/instrm.hxx new file mode 100644 index 000000000000..ca07dcec0559 --- /dev/null +++ b/svtools/inc/instrm.hxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * $RCSfile: instrm.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 SVTOOLS_INSTRM_HXX +#define SVTOOLS_INSTRM_HXX + +#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +#include <com/sun/star/uno/Reference.h> +#endif +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif + +namespace com { namespace sun { namespace star { namespace io { + class XInputStream; + class XSeekable; +} } } } + +class SvDataPipe_Impl; + +//============================================================================ +class SvInputStream: public SvStream +{ + com::sun::star::uno::Reference< com::sun::star::io::XInputStream > + m_xStream; + com::sun::star::uno::Reference< com::sun::star::io::XSeekable > + m_xSeekable; + SvDataPipe_Impl * m_pPipe; + ULONG m_nSeekedFrom; + + bool open(); + + virtual ULONG GetData(void * pData, ULONG nSize); + + virtual ULONG PutData(void const *, ULONG); + + virtual ULONG SeekPos(ULONG nPos); + + virtual void FlushData(); + + virtual void SetSize(ULONG); + +public: + SvInputStream( + com::sun::star::uno::Reference< com::sun::star::io::XInputStream > + const & + rTheStream); + + virtual ~SvInputStream(); + + virtual USHORT IsA() const; + + virtual void AddMark(ULONG nPos); + + virtual void RemoveMark(ULONG nPos); +}; + +#endif // SVTOOLS_INSTRM_HXX + diff --git a/svtools/inc/itemdel.hxx b/svtools/inc/itemdel.hxx new file mode 100644 index 000000000000..30da849c60fa --- /dev/null +++ b/svtools/inc/itemdel.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * $RCSfile: itemdel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _SVTOOLS_ITEMDEL_HXX +#define _SVTOOLS_ITEMDEL_HXX + +class SfxPoolItem; + +SfxPoolItem* DeleteItemOnIdle( SfxPoolItem* pItem ); +void DeleteOnIdleItems(); + + + +#endif + diff --git a/svtools/inc/jpeg.hxx b/svtools/inc/jpeg.hxx new file mode 100644 index 000000000000..de89fdc3ccb6 --- /dev/null +++ b/svtools/inc/jpeg.hxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * $RCSfile: jpeg.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:51 $ + * + * 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 _JPEG_HXX +#define _JPEG_HXX + +#ifdef VCL + +#ifndef _GRAPH_HXX +#include <vcl/graph.hxx> +#endif +#ifndef _FLTCALL_HXX +#include "fltcall.hxx" +#endif + +class Config; + +#else // VCL + +#ifndef _GEN_HXX +#include <tools/gen.hxx> +#endif +#ifndef _FLTCALL_HXX +#include "fltcall.hxx" +#endif +#ifndef _FLTDEFS_HXX +#include "fltdefs.hxx" +#endif + +#endif // VCL + +#ifdef _JPEGPRIVATE + +// -------- +// - Enum - +// -------- + +enum ReadState +{ + JPEGREAD_OK, + JPEGREAD_ERROR, + JPEGREAD_NEED_MORE +}; + +// -------------- +// - JPEGReader - +// -------------- + +#ifdef VCL + +class JPEGReader : public GraphicReader +{ + SvStream& rIStm; + Bitmap aBmp; + Bitmap aBmp1; + BitmapWriteAccess* pAcc; + BitmapWriteAccess* pAcc1; + void* pBuffer; + long nLastPos; + long nFormerPos; + long nLastLines; + + Graphic CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ); + void FillBitmap(); + +public: + + void* CreateBitmap( const Size& rSize, BOOL bGray, long& rAlignedWidth, long& rTopDown ); + +public: + + + + JPEGReader( SvStream& rStm, void* pCallData ); + virtual ~JPEGReader(); + + + ReadState Read( Graphic& rGraphic ); +}; + +// -------------- +// - JPEGWriter - +// -------------- + +class JPEGWriter +{ + SvStream& rOStm; + Bitmap aBmp; + BitmapReadAccess* pAcc; + BYTE* pBuffer; + PFilterCallback pCallback; + void* pCallerData; + Config* pConfig; + BOOL bNative; + +public: + + void* GetScanline( long nY ); + +public: + + JPEGWriter( SvStream& rOStm, PFilterCallback pCallback, + void* pCallData, Config* pOptionsConfig ); + ~JPEGWriter() {}; + + BOOL Write( const Graphic& rGraphic ); +}; + +#else // VCL + +class JPEGReader : public GraphicReader +{ + Graphic aImGraphic; + SvStream& rIStm; + PDIBBYTE pMonoDIB; + PDIBBYTE pRow1; + PDIBBYTE pMonoFile; + long nLastPos; + long nFormerPos; + long nLastLines; + long nWidthAl1; + long nTotal; + long nMonoTotal; + + void CreateMonoDIB( const Size& rSize ); + void CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ); + + +public: + + JPEGReader( SvStream& rStm, void* pCallData ); + virtual ~JPEGReader(); + + + ReadState ReadJpeg( Graphic& rGraphic ); +}; + +#endif // VCL +#endif // _JPEGPRIVATE + +// --------------------- +// - Import/ExportJPEG - +// --------------------- + +BOOL ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData ); + +BOOL ExportJPEG( SvStream& rStream, const Graphic& rGraphic, + PFilterCallback pCallback, void* pCallerData, + Config* pOptionsConfig ); + +#endif // _JPEG_HXX diff --git a/svtools/inc/memberid.hrc b/svtools/inc/memberid.hrc new file mode 100644 index 000000000000..7d5fca7b51ab --- /dev/null +++ b/svtools/inc/memberid.hrc @@ -0,0 +1,77 @@ +/************************************************************************* + * + * $RCSfile: memberid.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _MEMBERID_HRC +#define _MEMBERID_HRC + +#define SFX_MEMBERID(nUserData) ( ( (nUserData) >> 20 ) & 0xFF ) +#define SFX_SLOTID(nUserData) ( (nUserData) & 0xFFFF ) + +#define MID_X 1 +#define MID_Y 2 +#define MID_LEFT 3 +#define MID_TOP 4 +#define MID_WIDTH 5 +#define MID_HEIGHT 6 + + +#endif + diff --git a/svtools/inc/msgrd.hxx b/svtools/inc/msgrd.hxx new file mode 100644 index 000000000000..51733ecd0816 --- /dev/null +++ b/svtools/inc/msgrd.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * $RCSfile: msgrd.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _MSGRD_HXX +#define _MSGRD_HXX + + +BOOL ConvertMSGToGDIMetaFile( SvStream & rMSG, GDIMetaFile & rGDIMetaFile, + BOOL(*pCallback)(void *, USHORT), void * pCallerData, + ULONG nMinPercent, ULONG nMaxPercent); + + +#endif // _MSGRD_HXX diff --git a/svtools/inc/msgwr.hxx b/svtools/inc/msgwr.hxx new file mode 100644 index 000000000000..021044946ae0 --- /dev/null +++ b/svtools/inc/msgwr.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * $RCSfile: msgwr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _MSGWR_HXX +#define _MSGWR_HXX + + +BOOL ConvertGraphicToMSG(const Graphic & rGraphic, SvStream & rTargetStream, + BOOL(*pCallback)(void *, USHORT), void * pCallerData, + ULONG nMinPercent, ULONG nMaxPercent); + + +#endif // _MSGWR_HXX + diff --git a/svtools/inc/numuno.hxx b/svtools/inc/numuno.hxx new file mode 100644 index 000000000000..4600e248280b --- /dev/null +++ b/svtools/inc/numuno.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * $RCSfile: numuno.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _NUMUNO_HXX +#define _NUMUNO_HXX + +#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_ +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif + +class SvNumberFormatter; +class SvNumFmtSuppl_Impl; + +//------------------------------------------------------------------ + +// SvNumberFormatterServiceObj must be registered as service somewhere + +com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL + SvNumberFormatterServiceObj_NewInstance( + const com::sun::star::uno::Reference< + com::sun::star::lang::XMultiServiceFactory>& rSMgr ); + +//------------------------------------------------------------------ + +// SvNumberFormatsSupplierObj: aggregate to document, +// construct with SvNumberFormatter + +class SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2< + com::sun::star::util::XNumberFormatsSupplier, + com::sun::star::lang::XUnoTunnel> +{ +private: + SvNumFmtSuppl_Impl* pImpl; + +public: + SvNumberFormatsSupplierObj(); + SvNumberFormatsSupplierObj(SvNumberFormatter* pForm); + virtual ~SvNumberFormatsSupplierObj(); + + void SetNumberFormatter(SvNumberFormatter* pNew); + SvNumberFormatter* GetNumberFormatter() const; + + // ueberladen, um Attribute im Dokument anzupassen + virtual void NumberFormatDeleted(sal_uInt32 nKey); + // ueberladen, um evtl. neu zu formatieren + virtual void SettingsChanged(); + + // XNumberFormatsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL + getNumberFormatSettings() + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL + getNumberFormats() + throw(::com::sun::star::uno::RuntimeException); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< + sal_Int8 >& aIdentifier ) + throw(::com::sun::star::uno::RuntimeException); + + static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); + static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference< + com::sun::star::util::XNumberFormatsSupplier> xObj ); +}; + +#endif // #ifndef _NUMUNO_HXX + + diff --git a/svtools/inc/outstrm.hxx b/svtools/inc/outstrm.hxx new file mode 100644 index 000000000000..85d0e25c5f13 --- /dev/null +++ b/svtools/inc/outstrm.hxx @@ -0,0 +1,103 @@ +/************************************************************************* + * + * $RCSfile: outstrm.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 SVTOOLS_OUTSTRM_HXX +#define SVTOOLS_OUTSTRM_HXX + +#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +#include <com/sun/star/uno/Reference.h> +#endif +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif + +namespace com { namespace sun { namespace star { namespace io { + class XOutputStream; +} } } } + +//============================================================================ +class SvOutputStream: public SvStream +{ + com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > + m_xStream; + + virtual ULONG GetData(void *, ULONG); + + virtual ULONG PutData(void const * pData, ULONG nSize); + + virtual ULONG SeekPos(ULONG); + + virtual void FlushData(); + + virtual void SetSize(ULONG); + +public: + SvOutputStream(com::sun::star::uno::Reference< + com::sun::star::io::XOutputStream > const & + rTheStream); + + virtual ~SvOutputStream(); + + virtual USHORT IsA() const; +}; + +#endif // SVTOOLS_OUTSTRM_HXX + diff --git a/svtools/inc/poolcach.hxx b/svtools/inc/poolcach.hxx new file mode 100644 index 000000000000..fb73ee0745c9 --- /dev/null +++ b/svtools/inc/poolcach.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * $RCSfile: poolcach.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _SFXPOOLCACH_HXX +#define _SFXPOOLCACH_HXX + +#include <tools/solar.h> + +class SfxItemModifyArr_Impl; +class SfxItemPool; +class SfxItemSet; +class SfxPoolItem; +class SfxSetItem; + +class SfxItemPoolCache +{ + SfxItemPool *pPool; + SfxItemModifyArr_Impl *pCache; + const SfxItemSet *pSetToPut; + const SfxPoolItem *pItemToPut; + +public: + SfxItemPoolCache( SfxItemPool *pPool, + const SfxPoolItem *pPutItem ); + SfxItemPoolCache( SfxItemPool *pPool, + const SfxItemSet *pPutSet ); + ~SfxItemPoolCache(); + + const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, BOOL bNew = FALSE ); +}; + + +#endif + diff --git a/svtools/inc/prgsbar.hxx b/svtools/inc/prgsbar.hxx new file mode 100644 index 000000000000..f3de05087c2a --- /dev/null +++ b/svtools/inc/prgsbar.hxx @@ -0,0 +1,134 @@ +/************************************************************************* + * + * $RCSfile: prgsbar.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _PRGSBAR_HXX +#define _PRGSBAR_HXX + +#ifndef _WINDOW_HXX +#include <vcl/window.hxx> +#endif + +/************************************************************************* + +Beschreibung +============ + +class ProgressBar + +Diese Klasse dient zur Anzeige einer Progress-Anzeige. + +-------------------------------------------------------------------------- + +WinBits + +WB_BORDER Border um das Fenster +WB_SVLOOK 3D-Darstellung + +-------------------------------------------------------------------------- + +Methoden + +Mit SetValue() setzt man einen Prozent-Wert zwischen 0 und 100. Wenn Werte +groesser 100 gesetzt werden, faengt das letzte Rechteck an zu blinken. + +*************************************************************************/ + +// ----------- +// - WinBits - +// ----------- + +#define WB_STDPROGRESSBAR WB_BORDER + +// --------------- +// - ProgressBar - +// --------------- + +class ProgressBar : public Window +{ +private: + Point maPos; + long mnPrgsWidth; + long mnPrgsHeight; + USHORT mnPercent; + USHORT mnPercentCount; + BOOL mbCalcNew; + +#ifdef _SV_PRGSBAR_CXX + void ImplInit(); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc ); +#endif + +public: + ProgressBar( Window* pParent, WinBits nWinBits = WB_STDPROGRESSBAR ); + ProgressBar( Window* pParent, const ResId& rResId ); + ~ProgressBar(); + + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + void SetValue( USHORT nNewPercent ); + USHORT GetValue() const { return mnPercent; } +}; + +#endif // _PRGSBAR_HXX diff --git a/svtools/inc/privsplt.hxx b/svtools/inc/privsplt.hxx new file mode 100644 index 000000000000..f1f02c37e2a7 --- /dev/null +++ b/svtools/inc/privsplt.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: privsplt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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_PRIVSPLT_HXX +#define _SV_PRIVSPLT_HXX + +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif + +enum PRIVSPLIT_DIRECTION {PRIVSPLIT_HORZ,PRIVSPLIT_VERT }; + +class SvPrivatSplit : public FixedLine +{ + private: + + Link aCtrModifiedLink; + BOOL aMovingFlag; + Pointer aWinPointer; + PRIVSPLIT_DIRECTION eAdrSplit; + short nOldX; + short nOldY; + short nNewX; + short nNewY; + short nMinPos; + short nMaxPos; + Range aXMovingRange; + Range aYMovingRange; + short nDeltaX; + short nDeltaY; + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + + protected: + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + + public: + + SvPrivatSplit( Window* pWindow, const ResId& rResId,PRIVSPLIT_DIRECTION eAdrSplit); + + SvPrivatSplit( Window* pParent,PRIVSPLIT_DIRECTION eAdrSplit, WinBits nStyle = 0); + + virtual short GetDeltaX(); + virtual short GetDeltaY(); + + virtual void CtrModified(); + + void SetXRange(Range cRgeX); + void SetYRange(Range cRgeY); + + void MoveSplitTo(Point aPos); + + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + void SetCtrModifiedHdl( const Link& rLink ) { aCtrModifiedLink = rLink; } + const Link& GetCtrModifiedHdl() const { return aCtrModifiedLink; } +}; + + +#endif diff --git a/svtools/inc/propctrl.hxx b/svtools/inc/propctrl.hxx new file mode 100644 index 000000000000..ed028fe2e965 --- /dev/null +++ b/svtools/inc/propctrl.hxx @@ -0,0 +1,154 @@ +/************************************************************************* + * + * $RCSfile: propctrl.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _STREAM_HXX //autogen +#include <tools/stream.hxx> +#endif +#include <vcl/sound.hxx> +#include "sbx.hxx" +#include "sbxbase.hxx" +#include "sbxres.hxx" + +#ifndef _SFXBRDCST_HXX //autogen +#include <brdcst.hxx> +#endif + */ + + +#ifndef __PROPED_HXX__ +#include <svtools/proped.hxx> +#endif +#ifndef _UNO_HXX +#include <usr/uno.hxx> +#endif +#ifndef _USR_SEQU_HXX +#include <usr/sequ.hxx> +#endif +#ifndef __TOOLSIDL_HXX__ +#include <usr/toolsidl.hxx> +#endif + +/* +class XPropertyEditor + : public XInterface +{ +public: + + virtual void setObject(const UsrAny& aToInspectObj) = 0; + + static Uik getSmartUik() { return(385); } +}; +*/ + +class PropertyEditorControler_Impl; +class SvPropertyBox; +class Window; + +class SimplePropertyEditor_Impl : + public XPropertyEditor, + public XPropertyEditorNavigation, + public UsrObject +{ + PropertyEditorControler_Impl* pActiveControler; + SvPropertyBox* mpPropBox; + UsrAny maStartUnoObj; + UsrAny maActiveUnoObj; + + // History der Objekte speichern + AnySequence maHistorySeq; + WSStringSequence maHistoryNames; + UINT32 mnHistoryCount; + INT32 mnActualHistoryLevel; + + // Einfache History via Dummy-Properties + BOOL bSimpleHistory; + + // Methode zum Anlegen/Aktivieren der Controller + void showObject( const UsrAny& aToShowObj ); + String getPath( void ); + +public: + // Provisorischer Ctor mit Parent-Window + SimplePropertyEditor_Impl( Window *pParent ); + ~SimplePropertyEditor_Impl(); + + // HACK fuer History-Test + void enableSimpleHistory( BOOL bHistory_ ) { bSimpleHistory = bHistory_; } + + SMART_UNO_DECLARATION(ImplIntrospection,UsrObject); + + // Methoden von XInterface + XInterface * queryInterface( Uik aUik ); + XIdlClassRef getIdlClass(); + + // Methoden von XPropertyEditor + virtual void setObject(const UsrAny& aToInspectObj, const XubString& aObjName); + + // Methoden von PropertyEditorNavigation + virtual void forward(void); + virtual void back(void); + +}; + + + + diff --git a/svtools/inc/property.hxx b/svtools/inc/property.hxx new file mode 100644 index 000000000000..1ed05857b074 --- /dev/null +++ b/svtools/inc/property.hxx @@ -0,0 +1,639 @@ +/************************************************************************* + * + * $RCSfile: property.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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_PROPERTY_HXX +#define SV_PROPERTY_HXX + +#ifndef _VIRDEV_HXX //autogen +#include <vcl/virdev.hxx> +#endif +#ifndef SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +#ifndef SV_LSTBOX_HXX +#include <vcl/lstbox.hxx> +#endif +#ifndef SV_GROUP_HXX +#include <vcl/group.hxx> +#endif +#ifndef SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +#ifndef SV_MOREBTN_HXX +#include <vcl/morebtn.hxx> +#endif +#ifndef _DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif +#ifndef _SV_COMBOBOX_HXX //autogen +#include <vcl/combobox.hxx> +#endif +#ifndef _SV_FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif + +#ifndef _SVARRAY_HXX //autogen +#include <svarray.hxx> +#endif + +#define _SVSTDARR_USHORTS +#include <svstdarr.hxx> + +#ifndef _SV_VIRDEV_HXX //autogen +#include <vcl/virdev.hxx> +#endif + +#ifndef _SV_SCRBAR_HXX //autogen +#include <vcl/scrbar.hxx> +#endif + +#ifndef _SVARRAY_HXX //autogen +#include <svarray.hxx> +#endif + +#ifndef _SVSTDARR_STRINGS +#define _SVSTDARR_STRINGS +#include <svstdarr.hxx> +#endif + +#ifndef _SV_TABPAGE_HXX //autogen +#include <vcl/tabpage.hxx> +#endif + +#ifndef _SV_TABCTRL_HXX //autogen +#include <vcl/tabctrl.hxx> +#endif + +//------------------------------------------------------------------------ + +//======================================================================== +enum eKindOfControl { KOC_UNDEFINED=0,KOC_LISTBOX=1, KOC_COMBOBOX=2, + KOC_EDIT=3,KOC_USERDEFINED=5}; + +class SvXPropertyCtrListener; + +class SvXPropertyControl : public Control +{ +public: + SvXPropertyControl( Window* pParent, WinBits nWinStyle = 0 ); + SvXPropertyControl( Window* pParent, const ResId& rResId ); + + virtual void SetSvXPropertyCtrListener(SvXPropertyCtrListener*)=0; + + virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener()=0; + virtual void SetProperty(const String &rString)=0; + virtual String GetProperty()const=0; + virtual BOOL HasList()=0; + virtual void ClearList()=0; + virtual void InsertEntry( const String& rString, + USHORT nPos = LISTBOX_APPEND )=0; + + virtual void SetCtrSize(const Size& rSize)=0; + virtual void SetLocked(BOOL bLocked=TRUE)=0; + + virtual void SetMyName(const String &rString)=0; + virtual String GetMyName()const=0; + + virtual void SetMyData(void*)=0; + virtual void* GetMyData()=0; +}; + +class SvXPropertyCtrListener +{ + +public: + virtual void Modified (SvXPropertyControl *pSvXPCtr)=0; + virtual void GetFocus (SvXPropertyControl *pSvXPCtr)=0; + virtual void LoseFocus(SvXPropertyControl *pSvXPCtr)=0; + virtual void KeyInput (SvXPropertyControl *pSvXPCtr ,const KeyCode&)=0; +}; + + +class SvXPropertyEdit : public SvXPropertyControl +{ +private: + + String aName; + SvXPropertyCtrListener* pListener; + Edit aEdit; + void* pData; + + DECL_LINK(ModifiedHdl,Edit*); + DECL_LINK(GetFocusHdl,Edit*); + DECL_LINK(LoseFocusHdl,Edit*); + +public: + SvXPropertyEdit( Window* pParent, WinBits nWinStyle = 0 ); + SvXPropertyEdit( Window* pParent, const ResId& rResId ); + + virtual void SetSvXPropertyCtrListener(SvXPropertyCtrListener*); + + virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener(); + + virtual void SetProperty(const String &rString); + virtual String GetProperty()const; + + virtual BOOL HasList(); + virtual void ClearList(); + virtual void InsertEntry( const String& rString, + USHORT nPos = LISTBOX_APPEND ); + + virtual void SetCtrSize(const Size& rSize); + virtual void SetLocked(BOOL bLocked=TRUE); + + virtual void SetMyName(const String &rString); + virtual String GetMyName()const; + + virtual void SetMyData(void*); + virtual void* GetMyData(); +}; + + +class SvXPropertyListBox : public SvXPropertyControl +{ +private: + + String aName; + SvXPropertyCtrListener* pListener; + ListBox aListBox; + void* pData; + + DECL_LINK(ModifiedHdl,ListBox*); + DECL_LINK(GetFocusHdl,ListBox*); + DECL_LINK(LoseFocusHdl,ListBox*); + + +public: + SvXPropertyListBox( Window* pParent, WinBits nWinStyle = 0 ); + SvXPropertyListBox( Window* pParent, const ResId& rResId ); + + virtual void SetSvXPropertyCtrListener(SvXPropertyCtrListener*); + + virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener(); + + ListBox* GetListBox(); + + virtual void SetProperty(const String &rString); + virtual String GetProperty()const; + + virtual BOOL HasList(); + virtual void ClearList(); + virtual void InsertEntry( const String& rString, + USHORT nPos = LISTBOX_APPEND ); + + virtual void SetCtrSize(const Size& rSize); + virtual void SetLocked(BOOL bLocked=TRUE); + + virtual void SetMyName(const String &rString); + virtual String GetMyName()const; + + virtual void SetMyData(void*); + virtual void* GetMyData(); +}; + +class SvXPropertyComboBox : public SvXPropertyControl +{ +private: + + String aName; + SvXPropertyCtrListener* pListener; + ComboBox aComboBox; + void* pData; + + DECL_LINK(ModifiedHdl,ComboBox*); + DECL_LINK(GetFocusHdl,ComboBox*); + DECL_LINK(LoseFocusHdl,ComboBox*); + + +public: + SvXPropertyComboBox( Window* pParent, WinBits nWinStyle = 0 ); + SvXPropertyComboBox( Window* pParent, const ResId& rResId ); + + virtual void SetSvXPropertyCtrListener(SvXPropertyCtrListener*); + + virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener(); + + ComboBox* GetComboBox(); + + virtual void SetProperty(const String &rString); + virtual String GetProperty()const; + + virtual BOOL HasList(); + virtual void ClearList(); + virtual void InsertEntry( const String& rString, + USHORT nPos = LISTBOX_APPEND ); + + virtual void SetCtrSize(const Size& rSize); + virtual void SetLocked(BOOL bLocked=TRUE); + + virtual void SetMyName(const String &rString); + virtual String GetMyName()const; + + virtual void SetMyData(void*); + virtual void* GetMyData(); +}; + + + +class SvPropertyLine : public Control +{ +private: + FixedText aName; + USHORT nNameWidth; + BOOL bNeedsRepaint; + SvXPropertyControl* pSvXPropertyControl; + + PushButton aXButton; + BOOL bIsLocked; + BOOL bHasXButton; + BOOL bIsHyperlink; + eKindOfControl eKindOfCtr; + +protected: + virtual void Resize(); + +public: + SvPropertyLine( Window* pParent, + WinBits nWinStyle = 0 ); + SvPropertyLine( Window* pParent, + const ResId& rResId ); + + BOOL NeedsRepaint(); + void SetNeedsRepaint(BOOL bFlag); + void SetSvXPropertyControl(SvXPropertyControl*); + SvXPropertyControl* GetSvXPropertyControl(); + + void SetKindOfControl(eKindOfControl); + eKindOfControl GetKindOfControl(); + + void SetName(const String& rString ); + String GetName() const; + void SetNameWidth(USHORT); + + void ShowXButton(); + void HideXButton(); + BOOL IsVisibleXButton(); + void ShowAsHyperLink(BOOL nFlag=TRUE); + BOOL IsShownAsHyperlink(); + + void Locked(BOOL nFlag=TRUE); + BOOL IsLocked(); + + void SetClickHdl(const Link&); + +}; + + +class SvPropertyData +{ +public: + eKindOfControl eKind; + String aName; + String aValue; + SvStrings theValues; // ??? + + BOOL bHasVisibleXButton; + BOOL bIsHyperLink; + BOOL bIsLocked; + void* pDataPtr; + SvXPropertyControl* pControl; +}; + +class SvPropertyDataObjectControl +{ +}; + +class SvPropertyDataControl +{ +public: + virtual void Modified( const String& aName, + const String& aVal, + void* pData)=0; + + virtual void Clicked( const String& aName, + const String& aVal, + void* pData)=0; + + virtual void Commit( const String& aName, + const String& aVal, + void* pData)=0; + + virtual void Select( const String& aName, + void* pData)=0; + + virtual void LinkClicked(const String& aName, + void* pData)=0; +}; + +class SvXPropEvListener: public SvXPropertyCtrListener +{ + Link aModifyLink; + Link aGetFocusLink; + Link aLoseFocusLink; + Link aKeyInputLink; + String aModifiedResult; + + SvXPropertyControl * pTheActiveControl; + KeyCode aKeyCode; + +public: + SvXPropEvListener(); + + virtual void Modified (SvXPropertyControl *pSvXPCtr); + virtual void GetFocus (SvXPropertyControl *pSvXPCtr); + virtual void LoseFocus(SvXPropertyControl *pSvXPCtr); + virtual void KeyInput(SvXPropertyControl *pSvXPCtr ,const KeyCode&); + + SvXPropertyControl * GetPropertyControl(); + KeyCode GetKeyCode() const; + + void SetModifyHdl( const Link& rLink ) { aModifyLink = rLink; } + const Link& GetModifyHdl() const { return aModifyLink; } + + void SetGetFocusHdl( const Link& rLink ) { aGetFocusLink = rLink; } + const Link& GetGetFocusHdl() const { return aGetFocusLink; } + + void SetLoseFocusHdl( const Link& rLink ) { aLoseFocusLink = rLink; } + const Link& GetLoseFocusHdl() const { return aLoseFocusLink; } + + void SetKeyInputHdl( const Link& rLink ) { aKeyInputLink = rLink; } + const Link& GetKeyInputHdl() const { return aKeyInputLink; } + + +}; + +typedef SvPropertyLine * SvPropertyLinePtr; + +SV_DECL_PTRARR(SvPropLineArray,SvPropertyLinePtr,1,1); + +class SvListBoxForProperties: public Control +{ +private: + + SvXPropEvListener aListener; + Window aPlayGround; + ScrollBar aVScroll; + SvPropLineArray PLineArray; + SvPropertyDataControl* pPropDataControl; + USHORT nRowHeight; + BOOL bUpdate; + USHORT nTheNameSize; + long nYOffset; + + DECL_LINK( ScrollHdl,ScrollBar*); + DECL_LINK( ClickHdl ,PushButton*); + + DECL_LINK( ModifyHdl,SvXPropEvListener*); + DECL_LINK( GetFocusHdl,SvXPropEvListener*); + DECL_LINK(LoseFocusHdl,SvXPropEvListener*); + DECL_LINK( KeyInputHdl,SvXPropEvListener*); + +protected: + void UpdateAll(); + void UpdatePosNSize(); + void UpdatePlayGround(); + void UpdateVScroll(); + + void Resize(); + +public: + SvListBoxForProperties( Window* pParent, WinBits nWinStyle = 0 ); + SvListBoxForProperties( Window* pParent, const ResId& rResId ); + + ~SvListBoxForProperties(); + + virtual USHORT CalcVisibleLines(); + virtual void EnableUpdate(); + virtual void DisableUpdate(); + + virtual void SetController(SvPropertyDataControl *); + + virtual void Clear(); + + virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND ); + + virtual void ChangeEntry( const SvPropertyData&, USHORT nPos); + + virtual USHORT AppendEntry( const SvPropertyData&); + + virtual void SetPropertyValue( const String & rEntryName, const String & rValue ); + + virtual void SetFirstVisibleEntry(USHORT nPos); + virtual USHORT GetFirstVisibleEntry(); + + virtual void SetSelectedEntry(USHORT nPos); + virtual USHORT GetSelectedEntry(); +}; + +class SvTabPageForProperties: public TabPage +{ + +private: + + SvListBoxForProperties aLbProp; + +protected: + + virtual void Resize(); + +public: + SvTabPageForProperties(Window* pParent,WinBits nWinStyle = 0 ); + + SvListBoxForProperties* GetTheListBox(); +}; + + +class SvBasicPropertyDataControl: public SvPropertyDataControl +{ +private: + + BOOL bCorrectness; + String aEntryName; + String aEntryProperty; + String aCorrectProperty; + void* pTheData; + Link aModifyLink; + Link aClickedLink; + Link aCommitLink; + Link aSelectLink; + +public: + + virtual void Modified( const String& aName, + const String& aVal, + void* pData); //User has modified Property + + virtual void Clicked( const String& aName, + const String& aVal, + void* pData); //Xtension-Button pressed + + virtual void Commit( const String& aName, + const String& aVal, + void* pData); //User accept changes + + virtual void Select( const String& aName, + void* pData); //User select new Row + + virtual void LinkClicked(const String& aName, + void* pData); + + virtual void SetIsCorrect(BOOL nFlag); + + //virtual String GetTheCorrectProperty()const; + virtual void SetTheCorrectProperty(const String& aName); + + String GetName() const; //Tell's the name of the Property + String GetProperty() const; //Tell's the content of the Property + void* GetData(); //Tell's the storage + + + void SetModifyHdl( const Link& rLink ) { aModifyLink = rLink; } + const Link& GetModifyHdl() const { return aModifyLink; } + + void SetClickedHdl( const Link& rLink ) { aClickedLink = rLink; } + const Link& GetClickedHdl() const { return aClickedLink; } + + void SetCommitHdl( const Link& rLink ) { aCommitLink = rLink; } + const Link& GetCommitHdl() const { return aCommitLink; } + + void SetSelectHdl( const Link& rLink ) { aSelectLink = rLink; } + const Link& GetSelectHdl() const { return aSelectLink; } + +}; + + +class SvPropertyBox: public Control +{ +private: + SvPropertyDataControl* pThePropDataCtr; + TabControl aTabControl; + +protected: + virtual void Resize(); + +public: + SvPropertyBox ( Window* pParent, WinBits nWinStyle = 0 ); + SvPropertyBox ( Window* pParent, const ResId& rResId ); + + ~SvPropertyBox(); + + virtual USHORT CalcVisibleLines(); + virtual void EnableUpdate(); // auch IDL? + virtual void DisableUpdate(); // auch IDL? + + // AB: Hier beginnt das 'offizielle' Interface, das in IDL uebernommen werden soll + virtual void SetController(SvPropertyDataControl *); + + virtual USHORT AppendPage( const String & r ); + virtual void SetPage( USHORT ); + virtual USHORT GetCurPage(); + virtual void ClearAll(); + virtual void ClearTable(); + + virtual void SetPropertyValue( const String & rEntryName, const String & rValue ); + + virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND ); + virtual void ChangeEntry( const SvPropertyData&, USHORT nPos); + virtual USHORT AppendEntry( const SvPropertyData&); + + virtual void SetFirstVisibleEntry(USHORT nPos); + virtual USHORT GetFirstVisibleEntry(); + + virtual void SetSelectedEntry(USHORT nPos); + virtual USHORT GetSelectedEntry(); +}; + + + +/* +class ScPropertyDlg : public ModalDialog +{ +private: + SvBasicPropertyDataControl aBaProDatCtr; + OKButton anOk; + CancelButton aCancel; + USHORT nCount; + USHORT nClickCount; + + SvPropertyData aProperty; + SvPropertyBox aPropListBox; + + ListBox aKindOfListBox; + FixedText aModAnswer; + FixedText aClickAnswer; + FixedText aCommitAnswer; + FixedText aSelectAnswer; + + DECL_LINK( ModifiedHdl, ListBox*); + + DECL_LINK( RowModifiedHdl, SvBasicPropertyDataControl*); + DECL_LINK( ClickHdl , SvBasicPropertyDataControl*); + DECL_LINK( SelectHdl , SvBasicPropertyDataControl*); + DECL_LINK( CommitHdl , SvBasicPropertyDataControl*); + +public: + ScPropertyDlg( Window* pParent); + ~ScPropertyDlg(); +}; +*/ +#endif // SC_AUTOFMT_HXX + + diff --git a/svtools/inc/reginfo.hxx b/svtools/inc/reginfo.hxx new file mode 100644 index 000000000000..342c151ef898 --- /dev/null +++ b/svtools/inc/reginfo.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * $RCSfile: reginfo.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _REGINFO_HXX +#define _REGINFO_HXX + +struct RegInfo_Impl; + +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif + +class RegInfo +{ + + public: + + RegInfo(); + ~RegInfo(); + + const String& GetGroup() const { return aCurrentGroup; } + void SetAppGroup( const String& rGroup ); + void DeleteAppGroup( const String& rGroup ); + + String ReadKey( const String& rKey ) const; + String ReadKey( const String& rKey, const String& rDefault ) const; + void WriteKey( const String& rKey, const String& rValue ); + void DeleteKey( const String& rKey ); + String GetKeyName( USHORT nKey ) const; + String ReadKey( USHORT nKey ) const; + USHORT GetKeyCount() const; + + private: + + String aCurrentGroup; + RegInfo_Impl* pImp; + +}; + + +#endif diff --git a/svtools/inc/reqitem.hxx b/svtools/inc/reqitem.hxx new file mode 100644 index 000000000000..46b963fa327c --- /dev/null +++ b/svtools/inc/reqitem.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: reqitem.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _REQITEM_HXX +#define _REQITEM_HXX + +#ifndef _SOLAR_H +#include <solar.h> +#endif + +#ifndef _RTTI_HXX +#include <rtti.hxx> +#endif + +#if __PRIVATE +#include "poolitem.hxx" +#else +#include <sfxipool.hxx> +#endif + +// ----------------------------------------------------------------------- + +class SfxRequestItem: public SfxSetItem + +/** [Description] + + Represents a function call with optional arguments. +*/ + +{ +public: + TYPEINFO(); + SfxRequestItem(); + SfxRequestItem( USHORT nWhich, SvStream & ); + SfxRequestItem( const SfxRequestItem& ); + ~SfxRequestItem(); + + virtual int operator==( const SfxPoolItem& ) const; + virtual + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; +}; + + +#endif + diff --git a/svtools/inc/ruler.hxx b/svtools/inc/ruler.hxx new file mode 100644 index 000000000000..bd83f7ec60d9 --- /dev/null +++ b/svtools/inc/ruler.hxx @@ -0,0 +1,928 @@ +/************************************************************************* + * + * $RCSfile: ruler.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _RULER_HXX +#define _RULER_HXX + +#ifndef _LINK_HXX +#include <tools/link.hxx> +#endif + +#ifndef _WINDOW_HXX +#include <vcl/window.hxx> +#endif +#ifndef _VIRDEV_HXX +#include <vcl/virdev.hxx> +#endif +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif + +class MouseEvent; +class TrackingEvent; +class DataChangedEvent; + +/************************************************************************* + +Beschreibung +============ + +class Ruler + +Diese Klasse dient zur Anzeige eines Lineals. Dabei kann diese Klasse nicht +nur als Anzeige-Control verwendet werden, sondern auch als aktives Control +zum Setzen/Verschieben von Tabulatoren und Raendern. + +-------------------------------------------------------------------------- + +WinBits + +WB_HORZ Lineal wird horizontal dargestellt +WB_VERT Lineal wird vertikal dargestellt +WB_3DLOOK 3D-Darstellung +WB_BORDER Border am unteren/rechten Rand +WB_EXTRAFIELD Feld in der linken/oberen Ecke zur Anzeige und + Auswahl von Tabs, Null-Punkt, ... + +-------------------------------------------------------------------------- + +Beim Lineal werden alle Werte als Pixel-Werte eingestellt. Dadurch werden +doppelte Umrechnungen und Rundungsfehler vermieden und die Raender werden +im Lineal auch an der Position angezeigt, den Sie auch im Dokument haben. +Dadurch kann die Applikation zum Beispiel bei Tabellendarstellung auch +eigene Rundungen vornehmen und die Positionen im Lineal passen trotzdem noch +zu denen im Dokument. Damit aber das Lineal weiss, wie das Dokument auf dem +Bildschirm dargestellt wird, muessen noch ein paar zusaetzliche Werte +eingestellt werden. + +Mit SetWinPos() wird der Offset des Edit-Fenster zum Lineal eingestellt. +Dabei kann auch die Breite des Fensters eingestellt werden. Wenn bei den +Werten 0 uebergeben wird, wird die Position/Breite vom Fenster automatisch +so breit gesetzt, wie das Lineal breit ist. + +Mit SetPagePos() wird der Offset der Seite zum Edit-Fenster eingestellt und +die Breite der Seite eingestellt. Wenn bei den Werten 0 uebergeben wird, +wird die Position/Breite automatisch so gesetzt, als ob die Seite das ganze +Editfenster ausfuellen wuerde. + +Mit SetBorderPos() kann der Offset eingestellt werden, ab dem der +Border ausgegeben wird. Die Position bezieht sich auf die linke bzw. obere +Fensterkante. Dies wird gebraucht, wenn ein horizontales und vertikales +Lineal gleichzeitig sichtbar sind. Beispiel: + aHRuler.SetBorderPos( aVRuler.GetSizePixel().Width()-1 ); + +Mit SetNullOffset() wird der Null-Punkt bezogen auf die Seite gesetzt. + +Alle anderen Werte (Raender, Einzug, Tabs, ...) beziehen sich auf den 0 Punkt, +der mit SetNullOffset() eingestellt wird. + +Die Werte werden zum Beispiel folgendermassen berechnet: + +- WinPos (wenn beide Fenster den gleichen Parent haben) + + Point aHRulerPos = aHRuler.GetPosPixel(); + Point aEditWinPos = aEditWin.GetPosPixel(); + aHRuler.SetWinPos( aEditWinPos().X() - aHRulerPos.X() ); + +- PagePos + + Point aPagePos = aEditWin.LogicToPixel( aEditWin.GetPagePos() ); + aHRuler.SetPagePos( aPagePos().X() ); + +- Alle anderen Werte + + Die logischen Werte zusammenaddieren, als Position umrechnen und + die vorher gemerkten Pixel-Positionen (von PagePos und NullOffset) + entsprechend abziehen. + +-------------------------------------------------------------------------- + +Mit SetUnit() und SetZoom() wird eingestellt, in welcher Einheit das Lineal +die Werte anzeigt. Folgende Einheiten werden akzeptiert: + + FUNIT_MM + FUNIT_CM (Default) + FUNIT_M + FUNIT_KM + FUNIT_INCH + FUNIT_FOOT + FUNIT_MILE + FUNIT_POINT + FUNIT_PICA + +-------------------------------------------------------------------------- + +Mit SetMargin1() kann der linke/obere Rand und mit SetMargin2() kann +der rechte/untere Rand gesetzt werden. Falls diese Methoden ohne Parameter +aufgerufen werden, werden keine Raender angezeigt. Wenn SetMargin1() bzw. +SetMargin2() mit Parametern aufgerufen werden, kann bei diesen +folgendes angegeben werden: + + long nPos - Offset zum NullPunkt in Pixel + USHORT nStyle - Bit-Style: + RULER_MARGIN_SIZEABLE + Rand kann in der Groesse veraendert werden. + + Zu diesen Style's koennen folgende Style- + Bits dazugeodert werden: + RULER_STYLE_INVISIBLE (fuer nicht sichtbar) + + +Mit SetBorders() kann ein Array von Raendern gesetzt werden. Dabei muss +ein Array vom Typ RulerBorder uebergeben werden, wobei folgende Werte +initialisiert werden muessen: + + long nPos - Offset zum NullPunkt in Pixel + long nWidth - Breite des Spaltenabstands in Pixel (kann zum + Beispiel fuer Tabellenspalten auch 0 sein) + USHORT nStyle - Bit-Style: + RULER_BORDER_SIZEABLE + Spaltenabstand kann in der Groesse veraendert + werden. Dieses Flag sollte nur gesetzt werden, + wenn ein Abstand in der Groesse geaendert wird + und nicht die Groesse einer Zelle. + RULER_BORDER_MOVEABLE + Spaltenabstand/Begrenzung kann verschoben + werden. Wenn Tabellenbegrenzungen verschoben + werden, sollte dieses Flag gesetzt werden und + nicht Sizeable. Denn Sizeable gibt an, das + ein Abstand vergroessert werden kann und nicht + eine einzelne Zelle in der Groesse geaendert + werden kann. + RULER_BORDER_VARIABLE + Nicht alle Spaltenabstande sind gleich + RULER_BORDER_TABLE + Tabellenrahmen. Wenn dieser Style gesetzt + wird, muss die Spaltenbreite 0 sein. + RULER_BORDER_SNAP + Hilfslinie / Fanglinie. Wenn dieser Style + gesetzt wird, muss die Spaltenbreite 0 sein. + + Zu diesen Style's koennen folgende Style- + Bits dazugeodert werden: + RULER_STYLE_INVISIBLE (fuer nicht sichtbar) + +Mit SetIndents() kann ein Array von Indents gesetzt werden. Diese Methode darf +nur angewendet werden, wenn es sich um ein horizontales Lineal handelt. Als +Parameter muss ein Array vom Typ RulerIndent uebergeben werden, wobei folgende +Werte initialisiert werden muessen: + + long nPos - Offset zum NullPunkt in Pixel + USHORT nStyle - Bit-Style: + RULER_INDENT_TOP (Erstzeileneinzug) + RULER_INDENT_BOTTOM (Linker/Rechter Einzug) + Zu diesen Style's koennen folgende Style- + Bits dazugeodert werden: + RULER_STYLE_DONTKNOW (fuer alte Position oder + fuer Uneindeutigkeit) + RULER_STYLE_INVISIBLE (fuer nicht sichtbar) + +Mit SetTabs() kann ein Array von Tabs gesetzt werden. Diese Methode darf nur +angewendet werden, wenn es sich um ein horizontales Lineal handelt. Als +Parameter muss ein Array vom Typ RulerTab uebergeben werden, wobei folgende +Werte initialisiert werden muessen: + + long nPos - Offset zum NullPunkt in Pixel + USHORT nStyle - Bit-Style: + RULER_TAB_DEFAULT (kann nicht selektiert werden) + RULER_TAB_LEFT + RULER_TAB_CENTER + RULER_TAB_RIGHT + RULER_TAB_DECIMAL + Zu diesen Style's koennen folgende Style- + Bits dazugeodert werden: + RULER_STYLE_DONTKNOW (fuer alte Position oder + fuer Uneindeutigkeit) + RULER_STYLE_INVISIBLE (fuer nicht sichtbar) + +Mit SetLines() koennen Positionslinien im Lineal angezeigt werden. Dabei +muss ein Array vom Typ RulerLine uebergeben werden, wobei folgende Werte +initialisiert werden muessen: + + long nPos - Offset zum NullPunkt in Pixel + USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein) + +Mit SetArrows() koennen Bemassungspfeile im Lineal angezeigt werden. Wenn +Bemassungspfeile gesetzt werden, werden im Lineal auch keine Unterteilungen +mehr angezeigt. Deshalb sollten die Bemassungspfeile immer ueber die ganze +Linealbreite gesetzt werden. Dabei muss ein Array vom Typ RulerArrow +uebergeben werden, wobei folgende Werte initialisiert werden muessen: + + long nPos - Offset zum NullPunkt in Pixel + long nWidth - Breite des Pfeils + long nLogWidth - Breite des Pfeils in logischer Einheit + USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein) + +Mit SetSourceUnit() wird die Einheit eingestellt, in welcher die logischen +Werte vorliegen, die bei SetArrows() uebergeben werden. Dabei werden nur die +Einheiten MAP_TWIP und MAP_100TH_MM (default) akzeptiert. + +-------------------------------------------------------------------------- + +Wenn auch vom Benutzer die Raender, Tabs, Border, ... ueber das Lineal +geaendert werden koennen, muss etwas mehr Aufwand getrieben werden. Dazu +muessen die Methoden StartDrag(), Drag() und EndDrag() ueberlagert werden. +Bei der Methode StartDrag() besteht die Moeglichkeit durch das zurueckgeben +von FALSE das Draggen zu verhindern. Im Drag-Handler muss die Drag-Position +abgefragt werden und die Werte muessen an die neue Position verschoben werden. +Dazu ruft man einfach die einzelnen Set-Methoden auf. Solange man sich +im Drag-Handler befindet, werden sich die Werte nur gemerkt und erst +danach das Lineal neu ausgegeben. Alle Handler koennen auch als Links ueber +entsprechende Set..Hdl()-Methoden gesetzt werden. + + - StartDrag() + Wird gerufen, wenn das Draggen gestartet wird. Wenn FALSE + zurueckgegeben wird, wird das Draggen nicht ausgefuehrt. Bei TRUE + wird das Draggen zugelassen. Wenn der Handler nicht ueberlagert + wird, wird FALSE zurueckgegeben. + + - EndDrag() + Wird gerufen, wenn das Draggen beendet wird. + + - Drag() + Wird gerufen, wenn gedragt wird. + + - Click() + Dieser Handler wird gerufen, wenn kein Element angeklickt wurde. + Die Position kann mit GetClickPos() abgefragt werden. Dadurch + kann man zum Beispiel Tabs in das Lineal setzen. Nach Aufruf des + Click-Handlers wird gegebenenfalls das Drag sofort ausgeloest. Dadurch + ist es moeglich, einen neuen Tab im Click-Handler zu setzen und + danach gleich zu verschieben. + + - DoubleClick() + Dieser Handler wird gerufen, wenn ein DoubleClick ausserhalb des + Extrafeldes gemacht wurde. Was angeklickt wurde, kann mit + GetClickType(), GetClickAryPos() und GetClickPos() abgefragt werden. + Somit kann man zum Beispiel den Tab-Dialog anzeigen, wenn ein + Tab mit einem DoubleClick betaetigt wurde. + +Im Drag-Handler kann man abfragen, was und wohin gedragt wurde. Dazu gibt +es folgende Abfrage-Methoden. + + - GetDragType() + Liefert zurueck, was gedragt wird: + RULER_TYPE_MARGIN1 + RULER_TYPE_MARGIN2 + RULER_TYPE_BORDER + RULER_TYPE_INDENT + RULER_TYPE_TAB + + - GetDragPos() + Liefert die Pixel-Position bezogen auf den eingestellten Null-Offset + zurueck, wohin der Anwender die Maus bewegt hat. + + - GetDragAryPos() + Liefert den Index im Array zurueck, wenn ein Border, Indent oder ein + Tab gedragt wird. Achtung: Es wird die Array-Position waehrend des + gesammten Drag-Vorgangs von dem Item im Array was vor dem Drag gesetzt + war zurueckgeben. Dadurch ist es zum Beispiel auch moeglich, einen + Tab nicht mehr anzuzeigen, wenn die Maus nach unten/rechts aus dem + Lineal gezogen wird. + + - GetDragSize() + Wenn Borders gedragt werden, kann hierueber abgefragt werden, ob + die Groesse bzw. welche Seite oder die Position geaendert werden soll. + RULER_DRAGSIZE_MOVE oder 0 - Move + RULER_DRAGSIZE_1 - Linke/obere Kante + RULER_DRAGSIZE_2 - Rechte/untere Kante + + - IsDragDelete() + Mit dieser Methode kann abgefragt werden, ob beim Draggen die + Maus unten/rechts aus dem Fenster gezogen wurde. Damit kann + zum Beispiel festgestellt werden, ob der Benutzer einen Tab + loeschen will. + + - IsDragCanceled() + Mit dieser Methode kann im EndDrag-Handler abgefragt werden, + ob die Aktion abgebrochen wurde, indem der Anwender die + Maus oben/links vom Fenster losgelassen hat oder ESC gedrueckt + hat. In diesem Fall werden die Werte nicht uebernommen. Wird + waehrend des Draggings die Maus oben/links aus dem Fenster + gezogen, werden automatisch die alten Werte dargestellt, ohne das + der Drag-Handler gerufen wird. + Falls der Benutzer jedoch den Wert auf die alte Position + zurueckgeschoben hat, liefert die Methode trotzdem FALSE. Falls + dies vermieden werden soll, muss sich die Applikation im StartDrag- + Handler den alten Wert merken und im EndDrag-Handler den Wert + vergleichen. + + - GetDragScroll() + Mit dieser Methode kann abgefragt werden, ob gescrollt werden + soll. Es wird einer der folgenden Werte zurueckgegeben: + RULER_SCROLL_NO - Drag-Position befindet sich + an keinem Rand und somit + muss nicht gescrollt werden. + RULER_SCROLL_1 - Drag-Position befindet sich + am linken/oberen Rand und + somit sollte das Programm evt. + ein Srcoll ausloesen. + RULER_SCROLL_2 - Drag-Position befindet sich + am rechten/unteren Rand und + somit sollte das Programm evt. + ein Srcoll ausloesen. + + - GetDragModifier() + Liefert die Modifier-Tasten zurueck, die beim Starten des Drag- + Vorgangs gedrueckt waren. Siehe MouseEvent. + + - GetClickPos() + Liefert die Pixel-Position bezogen auf den eingestellten Null-Offset + zurueck, wo der Anwender die Maus gedrueckt hat. + + - GetClickType() + Liefert zurueck, was per DoubleClick betaetigt wird: + RULER_TYPE_DONTKNOW (kein Element im Linealbereich) + RULER_TYPE_OUTSIDE (ausserhalb des Linealbereichs) + RULER_TYPE_MARGIN1 (nur Margin1-Kante) + RULER_TYPE_MARGIN2 (nur Margin2-Kante) + RULER_TYPE_BORDER (Border: GetClickAryPos()) + RULER_TYPE_INDENT (Einzug: GetClickAryPos()) + RULER_TYPE_TAB (Tab: GetClickAryPos()) + + - GetClickAryPos() + Liefert den Index im Array zurueck, wenn ein Border, Indent oder ein + Tab per DoubleClick betaetigt wird. + + - GetType() + Mit dieser Methode kann man einen HitTest durchfuehren, um + gegebenenfalls ueber das Abfangen des MouseButtonDown-Handlers + auch ueber die rechte Maustaste etwas auf ein Item anzuwenden. Als + Paramter ueber gibt man die Fensterposition und gegebenenfalls + einen Pointer auf einen USHORT, um die Array-Position eines + Tabs, Indent oder Borders mitzubekommen. Als Type werden folgende + Werte zurueckgegeben: + RULER_TYPE_DONTKNOW (kein Element im Linealbereich) + RULER_TYPE_OUTSIDE (ausserhalb des Linealbereichs) + RULER_TYPE_MARGIN1 (nur Margin1-Kante) + RULER_TYPE_MARGIN2 (nur Margin2-Kante) + RULER_TYPE_BORDER (Border: GetClickAryPos()) + RULER_TYPE_INDENT (Einzug: GetClickAryPos()) + RULER_TYPE_TAB (Tab: GetClickAryPos()) + +Wenn der Drag-Vorgang abgebrochen werden soll, kann der Drag-Vorgang +mit CancelDrag() abgebrochen werden. Folgende Methoden gibt es fuer die +Drag-Steuerung: + + - IsDrag() + Liefert TRUE zurueck, wenn sich das Lineal im Drag-Vorgang befindet. + + - CancelDrag() + Bricht den Drag-Vorgang ab, falls einer durchgefuehrt wird. Dabei + werden die alten Werte wieder hergestellt und der Drag und der + EndDrag-Handler gerufen. + +Um vom Dokument ein Drag auszuloesen, gibt es folgende Methoden: + + - StartDocDrag() + Dieser Methode werden der MouseEvent vom Dokumentfenster und + was gedragt werden soll uebergeben. Wenn als DragType + RULER_TYPE_DONTKNOW uebergeben wird, bestimmt das Lineal, was + verschoben werden soll. Bei den anderen, wird der Drag nur dann + gestartet, wenn auch an der uebergebenen Position ein entsprechendes + Element gefunden wurde. Dies ist zun Beispiel dann notwendig, wenn + zum Beispiel Einzuege und Spalten an der gleichen X-Position liegen. + Der Rueckgabewert gibt an, ob der Drag ausgeloest wurde. Wenn ein + Drag ausgeloest wird, uebernimmt das Lineal die normale Drag-Steuerung + und verhaelt sich dann so, wie als wenn direkt in das Lineal geklickt + wurde. So captured das Lineal die Mouse und uebernimmt auch die + Steuerung des Cancel (ueber Tastatur, oder wenn die Mouse ueber + oder links vom Lineal ruasgeschoben wird). Auch alle Handler werden + gerufen (inkl. des StartDrag-Handlers). Wenn ein MouseEvent mit + Click-Count 2 uebergeben wird auch der DoubleClick-Handler + entsprechend gerufen. + + - GetDocType() + Dieser Methode wird die Position vom Dokumentfenster uebergeben und + testet, was sich unter der Position befindet. Dabei kann wie bei + StartDocDrag() der entsprechende Test auf ein bestimmtes Element + eingeschraenkt werden. Im Gegensatz zu GetType() liefert diese + Methode immer DontKnow zurueck, falls kein Element getroffen wurde. + Falls man den HitTest selber durchfuehren moechte, kann man + folgende Defines fuer die Toleranz benutzen (Werte gelten fuer + eine Richtung): + RULER_MOUSE_TABLEWIDTH - fuer Tabellenspalten + RULER_MOUSE_MARGINWIDTH - fuer Margins + +-------------------------------------------------------------------------- + +Fuer das Extra-Feld kann der Inhalt bestimmt werden und es gibt Handler, +womit man bestimmte Aktionen abfangen kann. + + - ExtraDown() + Dieser Handler wird gerufen, wenn im Extra-Feld die Maus + gedrueckt wird. + + - SetExtraType() + Mit dieser Methode kann festgelegt werden, was im ExtraFeld + dargestellt werden soll. + - ExtraType Was im Extrafeld dargestellt werden soll + RULER_EXTRA_DONTKNOW (Nichts) + RULER_EXTRA_NULLOFFSET (Koordinaaten-Kreuz) + RULER_EXTRA_TAB (Tab) + - USHORT nStyle Bitfeld als Style: + RULER_STYLE_HIGHLIGHT (selektiert) + RULER_TAB_... (ein Tab-Style) + + - GetExtraClick() + Liefert die Anzahl der Mausclicks zurueck. Dadurch ist es zum + Beispiel auch moeglich, auch durch einen DoubleClick im Extrafeld + eine Aktion auszuloesen. + + - GetExtraModifier() + Liefert die Modifier-Tasten zurueck, die beim Klicken in das Extra- + Feld gedrueckt waren. Siehe MouseEvent. + +-------------------------------------------------------------------------- + +Weitere Hilfsfunktionen: + +- static Ruler::DrawTab() + Mit dieser Methode kann ein Tab auf einem OutputDevice ausgegeben + werden. Dadurch ist es moeglich, auch in Dialogen die Tabs so + anzuzeigen, wie Sie im Lineal gemalt werden. + + Diese Methode gibt den Tab zentriert an der uebergebenen Position + aus. Die Groesse der Tabs kann ueber die Defines RULER_TAB_WIDTH und + RULER_TAB_HEIGHT bestimmt werden. + +-------------------------------------------------------------------------- + +Tips zur Benutzung des Lineals: + +- Bei dem Lineal muss weder im Drag-Modus noch sonst das Setzen der Werte + in SetUpdateMode() geklammert werden. Denn das Lineal sorgt von sich + aus dafuer, das wenn mehrere Werte gesetzt werden, diese automatisch + zusammengefast werden und flackerfrei ausgegeben werden. + +- Initial sollten beim Lineal zuerst die Groessen, Positionen und Werte + gesetzt werden, bevor es angezeigt wird. Dies ist deshalb wichtig, da + ansonsten viele Werte unnoetig berechnet werden. + +- Wenn das Dokumentfenster, in dem sich das Lineal befindet aktiv bzw. + deaktiv wird, sollten die Methoden Activate() und Deactivate() vom + Lineal gerufen werden. Denn je nach Einstellungen und System wird die + Anzeige entsprechend umgeschaltet. + +- Zum Beispiel sollte beim Drag von Tabs und Einzuegen nach Moeglichkeit die + alten Positionen noch mit angezeigt werden. Dazu sollte zusaetzlich beim + Setzen der Tabs und Einzuege als erstes im Array die alten Positionen + eingetragen werden und mit dem Style RULER_STYLE_DONTKNOW verknuepft + werden. Danach sollte im Array die restlichen Werte eingetragen werden. + +- Bei mehreren markierten Absaetzen und Tabellen-Zellen, sollten die Tabs + und Einzuege in grau von der ersten Zelle, bzw. vom ersten Absatz + angezeigt werden. Dies kann man auch ueber den Style RULER_STYLE_DONTKNOW + erreichen. + +- Die Bemassungspfeile sollten immer dann angezeigt, wenn beim Drag die + Alt-Taste (WW-Like) gedrueckt wird. Vielleicht sollte diese Einstellung + auch immer vornehmbar sein und vielleicht beim Drag immer die + Bemassungspfeile dargestellt werden. Bei allen Einstellung sollten die + Werte immer auf ein vielfaches eines Wertes gerundet werden, da die + Bildschirmausloesung sehr ungenau ist. + +- DoppelKlicks sollten folgendermassen behandelt werden (GetClickType()): + - RULER_TYPE_DONTKNOW + RULER_TYPE_MARGIN1 + RULER_TYPE_MARGIN2 + Wenn die Bedingunden GetClickPos() <= GetMargin1() oder + GetClickPos() >= GetMargin2() oder der Type gleich + RULER_TYPE_MARGIN1 oder RULER_TYPE_MARGIN2 ist, sollte + ein SeitenDialog angezeigt werden, wo der Focus auf dem + entsprechenden Rand steht + - RULER_TYPE_BORDER + Es sollte ein Spalten- oder Tabellen-Dialog angezeigt werden, + wo der Focus auf der entsprechenden Spalte steht, die mit + GetClickAryPos() abgefragt werden kann. + - RULER_TYPE_INDENT + Es sollte der Dialog angezeigt werden, wo die Einzuege eingestellt + werden koennen. Dabei sollte der Focus auf dem Einzug stehen, der + mit GetClickAryPos() ermittelt werden kann. + - RULER_TYPE_TAB + Es sollte ein TabDialog angezeigt werden, wo der Tab selektiert + sein sollte, der ueber GetClickAryPos() abgefragt werden kann. + +*************************************************************************/ + +// ----------- +// - WinBits - +// ----------- + +#define WB_EXTRAFIELD ((WinBits)0x00004000) +#define WB_STDRULER WB_HORZ + +// --------------- +// - Ruler-Types - +// --------------- + +struct ImplRulerHitTest; + +// -------------- +// - Ruler-Type - +// -------------- + +enum RulerType { RULER_TYPE_DONTKNOW, RULER_TYPE_OUTSIDE, + RULER_TYPE_MARGIN1, RULER_TYPE_MARGIN2, + RULER_TYPE_BORDER, RULER_TYPE_INDENT, RULER_TYPE_TAB }; + +enum RulerExtra { RULER_EXTRA_DONTKNOW, + RULER_EXTRA_NULLOFFSET, RULER_EXTRA_TAB }; + +#define RULER_STYLE_HIGHLIGHT ((USHORT)0x8000) +#define RULER_STYLE_DONTKNOW ((USHORT)0x4000) +#define RULER_STYLE_INVISIBLE ((USHORT)0x2000) + +#define RULER_DRAGSIZE_MOVE 0 +#define RULER_DRAGSIZE_1 1 +#define RULER_DRAGSIZE_2 2 + +#define RULER_MOUSE_BORDERMOVE 5 +#define RULER_MOUSE_BORDERWIDTH 5 +#define RULER_MOUSE_TABLEWIDTH 1 +#define RULER_MOUSE_MARGINWIDTH 3 + +#define RULER_SCROLL_NO 0 +#define RULER_SCROLL_1 1 +#define RULER_SCROLL_2 2 + +// --------------- +// - RulerMargin - +// --------------- + +#define RULER_MARGIN_SIZEABLE ((USHORT)0x0001) + +// --------------- +// - RulerBorder - +// --------------- + +#define RULER_BORDER_SIZEABLE ((USHORT)0x0001) +#define RULER_BORDER_MOVEABLE ((USHORT)0x0002) +#define RULER_BORDER_VARIABLE ((USHORT)0x0004) +#define RULER_BORDER_TABLE ((USHORT)0x0008) +#define RULER_BORDER_SNAP ((USHORT)0x0010) + +struct RulerBorder +{ + long nPos; + long nWidth; + USHORT nStyle; +}; + +// --------------- +// - RulerIndent - +// --------------- + +#define RULER_INDENT_TOP ((USHORT)0x0000) +#define RULER_INDENT_BOTTOM ((USHORT)0x0001) +#define RULER_INDENT_STYLE ((USHORT)0x000F) + +struct RulerIndent +{ + long nPos; + USHORT nStyle; +}; + +// ------------ +// - RulerTab - +// ------------ + +#define RULER_TAB_LEFT ((USHORT)0x0000) +#define RULER_TAB_RIGHT ((USHORT)0x0001) +#define RULER_TAB_DECIMAL ((USHORT)0x0002) +#define RULER_TAB_CENTER ((USHORT)0x0003) +#define RULER_TAB_DEFAULT ((USHORT)0x0004) +#define RULER_TAB_STYLE ((USHORT)0x000F) + +struct RulerTab +{ + long nPos; + USHORT nStyle; +}; + +#define RULER_TAB_WIDTH 7 +#define RULER_TAB_HEIGHT 6 + +// ------------- +// - RulerLine - +// ------------- + +struct RulerLine +{ + long nPos; + USHORT nStyle; +}; + +// -------------- +// - RulerArrow - +// -------------- + +struct RulerArrow +{ + long nPos; + long nWidth; + long nLogWidth; + USHORT nStyle; +}; + +// ----------------- +// - ImplRulerData - +// ----------------- + +class ImplRulerData +{ + friend class Ruler; + +private: + RulerLine* pLines; + RulerArrow* pArrows; + RulerBorder* pBorders; + RulerIndent* pIndents; + RulerTab* pTabs; + long nNullVirOff; + long nRulVirOff; + long nRulWidth; + long nPageOff; + long nPageWidth; + long nNullOff; + long nMargin1; + long nMargin2; + USHORT nLines; + USHORT nArrows; + USHORT nBorders; + USHORT nIndents; + USHORT nTabs; + USHORT nMargin1Style; + USHORT nMargin2Style; + BOOL bAutoPageWidth; + BOOL bDummyAlign; + +#ifdef _SV_RULER_CXX +public: + ImplRulerData(); + ~ImplRulerData(); + ImplRulerData& operator=( const ImplRulerData& rData ); +#endif +}; + +// --------- +// - Ruler - +// --------- + +class Ruler : public Window +{ +private: + VirtualDevice maVirDev; + MapMode maMapMode; + long mnBorderOff; + long mnWinOff; + long mnWinWidth; + long mnWidth; + long mnHeight; + long mnVirOff; + long mnVirWidth; + long mnVirHeight; + long mnBorderWidth; + long mnStartDragPos; + long mnDragPos; + ULONG mnUpdateEvtId; + ImplRulerData* mpData; + ImplRulerData maData; + ImplRulerData maDragData; + Rectangle maExtraRect; + WinBits mnWinStyle; + USHORT mnUnitIndex; + USHORT mnDragAryPos; + USHORT mnDragSize; + USHORT mnDragScroll; + USHORT mnDragModifier; + USHORT mnExtraStyle; + USHORT mnExtraClicks; + USHORT mnExtraModifier; + RulerExtra meExtraType; + RulerType meDragType; + MapUnit meSourceUnit; + FieldUnit meUnit; + Fraction maZoom; + BOOL mbCalc; + BOOL mbFormat; + BOOL mbDrag; + BOOL mbDragDelete; + BOOL mbDragCanceled; + BOOL mbAutoWinWidth; + BOOL mbActive; + BYTE mnUpdateFlags; + Link maStartDragHdl; + Link maDragHdl; + Link maEndDragHdl; + Link maClickHdl; + Link maDoubleClickHdl; + Link maExtraDownHdl; + +#ifdef _SV_RULER_CXX + void ImplVDrawLine( long nX1, long nY1, long nX2, long nY2 ); + void ImplVDrawRect( long nX1, long nY1, long nX2, long nY2 ); + void ImplVDrawText( long nX, long nY, const String& rText ); + + void ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ); + void ImplDrawArrows( long nCenter ); + void ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom ); + void ImplDrawIndent( const Polygon& rPoly, USHORT nStyle ); + void ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom ); + void ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle ); + void ImplDrawTabs( long nMin, long nMax, long nVirBottom ); + void ImplInit( WinBits nWinBits ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplCalc(); + void ImplFormat(); + void ImplInitExtraField( BOOL bUpdate ); + void ImplInvertLines( BOOL bErase = FALSE ); + void ImplDraw(); + void ImplDrawExtra( BOOL bPaint = FALSE ); + void ImplUpdate( BOOL bMustCalc = FALSE ); + BOOL ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest ) const; + BOOL ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const; + BOOL ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier ); + void ImplDrag( const Point& rPos ); + void ImplEndDrag(); + DECL_LINK( ImplUpdateHdl, void* ); +#endif + +public: + Ruler( Window* pParent, WinBits nWinStyle = WB_STDRULER ); + virtual ~Ruler(); + + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + virtual long StartDrag(); + virtual void Drag(); + virtual void EndDrag(); + virtual void Click(); + virtual void DoubleClick(); + virtual void ExtraDown(); + + void Activate(); + void Deactivate(); + BOOL IsActive() const { return mbActive; } + + void SetWinPos( long nOff = 0, long nWidth = 0 ); + long GetWinOffset() const { return mnWinOff; } + long GetWinWidth() const { return mnWinWidth; } + void SetPagePos( long nOff = 0, long nWidth = 0 ); + long GetPageOffset() const { return mpData->nPageOff; } + long GetPageWidth() const { return mpData->nPageWidth; } + void SetBorderPos( long nOff = 0 ); + long GetBorderOffset() const { return mnBorderOff; } + Rectangle GetExtraRect() const { return maExtraRect; } + + void SetUnit( FieldUnit eNewUnit ); + FieldUnit GetUnit() const { return meUnit; } + void SetZoom( const Fraction& rNewZoom ); + Fraction GetZoom() const { return maZoom; } + + void SetSourceUnit( MapUnit eNewUnit ) { meSourceUnit = eNewUnit; } + MapUnit GetSourceUnit() const { return meSourceUnit; } + + void SetExtraType( RulerExtra eNewExtraType, USHORT nStyle = 0 ); + RulerExtra GetExtraType() const { return meExtraType; } + USHORT GetExtraStyle() const { return mnExtraStyle; } + USHORT GetExtraClicks() const { return mnExtraClicks; } + USHORT GetExtraModifier() const { return mnExtraModifier; } + + BOOL StartDocDrag( const MouseEvent& rMEvt, + RulerType eDragType = RULER_TYPE_DONTKNOW ); + RulerType GetDocType( const Point& rPos, + RulerType eDragType = RULER_TYPE_DONTKNOW, + USHORT* pAryPos = NULL ) const; + RulerType GetDragType() const { return meDragType; } + long GetDragPos() const { return mnDragPos; } + USHORT GetDragAryPos() const { return mnDragAryPos; } + USHORT GetDragSize() const { return mnDragSize; } + BOOL IsDragDelete() const { return mbDragDelete; } + BOOL IsDragCanceled() const { return mbDragCanceled; } + USHORT GetDragScroll() const { return mnDragScroll; } + USHORT GetDragModifier() const { return mnDragModifier; } + BOOL IsDrag() const { return mbDrag; } + void CancelDrag(); + long GetClickPos() const { return mnDragPos; } + RulerType GetClickType() const { return meDragType; } + USHORT GetClickAryPos() const { return mnDragAryPos; } + RulerType GetType( const Point& rPos, + USHORT* pAryPos = NULL ) const; + + void SetNullOffset( long nPos ); + long GetNullOffset() const { return mpData->nNullOff; } + void SetMargin1() { SetMargin1( 0, RULER_STYLE_INVISIBLE ); } + void SetMargin1( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE ); + long GetMargin1() const { return mpData->nMargin1; } + USHORT GetMargin1Style() const { return mpData->nMargin1Style; } + void SetMargin2() { SetMargin2( 0, RULER_STYLE_INVISIBLE ); } + void SetMargin2( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE ); + long GetMargin2() const { return mpData->nMargin2; } + USHORT GetMargin2Style() const { return mpData->nMargin2Style; } + + void SetLines( USHORT n = 0, const RulerLine* pLineAry = NULL ); + USHORT GetLineCount() const { return mpData->nLines; } + const RulerLine* GetLines() const { return mpData->pLines; } + + void SetArrows( USHORT n = 0, const RulerArrow* pArrowAry = NULL ); + USHORT GetArrowCount() const { return mpData->nArrows; } + const RulerArrow* GetArrows() const { return mpData->pArrows; } + + void SetBorders( USHORT n = 0, const RulerBorder* pBrdAry = NULL ); + USHORT GetBorderCount() const { return mpData->nBorders; } + const RulerBorder* GetBorders() const { return mpData->pBorders; } + + void SetIndents( USHORT n = 0, const RulerIndent* pIndentAry = NULL ); + USHORT GetIndentCount() const { return mpData->nIndents; } + const RulerIndent* GetIndents() const { return mpData->pIndents; } + + void SetTabs( USHORT n = 0, const RulerTab* pTabAry = NULL ); + USHORT GetTabCount() const { return mpData->nTabs; } + const RulerTab* GetTabs() const { return mpData->pTabs; } + + static void DrawTab( OutputDevice* pDevice, + const Point& rPos, USHORT nStyle ); + + void SetStyle( WinBits nStyle ); + WinBits GetStyle() const { return mnWinStyle; } + + void SetStartDragHdl( const Link& rLink ) { maStartDragHdl = rLink; } + const Link& GetStartDragHdl() const { return maStartDragHdl; } + void SetDragHdl( const Link& rLink ) { maDragHdl = rLink; } + const Link& GetDragHdl() const { return maDragHdl; } + void SetEndDragHdl( const Link& rLink ) { maEndDragHdl = rLink; } + const Link& GetEndDragHdl() const { return maEndDragHdl; } + void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; } + const Link& GetClickHdl() const { return maClickHdl; } + void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } + const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetExtraDownHdl( const Link& rLink ) { maExtraDownHdl = rLink; } + const Link& GetExtraDownHdl() const { return maExtraDownHdl; } +}; + +#endif // _RULER_HXX diff --git a/svtools/inc/scrwin.hxx b/svtools/inc/scrwin.hxx new file mode 100644 index 000000000000..71d81477c58b --- /dev/null +++ b/svtools/inc/scrwin.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * $RCSfile: scrwin.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:52 $ + * + * 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 _SCRWIN_HXX +#define _SCRWIN_HXX + +#ifndef _SCRBAR_HXX //autogen +#include <vcl/scrbar.hxx> +#endif + +class DataChangedEvent; + +// ------------------------- +// - ScrollableWindow-Type - +// ------------------------- + +typedef USHORT ScrollableWindowFlags; + +#define SCRWIN_THUMBDRAGGING 1 +#define SCRWIN_VCENTER 2 +#define SCRWIN_HCENTER 4 +#define SCRWIN_DEFAULT (SCRWIN_THUMBDRAGGING | SCRWIN_VCENTER | SCRWIN_HCENTER) + +// -------------------- +// - ScrollableWindow - +// -------------------- + +class ScrollableWindow: public Window +{ +private: + Point aPixOffset; // offset to virtual window (pixel) + Size aTotPixSz; // total size of virtual window (pixel) + long nLinePixH; // size of a line/column (pixel) + long nColumnPixW; + + ScrollBar aVScroll; // the scrollbars + ScrollBar aHScroll; + ScrollBarBox aCornerWin; // window in the bottom right corner + BOOL bScrolling:1, // user controlled scrolling + bHandleDragging:1, // scroll window while dragging + bHCenter:1, + bVCenter:1; + +#ifdef _SVT_SCRWIN_CXX + void ImpInitialize( ScrollableWindowFlags nFlags ); + DECL_LINK( ScrollHdl, ScrollBar * ); + DECL_LINK( EndScrollHdl, ScrollBar * ); +#endif + +public: + ScrollableWindow( Window* pParent, WinBits nBits = 0, + ScrollableWindowFlags = SCRWIN_DEFAULT ); + ScrollableWindow( Window* pParent, const ResId& rId, + ScrollableWindowFlags = SCRWIN_DEFAULT ); + + virtual void Resize(); + virtual void Command( const CommandEvent& rCEvt ); + virtual void DataChanged( const DataChangedEvent& rDEvt ); + + virtual void StartScroll(); + virtual void EndScroll( long nDeltaX, long nDeltaY ); + + void SetMapMode( const MapMode& rNewMapMode ); + MapMode GetMapMode() const; + + void SetTotalSize( const Size& rNewSize ); + Size GetTotalSize() { return PixelToLogic( aTotPixSz ); } + + void SetVisibleSize( const Size& rNewSize ); + BOOL MakeVisible( const Rectangle& rTarget, BOOL bSloppy = FALSE ); + Rectangle GetVisibleArea() const; + + void SetLineSize( ULONG nHorz, ULONG nVert ); + void Scroll( long nDeltaX, long nDeltaY ); + void Scroll( long nDeltaX, long nDeltaY, + const Rectangle& rRect ); + void ScrollLines( long nLinesX, long nLinesY ); + void ScrollPages( long nPagesX, ULONG nOverlapX, + long nPagesY, ULONG nOverlapY ); + +private: + void SetOutputSizePixel( const Size& rSize ); + Size GetOutputSizePixel() const; + Size GetOutputSize() const; +}; + +#endif diff --git a/svtools/inc/sectctr.hxx b/svtools/inc/sectctr.hxx new file mode 100644 index 000000000000..8fb4de3653c8 --- /dev/null +++ b/svtools/inc/sectctr.hxx @@ -0,0 +1,187 @@ +/************************************************************************* + * + * $RCSfile: sectctr.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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_SECTCTR_HXX +#define _SV_SECTCTR_HXX + +#ifndef _SV_SV_H +#include <vcl/sv.h> +#endif +#ifndef _SV_CTRL_HXX +#include <vcl/ctrl.hxx> +#endif + +class ImplSplitWindow; +class ScrollBar; +class ScrollBarBox; +class SvSection; + +#define SECTION_APPEND ((USHORT)0xFFFF) +#define SECTION_NOTFOUND ((USHORT)0xFFFF) + +#define WB_SECTION_STYLE WB_VSCROLL | WB_HSCROLL | WB_TABSTOP + +class SvSectionControl : public Control +{ +private: + + Window aSplitWinContainer; + ImplSplitWindow* pSplitWin; + ScrollBar* pVScrollBar; + ScrollBar* pHScrollBar; + ScrollBarBox* pScrollBarBox; + DockingWindow* pDummy; + long nRealHeight; + long nMaxHeight; + long nMinWidth; + Wallpaper aWallpaper; + + DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK( EndScrollHdl, ScrollBar* ); + + +protected: + + virtual void Resize(); + virtual void Paint( const Rectangle& rRect ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void Command( const CommandEvent& rCEvt ); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long Notify( NotifyEvent& rNEvt ); + virtual long KeyEventNotify( const KeyEvent& rKEvt ); + virtual void SetPosSizePixel( long nX, long nY,long nWidth, long nHeight,USHORT nFlags); + + + + long CalcMaxHeight(); + long CalcRealHeight(); + long CalcSectionWidth(); + + void SetScrollBars(BOOL bVert,BOOL bHorz); + void ShowScrollBarBox(); + void UpdateScrollBars(); + + BOOL VScrollResize(Size &aSize); + BOOL HScrollResize(Size &aSize); + void SetChildPos(long nPos, BOOL bScrolling = TRUE); + +public: + SvSectionControl( Window* pParent,WinBits nStyle = WB_SECTION_STYLE); + SvSectionControl( Window* pParent, const ResId& rResId ); + ~SvSectionControl(); + + + void InsertSection( USHORT nSectionId,SvSection* pSection,long nSize,USHORT nPos); + void InsertSection( USHORT nSectionId,SvSection* pSection,USHORT nPos); + void RemoveSection( USHORT nSectionId ); + void Clear(); + + USHORT GetSectionCount() const; + USHORT GetSectionId( USHORT nPos ) const; + USHORT GetSectionPos( USHORT nSectionId ) const; + USHORT GetSectionId( const Point& rPos ) const; + + void SetSectionSize( USHORT nId, long nNewSize ); + long GetSectionSize( USHORT nId ) const; + + /* + void SetCurSectionId( USHORT nSectionId ); + USHORT GetCurSectionId() const; + + void SetFirstSectionId( USHORT nSectionId ); + USHORT GetFirstSectionId() const { return GetSectionId( mnFirstSectionPos ); } + + void MakeVisible( USHORT nSectionId ); + */ + + void SetSectionWidth( USHORT nSectionId, long nWidth); + long GetSectionWidth( USHORT nSectionId ) const; + + void SetSection( USHORT nSectionId, SvSection* pPage ); + SvSection* GetSection( USHORT nSectionId ) const; + + void SetSectionText( USHORT nSectionId, const XubString& rText ); + XubString GetSectionText( USHORT nSectionId ) const; + + void SetHelpText( USHORT nSectionId, const XubString& rText ); + const XubString& GetHelpText( USHORT nSectionId ) const; + + void SetHelpId( USHORT nSectionId, ULONG nHelpId ); + ULONG GetHelpId( USHORT nSectionId ) const; + + void SetHelpText( const XubString& rText ) + { Control::SetHelpText( rText ); } + const XubString& GetHelpText() const + { return Control::GetHelpText(); } + + void SetHelpId( ULONG nId ) + { Control::SetHelpId( nId ); } + ULONG GetHelpId() const + { return Control::GetHelpId(); } + + void SetBackground( const Wallpaper& rBackground ){aWallpaper=rBackground; } + const Wallpaper& GetBackground() const { return aWallpaper; } + +}; + + +#endif diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/sfxecode.hxx new file mode 100644 index 000000000000..a5ce6d561ba4 --- /dev/null +++ b/svtools/inc/sfxecode.hxx @@ -0,0 +1,143 @@ +/************************************************************************* + * + * $RCSfile: sfxecode.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SFXECODE_HXX +#define _SFXECODE_HXX + +#include <tools/errcode.hxx> + +#define ERRCODE_SFX_NOSTDTEMPLATE (ERRCODE_AREA_SFX|ERRCODE_CLASS_PATH|1) +#define ERRCODE_SFX_NOTATEMPLATE (ERRCODE_AREA_SFX|ERRCODE_CLASS_FORMAT|2) +#define ERRCODE_SFX_GENERAL (ERRCODE_AREA_SFX|ERRCODE_CLASS_GENERAL|3) +#define ERRCODE_SFX_DOLOADFAILED (ERRCODE_AREA_SFX|ERRCODE_CLASS_READ|4) +#define ERRCODE_SFX_DOSAVECOMPLETEDFAILED (ERRCODE_AREA_SFX|ERRCODE_CLASS_WRITE|5) +#define ERRCODE_SFX_COMMITFAILED (ERRCODE_AREA_SFX|ERRCODE_CLASS_WRITE|6) +#define ERRCODE_SFX_HANDSOFFFAILED (ERRCODE_AREA_SFX|ERRCODE_CLASS_GENERAL|7) +#define ERRCODE_SFX_DOINITNEWFAILED (ERRCODE_AREA_SFX|ERRCODE_CLASS_CREATE|8) +#define ERRCODE_SFX_CANTREADDOCINFO (ERRCODE_AREA_SFX|ERRCODE_CLASS_FORMAT|9) +#define ERRCODE_SFX_ALREADYOPEN (ERRCODE_AREA_SFX|ERRCODE_CLASS_ALREADYEXISTS|10) +#define ERRCODE_SFX_WRONGPASSWORD (ERRCODE_AREA_SFX|ERRCODE_CLASS_READ|11) +#define ERRCODE_SFX_DOCUMENTREADONLY (ERRCODE_AREA_SFX|ERRCODE_CLASS_WRITE|12) +#define ERRCODE_SFX_OLEGENERAL (ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|14) +#define ERRCODE_SFXMSG_STYLEREPLACE (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|13) +#define ERRCODE_SFX_TEMPLATENOTFOUND (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|15) +#define ERRCODE_SFX_ISRELATIVE (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|16) +#define ERRCODE_SFX_FORCEDOCLOAD (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|17) + +#define ERRCODE_SFX_NOFILTER (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|45) +#define ERRCODE_SFX_FORCEQUIET (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|47) +#define ERRCODE_SFX_CONSULTUSER (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|48) +#define ERRCODE_SFX_NEVERCHECKCONTENT (ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|49) + +#define ERRCODE_SFX_NODOCRELOAD (ERRCODE_AREA_SFX|ERRCODE_CLASS_ACCESS|18) +#define ERRCODE_SFX_CANTFINDORIGINAL (ERRCODE_AREA_SFX|ERRCODE_CLASS_GENERAL|19) +#define ERRCODE_SFX_RESTART (ERRCODE_AREA_SFX|ERRCODE_CLASS_GENERAL|20) +#define ERRCODE_SFX_CANTCREATECONTENT (ERRCODE_AREA_SFX|ERRCODE_CLASS_CREATE|21) +#define ERRCODE_SFX_CANTCREATELINK (ERRCODE_AREA_SFX|ERRCODE_CLASS_CREATE|22) +#define ERRCODE_SFX_WRONGBMKFORMAT (ERRCODE_AREA_SFX|ERRCODE_CLASS_FORMAT|23) +#define ERRCODE_SFX_WRONGICONFILE (ERRCODE_AREA_SFX|ERRCODE_CLASS_FORMAT|24) +#define ERRCODE_SFX_CANTDELICONFILE (ERRCODE_AREA_SFX|ERRCODE_CLASS_ACCESS|25) +#define ERRCODE_SFX_CANTWRITEICONFILE (ERRCODE_AREA_SFX|ERRCODE_CLASS_ACCESS|26) +#define ERRCODE_SFX_CANTRENAMECONTENT (ERRCODE_AREA_SFX|ERRCODE_CLASS_ACCESS|27) +#define ERRCODE_SFX_INVALIDBMKPATH (ERRCODE_AREA_SFX|ERRCODE_CLASS_PATH|28) +#define ERRCODE_SFX_CANTWRITEURLCFGFILE (ERRCODE_AREA_SFX|ERRCODE_CLASS_ACCESS|29) +#define ERRCODE_SFX_WRONGURLCFGFORMAT (ERRCODE_AREA_SFX|ERRCODE_CLASS_FORMAT|30) +#define ERRCODE_SFX_NODOCUMENT (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|31) +#define ERRCODE_SFX_INVALIDLINK (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|32) +#define ERRCODE_SFX_INVALIDTRASHPATH (ERRCODE_AREA_SFX|ERRCODE_CLASS_PATH|33) +#define ERRCODE_SFX_NOTRESTORABLE (ERRCODE_AREA_SFX|ERRCODE_CLASS_CREATE|34) +#define ERRCODE_SFX_NOTRASH (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|35) +#define ERRCODE_SFX_INVALIDSYNTAX (ERRCODE_AREA_SFX|ERRCODE_CLASS_PATH|36) +#define ERRCODE_SFX_CANTCREATEFOLDER (ERRCODE_AREA_SFX|ERRCODE_CLASS_CREATE|37) +#define ERRCODE_SFX_CANTRENAMEFOLDER (ERRCODE_AREA_SFX|ERRCODE_CLASS_PATH|38) +#define ERRCODE_SFX_WRONG_CDF_FORMAT (ERRCODE_AREA_SFX| ERRCODE_CLASS_READ | 39) +#define ERRCODE_SFX_EMPTY_SERVER (ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|40) +#define ERRCODE_SFX_NO_ABOBOX (ERRCODE_AREA_SFX| ERRCODE_CLASS_READ | 41) + +//Dies und das +#define ERRCTX_ERROR 21 +#define ERRCTX_WARNING 22 + +//Documentkontexte +#define ERRCTX_SFX_LOADTEMPLATE 1 +#define ERRCTX_SFX_SAVEDOC 2 +#define ERRCTX_SFX_SAVEASDOC 3 +#define ERRCTX_SFX_DOCINFO 4 +#define ERRCTX_SFX_DOCTEMPLATE 5 +#define ERRCTX_SFX_MOVEORCOPYCONTENTS 6 + +//Appkontexte +#define ERRCTX_SFX_DOCMANAGER 50 +#define ERRCTX_SFX_OPENDOC 51 +#define ERRCTX_SFX_NEWDOCDIRECT 52 +#define ERRCTX_SFX_NEWDOC 53 + +//Organizerkontexte +#define ERRCTX_SFX_CREATEOBJSH 70 + +//BASIC-Kontexte +#define ERRCTX_SFX_LOADBASIC 80 + +//Addressbook contexts +#define ERRCTX_SFX_SEARCHADDRESS 90 + +#endif // #ifndef _SFXECODE_HXX + + diff --git a/svtools/inc/sgfbram.hxx b/svtools/inc/sgfbram.hxx new file mode 100644 index 000000000000..5738afad5657 --- /dev/null +++ b/svtools/inc/sgfbram.hxx @@ -0,0 +1,201 @@ +/************************************************************************* + * + * $RCSfile: sgfbram.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SGFBRAM_HXX +#define _SGFBRAM_HXX + +// die folgenden Zeilen k”nnen raus, sobald das auch im WNT-Update verfgbar ist: +#if defined(WNT) +typedef void INT64; +typedef void UINT64; +typedef long INT32; +typedef unsigned long UINT32; +typedef short INT16; +typedef unsigned short UINT16; +typedef char INT8; +typedef unsigned char UINT8; +#endif + +#define SgfBitImag0 1 /* Bitmap */ +#define SgfBitImag1 4 /* Bitmap */ +#define SgfBitImag2 5 /* Bitmap */ +#define SgfBitImgMo 6 /* Monochrome Bitmap */ +#define SgfSimpVect 2 /* Einfaches Vectorformat */ +#define SgfPostScrp 3 /* Postscript file */ +#define SgfStarDraw 7 /* StarDraw SGV-Datei */ +#define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */ + +// Konstanten fr SgfHeader.SwGrCol +#define SgfBlckWhit 1 /* Schwarz/Weiá Bild Ä¿ SimpVector, */ +#define SgfGrayscal 2 /* Bild mit Graustufen ³ StarDraw und */ +#define Sgf16Colors 3 /* Farbbild (16 Farben) ÄÙ Bit Image */ +#define SgfVectFarb 4 /* Farben fr Linien verwenden Ä¿ */ +#define SgfVectGray 5 /* Graustufen fr Linien verwenden ³ Nur fr */ +#define SgfVectWdth 6 /* Strichst„rken fr Linien verwenden ÄÙ SimpVector */ + + +#define SgfHeaderSize 42 +class SgfHeader +{ +public: + UINT16 Magic; + UINT16 Version; + UINT16 Typ; + UINT16 Xsize; + UINT16 Ysize; + INT16 Xoffs; + INT16 Yoffs; + UINT16 Planes; // Layer + UINT16 SwGrCol; + char Autor[10]; + char Programm[10]; + UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) ! + + UINT32 GetOffset(); + friend SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead); + BOOL ChkMagic(); +}; + +#define SgfEntrySize 22 +class SgfEntry +{ +public: + UINT16 Typ; + UINT16 iFrei; + UINT16 lFreiLo,lFreiHi; + char cFrei[10]; + UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) ! + + UINT32 GetOffset(); + friend SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr); +}; + +#define SgfVectorSize 10 +class SgfVector +{ +public: + UINT16 Flag; + INT16 x; + INT16 y; + UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) ! + + friend SvStream& operator>>(SvStream& rIStream, SgfVector& rEntr); +}; + +extern long SgfVectXofs; +extern long SgfVectYofs; +extern long SgfVectXmul; +extern long SgfVectYmul; +extern long SgfVectXdiv; +extern long SgfVectYdiv; +extern BOOL SgfVectScal; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Windows BMP ///////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#define BmpFileHeaderSize 14 +class BmpFileHeader +{ +public: + UINT16 Typ; // = "BM" + UINT16 SizeLo,SizeHi; // Filesize in Bytes + UINT16 Reserve1; // Reserviert + UINT16 Reserve2; // Reserviert + UINT16 OfsLo,OfsHi; // Offset? + + void SetSize(UINT32 Size); + void SetOfs(UINT32 Size); + UINT32 GetOfs(); + friend SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead); +}; + +#define BmpInfoHeaderSize 40 +class BmpInfoHeader +{ +public: + UINT32 Size; // Gr”áe des BmpInfoHeaders + INT32 Width; // Breite in Pixel + INT32 Hight; // H”he in Pixel + UINT16 Planes; // Anzahl der Planes (immer 1) + UINT16 PixBits; // Anzahl der Bit je Pixel (1,4,8,oder 24) + UINT32 Compress; // Datenkompression + UINT32 ImgSize; // Gr”áe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt. + INT32 xDpmm; // Dot per Meter (0 ist erlaubt) + INT32 yDpmm; // Dot per Meter (0 ist erlaubt) + UINT32 ColUsed; // Anzahl der verwendeten Farben (0=alle) + UINT32 ColMust; // Anzahl der wichtigen Farben (0=alle) + + friend SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rHead); +}; + +#define RGBQuadSize 4 +class RGBQuad { +private: + BYTE Red; + BYTE Grn; + BYTE Blu; + BYTE Fil; +public: + RGBQuad(BYTE R, BYTE G, BYTE B) { Red=R; Grn=G; Blu=B; Fil=0; } +}; + +#endif //_SGFBRAM_HXX diff --git a/svtools/inc/sgffilt.hxx b/svtools/inc/sgffilt.hxx new file mode 100644 index 000000000000..d4bb173519d1 --- /dev/null +++ b/svtools/inc/sgffilt.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * $RCSfile: sgffilt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SGFFILT_HXX +#define _SGFFILT_HXX +#ifndef _URLOBJ_HXX +#include <tools/urlobj.hxx> +#endif + +BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion); +BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut); +BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf); +BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath, const INetURLObject& rFltPath, const INetURLObject& rCfgPath); + +// Konstanten fr CheckSgfTyp() +#define SGF_BITIMAGE 1 /* Bitmap */ +#define SGF_SIMPVECT 2 /* Einfaches Vectorformat */ +#define SGF_POSTSCRP 3 /* Postscript file */ +#define SGF_STARDRAW 7 /* StarDraw SGV-Datei */ +#define SGF_DONTKNOW 255 /* Unbekannt oder kein SGF/SGV */ + +#define SGV_VERSION 3 /* SGV mit anderer Version wird abgewiesen */ + /* 3 entspricht StarDraw 2.00/2.01 M„rz'93 */ +#endif //_SGFFILT_HXX diff --git a/svtools/inc/sgvmain.hxx b/svtools/inc/sgvmain.hxx new file mode 100644 index 000000000000..d9451f4c46a2 --- /dev/null +++ b/svtools/inc/sgvmain.hxx @@ -0,0 +1,391 @@ +/************************************************************************* + * + * $RCSfile: sgvmain.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SGVMAIN_HXX +#define _SGVMAIN_HXX + +#ifdef VCL +#include <vcl/font.hxx> +#include <vcl/outdev.hxx> +#include <vcl/virdev.hxx> +#else // VCL +#include <svgen.hxx> +#endif + + +#define UCHAR unsigned char + +struct PointType { + INT16 x; + INT16 y; +}; + +#define SgfDpmm 40 + +#define DtHdSize 256 +class DtHdType { +public: + BYTE Reserved[256]; + friend SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd); + friend void DtHdOverSeek(SvStream& rInp); +}; + + +struct Seitenformat { + PointType Size; // 0.00mm...819.175mm (Papiergröße) + INT16 RandL; // links Rand auf + INT16 RandR; // rechts dem Papier + INT16 RandO; // oben Rand auf + INT16 RandU; // unten dem Papier + BYTE PColor; // Future Use + BYTE PIntens; // erst recht Future use +// BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT) +}; + + +#define PageSize 146 +class PageType { +public: + UINT32 Next; // Nächste Seite + UINT32 nList; // Objektdaten, erster Record + UINT32 ListEnd; // Objektdaten, letzter Record + Seitenformat Paper; // Papierdaten + BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT) + BYTE StdPg; // welche Standardseite einblenden ? + PointType U; // Nullpunkt + INT16 HlpLnH[20]; // Hilfslinien + INT16 HlpLnV[20]; + BYTE LnAnzH; + BYTE LnAnzV; + UCHAR PgName[32]; // Seitenname + friend SvStream& operator>>(SvStream& rIStream, PageType& rPage); +}; + + +enum ObjArtType {ObjStrk,ObjRect,ObjPoly,ObjCirc,ObjSpln, + ObjText,ObjGrup,ObjBmap,ObjVirt,ObjTxtX,ObjMaxi}; + +struct ObjLineType { + BYTE LFarbe; // [Index] + BYTE LBFarbe; // [Index] + BYTE LIntens; // [%] + BYTE LMuster; // [Index] inkl. Transparenz + INT16 LMSize; // [Koeffizient/100] + INT16 LDicke; // Strichstärke +}; + +struct ObjAreaType { + BYTE FFarbe; // [Index] + BYTE FBFarbe; // [Index] + BYTE FIntens; // [%] + BYTE FDummy1; // + INT16 FDummy2; // + UINT16 FMuster; // [Index] inkl. Invers, Transparenz +}; + +#define ObjTextTypeSize 64 +class ObjTextType { +public: + ObjLineType L; // Text-Outline (future) + ObjAreaType F; // Text innen + UINT16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType. + UINT16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schluß sein + UINT16 Breite; // 1..65535% bitte nicht mehr als 500% + BYTE Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo) + BYTE Kapit; // 1..255% + UINT16 Schnitt; // 8 Flags + UINT16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile + UINT16 Slant; // Kursivwinkel 0.00..89.99ø default 15.00ø doppelt Breit angesehen) + BYTE ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als + INT8 ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63«) + ObjLineType ShdL; // Schatten-Outline (neu 2.0) + ObjAreaType ShdF; // Schatten-innen (neu 2.0) + PointType ShdVers; // Schattenversatz Max.300.00% + BOOL ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad + BOOL NoSpc; // True-> kein Zwischenraum (für BackArea) + ObjAreaType BackF; // Hintergrundfläche + UINT32 GetFont(); + void SetFont(UINT32 FontID); +}; + +class Obj0Type { // SuperClass für Apple-VMT +public: + virtual void Draw(OutputDevice& rOut); +}; + +#define ObjkSize 20 /* eigentlich 21. Wg. Allignment ist Flags jedoch verschoben worden*/ +class ObjkType: public Obj0Type { // Grundkomponenten aller Stardraw-Objekte +public: + UINT32 Last; + UINT32 Next; + UINT16 MemSize; // in Bytes + PointType ObjMin; // XY-Minimum des Objekts + PointType ObjMax; // XY-Maximum des Objekts + BYTE Art; + BYTE Layer; +// BYTE Flags; // (Schummel für Allignment unter NT) + friend SvStream& operator>>(SvStream& rIStream, ObjkType& rObjk); + friend BOOL ObjOverSeek(SvStream& rInp, ObjkType& rObjk); + virtual void Draw(OutputDevice& rOut); +}; + + +#define StrkSize 38 +class StrkType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE LEnden; // Linienenden + ObjLineType L; + PointType Pos1; // Anfangspunkt + PointType Pos2; // Endpunkt + friend SvStream& operator>>(SvStream& rIStream, StrkType& rStrk); + virtual void Draw(OutputDevice& rOut); +}; + + +#define RectSize 52 +class RectType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE Reserve; + ObjLineType L; + ObjAreaType F; + PointType Pos1; // LO-Ecke = Bezugspunkt + PointType Pos2; // R-Ecke + INT16 Radius; // Eckenradius + UINT16 DrehWink; // 315...<45 + UINT16 Slant; // >270...<90 + friend SvStream& operator>>(SvStream& rIStream, RectType& rRect); + virtual void Draw(OutputDevice& rOut); +}; + + +#define PolySize 44 +class PolyType: public ObjkType { // identisch mit Spline ! +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE LEnden; // nur für Polyline + ObjLineType L; + ObjAreaType F; // nicht für Polyline + BYTE nPoints; + BYTE Reserve; + UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw) + PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!)) + friend SvStream& operator>>(SvStream& rIStream, PolyType& rPoly); + virtual void Draw(OutputDevice& rOut); +}; +#define PolyClosBit 0x01 // Unterarten von Poly: 0: PolyLine 1: Polygon + + +#define SplnSize 44 +class SplnType: public ObjkType { // identisch mit Poly ! +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE LEnden; // nur für nSpline + ObjLineType L; + ObjAreaType F; // nicht für nSpline + BYTE nPoints; + BYTE Reserve; + UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw) + PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!)) + friend SvStream& operator>>(SvStream& rIStream, SplnType& rSpln); + virtual void Draw(OutputDevice& rOut); +}; +// Unterarten von Spline: siehe Poly + + +#define CircSize 52 +class CircType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE LEnden; // nur Bogen (Kr & El) + ObjLineType L; + ObjAreaType F; // nicht für Bogen (Kr & El) + PointType Center; // Mittelpunkt + PointType Radius; // Radius + UINT16 DrehWink; // nur Ellipse + UINT16 StartWink; // ¿ nicht für Vollkreis + UINT16 RelWink; // Ù und Vollellipse + friend SvStream& operator>>(SvStream& rIStream, CircType& rCirc); + virtual void Draw(OutputDevice& rOut); +}; +#define CircFull 0x00 /* Unterarten von Kreis: 0: Kreis */ +#define CircSect 0x01 /* 1: Kreissektor */ +#define CircAbsn 0x02 /* 2: Kreisabschnitt */ +#define CircArc 0x03 /* 3: Kreisbogen */ + + +#define TextSize 116 +class TextType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE Reserve; // für Word Allign + ObjTextType T; // 64 Bytes << DWord-Allign bei FontID erforderlich + PointType Pos1; // Bezugspunkt (ObenLinks) + PointType Pos2; // (untenRechts) + INT16 TopOfs; // Von Oberkante bis Textbegin (future für vJustify) + UINT16 DrehWink; // 0...<360 + UINT16 BoxSlant; // >270...<90 (nur Box) + UINT16 BufSize; // Größe von Buf für Load, Save, Copy und so + UINT16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich + UINT16 ExtLo,ExtHi;// (Ptr) Text über mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich + PointType FitSize; // Ursprungsgröße für Fit2Size + INT16 FitBreit; // Breite zum formatieren bei Fit2Size + UCHAR* Buffer; // Diese Variable wird nicht durch Lesen von Disk gefüllt, sondern explizit! + friend SvStream& operator>>(SvStream& rIStream, TextType& rText); + virtual void Draw(OutputDevice& rOut); +}; +#define TextOutlBit 0x01 /* 1=Sourcecode für Outliner (wird von DrawObjekt() ignoriert) */ +#define TextFitSBit 0x02 /* Bit1: 1=Text-FitToSize, auch Outliner (2.0) */ +#define TextFitZBit 0x08 /* Bit3: 1=Fit2Size Zeilenweise (2.0) */ +#define TextDrftBit 0x04 /* Bit2: 1=DraftDraw (2.0) */ +#define TextFitBits (TextFitSBit | TextFitZBit) + + +enum GrafStat {NoGraf,Pic,Pcx,Hpgl,Img,Msp,Tiff,Dxf,Lot,Usr,Sgf}; + +#define BmapSize 132 +class BmapType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + BYTE Reserve; + ObjAreaType F; // Farbe und Muster der 1-Plane Bitmap + PointType Pos1; + PointType Pos2; + UINT16 DrehWink; // 315...<45 (Future) + UINT16 Slant; // >270...<90 (Future) + UCHAR Filename[80]; // Pfad + PointType PixSize; // Größe in Pixel (0 bei Vektor) + GrafStat Format; // siehe GpmDef.Pas + BYTE nPlanes; // Anzahl der Bitplanes (0 bei Vektor) + BOOL RawOut; // als Raw ausgeben ? + BOOL InvOut; // invertiert ausgeben ? + BOOL LightOut; // aufhellen? (SD20) + BYTE GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(für Fix in DrawBmp) + + INetURLObject aFltPath; // Für GraphicFilter + INetURLObject aCfgPath; // Für GraphicFilter + friend SvStream& operator>>(SvStream& rIStream, BmapType& rBmap); + virtual void Draw(OutputDevice& rOut); + void SetPaths(const INetURLObject rFltPath, const INetURLObject rCfgPath); +}; + + +#define GrupSize 48 +class GrupType: public ObjkType { +public: + BYTE Flags; // (Schummel für Allignment unter NT) + UCHAR Name[13]; // Name der Gruppe + UINT16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich + UINT16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich + UINT16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur + UINT32 ChartPtr; // Diagrammstruktur + UINT32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist. + friend SvStream& operator>>(SvStream& rIStream, GrupType& rGrup); +// virtual void Draw(OutputDevice& rOut); +}; + + +void SetLine(ObjLineType& rLine, OutputDevice& rOut); +void SetArea(ObjAreaType& rArea, OutputDevice& rOut); +Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts); +void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs); +void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs); +INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div); +UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div); + + +class SgfFontOne { +public: + SgfFontOne* Next; // Zeiger für Listenverkettung + UINT32 IFID; + BOOL Bold; + BOOL Ital; + BOOL Sans; + BOOL Serf; + BOOL Fixd; + FontFamily SVFamil; + CharSet SVChSet; + String SVFName; // z.B. "Times New Roman" = 15 Chars + USHORT SVWidth; // Durchschnittliche Zeichenbreite in % + SgfFontOne(); + void ReadOne( ByteString& ID, ByteString& Dsc); +}; + +class SgfFontLst { +public: + String FNam; // vollständiger Filename des Inifiles + SgfFontOne* pList; // Listenanfang + SgfFontOne* Last; // Listenende + UINT32 LastID; // für schnelleren Zugriff bei Wiederholungen + SgfFontOne* LastLn; // für schnelleren Zugriff bei Wiederholungen + BOOL Tried; + SgfFontLst(); + ~SgfFontLst(); + void AssignFN(const String& rFName); + void ReadList(); + void RausList(); + SgfFontOne* GetFontDesc(UINT32 ID); +}; + +#endif //_SGVMAIN_HXX + + diff --git a/svtools/inc/sgvspln.hxx b/svtools/inc/sgvspln.hxx new file mode 100644 index 000000000000..81282c0b008c --- /dev/null +++ b/svtools/inc/sgvspln.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * $RCSfile: sgvspln.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SGVSPLN_HXX +#define _SGVSPLN_HXX + +/************************************************************************* +|* +|* CalcSpline() +|* +|* Beschreibung Berechnet die Koeffizienten eines parametrischen +|* natrlichen oder periodischen kubischen +|* Polynomsplines. Die Eckpunkte des šbergebenen +|* Polygons werden als Sttzstellen angenommen. +|* n liefert die Anzahl der Teilpolynome. +|* Ist die Berechnung fehlerfrei verlaufen, so +|* liefert die Funktion TRUE. Nur in diesem Fall +|* ist Speicher fr die Koeffizientenarrays +|* allokiert, der dann sp„ter vom Aufrufer mittels +|* delete freizugeben ist. +|* Ersterstellung JOE 17-08.93 +|* Letzte Aenderung JOE 17-08.93 +|* +*************************************************************************/ + +BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n, + double*& ax, double*& ay, double*& bx, double*& by, + double*& cx, double*& cy, double*& dx, double*& dy, double*& T); + +/************************************************************************* +|* +|* Poly2Spline() +|* +|* Beschreibung Konvertiert einen parametrichen kubischen +|* Polynomspline Spline (natrlich oder periodisch) +|* in ein angen„hertes Polygon. +|* Die Funktion liefert FALSE, wenn ein Fehler bei +|* der Koeffizientenberechnung aufgetreten ist oder +|* das Polygon zu groá wird (>PolyMax=16380). Im 1. +|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte. +|* Um Koordinatenberl„ufe zu vermeiden werden diese +|* auf +/-32000 begrenzt. +|* Ersterstellung JOE 23.06.93 +|* Letzte Aenderung JOE 23.06.93 +|* +*************************************************************************/ +BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly); + +#endif //_SGVSPLN_HXX diff --git a/svtools/inc/stdmenu.hxx b/svtools/inc/stdmenu.hxx new file mode 100644 index 000000000000..8ba0f7dd0669 --- /dev/null +++ b/svtools/inc/stdmenu.hxx @@ -0,0 +1,278 @@ +/************************************************************************* + * + * $RCSfile: stdmenu.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _STDMENU_HXX +#define _STDMENU_HXX + +#ifndef _LINK_HXX +#include <tools/link.hxx> +#endif +#ifndef _INTN_HXX +#include <tools/intn.hxx> +#endif +#ifndef _MENU_HXX +#include <vcl/menu.hxx> +#endif + +class FontList; +class FontInfo; + +/************************************************************************* + +Beschreibung +============ + +class FontNameMenu + +Beschreibung + +Erlaubt die Auswahl von Fonts. Das Menu wird ueber Fill mit den FontNamen +gefuellt. Fill sortiert automatisch die FontNamen (inkl. aller Umlaute und +sprachabhaengig). Mit SetCurName()/GetCurName() kann der aktuelle Fontname +gesetzt/abgefragt werden. Wenn SetCurName() mit einem leeren String +aufgerufen wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow). +Vor dem Selectaufruf wird der ausgewaehlte Name automatisch als aktueller +gesetzt und wuerde beim naechsten Aufruf auch als aktueller Name angezeigt +werden. Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit +SetCurName() der aktuelle Fontname gesetzt werden. + +Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein +Select-Handler gesetzt werden, um die Auswahl eines Namens mitzubekommen. + +In dieses Menu koennen keine weiteren Items eingefuegt werden. + +Spaeter soll auch das Menu die gleichen Bitmaps anzeigen, wie die +FontNameBox. Auf den Systemen, wo Menues nicht automatisch scrollen, +wird spaeter wohl ein A-Z Menu ziwschengeschaltet. Da ein Menu bei vielen +installierten Fonts bisher schon immer lange gebraucht hat, sollte dieses +Menu schon jetzt nur einmal erzeugt werden (da sonst das Kontextmenu bis +zu 10-Sekunden fuer die Erzeugung brauchen koennte). + +Querverweise + +FontList; FontStyleMenu; FontSizeMenu; FontNameBox + +-------------------------------------------------------------------------- + +class FontStyleMenu + +Beschreibung + +Erlaubt die Auswahl eines FontStyles. Mit Fill wird das FontStyleMenu mit +den Styles zum uebergebenen Font gefuellt. Nachgebildete Styles werden +immer mit eingefuegt (kann sich aber noch aendern, da vielleicht +nicht alle Applikationen [StarDraw,Formel,FontWork] mit Syntetic-Fonts +umgehen koennen). Mit SetCurStyle()/GetCurStyle() kann der aktuelle Fontstyle +gesetzt/abgefragt werden. Der Stylename muss mit FontList::GetStyleName() +ermittelt werden. Wenn SetCurStyle() mit einem leeren String aufgerufen wird, +wird kein Eintrag als aktueller angezeigt (fuer DontKnow). Vor dem Selectaufruf +wird der ausgewaehlte Style automatisch als aktueller gesetzt und wuerde beim +naechsten Aufruf auch als aktueller Style angezeigt werden. Deshalb sollte vor +PopupMenu::Execute() gegebenenfalls mit SetCurStyle() der aktuelle Style +gesetzt werden. Da die Styles vom ausgewaehlten Font abhaengen, sollte +nach einer Aenderung des Fontnamen das Menu mit Fill mit den Styles des +Fonts neu gefuellt werden. + +Mit GetCurStyle() kann der ausgewaehlte Style abgefragt +werden. Mit Check wird der Style gecheckt/uncheckt, welcher aktiv +ist. Der Stylename muss mit FontList::GetStyleName() ermittelt werden. Vor +dem Selectaufruf wird der ausgewaehlte Style automatisch gecheckt. Mit +UncheckAllStyles() koennen alle Fontstyles geuncheckt werden (zum Beispiel +fuer DontKnow). + +Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein +Select-Handler gesetzt werden, um die Auswahl eines Styles mitzubekommen. + +An dieses Menu kann ueber MENU_APPEND weitere Items eingefuegt werden. +Bei Fill werden nur Items entfernt, die die Id zwischen FONTSTYLEMENU_FIRSTID +und FONTSTYLEMENU_LASTID haben. + +Querverweise + +FontList; FontNameMenu; FontSizeMenu; FontStyleBox + +-------------------------------------------------------------------------- + +class FontSizeMenu + +Beschreibung + +Erlaubt die Auswahl von Fontgroessen. Ueber Fill wird das FontSizeMenu +gefuellt und ueber GetCurHeight() kann die ausgewaehlte Fontgroesse +abgefragt werden. Mit SetCurHeight()/GetCurHeight() kann die aktuelle +Fontgroesse gesetzt/abgefragt werden. Wenn SetCurHeight() mit 0 aufgerufen +wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow). Vor dem +Selectaufruf wird die ausgewaehlte Groesse automatisch als aktuelle gesetzt +und wuerde beim naechsten Aufruf auch als aktuelle Groesse angezeigt werden. +Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit SetCurHeight() +die aktuelle Groesse gesetzt werden. Da die Groessen vom ausgewaehlten Font +abhaengen, sollte nach einer Aenderung des Fontnamen das Menu mit Fill mit +den Groessen des Fonts neu gefuellt werden. + +Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein +Select-Handler gesetzt werden, um die Auswahl einer Groesse mitzubekommen. + +Alle Groessen werden in 10tel Point angegeben. + +In dieses Menu koennen keine weiteren Items eingefuegt werden. + +Spaeter soll das Menu je nach System die Groessen anders darstelllen. Zum +Beispiel koennte der Mac spaeter vielleicht einmal die Groessen als Outline +darstellen, die als Bitmap-Fonts vorhanden sind. + +Querverweise + +FontList; FontNameMenu; FontStyleMenu; FontSizeBox + +*************************************************************************/ + +// ---------------- +// - FontNameMenu - +// ---------------- + +class FontNameMenu : public PopupMenu +{ +private: + XubString maCurName; + Link maSelectHdl; + Link maHighlightHdl; + +public: + FontNameMenu(); + virtual ~FontNameMenu(); + + virtual void Select(); + virtual void Highlight(); + + void Fill( const FontList* pList ); + + void SetCurName( const XubString& rName ); + const XubString& GetCurName() const { return maCurName; } + + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } + void SetHighlightHdl( const Link& rLink ) { maHighlightHdl = rLink; } + const Link& GetHighlightHdl() const { return maHighlightHdl; } +}; + +// ----------------- +// - FontStyleMenu - +// ----------------- + +#define FONTSTYLEMENU_FIRSTID 62000 +#define FONTSTYLEMENU_LASTID 62999 + +class FontStyleMenu : public PopupMenu +{ +private: + XubString maCurStyle; + Link maSelectHdl; + Link maHighlightHdl; + +public: + FontStyleMenu(); + virtual ~FontStyleMenu(); + + virtual void Select(); + virtual void Highlight(); + + void Fill( const XubString& rName, const FontList* pList ); + void SetCurStyle( const XubString& rStyle ); + const XubString& GetCurStyle() const { return maCurStyle; } + + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } + void SetHighlightHdl( const Link& rLink ) { maHighlightHdl = rLink; } + const Link& GetHighlightHdl() const { return maHighlightHdl; } +}; + +// ---------------- +// - FontSizeMenu - +// ---------------- + +class FontSizeMenu : public PopupMenu +{ +private: + International maIntn; + long* mpHeightAry; + long mnCurHeight; + Link maSelectHdl; + Link maHighlightHdl; + +public: + FontSizeMenu(); + ~FontSizeMenu(); + + virtual void Select(); + virtual void Highlight(); + + void Fill( const FontInfo& rInfo, const FontList* pList ); + + void SetCurHeight( long nHeight ); + long GetCurHeight() const { return mnCurHeight; } + + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } + void SetHighlightHdl( const Link& rLink ) { maHighlightHdl = rLink; } + const Link& GetHighlightHdl() const { return maHighlightHdl; } +}; + +#endif // _STDMENU_HXX diff --git a/svtools/inc/strmadpt.hxx b/svtools/inc/strmadpt.hxx new file mode 100644 index 000000000000..3e62e569a9f2 --- /dev/null +++ b/svtools/inc/strmadpt.hxx @@ -0,0 +1,180 @@ +/************************************************************************* + * + * $RCSfile: strmadpt.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 SVTOOLS_STRMADPT_HXX +#define SVTOOLS_STRMADPT_HXX + +#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_ +#include <com/sun/star/io/XInputStream.hpp> +#endif +#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_ +#include <com/sun/star/io/XOutputStream.hpp> +#endif +#ifndef _COM_SUN_STAR_IO_XSEEKABLE_HPP_ +#include <com/sun/star/io/XSeekable.hpp> +#endif +#ifndef _CPPUHELPER_WEAK_HXX_ +#include <cppuhelper/weak.hxx> +#endif +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif + +//============================================================================ +class SvOutputStreamOpenLockBytes: public SvOpenLockBytes +{ + com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > + m_xOutputStream; + sal_uInt32 m_nPosition; + +public: + TYPEINFO(); + + SvOutputStreamOpenLockBytes( + const com::sun::star::uno::Reference< + com::sun::star::io::XOutputStream > & + rTheOutputStream): + m_xOutputStream(rTheOutputStream), m_nPosition(0) {} + + virtual ErrCode ReadAt(ULONG, void *, ULONG, ULONG *) const; + + virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount, + ULONG * pWritten); + + virtual ErrCode Flush() const; + + virtual ErrCode SetSize(ULONG); + + virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const; + + virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount, + ULONG * pWritten); + + virtual ULONG Tell() const; + + virtual ULONG Seek(ULONG); + + virtual void Terminate(); +}; + +//============================================================================ +class SvLockBytesInputStream: public cppu::OWeakObject, + public com::sun::star::io::XInputStream, + public com::sun::star::io::XSeekable +{ + SvLockBytesRef m_xLockBytes; + sal_Int64 m_nPosition; + bool m_bDone; + +public: + SvLockBytesInputStream(SvLockBytes * pTheLockBytes): + m_xLockBytes(pTheLockBytes), m_nPosition(0), m_bDone(false) {} + + virtual com::sun::star::uno::Any SAL_CALL + queryInterface(const com::sun::star::uno::Type & rType) + throw (com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL acquire() + throw(com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL release() + throw(com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL + readBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData, + sal_Int32 nBytesToRead) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL + readSomeBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData, + sal_Int32 nMaxBytesToRead) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL available() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL closeInput() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL seek(sal_Int64 nLocation) + throw (com::sun::star::lang::IllegalArgumentException, + com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int64 SAL_CALL getPosition() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int64 SAL_CALL getLength() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); +}; + +#endif // SVTOOLS_STRMADPT_HXX + diff --git a/svtools/inc/svimpbox.hxx b/svtools/inc/svimpbox.hxx new file mode 100644 index 000000000000..18fe97c07dc1 --- /dev/null +++ b/svtools/inc/svimpbox.hxx @@ -0,0 +1,362 @@ +/************************************************************************* + * + * $RCSfile: svimpbox.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SVIMPLBOX_HXX +#define _SVIMPLBOX_HXX + +#ifndef _SELENG_HXX +#include <vcl/seleng.hxx> +#endif + +#ifndef _SCRBAR_HXX +#include <vcl/scrbar.hxx> +#endif + +class SvTreeListBox; +class Point; +class DropEvent; +class SvLBoxTreeList; +class SvImpLBox; +class SvLBoxEntry; +class SvLBoxItem; +class SvLBoxTab; +class TabBar; + +class ImpLBSelEng : public FunctionSet +{ + SvImpLBox* pImp; + SelectionEngine* pSelEng; + SvTreeListBox* pView; + +public: + ImpLBSelEng( SvImpLBox* pImp, SelectionEngine* pSelEng, + SvTreeListBox* pView ); + ~ImpLBSelEng(); + void BeginDrag(); + void CreateAnchor(); + void DestroyAnchor(); + BOOL SetCursorAtPoint( const Point& rPoint, + BOOL bDontSelectAtCursor=FALSE ); + BOOL IsSelectionAtPoint( const Point& rPoint ); + void DeselectAtPoint( const Point& rPoint ); + void DeselectAll(); +}; + +// Flags fuer nFlag +#define F_VER_SBARSIZE_WITH_HBAR 0x0001 +#define F_HOR_SBARSIZE_WITH_VBAR 0x0002 +#define F_IGNORE_NEXT_MOUSEMOVE 0x0004 // OS/2 only +#define F_IN_SCROLLING 0x0008 +#define F_DESEL_ALL 0x0010 +#define F_START_EDITTIMER 0x0020 // MAC only +#define F_IGNORE_SELECT 0x0040 +#define F_IN_RESIZE 0x0080 +#define F_REMOVED_ENTRY_INVISIBLE 0x0100 +#define F_REMOVED_RECALC_MOST_RIGHT 0x0200 +#define F_IGNORE_CHANGED_TABS 0x0400 +#define F_PAINTED 0x0800 +#define F_IN_PAINT 0x1000 +#define F_ENDSCROLL_SET_VIS_SIZE 0x2000 +#define F_FILLING 0x4000 + + +class SvImpLBox +{ +friend class ImpLBSelEng; +friend class SvTreeListBox; +private: + SvTreeListBox* pView; + SvLBoxTreeList* pTree; + SvLBoxEntry* pCursor; + SvLBoxEntry* pStartEntry; + SvLBoxEntry* pAnchor; + SvLBoxEntry* pMostRightEntry; + SvLBoxButton* pActiveButton; + SvLBoxEntry* pActiveEntry; + SvLBoxTab* pActiveTab; + TabBar* pTabBar; + + ScrollBar aVerSBar; + ScrollBar aHorSBar; + ScrollBarBox aScrBarBox; + + // wg. kompat. hier + Image aDontKnowNodeBmp; + Image aExpNodeBmp, aCollNodeBmp; + Size aOutputSize; + SelectionEngine aSelEng; + ImpLBSelEng aFctSet; + Timer aAsyncBeginDragTimer; + Point aAsyncBeginDragPos; + + long nYoffsNodeBmp; + long nNodeBmpTabDistance; // typisch kleiner 0 + long nNodeBmpWidth; + long nNextVerVisSize; + long nMostRight; + ULONG nVisibleCount; // Anzahl Zeilen im Control + ULONG nCurUserEvent; //-1 == kein Userevent amn Laufen + short nHorSBarHeight, nVerSBarWidth; + USHORT nFlags; + + WinBits nWinBits; + FASTBOOL bSimpleTravel; // ist TRUE bei SINGLE_SELECTION + BOOL bUpdateMode; + BOOL bInVScrollHdl; + BOOL bAsyncBeginDrag; + +//#if defined (MAC) || defined(OV_DEBUG) + Timer aEditTimer; + DECL_LINK( EditTimerCall, Timer * ); +//#endif + + DECL_LINK( BeginDragHdl, void* ); + DECL_LINK( MyUserEvent,void*); + void StopUserEvent(); + + void InvalidateEntriesFrom( long nY ) const; + void InvalidateEntry( long nY ) const; + void ShowVerSBar(); + // setzt Thumb auf FirstEntryToDraw + void SyncVerThumb(); + BOOL IsLineVisible( long nY ) const; + long GetEntryLine( SvLBoxEntry* pEntry ) const; + void FillView(); + void CursorDown(); + void CursorUp(); + void KeyLeftRight( long nDiff ); + void PageDown( USHORT nDelta ); + void PageUp( USHORT nDelta ); + + void SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect = FALSE ); + + void DrawNet(); + + // ScrollBar-Handler + DECL_LINK( ScrollUpDownHdl, ScrollBar * ); + DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); + DECL_LINK( EndScrollHdl, ScrollBar * ); + + void SetNodeBmpYOffset( const Image& ); + void SetNodeBmpTabDistance(); + + // Selection-Engine + SvLBoxEntry* MakePointVisible( const Point& rPoint, + BOOL bNotifyScroll=TRUE ); + + void SetAnchorSelection( SvLBoxEntry* pOld, + SvLBoxEntry* pNewCursor ); + void BeginDrag(); + BOOL ButtonDownCheckCtrl( const MouseEvent& rMEvt, + SvLBoxEntry* pEntry, long nY ); + BOOL MouseMoveCheckCtrl( const MouseEvent& rMEvt, + SvLBoxEntry* pEntry ); + BOOL ButtonUpCheckCtrl( const MouseEvent& rMEvt ); + BOOL ButtonDownCheckExpand( const MouseEvent&, + SvLBoxEntry*,long nY ); + + void PositionScrollBars( Size& rOSize, USHORT nMask ); + USHORT AdjustScrollBars( Size& rSize ); + + void BeginScroll(); + void EndScroll(); + BOOL InScroll() const { return (BOOL)(nFlags & F_IN_SCROLLING)!=0;} + Rectangle GetVisibleArea() const; + BOOL EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPos,long nLine); + void InitScrollBarBox(); + SvLBoxTab* NextTab( SvLBoxTab* ); + + BOOL SetMostRight( SvLBoxEntry* pEntry ); + void FindMostRight( SvLBoxEntry* EntryToIgnore ); + void FindMostRight( SvLBoxEntry* pParent, SvLBoxEntry* EntryToIgnore ); + void FindMostRight_Impl( SvLBoxEntry* pParent,SvLBoxEntry* EntryToIgnore ); + void NotifyTabsChanged(); + +public: + SvImpLBox( SvTreeListBox* pView, SvLBoxTreeList*, WinBits nWinStyle ); + ~SvImpLBox(); + + void Clear(); + void SetWindowBits( WinBits nWinStyle ); + void SetModel( SvLBoxTreeList* pModel ) { pTree = pModel;} + + void EntryInserted( SvLBoxEntry*); + void RemovingEntry( SvLBoxEntry* pEntry ); + void EntryRemoved(); + void MovingEntry( SvLBoxEntry* pEntry ); + void EntryMoved( SvLBoxEntry* pEntry ); + void TreeInserted( SvLBoxEntry* pEntry ); + + void IndentChanged( short nIndentPixel ); + void EntryExpanded( SvLBoxEntry* pEntry ); + void EntryCollapsed( SvLBoxEntry* pEntry ); + void CollapsingEntry( SvLBoxEntry* pEntry ); + void EntrySelected( SvLBoxEntry*, BOOL bSelect ); + + void Paint( const Rectangle& rRect ); + void RepaintSelectionItems(); + void MouseButtonDown( const MouseEvent& ); + void MouseButtonUp( const MouseEvent& ); + void MouseMove( const MouseEvent&); + BOOL KeyInput( const KeyEvent& ); + void Resize(); + void GetFocus(); + void LoseFocus(); + void UpdateAll( + BOOL bInvalidateCompleteView= TRUE, + BOOL bUpdateVerSBar = TRUE ); + void SetEntryHeight( short nHeight ); + void PaintEntry( SvLBoxEntry* pEntry ); + void InvalidateEntry( SvLBoxEntry* ); + void RecalcFocusRect(); + + inline void SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect ); + void SetDragDropMode( DragDropMode eDDMode ); + void SetSelectionMode( SelectionMode eSelMode ); + void SetAddMode( BOOL bAdd ) { aSelEng.AddAlways(FALSE); } + BOOL IsAddMode() const { return aSelEng.IsAlwaysAdding(); } + + SvLBoxEntry* GetCurrentEntry() const { return pCursor; } + BOOL IsEntryInView( SvLBoxEntry* ) const; + SvLBoxEntry* GetEntry( const Point& rPos ) const; + // gibt letzten Eintrag zurueck, falls Pos unter letztem Eintrag + SvLBoxEntry* GetClickedEntry( const Point& ) const; + SvLBoxEntry* GetCurEntry() const { return pCursor; } + void SetCurEntry( SvLBoxEntry* ); + Point GetEntryPos( SvLBoxEntry* ) const; + void MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop=FALSE ); + + void PaintDDCursor( SvLBoxEntry* ); + + void SetExpandedNodeBmp( const Image& ); + void SetCollapsedNodeBmp( const Image& ); + void SetDontKnowNodeBmp( const Image& rImg ) { aDontKnowNodeBmp = rImg; } + const Image& GetExpandedNodeBmp() const { return aExpNodeBmp; } + const Image& GetCollapsedNodeBmp() const { return aCollNodeBmp; } + const Image& GetDontKnowNodeBmp() const { return aDontKnowNodeBmp; } + + const Size& GetOutputSize() const { return aOutputSize;} + void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE ); + void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE ); + void Command( const CommandEvent& rCEvt ); + + void Invalidate(); + void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); } + void SelAllDestrAnch( BOOL bSelect, + BOOL bDestroyAnchor = TRUE, + BOOL bSingleSelToo = FALSE ); + void ShowCursor( BOOL bShow ); + + BOOL RequestHelp( const HelpEvent& rHEvt ); + void EndSelection(); + BOOL IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const; + void RepaintScrollBars(); + void EnableAsyncDrag( BOOL b) { bAsyncBeginDrag = b; } + void SetUpdateMode( BOOL ); + void SetUpdateModeFast( BOOL ); + BOOL GetUpdateMode() const { return bUpdateMode; } + Rectangle GetClipRegionRect() const; + BOOL HasHorScrollBar() const { return aHorSBar.IsVisible(); } + void ShowFocusRect( const SvLBoxEntry* pEntry ); + void SetTabBar( TabBar* pTabBar ); +}; + +inline void SvImpLBox::SetExpandedNodeBmp( const Image& rBmp ) +{ + aExpNodeBmp = rBmp; + SetNodeBmpYOffset( rBmp ); +} + +inline void SvImpLBox::SetCollapsedNodeBmp( const Image& rBmp ) +{ + aCollNodeBmp = rBmp; + SetNodeBmpYOffset( rBmp ); +} + +inline Point SvImpLBox::GetEntryPos( SvLBoxEntry* pEntry ) const +{ + return Point( 0, GetEntryLine( pEntry ) ); +} + +inline void SvImpLBox::PaintEntry( SvLBoxEntry* pEntry ) +{ + long nY = GetEntryLine( pEntry ); + pView->PaintEntry( pEntry, nY ); +} + + +inline BOOL SvImpLBox::IsLineVisible( long nY ) const +{ + BOOL bRet = TRUE; + if ( nY < 0 || nY >= aOutputSize.Height() ) + bRet = FALSE; + return bRet; +} + +inline void SvImpLBox::TreeInserted( SvLBoxEntry* pTree ) +{ + EntryInserted( pTree ); +} + + +#endif + + diff --git a/svtools/inc/svimpicn.hxx b/svtools/inc/svimpicn.hxx new file mode 100644 index 000000000000..6d1ba72ecad8 --- /dev/null +++ b/svtools/inc/svimpicn.hxx @@ -0,0 +1,354 @@ +/************************************************************************* + * + * $RCSfile: svimpicn.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SVIMPICN_HXX +#define _SVIMPICN_HXX + +#ifndef _VIRDEV_HXX +#include <vcl/virdev.hxx> +#endif + +#ifndef _SCRBAR_HXX +#include <vcl/scrbar.hxx> +#endif +#include <limits.h> + +class SvLBoxEntry; +class SvLBoxTreeList; +class SvImpIconView; +class ImpIcnCursor; +class SvPtrarr; + +#define PAINTFLAG_HOR_CENTERED 0x0001 +#define PAINTFLAG_VER_CENTERED 0x0002 + +#define SELRECT_BORDER_OFFS -7 +// Flags +#define F_VER_SBARSIZE_WITH_HBAR 0x00000001 +#define F_HOR_SBARSIZE_WITH_VBAR 0x00000002 +#define F_IGNORE_NEXT_MOUSEMOVE 0x00000004 // OS/2 only +#define F_ENTRY_REMOVED 0x00000008 +// ist gesetzt, wenn nach Clear oder Ctor mind. einmal gepaintet wurde +#define F_PAINTED 0x00000010 +#define F_ADD_MODE 0x00000020 +#define F_MOVING_SIBLING 0x00000040 +#define F_SELRECT_VISIBLE 0x00000080 +#define F_CMD_ARRIVED 0x00000100 +#define F_DRAG_SOURCE 0x00000200 +#define F_GRIDMODE 0x00000400 +// beim Einfuegen eines Eintrags ergibt sich dessen Position +// durch simples Addieren auf die Position des zuletzt eingefuegten Eintrags +#define F_GRID_INSERT 0x00000800 +#define F_DOWN_CTRL 0x00001000 +#define F_DOWN_DESELECT 0x00002000 +// Hack fuer D&D: Hintergrund des Entries nicht painten +#define F_NO_EMPHASIS 0x00004000 +// Selektion per Gummiband +#define F_RUBBERING 0x00008000 +#define F_START_EDITTIMER_IN_MOUSEUP 0x00010000 + +class SvImpIconView +{ + friend class ImpIcnCursor; + ScrollBar aVerSBar; + ScrollBar aHorSBar; + Rectangle aCurSelectionRect; + SvPtrarr aSelectedRectList; + MouseEvent aMouseMoveEvent; + Timer aEditTimer; // fuer Inplace-Editieren + Timer aMouseMoveTimer; // generiert MouseMoves bei Gummibandselektion + // Boundrect des zuletzt eingefuegten Entries + Rectangle aPrevBoundRect; + Size aOutputSize; // Pixel + Size aVirtOutputSize; // expandiert automatisch + Point aDDLastEntryPos; + Point aDDLastRectPos; + + SvLBoxTreeList* pModel; + SvIconView* pView; + ImpIcnCursor* pImpCursor; + long nMaxVirtWidth; // max.breite aVirtOutputSize + SvPtrarr* pZOrderList; + long nGridDX, + nGridDY; + long nHorSBarHeight, + nVerSBarWidth; + WinBits nWinBits; + int nViewMode; + long nHorDist; + long nVerDist; + long nMaxBmpWidth; + long nMaxBmpHeight; + long nMaxTextWidth; + long nMaxBoundHeight; // Hoehe des hoechsten BoundRects + ULONG nFlags; + ULONG nCurUserEvent; + SvLBoxEntry* pCurParent; + SvLBoxEntry* pCursor; + SvLBoxEntry* pNextCursor; // wird in MovingEntry gesetzt und ist + // nur in EntryMoved gueltig! + SvLBoxEntry* pDDRefEntry; + VirtualDevice* pDDDev; + VirtualDevice* pDDBufDev; + VirtualDevice* pDDTempDev; + + SvIconViewTextMode eTextMode; + BOOL bMustRecalcBoundingRects; + + void CheckAllSizes(); + void CheckSizes( SvLBoxEntry* pEntry, + const SvIcnVwDataEntry* pViewData = 0 ); + void ShowCursor( BOOL bShow ); + + void SetNextEntryPos(const Point& rPos); + Point FindNextEntryPos( const Size& rBoundSize ); + void ImpArrange(); + void AdjustVirtSize( const Rectangle& ); + void ResetVirtSize(); + void CheckScrollBars(); + + DECL_LINK( ScrollUpDownHdl, ScrollBar * ); + DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); + DECL_LINK( MouseMoveTimeoutHdl, Timer* ); + DECL_LINK( EditTimeoutHdl, Timer* ); + DECL_LINK( UserEventHdl, void* ); + void AdjustScrollBars( BOOL bVirtSizeGrowedOnly = FALSE); + void PositionScrollBars( long nRealWidth, long nRealHeight ); + void CalcDocPos( Point& aMousePos ); + BOOL GetResizeRect( Rectangle& ); + void PaintResizeRect( const Rectangle& ); + SvLBoxEntry* GetNewCursor(); + void ToggleSelection( SvLBoxEntry* ); + void DeselectAllBut( SvLBoxEntry* ); + void Center( SvLBoxEntry* pEntry, SvIcnVwDataEntry* ) const; + void StopEditTimer() { aEditTimer.Stop(); } + void StartEditTimer() { aEditTimer.Start(); } + void ImpHideDDIcon(); + void ImpDrawXORRect( const Rectangle& rRect ); + void AddSelectedRect( const Rectangle&, short nOffset = SELRECT_BORDER_OFFS ); + void ClearSelectedRectList(); + Rectangle CalcMaxTextRect( const SvLBoxEntry* pEntry, + const SvIcnVwDataEntry* pViewData ) const; + + void ClipAtVirtOutRect( Rectangle& rRect ) const; + void AdjustAtGrid( const SvPtrarr& rRow, SvLBoxEntry* pStart=0 ); + Point AdjustAtGrid( + const Rectangle& rCenterRect, // "Schwerpunkt" des Objekts (typ. Bmp-Rect) + const Rectangle& rBoundRect ) const; + SvIconViewTextMode GetEntryTextModeSmart( const SvLBoxEntry* pEntry, + const SvIcnVwDataEntry* pViewData ) const; + + BOOL CheckVerScrollBar(); + BOOL CheckHorScrollBar(); + void CancelUserEvent(); + +public: + + SvImpIconView( SvIconView* pView, SvLBoxTreeList*, WinBits nWinStyle ); + ~SvImpIconView(); + + void Clear( BOOL bInCtor = FALSE ); + void SetWindowBits( WinBits nWinStyle ); + void SetModel( SvLBoxTreeList* pTree, SvLBoxEntry* pParent ) + { pModel = pTree; SetCurParent(pParent); } + void EntryInserted( SvLBoxEntry*); + void RemovingEntry( SvLBoxEntry* pEntry ); + void EntryRemoved(); + void MovingEntry( SvLBoxEntry* pEntry ); + void EntryMoved( SvLBoxEntry* pEntry ); + void TreeInserted( SvLBoxEntry* pEntry ); + void ChangedFont(); + void ModelHasEntryInvalidated( SvListEntry* ); + void EntryExpanded( SvLBoxEntry* pEntry ); + void EntryCollapsed( SvLBoxEntry* pEntry ); + void CollapsingEntry( SvLBoxEntry* pEntry ); + void EntrySelected( SvLBoxEntry*, BOOL bSelect ); + + void Paint( const Rectangle& rRect ); + void RepaintSelectionItems(); + void MouseButtonDown( const MouseEvent& ); + void MouseButtonUp( const MouseEvent& ); + void MouseMove( const MouseEvent&); + BOOL KeyInput( const KeyEvent& ); + void Resize(); + void GetFocus(); + void LoseFocus(); + void UpdateAll(); + void PaintEntry( SvLBoxEntry* pEntry, + SvIcnVwDataEntry* pViewData = 0 ); + void PaintEntry( SvLBoxEntry*, const Point&, + SvIcnVwDataEntry* pViewData = 0, OutputDevice* pOut = 0); + void SetEntryPos( SvLBoxEntry* pEntry, const Point& rPos, + BOOL bAdjustRow = FALSE, + BOOL bCheckScrollBars = FALSE ); + void InvalidateEntry( SvLBoxEntry* ); + void ViewDataInitialized( SvLBoxEntry* pEntry ); + SvLBoxItem* GetItem( SvLBoxEntry*, const Point& rAbsPos ); + + void SetNoSelection(); + void SetDragDropMode( DragDropMode eDDMode ); + void SetSelectionMode( SelectionMode eSelMode ); + + SvLBoxEntry* GetCurEntry() const { return pCursor; } + void SetCursor( SvLBoxEntry* ); + + BOOL IsEntryInView( SvLBoxEntry* ); + SvLBoxEntry* GetEntry( const Point& rDocPos ); + SvLBoxEntry* GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry ); + SvLBoxEntry* GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry ); + + Point GetEntryPos( SvLBoxEntry* ); + void MakeVisible( SvLBoxEntry* pEntry ); + + void Arrange(); + + void SetSpaceBetweenEntries( long nHor, long Ver ); + long GetHorSpaceBetweenEntries() const { return nHorDist; } + long GetVerSpaceBetweenEntries() const { return nVerDist; } + + Rectangle CalcFocusRect( SvLBoxEntry* ); + + Rectangle CalcBmpRect( SvLBoxEntry*, const Point* pPos = 0, + SvIcnVwDataEntry* pViewData=0 ); + Rectangle CalcTextRect( SvLBoxEntry*, SvLBoxString* pItem = 0, + const Point* pPos = 0, + BOOL bForInplaceEdit = FALSE, + SvIcnVwDataEntry* pViewData = 0 ); + + long CalcBoundingWidth( SvLBoxEntry*, const SvIcnVwDataEntry* pViewData = 0) const; + long CalcBoundingHeight( SvLBoxEntry*, const SvIcnVwDataEntry* pViewData= 0 ) const; + Size CalcBoundingSize( SvLBoxEntry*, + SvIcnVwDataEntry* pViewData = 0 ) const; + void FindBoundingRect( SvLBoxEntry* pEntry, + SvIcnVwDataEntry* pViewData = 0 ); + // berechnet alle BoundRects neu + void RecalcAllBoundingRects(); + // berechnet alle ungueltigen BoundRects neu + void RecalcAllBoundingRectsSmart(); + const Rectangle& GetBoundingRect( SvLBoxEntry*, + SvIcnVwDataEntry* pViewData=0); + void InvalidateBoundingRect( SvLBoxEntry* ); + void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; } + BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); } + + void PaintEmphasis( const Rectangle&, BOOL bSelected, + BOOL bInUse, BOOL bCursored, OutputDevice* pOut = 0 ); + void PaintItem( const Rectangle& rRect, SvLBoxItem* pItem, + SvLBoxEntry* pEntry, USHORT nPaintFlags, OutputDevice* pOut = 0 ); + // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE + void CheckBoundingRects() { if (bMustRecalcBoundingRects) RecalcAllBoundingRects(); } + // berechnet alle invalidierten BoundingRects neu + void UpdateBoundingRects(); + void ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow ); + SvLBoxEntry* GetDropTarget( const Point& rPosPixel ); + BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); + BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); + + void WriteDragServerInfo( const Point&, SvLBoxDDInfo* ); + void ReadDragServerInfo( const Point&, SvLBoxDDInfo* ); + void Command( const CommandEvent& rCEvt ); + void ToTop( SvLBoxEntry* ); + + void SetCurParent( SvLBoxEntry* pNewParent ); + SvLBoxEntry* GetCurParent() const { return pCurParent; } + USHORT GetSelectionCount() const; + void SetGrid( long nDX, long nDY ); + void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE ); + const Size& GetItemSize( SvIconView* pView, SvLBoxEntry*, SvLBoxItem*, + const SvIcnVwDataEntry* pViewData = 0 ) const; + void PrepareCommandEvent( const CommandEvent& ); + + void HideDDIcon(); + void ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPos ); + void HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPos ); + + // HACK(damits kompatibel bleibt) + SvLBoxEntry* pViewData; + + BOOL IsOver( SvPtrarr* pSelectedRectList, const Rectangle& rEntryBoundRect ) const; + void SelectRect( const Rectangle&, BOOL bAdd = TRUE, + SvPtrarr* pOtherRects = 0, + short nOffs = SELRECT_BORDER_OFFS ); + void DrawSelectionRect( const Rectangle& ); + void HideSelectionRect(); + void CalcScrollOffsets( const Point& rRefPosPixel, + long& rX, long& rY, BOOL bDragDrop = FALSE, + USHORT nBorderWidth = 10 ); + void EndTracking(); + BOOL IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos ); + void MakeVisible( const Rectangle& rDocPos,BOOL bInScrollBarEvent=FALSE); + void AdjustAtGrid( SvLBoxEntry* pStart = 0 ); + void SetTextMode( SvIconViewTextMode, SvLBoxEntry* pEntry = 0 ); + SvIconViewTextMode GetTextMode( const SvLBoxEntry* pEntry = 0, + const SvIcnVwDataEntry* pViewData = 0 ) const; + void ShowFocusRect( const SvLBoxEntry* pEntry ); +}; + +inline void SvImpIconView::MakeVisible( SvLBoxEntry* pEntry ) +{ + const Rectangle& rRect = GetBoundingRect( pEntry ); + MakeVisible( rRect ); +} + +#endif // #ifndef _SVIMPICN_HXX + + diff --git a/svtools/inc/svipcdef.h b/svtools/inc/svipcdef.h new file mode 100644 index 000000000000..e12577598b6e --- /dev/null +++ b/svtools/inc/svipcdef.h @@ -0,0 +1,102 @@ +/************************************************************************* + * + * $RCSfile: svipcdef.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SVIPCDEF_H +#define _SVIPCDEF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (WNT) || defined (WIN) +#define CDECL __cdecl +#elif defined CSET +#define CDECL _System +#else +#define CDECL +#endif + +#if defined WIN +#define _EXTLIBCALL_ _pascal +#else +#define _EXTLIBCALL_ CDECL +#endif + +typedef void (CDECL *IPCCallbackFunc)(void*); + +extern void _EXTLIBCALL_ IPCFreeMemory(void*); +extern short _EXTLIBCALL_ IPCGetStatus(void*); +extern short _EXTLIBCALL_ IPCInit(void); +extern void _EXTLIBCALL_ IPCDeInit(void); +extern void* _EXTLIBCALL_ IPCConnectServer(const char*, IPCCallbackFunc); +extern void _EXTLIBCALL_ IPCDisconnectServer(void *); +#ifdef WIN +extern long CDECL IPCCALLFUNCTION(void *,unsigned long,void *, + short,const char *, char, ...); +#else +extern long CDECL IPCCallFunction(void *,unsigned long,void *, + short,const char *, char, ...); +#endif +#ifdef __cplusplus +} +#endif + +#endif diff --git a/svtools/inc/svtool.h b/svtools/inc/svtool.h new file mode 100644 index 000000000000..30bf10b7bd0c --- /dev/null +++ b/svtools/inc/svtool.h @@ -0,0 +1,71 @@ +/************************************************************************* + * + * $RCSfile: svtool.h,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SVTOOL_H +#define _SVTOOL_H + +#if defined( W30 ) && defined( _MSC_VER ) +#define SVEXPORT _export +#else +#define SVEXPORT +#endif + +#endif // _SVTOOL_H diff --git a/svtools/inc/sychconv.hxx b/svtools/inc/sychconv.hxx new file mode 100644 index 000000000000..bb11426ed7ba --- /dev/null +++ b/svtools/inc/sychconv.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * $RCSfile: sychconv.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:53 $ + * + * 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 _SYCHCONV_HXX +#define _SYCHCONV_HXX + +#ifndef _STRING_HXX +#include <tools/string.hxx> +#endif +#ifndef _SV_FONT_HXX +#include <vcl/font.hxx> +#endif + +// ---------------------- +// - CharacterConverter - +// ---------------------- + +class OutputDevice; + +class SymCharConverter +{ +public: + + static const BOOL Convert( Font& rFont, UniString& rString, OutputDevice* pDev = NULL ); +}; + +#endif // _CHARCONV_HXX diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/tabbar.hxx new file mode 100644 index 000000000000..a15f597bedd9 --- /dev/null +++ b/svtools/inc/tabbar.hxx @@ -0,0 +1,565 @@ +/************************************************************************* + * + * $RCSfile: tabbar.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:54 $ + * + * 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 _TABBAR_HXX +#define _TABBAR_HXX + +#ifndef _LINK_HXX +#include <tools/link.hxx> +#endif +#ifndef _WINDOW_HXX +#include <vcl/window.hxx> +#endif + +class MouseEvent; +class TrackingEvent; +class DataChangedEvent; +class ImplTabBarList; +class ImplTabButton; +class ImplTabSizer; +class TabBarEdit; + +// ----------------- +// - Dokumentation - +// ----------------- + +/* + +Erlaubte StyleBits +------------------ + +WB_SCROLL - Die Tabs koennen ueber ein Extra-Feld gescrollt werden +WB_MINSCROLL - Die Tabs koennen ueber 2 zusaetzliche Buttons gescrollt werden +WB_RANGESELECT - Zusammenhaengende Bereiche koennen selektiert werden +WB_MULTISELECT - Einzelne Tabs koennen selektiert werden +WB_BORDER - Oben und unten wird ein Strich gezeichnet +WB_TOPBORDER - Oben wird ein Border gezeichnet +WB_3DTAB - Die Tabs und der Border werden in 3D gezeichnet +WB_DRAG - Vom TabBar wird ein StartDrag-Handler gerufen, wenn + Drag and Drop gestartet werden soll. Es wird ausserdem + im TabBar mit EnableDrop() Drag and Drop eingeschaltet. +WB_SIZEABLE - Vom TabBar wird ein Split-Handler gerufen, wenn der Anwender + den TabBar in der Breite aendern will +WB_STDTABBAR - WB_BORDER + +Wenn man den TabBar zum Beispiel als Property-Bar benutzen moechte, sollten +die WinBits WB_TOPBORDER und WB_3DTAB anstatt WB_BORDER gesetzt werden. + + +Erlaubte PageBits +----------------- + +TPB_SPECIAL - Andere Darstellung des TabTextes, zum Beispiel fuer + Szenario-Seiten. + + +Handler +------- + +Select - Wird gerufen, wenn eine Tab selektiert oder + deselektiert wird +DoubleClick - Wird gerufen, wenn ein DoubleClick im TabBar ausgeloest + wurde. Innerhalb des Handlers liefert GetCurPageId() die + angeklickte Tab zurueck oder 0, wenn keine Tab angeklickt + wurde +ActivatePage - Wird gerufen, wenn eine andere Seite aktiviert wird. + GetCurPageId() gibt die aktivierte Seite zurueck. +DeactivatePage - Wird gerufen, wenn eine Seite deaktiviert wird. Wenn + eine andere Seite aktiviert werden darf, muss TRUE + zurueckgegeben werden, wenn eine andere Seite von + der Aktivierung ausgeschlossen werden soll, muss + FALSE zurueckgegeben werden. GetCurPageId() gibt die + zu deaktivierende Seite zurueck. + + + +Drag and Drop +------------- + +Fuer Drag and Drop muss das WinBit WB_DRAG gesetzt werden. Ausserdem +muss der Command-, QueryDrop-Handler und der Drop-Handler ueberlagert +werden. Dabei muss in den Handlern folgendes implementiert werden: + +Command - Wenn in diesem Handler das Dragging gestartet werden + soll, muss StartDrag() gerufen werden. Diese Methode + selektiert dann den entsprechenden Eintrag oder gibt + FALSE zurueck, wenn das Dragging nicht durchgefuhert + werden kann. + +QueryDrop - Dieser Handler wird von StarView immer dann gerufen, wenn + bei einem Drag-Vorgang die Maus ueber das Fenster gezogen + wird (siehe dazu auch SV-Doku). In diesem Handler muss + festgestellt werden, ob ein Drop moeglich ist. Die + Drop-Position kann im TabBar mit ShowDropPos() angezeigt + werden. Beim Aufruf muss die Position vom Event uebergeben + werden. Wenn sich die Position am linken oder rechten + Rand befindet, wird automatisch im TabBar gescrollt. + Diese Methode gibt auch die entsprechende Drop-Position + zurueck, die auch fuer ein Drop gebraucht wird. Wenn das + Fenster beim Drag verlassen wird, kann mit HideDropPos() + die DropPosition wieder weggenommen werden. Es ist dadurch + auch moeglich, ein von ausserhalb des TabBars ausgeloestes + Drag zu verarbeiten. + +Drop - Im Drop-Handler muessen dann die Pages verschoben werden, + oder die neuen Pages eingefuegt werden. Die entsprechende + Drop-Postion kann mit ShowDropPos() ermittelt werden. + +Folgende Methoden werden fuer Drag and Drop gebraucht und muessen von +den Handlern gerufen werden: + +StartDrag - Muss aus dem Commnad-Handler gerufen werden. Als Parameter + muss der CommandEvent uebergeben werden und eine Referenz + auf eine Region. Diese Region muss dann bei ExecuteDrag() + uebergeben werden, wenn der Rueckgabewert sagt, das + ExecuteDrag durchgefuehrt werden soll. Falls der Eintrag + nicht selektiert ist, wird er vorher als aktueller + Eintrag gesetzt. Es ist daher darauf zu achten, das aus + dieser Methode heraus der Select-Handler gerufen werden + kann. + +ShowDropPos - Diese Methode muss vom QueryDrop-Handler gerufen werden, + damit der TabBar anzeigt, wo die Tabs eingefuegt werden. + Diese Methode kann auch im Drop-Handler benutzt werden, + um die Position zu ermitteln wo die Tabs eingefuegt werden + sollen. In der Methode muss die Position vom Event + uebergeben werden. Diese Methode gibt die Position zurueck, + wo die Tabs eingefuegt werden sollen. + +HideDropPos - Diese Methode nimmt die vorher mit ShowDropPos() angezeigte + DropPosition wieder zurueck. Diese Methode sollte dann + gerufen werden, wenn bei QueryDrop() das Fenster verlassen + wird oder der Dragvorgang beendet wurde. + +Folgende Methoden koennen eingesetzt werden, wenn bei D&D die Seiten +umgeschaltet werden sollen: + +SwitchPage - Diese Methode muss vom QueryDrop-Handler gerufen werden, + wenn die Seite ueber der sich der Mousepointer befindet, + umgeschaltet werden soll. Diese Methode sollte jedesmal + gerufen werden, wenn der QueryDrop-Handler gerufen wird. + Das umschalten der Seite passiert zeitverzoegert (500 ms) + und wird automatisch von dieser Methode verwaltet. + In der Methode muss die Position vom Event uebergeben + werden. Diese Methode gibt TRUE zurueck, wenn die Page + umgeschaltet wurde. + +EndSwitchPage - Diese Methode setzt die Daten fuer das umschalten der + Seiten zurueck. Diese Methode sollte dann gerufen werden, + wenn bei QueryDrop() das Fenster verlassen wird oder + der Dragvorgang beendet wurde. + +IsInSwitching - Mit dieser Methode kann im ActivatePage()/DeactivatePage() + abgefragt werden, ob dies durch SwitchPage() veranlasst + wurde. So kann dann beispielsweise in DeactivatePage() + das Umschalten ohne eine Fehlerbox verhindert werden. + + +Fenster-Resize +-------------- + +Wenn das Fenster vom Anwender in der Breite geaendert werden kann, dann +muss das WinBit WB_SIZEABLE gesetzt werden. In diesem Fall muss noch +folgender Handler ueberlagert werden: + +Split - Wenn dieser Handler gerufen wird, sollte das Fenster + auf die Breite angepasst werden, die von GetSplitSize() + zurueckgegeben wird. Dabei wird keine minimale und + maximale Breite beruecksichtig. Eine minimale Breite + kann mit GetMinSize() abgefragt werden und die maximale + Breite muss von der Anwendung selber berechnet werden. + Da nur Online-Resize unterstuetzt wird, muss das Fenster + innerhalb dieses Handlers in der Breite geaendert + werden und eventuell abhaengige Fenster ebenfalls. Fuer + diesen Handler kann auch mit SetSplitHdl() ein + Link gesetzt werden. + +Folgende Methoden liefern beim Splitten weitere Informationen: + +GetSplitSize() - Liefert die Breite des TabBars zurueck, auf die der + Anwender das Fenster resizen will. Dabei wird keine + minimale oder maximale Breite beruecksichtigt. Es wird + jedoch nie eine Breite < 5 zurueckgeliefert. Diese Methode + liefert nur solange richtige Werte, wie Splitten aktiv + ist. + +GetMinSize() - Mit dieser Methode kann eine minimale Fensterbreite + abgefragt werden, so das min. etwas eines Tabs sichtbar + ist. Jedoch kann der TabBar immer noch schmaler gesetzt + werden, als die Breite, die diese Methode zurueckliefert. + Diese Methode kann auch aufgerufen werden, wenn kein + Splitten aktiv ist. + + +Edit-Modus +---------- + +Der Tabbar bietet auch Moeglichkeiten, das der Anwender in den Tabreitern +die Namen aendern kann. + +EnableEditMode - Damit kann eingestellt werden, das bei Alt+LeftClick + StartEditMode() automatisch vom TabBar gerufen wird. + Im StartRenaming()-Handler kann dann das Umbenennen + noch abgelehnt werden. +StartEditMode - Mit dieser Methode wird der EditModus auf einem + Tab gestartet. FALSE wird zurueckgegeben, wenn + der Editmodus schon aktiv ist, mit StartRenaming() + der Modus abgelehnt wurde oder kein Platz zum + Editieren vorhanden ist. +EndEditMode - Mit dieser Methode wird der EditModus beendet. +SetEditText - Mit dieser Methode kann der Text im AllowRenaming()- + Handler noch durch einen anderen Text ersetzt werden. +GetEditText - Mit dieser Methode kann im AllowRenaming()-Handler + der Text abgefragt werden, den der Anwender eingegeben + hat. +IsInEditMode - Mit dieser Methode kann abgefragt werden, ob der + Editmodus aktiv ist. +IsEditModeCanceled - Mit dieser Methode kann im EndRenaming()- + Handler abgefragt werden, ob die Umbenenung + abgebrochen wurde. +GetEditPageId - Mit dieser Methode wird in den Renaming-Handlern + abgefragt, welcher Tab umbenannt wird/wurde. + +StartRenaming() - Dieser Handler wird gerufen, wenn ueber StartEditMode() + der Editmodus gestartet wurde. Mit GetEditPageId() + kann abgefragt werden, welcher Tab umbenannt werden + soll. FALSE sollte zurueckgegeben werden, wenn + der Editmodus nicht gestartet werden soll. +AllowRenaming() - Dieser Handler wird gerufen, wenn der Editmodus + beendet wird (nicht bei Cancel). In diesem Handler + kann dann getestet werden, ob der Text OK ist. + Mit GetEditPageId() kann abgefragt werden, welcher Tab + umbenannt wurde. + Es sollte einer der folgenden Werte zurueckgegeben + werden: + TAB_RENAMING_YES + Der Tab wird umbenannt. + TAB_RENAMING_NO + Der Tab wird nicht umbenannt, der Editmodus bleibt + jedoch aktiv, so das der Anwender den Namen + entsprechent anpassen kann. + TAB_RENAMING_CANCEL + Der Editmodus wird abgebrochen und der alte + Text wieder hergestellt. +EndRenaming() - Dieser Handler wird gerufen, wenn der Editmodus + beendet wurde. Mit GetEditPageId() kann abgefragt + werden, welcher Tab umbenannt wurde. Mit + IsEditModeCanceled() kann abgefragt werden, ob der + Modus abgebrochen wurde und der Name dadurch nicht + geaendert wurde. + + +Maximale Pagebreite +------------------- + +Die Pagebreite der Tabs kann begrenzt werden, damit ein einfacheres +Navigieren ueber diese moeglich ist. Wenn der Text dann nicht komplett +angezeigt werden kann, wird er mit ... abgekuerzt und in der Tip- +oder der aktiven Hilfe (wenn kein Hilfetext gesetzt ist) wird dann der +ganze Text angezeigt. Mit EnableAutoMaxPageWidth() kann eingestellt +werden, ob die maximale Pagebreite sich nach der gerade sichtbaren +Breite richten soll (ist der default). Ansonsten kann auch die +maximale Pagebreite mit SetMaxPageWidth() (in Pixeln) gesetzt werden +(die AutoMaxPageWidth wird dann ignoriert). + + +KontextMenu +----------- + +Wenn ein kontextsensitives PopupMenu anzeigt werden soll, muss der +Command-Handler ueberlagert werden. Mit GetPageId() und bei +Uebergabe der Mausposition kann ermittelt werden, ob der Mausclick +ueber einem bzw. ueber welchem Item durchgefuehrt wurde. +*/ + +// ----------- +// - WinBits - +// ----------- + +#define WB_RANGESELECT ((WinBits)0x00200000) +#define WB_MULTISELECT ((WinBits)0x00400000) +#define WB_TOPBORDER ((WinBits)0x04000000) +#define WB_3DTAB ((WinBits)0x08000000) +#define WB_MINSCROLL ((WinBits)0x20000000) +#define WB_STDTABBAR WB_BORDER + +// ------------------ +// - TabBarPageBits - +// ------------------ + +typedef USHORT TabBarPageBits; + +// ------------------------- +// - Bits fuer TabBarPages - +// ------------------------- + +#define TPB_SPECIAL ((TabBarPageBits)0x0001) + +// ---------------- +// - TabBar-Types - +// ---------------- + +#define TAB_APPEND ((USHORT)0xFFFF) +#define TAB_PAGE_NOTFOUND ((USHORT)0xFFFF) + +#define TAB_RENAMING_YES ((long)TRUE) +#define TAB_RENAMING_NO ((long)FALSE) +#define TAB_RENAMING_CANCEL ((long)2) + +// ---------- +// - TabBar - +// ---------- + +class TabBar : public Window +{ + friend class ImplTabButton; + friend class ImplTabSizer; + +private: + ImplTabBarList* mpItemList; + ImplTabButton* mpFirstBtn; + ImplTabButton* mpPrevBtn; + ImplTabButton* mpNextBtn; + ImplTabButton* mpLastBtn; + ImplTabSizer* mpSizer; + TabBarEdit* mpEdit; + XubString maEditText; + Color maSelColor; + Color maSelTextColor; + Size maWinSize; + long mnMaxPageWidth; + long mnCurMaxWidth; + long mnOffX; + long mnOffY; + long mnOutWidth; + long mnSplitSize; + ULONG mnSwitchTime; + WinBits mnWinStyle; + USHORT mnCurPageId; + USHORT mnFirstPos; + USHORT mnDropPos; + USHORT mnSwitchId; + USHORT mnEditId; + BOOL mbFormat; + BOOL mbFirstFormat; + BOOL mbSizeFormat; + BOOL mbAutoMaxWidth; + BOOL mbInSwitching; + BOOL mbAutoEditMode; + BOOL mbEditCanceled; + BOOL mbDropPos; + BOOL mbInSelect; + BOOL mbSelColor; + BOOL mbSelTextColor; + Link maSelectHdl; + Link maDoubleClickHdl; + Link maSplitHdl; + Link maActivatePageHdl; + Link maDeactivatePageHdl; + Link maStartRenamingHdl; + Link maAllowRenamingHdl; + Link maEndRenamingHdl; + +#ifdef _SV_TABBAR_CXX + void ImplInit( WinBits nWinStyle ); + void ImplInitSettings( BOOL bFont, BOOL bBackground ); + void ImplGetColors( Color& rFaceColor, Color& rFaceTextColor, + Color& rSelectColor, Color& rSelectTextColor ); + void ImplShowPage( USHORT nPos ); + BOOL ImplCalcWidth(); + void ImplFormat(); + USHORT ImplGetLastFirstPos(); + void ImplInitControls(); + void ImplEnableControls(); + DECL_LINK( ImplClickHdl, ImplTabButton* ); +#endif + +public: + TabBar( Window* pParent, WinBits nWinStyle = WB_STDTABBAR ); + virtual ~TabBar(); + + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + + virtual void Select(); + virtual void DoubleClick(); + virtual void Split(); + virtual void ActivatePage(); + virtual long DeactivatePage(); + virtual long StartRenaming(); + virtual long AllowRenaming(); + virtual void EndRenaming(); + + void InsertPage( USHORT nPageId, const XubString& rText, + TabBarPageBits nBits = 0, + USHORT nPos = TAB_APPEND ); + void RemovePage( USHORT nPageId ); + void MovePage( USHORT nPageId, USHORT nNewPos ); + void Clear(); + + void EnablePage( USHORT nPageId, BOOL bEnable = TRUE ); + BOOL IsPageEnabled( USHORT nPageId ) const; + + void SetPageBits( USHORT nPageId, TabBarPageBits nBits = 0 ); + TabBarPageBits GetPageBits( USHORT nPageId ) const; + + USHORT GetPageCount() const; + USHORT GetPageId( USHORT nPos ) const; + USHORT GetPagePos( USHORT nPageId ) const; + USHORT GetPageId( const Point& rPos ) const; + Rectangle GetPageRect( USHORT nPageId ) const; + + void SetCurPageId( USHORT nPageId ); + USHORT GetCurPageId() const { return mnCurPageId; } + + void SetFirstPageId( USHORT nPageId ); + USHORT GetFirstPageId() const { return GetPageId( mnFirstPos ); } + + void SelectPage( USHORT nPageId, BOOL bSelect = TRUE ); + void SelectPageRange( BOOL bSelect = FALSE, + USHORT nStartPos = 0, + USHORT nEndPos = TAB_APPEND ); + USHORT GetSelectPage( USHORT nSelIndex = 0 ) const; + USHORT GetSelectPageCount() const; + BOOL IsPageSelected( USHORT nPageId ) const; + + void EnableAutoMaxPageWidth( BOOL bEnable = TRUE ) { mbAutoMaxWidth = bEnable; } + BOOL IsAutoMaxPageWidthEnabled() const { return mbAutoMaxWidth; } + void SetMaxPageWidth( long nMaxWidth ); + long GetMaxPageWidth() const { return mnMaxPageWidth; } + void ResetMaxPageWidth() { SetMaxPageWidth( 0 ); } + BOOL IsMaxPageWidth() const { return mnMaxPageWidth != 0; } + + void EnableEditMode( BOOL bEnable = TRUE ) { mbAutoEditMode = bEnable; } + BOOL IsEditModeEnabled() const { return mbAutoEditMode; } + BOOL StartEditMode( USHORT nPageId ); + void EndEditMode( BOOL bCancel = FALSE ); + void SetEditText( const XubString& rText ) { maEditText = rText; } + const XubString& GetEditText() const { return maEditText; } + BOOL IsInEditMode() const { return (mpEdit != NULL); } + BOOL IsEditModeCanceled() const { return mbEditCanceled; } + USHORT GetEditPageId() const { return mnEditId; } + + BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion ); + USHORT ShowDropPos( const Point& rPos ); + void HideDropPos(); + BOOL SwitchPage( const Point& rPos ); + void EndSwitchPage(); + BOOL IsInSwitching() { return mbInSwitching; } + + void SetSelectColor(); + void SetSelectColor( const Color& rColor ); + const Color& GetSelectColor() const { return maSelColor; } + BOOL IsSelectColor() const { return mbSelColor; } + void SetSelectTextColor(); + void SetSelectTextColor( const Color& rColor ); + const Color& GetSelectTextColor() const { return maSelTextColor; } + BOOL IsSelectTextColor() const { return mbSelTextColor; } + + void SetPageText( USHORT nPageId, const XubString& rText ); + XubString GetPageText( USHORT nPageId ) const; + void SetHelpText( USHORT nPageId, const XubString& rText ); + XubString GetHelpText( USHORT nPageId ) const; + void SetHelpId( USHORT nPageId, ULONG nHelpId ); + ULONG GetHelpId( USHORT nPageId ) const; + + long GetSplitSize() const { return mnSplitSize; } + long GetMinSize() const; + + void SetHelpText( const XubString& rText ) + { Window::SetHelpText( rText ); } + XubString GetHelpText() const + { return Window::GetHelpText(); }; + void SetHelpId( ULONG nId ) + { Window::SetHelpId( nId ); } + ULONG GetHelpId() const + { return Window::GetHelpId(); } + + void SetStyle( WinBits nStyle ); + WinBits GetStyle() const { return mnWinStyle; } + + Size CalcWindowSizePixel() const; + + void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } + const Link& GetSelectHdl() const { return maSelectHdl; } + void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } + const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetSplitHdl( const Link& rLink ) { maSplitHdl = rLink; } + const Link& GetSplitHdl() const { return maSplitHdl; } + void SetActivatePageHdl( const Link& rLink ) { maActivatePageHdl = rLink; } + const Link& GetActivatePageHdl() const { return maActivatePageHdl; } + void SetDeactivatePageHdl( const Link& rLink ) { maDeactivatePageHdl = rLink; } + const Link& GetDeactivatePageHdl() const { return maDeactivatePageHdl; } + void SetStartRenamingHdl( const Link& rLink ) { maStartRenamingHdl = rLink; } + const Link& GetStartRenamingHdl() const { return maStartRenamingHdl; } + void SetAllowRenamingHdl( const Link& rLink ) { maAllowRenamingHdl = rLink; } + const Link& GetAllowRenamingHdl() const { return maAllowRenamingHdl; } + void SetEndRenamingHdl( const Link& rLink ) { maEndRenamingHdl = rLink; } + const Link& GetEndRenamingHdl() const { return maEndRenamingHdl; } +}; + +#endif // _TABBAR_HXX diff --git a/svtools/inc/taskbar.hxx b/svtools/inc/taskbar.hxx new file mode 100644 index 000000000000..4339c9451660 --- /dev/null +++ b/svtools/inc/taskbar.hxx @@ -0,0 +1,537 @@ +/************************************************************************* + * + * $RCSfile: taskbar.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 16:58:54 $ + * + * 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 _TASKBAR_HXX +#define _TASKBAR_HXX + +#ifndef _TOOLS_TIME_HXX +#include <tools/time.hxx> +#endif +#ifndef _TOOLS_INTN_HXX +#include <tools/intn.hxx> +#endif +#ifndef _TOOLS_LIST_HXX +#include <tools/list.hxx> +#endif + +#ifndef _SV_TIMER_HXX +#include <vcl/timer.hxx> +#endif +#ifndef _SV_TOOLBOX_HXX +#include <vcl/toolbox.hxx> +#endif +#ifndef _SV_STATUS_HXX +#include <vcl/status.hxx> +#endif + +class TaskBar; +class TaskStatusFieldItem; +class ImplTaskItemList; +class ImplTaskSBItemList; +class ImplTaskBarFloat; +struct ImplTaskSBFldItem; + +// ----------------- +// - Dokumentation - +// ----------------- + +/* + +TaskToolBox +=========== + +StartUpdateTask()/UpdateTask()/EndUpdateTask() +Diese muessen gerufen werden, wenn die Task upgedatet werden muessen. +Dann muss Star |