diff options
Diffstat (limited to 'svtools')
25 files changed, 146 insertions, 1615 deletions
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk index 511cdb4ed13e..ab0895dea07f 100644 --- a/svtools/AllLangResTarget_svt.mk +++ b/svtools/AllLangResTarget_svt.mk @@ -57,7 +57,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\ svtools/source/dialogs/colrdlg.src \ svtools/source/dialogs/filedlg2.src \ svtools/source/dialogs/formats.src \ - svtools/source/dialogs/printdlg.src \ svtools/source/dialogs/prnsetup.src \ svtools/source/dialogs/so3res.src \ svtools/source/dialogs/wizardmachine.src \ diff --git a/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk index 24019ced63d2..67b21600e523 100644 --- a/svtools/Executable_bmp.mk +++ b/svtools/Executable_bmp.mk @@ -53,6 +53,20 @@ $(eval $(call gb_Executable_add_exception_objects,bmp,\ )) ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else $(eval $(call gb_Executable_add_linked_libs,bmp,\ kernel32 \ msvcrt \ @@ -61,6 +75,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmp,\ uwinapi \ )) endif +endif ifeq ($(OS),LINUX) $(eval $(call gb_Executable_add_linked_libs,bmp,\ diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk index 3d04c3b5a25a..6b2c0466f0ec 100644 --- a/svtools/Executable_bmpsum.mk +++ b/svtools/Executable_bmpsum.mk @@ -49,6 +49,20 @@ $(eval $(call gb_Executable_add_exception_objects,bmpsum,\ )) ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else $(eval $(call gb_Executable_add_linked_libs,bmpsum,\ kernel32 \ msvcrt \ @@ -57,6 +71,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmpsum,\ uwinapi \ )) endif +endif ifeq ($(OS),LINUX) $(eval $(call gb_Executable_add_linked_libs,bmpsum,\ diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk index 99bde19e1055..d6b96970eacc 100644 --- a/svtools/Executable_g2g.mk +++ b/svtools/Executable_g2g.mk @@ -50,6 +50,20 @@ $(eval $(call gb_Executable_add_exception_objects,g2g,\ svtools/bmpmaker/g2g \ )) ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else $(eval $(call gb_Executable_add_linked_libs,g2g,\ kernel32 \ msvcrt \ @@ -58,6 +72,7 @@ $(eval $(call gb_Executable_add_linked_libs,g2g,\ uwinapi \ )) endif +endif ifeq ($(OS),LINUX) $(eval $(call gb_Executable_add_linked_libs,g2g,\ pthread \ diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk index 150b71396284..3e96d22588c8 100644 --- a/svtools/Library_hatchwindowfactory.mk +++ b/svtools/Library_hatchwindowfactory.mk @@ -64,6 +64,20 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ )) endif ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ kernel32 \ msvcrt \ @@ -73,4 +87,5 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ uwinapi \ )) endif +endif # vim: set noet sw=4 ts=4: diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk index 8b0c27d4469a..5df44f631097 100644 --- a/svtools/Library_productregistration.mk +++ b/svtools/Library_productregistration.mk @@ -66,6 +66,20 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\ endif ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else $(eval $(call gb_Library_add_linked_libs,productregistration,\ kernel32 \ msvcrt \ @@ -74,4 +88,5 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\ uwinapi \ )) endif +endif # vim: set noet sw=4 ts=4: diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 545690bd0f12..fb0fae66ca12 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -159,7 +159,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/dialogs/filedlg2 \ svtools/source/dialogs/insdlg \ svtools/source/dialogs/mcvmath \ - svtools/source/dialogs/printdlg \ svtools/source/dialogs/prnsetup \ svtools/source/dialogs/property \ svtools/source/dialogs/roadmapwizard \ @@ -300,6 +299,25 @@ $(eval $(call gb_Library_add_linked_libs,svt,\ endif ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,svt,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + ole32 \ + oleaut32 \ + user32 \ + uuid \ +)) +else $(eval $(call gb_Library_add_linked_libs,svt,\ advapi32 \ gdi32 \ @@ -313,4 +331,5 @@ $(eval $(call gb_Library_add_linked_libs,svt,\ uwinapi \ )) endif +endif # vim: set noet sw=4 ts=4: diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk index ef656f9ba061..f6a48e845679 100644 --- a/svtools/Package_inc.mk +++ b/svtools/Package_inc.mk @@ -113,7 +113,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/parrtf.hxx,svtools/par $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupmenucontrollerbase.hxx,svtools/popupmenucontrollerbase.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupwindowcontroller.hxx,svtools/popupwindowcontroller.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prgsbar.hxx,svtools/prgsbar.hxx)) -$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printdlg.hxx,svtools/printdlg.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printoptions.hxx,svtools/printoptions.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prnsetup.hxx,svtools/prnsetup.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmap.hxx,svtools/roadmap.hxx)) diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx index ddedfc5a0369..ebabe33af690 100644 --- a/svtools/inc/pch/precompiled_svtools.hxx +++ b/svtools/inc/pch/precompiled_svtools.hxx @@ -419,8 +419,8 @@ #include <unotools/processfactory.hxx> #include <vcl/dndhelp.hxx> -#include <vcl/fldunit.hxx> -#include <vcl/mapunit.hxx> +#include <tools/fldunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/unohelp.hxx> #include <vos/mutex.hxx> diff --git a/svtools/inc/svtools/apearcfg.hxx b/svtools/inc/svtools/apearcfg.hxx index 8e6018424c4c..5dea74761e17 100644 --- a/svtools/inc/svtools/apearcfg.hxx +++ b/svtools/inc/svtools/apearcfg.hxx @@ -37,14 +37,6 @@ class Application; Beschreibung: --------------------------------------------------------------------*/ typedef enum { - LookStardivision = 0, - LookMotif, - LookWindows, - LookOSTwo, - LookMacintosh -} SystemLook; - -typedef enum { SnapToButton = 0, SnapToMiddle, NoSnap @@ -59,7 +51,6 @@ typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem { - short nLookNFeel ; short nDragMode ; short nScaleFactor ; short nSnapMode ; @@ -69,8 +60,6 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem #endif BOOL bMenuMouseFollow ; - BOOL bSingleLineTabCtrl ; - BOOL bColoredTabCtrl ; #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) BOOL bFontAntialiasing ; #endif @@ -86,9 +75,6 @@ public: virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); - USHORT GetLookNFeel () const { return nLookNFeel; } - void SetLookNFeel ( USHORT nSet ); - USHORT GetDragMode () const { return nDragMode; } void SetDragMode ( USHORT nSet ); @@ -106,9 +92,6 @@ public: void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();} BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;} - void SetSingleLineTabCtrl(BOOL bSet) {bSingleLineTabCtrl = bSet; SetModified();} - BOOL IsSingleLineTabCtrl()const {return bSingleLineTabCtrl;} - #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); } BOOL IsFontAntiAliasing() const { return bFontAntialiasing; } @@ -117,9 +100,6 @@ public: void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); } #endif - void SetColoredTabCtrl(BOOL bSet) {bColoredTabCtrl = bSet; SetModified();}; - BOOL IsColoredTabCtrl()const {return bColoredTabCtrl;} - static sal_Bool IsInitialized() { return bInitialized; } static void SetInitialized() { bInitialized = sal_True; } }; diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 098b565385ec..bc9770c1bcc8 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -34,9 +34,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <vcl/graph.hxx> -#ifndef _SV_MAPUNIT_HXX -#include <vcl/mapunit.hxx> -#endif +#include <tools/mapunit.hxx> #include <rtl/ustring.hxx> #define NS_UNO ::com::sun::star::uno diff --git a/svtools/inc/svtools/printdlg.hxx b/svtools/inc/svtools/printdlg.hxx deleted file mode 100644 index 8c455b910b41..000000000000 --- a/svtools/inc/svtools/printdlg.hxx +++ /dev/null @@ -1,297 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_PRINTDLG_HXX_ -#define _SV_PRINTDLG_HXX_ - -#include "svtools/svtdllapi.h" - -#ifndef _VCL_DIALOG_HXX -#include <vcl/dialog.hxx> -#endif -#ifndef _VCL_FIXED_HXX -#include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#ifndef _VCL_GROUP_HXX -#include <vcl/group.hxx> -#endif -#ifndef _VCL_FIELD_HXX -#include <vcl/field.hxx> -#endif -#ifndef _VCL_EDIT_HXX -#include <vcl/edit.hxx> -#endif -#ifndef _VCL_LSTBOX_HXX -#include <vcl/lstbox.hxx> -#endif -#include <svtools/stdctrl.hxx> - -class Printer; -class QueueInfo; -struct SvtPrinterImpl; - -// --------------------- -// - PrintDialog-Types - -// --------------------- - -enum PrintDialogRange{ - PRINTDIALOG_ALL, PRINTDIALOG_SELECTION, PRINTDIALOG_FROMTO, PRINTDIALOG_RANGE }; - -enum PrintSheetRange -{ - PRINTSHEETS_ALL, - PRINTSHEETS_SELECTED_SHEETS, - PRINTSHEETS_SELECTED_CELLS -}; - - -// --------------- -// - PrintDialog - -// --------------- - -class SVT_DLLPUBLIC PrintDialog : public ModalDialog -{ -private: - FixedLine maFlPrinter; - FixedText maFtName; - ListBox maLbName; - PushButton maBtnProperties; - FixedText maFtStatus; - FixedInfo maFiStatus; - FixedText maFtType; - FixedInfo maFiType; - FixedText maFtLocation; - FixedInfo maFiLocation; - FixedText maFtComment; - FixedInfo maFiComment; - - // "Print to file" or "Fax number" - CheckBox maCbxFilePrint; - FixedInfo maFiPrintFile; - FixedText maFiFaxNo; - Edit maEdtFaxNo; - //PushButton maBtnBrowse_nomore; - - // "Print" - FixedLine maFlPrint; - RadioButton maRbtAllSheets; - RadioButton maRbtSelectedSheets; - RadioButton maRbtSelectedCells; - - // "Print range" - FixedLine maFlPrintRange; - RadioButton maRbtAll; - RadioButton maRbtPages; - RadioButton maRbtSelection; - Edit maEdtPages; - - FixedLine maFlSepCopiesRange; - - // "Copies" - FixedLine maFlCopies; - FixedText maFtCopies; - NumericField maNumCopies; - FixedImage maImgCollate; - FixedImage maImgNotCollate; - CheckBox maCbxCollate; - - FixedLine maFlSepButtonLine; - PushButton maBtnOptions; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; - - AutoTimer maStatusTimer; - Printer* mpPrinter; - SvtPrinterImpl* mpPrinterImpl; - - XubString maRangeText; - USHORT mnCopyCount; - USHORT mnFirstPage; - USHORT mnLastPage; - USHORT mnMinPage; - USHORT mnMaxPage; - PrintDialogRange meCheckRange; - BOOL mbAll; - BOOL mbSelection; - BOOL mbFromTo; - BOOL mbRange; - BOOL mbCollate; - BOOL mbCollateCheck; - BOOL mbOptions; - bool mbWithSheetsAndCells; - Link maOptionsHdlLink; // Link zum Options-Handler - Link maOKHdlLink; // Link zum OK-Handler - - String maAllFilterStr; - - SVT_DLLPRIVATE void ImplCheckOK(); - SVT_DLLPRIVATE void ImplInitControls(); - SVT_DLLPRIVATE void ImplFillDialogData(); - SVT_DLLPRIVATE void ImplSetInfo(); - SVT_DLLPRIVATE void ImplSetImages(); - SVT_DLLPRIVATE bool ImplGetFilename(); - - DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplModifyControlHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer* ); - -public: - PrintDialog( Window* pWindow, bool bWithSheetsAndCells ); - ~PrintDialog(); - - virtual long OK(); - virtual long ClickOptionsHdl(); - - void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } - Printer* GetPrinter() const { return mpPrinter; } - - inline bool IsSheetRangeAvailable() const { return mbWithSheetsAndCells; } - void EnableSheetRange( bool bEnable, PrintSheetRange eRange ); - bool IsSheetRangeEnabled( PrintSheetRange eRange ) const; - void CheckSheetRange( PrintSheetRange eRange ); - PrintSheetRange GetCheckedSheetRange() const; - bool IsSheetRangeChecked( PrintSheetRange eRange ) const; - - void EnableRange( PrintDialogRange eRange ); - void DisableRange( PrintDialogRange eRange ); - BOOL IsRangeEnabled( PrintDialogRange eRange ) const; - - void CheckRange( PrintDialogRange eRange = PRINTDIALOG_ALL ) - { meCheckRange = eRange; } - PrintDialogRange GetCheckedRange() const { return meCheckRange; } - BOOL IsRangeChecked( PrintDialogRange eRange ) const; - - void SetRangeText( const XubString& rRange ) { maRangeText = rRange; } - const XubString& GetRangeText() const { return maRangeText; } - - void SetFirstPage( USHORT nPage = 0 ); - USHORT GetFirstPage() const { return mnFirstPage; } - void SetLastPage( USHORT nPage = 0 ); - USHORT GetLastPage() const { return mnLastPage; } - - void SetMinPage( USHORT nPage = 1 ) { mnMinPage = nPage; } - USHORT GetMinPage() const { return mnMinPage; } - void SetMaxPage( USHORT nPage = 65535 ) { mnMaxPage = nPage; } - USHORT GetMaxPage() const { return mnMaxPage; } - - void SetCopyCount( USHORT nCopies = 1 ) { mnCopyCount = nCopies; } - USHORT GetCopyCount() const { return mnCopyCount; } - - void EnableCollate( BOOL bEnable = TRUE ) - { mbCollate = bEnable; } - BOOL IsCollateEnabled() const { return mbCollate; } - void CheckCollate( BOOL bCheck = TRUE ) - { mbCollateCheck = bCheck; } - BOOL IsCollateChecked() const { return mbCollateCheck; } - - void ShowOptionsButton( BOOL bShow = TRUE ) - { mbOptions = bShow; } - BOOL IsOptionsButtonVisible() const { return mbOptions; } - - void SetOptionsHdl( const Link& rLink ) { maOptionsHdlLink = rLink; } - const Link& GetOptionsHdl() const { return maOptionsHdlLink; } - - void SetOKHdl( const Link& rLink ) { maOKHdlLink = rLink; } - const Link& GetOKHdl() const { return maOKHdlLink; } - - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - virtual long Notify( NotifyEvent& rNEvt ); - - virtual short Execute(); - - void DisableHelp(); -}; - -inline void PrintDialog::EnableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = TRUE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = TRUE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = TRUE; - else - mbRange = TRUE; -} - -inline void PrintDialog::DisableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = FALSE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = FALSE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = FALSE; - else - mbRange = FALSE; -} - -inline BOOL PrintDialog::IsRangeEnabled( PrintDialogRange eRange ) const -{ - BOOL bRet; - - if ( eRange == PRINTDIALOG_ALL ) - bRet = mbAll; - else if ( eRange == PRINTDIALOG_SELECTION ) - bRet = mbSelection; - else if ( eRange == PRINTDIALOG_FROMTO ) - bRet = mbFromTo; - else - bRet = mbRange; - - return bRet; -} - -inline BOOL PrintDialog::IsRangeChecked( PrintDialogRange eRange ) const -{ - if ( eRange == meCheckRange ) - return TRUE; - else - return FALSE; -} - -inline void PrintDialog::SetFirstPage( USHORT nPage ) -{ - mnFirstPage = nPage; - if ( nPage && (nPage < mnMinPage) ) - mnMinPage = nPage; -} - -inline void PrintDialog::SetLastPage( USHORT nPage ) -{ - mnLastPage = nPage; - if ( nPage && (nPage > mnMaxPage) ) - mnMaxPage = nPage; -} - -#endif // _SV_PRINTDLG_HXX_ - diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx index 3bdfdc44e8e9..9c8a4a34dbf6 100644 --- a/svtools/inc/svtools/svmedit.hxx +++ b/svtools/inc/svtools/svmedit.hxx @@ -28,7 +28,7 @@ #ifndef _SVEDIT_HXX #define _SVEDIT_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/edit.hxx> #include <svtools/syntaxhighlight.hxx> diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index a40b149d780b..4a95d0c03dcd 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -52,7 +52,6 @@ sal_Bool SvtTabAppearanceCfg::bInitialized = sal_False; --------------------------------------------------------------------*/ SvtTabAppearanceCfg::SvtTabAppearanceCfg() :ConfigItem(OUString::createFromAscii("Office.Common/View")) - ,nLookNFeel ( DEFAULT_LOOKNFEEL ) ,nDragMode ( DEFAULT_DRAGMODE ) ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) @@ -61,8 +60,6 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() ,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT ) #endif ,bMenuMouseFollow(FALSE) - ,bSingleLineTabCtrl(FALSE) - ,bColoredTabCtrl(FALSE) #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) ,bFontAntialiasing ( TRUE ) #endif @@ -83,16 +80,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() switch(nProp) { case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: *pValues >>= nLookNFeel; break; //"LookAndFeel", - case 2: *pValues >>= nDragMode; break; //"Window/Drag", - case 3: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", - case 4: bSingleLineTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/SingleLineTab", - case 5: bColoredTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/ColoredTab", - case 6: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", - case 7: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: *pValues >>= nDragMode; break; //"Window/Drag", + case 2: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", + case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", + case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", - case 9: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", + case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -116,16 +110,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() static const sal_Char* aPropNames[] = { "FontScaling" // 0 - ,"LookAndFeel" // 1 - ,"Window/Drag" // 2 - ,"Menu/FollowMouse" // 3 - ,"Dialog/SingleLineTab" // 4 - ,"Dialog/ColoredTab" // 5 - ,"Dialog/MousePositioning" // 6 - ,"Dialog/MiddleMouseButton" // 7 + ,"Window/Drag" // 1 + ,"Menu/FollowMouse" // 2 + ,"Dialog/MousePositioning" // 3 + ,"Dialog/MiddleMouseButton" // 4 #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - ,"FontAntiAliasing/Enabled" // 8 - ,"FontAntiAliasing/MinPixelHeight" // 9 + ,"FontAntiAliasing/Enabled" // 5 + ,"FontAntiAliasing/MinPixelHeight" // 6 #endif }; const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] ); @@ -153,16 +144,13 @@ void SvtTabAppearanceCfg::Commit() switch(nProp) { case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= nLookNFeel; break; //"LookAndFeel", - case 2: pValues[nProp] <<= nDragMode; break; //"Window/Drag", - case 3: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", - case 4: pValues[nProp].setValue(&bSingleLineTabCtrl, rType); break; //"Dialog/SingleLineTab", - case 5: pValues[nProp].setValue(&bColoredTabCtrl, rType); break; //"Dialog/ColoredTab", - case 6: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", - case 7: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag", + case 2: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", + case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", + case 4: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", - case 9: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", + case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -177,16 +165,6 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetLookNFeel ( USHORT nSet ) -{ - nLookNFeel = nSet; - SetModified(); -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet ) { nDragMode = nSet; @@ -234,26 +212,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // SetStandard...Styles() resets the UseSystemUIFonts flag, // but we don't want to change it now, so save the flag before ... BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); - - switch ( nLookNFeel ) - { - case LookMotif: - hAppStyle.SetStandardUnixStyles(); break; - - case LookOSTwo: - hAppStyle.SetStandardOS2Styles(); break; - - case LookMacintosh: - hAppStyle.SetStandardMacStyles(); break; - - case LookWindows: - hAppStyle.SetStandardWinStyles(); break; - - case LookStardivision: - default: - hAppStyle.SetStandardStyles(); break; - } - + hAppStyle.SetStandardStyles(); // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); @@ -298,14 +257,6 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) else nFollow &= ~MOUSE_FOLLOW_MENU; hMouseSettings.SetFollow( nFollow ); - sal_uInt16 nTabStyle = 0; - if(bSingleLineTabCtrl) - nTabStyle |= STYLE_TABCONTROL_SINGLELINE; - - if(bColoredTabCtrl) - nTabStyle |= STYLE_TABCONTROL_COLOR; - hAppStyle.SetTabControlStyle(nTabStyle); - hAppSettings.SetMouseSettings( hMouseSettings ); diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx deleted file mode 100644 index ab8b69fdcda1..000000000000 --- a/svtools/source/dialogs/printdlg.cxx +++ /dev/null @@ -1,791 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <tools/debug.hxx> -#include <vcl/svapp.hxx> -#include <vcl/print.hxx> -#include <vcl/msgbox.hxx> -#include <vcl/jobset.hxx> -#include <tools/urlobj.hxx> -#include "printdlg.hrc" -#include <svtools/controldims.hrc> -#include <svtools/prnsetup.hxx> -#include <svtools/printdlg.hxx> -#include <svtools/svtdata.hxx> -#include <svtools/filedlg.hxx> -#include "svl/pickerhelper.hxx" -#include <svtools/helpid.hrc> -#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> -#include <com/sun/star/ui/dialogs/XFilePicker.hpp> -#include <com/sun/star/ui/dialogs/XFilterManager.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <comphelper/processfactory.hxx> - -using rtl::OUString; -using namespace com::sun::star; - -struct SvtPrinterImpl -{ - Printer* m_pTempPrinter; - sal_Bool m_bHelpDisabled; - PrintSheetRange m_eSheetRange; - - SvtPrinterImpl() : - m_pTempPrinter( NULL ), m_bHelpDisabled( sal_False ), m_eSheetRange( PRINTSHEETS_ALL ) {} - ~SvtPrinterImpl() { delete m_pTempPrinter; } -}; - -#define TEMPPRINTER() mpPrinterImpl->m_pTempPrinter - -// ======================================================================= - -PrintDialog::PrintDialog( Window* pWindow, bool bWithSheetsAndCells ) : - ModalDialog ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRINTDLG ) ), - maFlPrinter ( this, SvtResId( FL_PRINTER ) ), - maFtName ( this, SvtResId( FT_NAME ) ), - maLbName ( this, SvtResId( LB_NAMES ) ), - maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ), - maFtStatus ( this, SvtResId( FT_STATUS ) ), - maFiStatus ( this, SvtResId( FI_STATUS ) ), - maFtType ( this, SvtResId( FT_TYPE ) ), - maFiType ( this, SvtResId( FI_TYPE ) ), - maFtLocation ( this, SvtResId( FT_LOCATION ) ), - maFiLocation ( this, SvtResId( FI_LOCATION ) ), - maFtComment ( this, SvtResId( FT_COMMENT ) ), - maFiComment ( this, SvtResId( FI_COMMENT ) ), - maCbxFilePrint ( this, SvtResId( CBX_FILEPRINT ) ), - maFiPrintFile ( this, SvtResId( FI_PRINTFILE ) ), - maFiFaxNo ( this, SvtResId( FI_FAXNO ) ), - maEdtFaxNo ( this, SvtResId( EDT_FAXNO ) ), - maFlPrint ( this, SvtResId( FL_PRINT ) ), - maRbtAllSheets ( this, SvtResId( RBT_ALL_SHEETS ) ), - maRbtSelectedSheets ( this, SvtResId( RBT_SELECTED_SHEETS ) ), - maRbtSelectedCells ( this, SvtResId( RBT_SELECTED_CELLS ) ), - maFlPrintRange ( this, SvtResId( FL_PRINTRANGE ) ), - maRbtAll ( this, SvtResId( RBT_ALL ) ), - maRbtPages ( this, SvtResId( RBT_PAGES ) ), - maRbtSelection ( this, SvtResId( RBT_SELECTION ) ), - maEdtPages ( this, SvtResId( EDT_PAGES ) ), - maFlSepCopiesRange ( this, SvtResId( FL_SEPCOPIESRANGE ) ), - maFlCopies ( this, SvtResId( FL_COPIES ) ), - maFtCopies ( this, SvtResId( FT_COPIES ) ), - maNumCopies ( this, SvtResId( NUM_COPIES ) ), - maImgCollate ( this, SvtResId( IMG_COLLATE ) ), - maImgNotCollate ( this, SvtResId( IMG_NOT_COLLATE ) ), - maCbxCollate ( this, SvtResId( CBX_COLLATE ) ), - maFlSepButtonLine ( this, SvtResId( FL_SEPBUTTONLINE ) ), - maBtnOptions ( this, SvtResId( BTN_OPTIONS ) ), - maBtnOK ( this, SvtResId( BTN_OK ) ), - maBtnCancel ( this, SvtResId( BTN_CANCEL ) ), - maBtnHelp ( this, SvtResId( BTN_HELP ) ), - mbWithSheetsAndCells( bWithSheetsAndCells ), - maAllFilterStr ( SvtResId( STR_ALLFILTER ) ) - -{ - FreeResource(); - - mpPrinter = NULL; - mpPrinterImpl = new SvtPrinterImpl; - mnCopyCount = 1; - mnFirstPage = 0; - mnLastPage = 0; - mnMinPage = 1; - mnMaxPage = 65535; - meCheckRange = PRINTDIALOG_ALL; - mbAll = TRUE; - mbSelection = FALSE; - mbFromTo = FALSE; - mbRange = FALSE; - mbCollate = TRUE; - mbCollateCheck = TRUE; - mbOptions = FALSE; - - maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE ); - maStatusTimer.SetTimeoutHdl( LINK( this, PrintDialog, ImplStatusHdl ) ); - maBtnProperties.SetClickHdl( LINK( this, PrintDialog, ImplPropertiesHdl ) ); - maLbName.SetSelectHdl( LINK( this, PrintDialog, ImplChangePrinterHdl ) ); - - maFiPrintFile.SetStyle( maFiPrintFile.GetStyle() | WB_PATHELLIPSIS ); - - Link aLink( LINK( this, PrintDialog, ImplModifyControlHdl ) ); - maCbxFilePrint.SetClickHdl( aLink ); - maRbtAll.SetClickHdl( aLink ); - maRbtPages.SetClickHdl( aLink ); - maRbtSelection.SetClickHdl( aLink ); - maEdtPages.SetModifyHdl( aLink ); - maNumCopies.SetModifyHdl( aLink ); - maCbxCollate.SetClickHdl( aLink ); - maBtnOptions.SetClickHdl( aLink ); - maEdtFaxNo.SetModifyHdl( aLink ); - maBtnOK.SetClickHdl( aLink ); - - maRbtAll.Check(); - ImplSetImages(); -} - -// ----------------------------------------------------------------------- - -PrintDialog::~PrintDialog() -{ - ImplFreePrnDlgListBox( &maLbName, FALSE ); - delete mpPrinterImpl; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetImages() -{ - if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ), BMP_COLOR_NORMAL ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ), BMP_COLOR_NORMAL ); - } - else - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetInfo() -{ - const QueueInfo* pInfo = Printer::GetQueueInfo( maLbName.GetSelectEntry(), true ); - if ( pInfo ) - { - maFiType.SetText( pInfo->GetDriver() ); - maFiLocation.SetText( pInfo->GetLocation() ); - maFiComment.SetText( pInfo->GetComment() ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) ); - } - else - { - XubString aTempStr; - maFiType.SetText( aTempStr ); - maFiLocation.SetText( aTempStr ); - maFiComment.SetText( aTempStr ); - maFiStatus.SetText( aTempStr ); - } - -#ifdef UNX - if( pInfo && pInfo->GetLocation().EqualsAscii( "fax_queue" ) ) - { - maFiPrintFile.Show( FALSE ); - maCbxFilePrint.Show( FALSE ); - maFiFaxNo.Show( TRUE ); - maEdtFaxNo.Show( TRUE ); - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - maEdtFaxNo.SetText( pPrinter->GetJobValue( String::CreateFromAscii( "FAX#" ) ) ); - - Size aFTSize = maFiFaxNo.GetSizePixel(); - long nTextWidth = maFiFaxNo.GetCtrlTextWidth( maFiFaxNo.GetText() ) + 10; - if ( aFTSize.Width() < nTextWidth ) - { - long nDelta = nTextWidth - aFTSize.Width(); - aFTSize.Width() = aFTSize.Width() + nDelta; - maFiFaxNo.SetSizePixel( aFTSize ); - Size aEdtSize = maEdtFaxNo.GetSizePixel(); - aEdtSize.Width() = aEdtSize.Width() - nDelta; - Point aEdtPos = maEdtFaxNo.GetPosPixel(); - aEdtPos.X() = aEdtPos.X() + nDelta; - maEdtFaxNo.SetPosSizePixel( aEdtPos, aEdtSize ); - } - } - else -#endif - { - maFiPrintFile.Show( TRUE ); - maCbxFilePrint.Show( TRUE ); - maFiFaxNo.Show( FALSE ); - maEdtFaxNo.Show( FALSE ); - } - -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplCheckOK() -{ - // Ueberprueft, ob der OK-Button enabled ist - BOOL bEnable = TRUE; - - if ( bEnable && maRbtPages.IsChecked() ) - bEnable = maEdtPages.GetText().Len() > 0; - - if ( bEnable ) - { - if ( TEMPPRINTER() ) - bEnable = TEMPPRINTER()->IsValid(); - else - bEnable = mpPrinter->IsValid(); - } - - maBtnOK.Enable( bEnable ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplInitControls() -{ - // Alles - if ( mbAll ) - { - maRbtAll.Enable(); - if( meCheckRange == PRINTDIALOG_ALL ) - maRbtAll.Check( TRUE ); - } - else - maRbtAll.Enable( FALSE ); - - // Selektion - if ( mbSelection ) - { - maRbtSelection.Enable(); - if ( meCheckRange == PRINTDIALOG_SELECTION ) - maRbtSelection.Check( TRUE ); - } - else - maRbtSelection.Enable( FALSE ); - - // Seiten - if ( mbRange ) - { - maRbtPages.Enable(); - maEdtPages.Show(); - maEdtPages.SetText( maRangeText ); - - if( ( meCheckRange == PRINTDIALOG_FROMTO ) || - ( meCheckRange == PRINTDIALOG_RANGE ) ) - { - maRbtPages.Check( TRUE ); - maEdtPages.Enable(); - } - else - maEdtPages.Enable( FALSE ); - } - else - { - maRbtPages.Enable( FALSE ); - maEdtPages.Hide(); - } - - // Anzahl Kopien - maNumCopies.SetValue( mnCopyCount ); - - // Sortierung - maCbxCollate.Enable( mbCollate ); - maCbxCollate.Check( mbCollateCheck ); - - // Zusaetze-Button - if ( mbOptions ) - maBtnOptions.Show(); - - if ( !mbWithSheetsAndCells ) - { - Size aMarginSize = - LogicToPixel( Size( RSC_SP_CTRL_GROUP_X, RSC_SP_CTRL_GROUP_Y ), MAP_APPFONT ); - long nTempPos = maImgCollate.GetPosPixel().Y() + - maImgCollate.GetSizePixel().Height() + aMarginSize.Height(); - long nDelta1 = maFlPrintRange.GetPosPixel().Y() - maFlPrint.GetPosPixel().Y(); - long nDelta2 = maFlSepButtonLine.GetPosPixel().Y() - nTempPos; - - maFlPrint.Hide(); - maRbtAllSheets.Hide(); - maRbtSelectedSheets.Hide(); - maRbtSelectedCells.Hide(); - maRbtSelection.Show(); - - Size aNewSize = GetSizePixel(); - aNewSize.Height() -= nDelta2; - SetSizePixel( aNewSize ); - aNewSize = maFlSepCopiesRange.GetSizePixel(); - aNewSize.Height() -= nDelta2; - maFlSepCopiesRange.SetSizePixel( aNewSize ); - - long nDelta = nDelta1; - Window* pControls[] = { &maFlPrintRange, &maRbtAll, - &maRbtPages, &maEdtPages, &maRbtSelection, NULL, - &maFlSepButtonLine, &maBtnOptions, &maBtnOK, - &maBtnCancel, &maBtnHelp }; - Window** pCtrl = pControls; - const sal_Int32 nCount = sizeof( pControls ) / sizeof( pControls[0] ); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pCtrl ) - { - if ( NULL == *pCtrl ) - { - nDelta = nDelta2; - continue; - } - Point aNewPos = (*pCtrl)->GetPosPixel(); - aNewPos.Y() -= nDelta; - (*pCtrl)->SetPosPixel( aNewPos ); - } - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplFillDialogData() -{ - if ( maRbtAll.IsChecked() ) - meCheckRange = PRINTDIALOG_ALL; - else if( maRbtSelection.IsChecked() ) - meCheckRange = PRINTDIALOG_SELECTION; - else - { - meCheckRange = PRINTDIALOG_RANGE; - maRangeText = maEdtPages.GetText(); - } - - mnCopyCount = (USHORT) maNumCopies.GetValue(); - mbCollateCheck = maCbxCollate.IsChecked(); - - // In Datei drucken - if ( maCbxFilePrint.IsChecked() ) - mpPrinter->SetPrintFile( maFiPrintFile.GetText() ); - mpPrinter->EnablePrintFile( maCbxFilePrint.IsChecked() ); -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplStatusHdl, Timer*, EMPTYARG ) -{ - QueueInfo aInfo; - ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplPropertiesHdl, void*, EMPTYARG ) -{ - if ( !TEMPPRINTER() ) - TEMPPRINTER() = new Printer( mpPrinter->GetJobSetup() ); - TEMPPRINTER()->Setup( this ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplChangePrinterHdl, void*, EMPTYARG ) -{ - TEMPPRINTER() = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties, - mpPrinter, TEMPPRINTER() ); - ImplSetInfo(); - ImplCheckOK(); // Check if "OK" button can be enabled now! - - return 0; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::ImplGetFilename() -{ - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - static ::rtl::OUString aOldFile; - if( xFactory.is() ) - { - uno::Sequence< uno::Any > aTempl( 1 ); - aTempl.getArray()[0] <<= ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION; - uno::Reference< ui::dialogs::XFilePicker > xFilePicker( - xFactory->createInstanceWithArguments( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), - aTempl ), uno::UNO_QUERY ); - DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" ); - - uno::Reference< ui::dialogs::XFilterManager > xFilterMgr( xFilePicker, uno::UNO_QUERY ); - if( xFilePicker.is() && xFilterMgr.is() ) - { - try - { -#ifdef UNX - // add PostScript and PDF - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - bool bPS = true, bPDF = true; - if( pPrinter ) - { - if( pPrinter->GetCapabilities( PRINTER_CAPABILITIES_PDF ) ) - bPS = false; - else - bPDF = false; - } - if( bPS ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - if( bPDF ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Portable Document Format" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.pdf" ) ) ); -#elif defined WNT - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); -#endif - // add arbitrary files - xFilterMgr->appendFilter( maAllFilterStr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) ); - } - catch( lang::IllegalArgumentException rExc ) - { - DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" ); - } - - if( aOldFile.getLength() ) - { - INetURLObject aUrl( aOldFile, INET_PROT_FILE ); - xFilePicker->setDefaultName( aUrl.GetLastName() ); - aUrl.CutLastName(); - xFilePicker->setDisplayDirectory( aUrl.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - } - - if( xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK ) - { - uno::Sequence< ::rtl::OUString > aPathSeq( xFilePicker->getFiles() ); - INetURLObject aObj( aPathSeq[0] ); - maFiPrintFile.SetText( aOldFile = aObj.PathToFileName() ); - return true; - } - return false; - } - } - - // something went awry, lets try the old fashioned dialogue - Window* pDlgParent = IsReallyVisible() ? this : GetParent(); - FileDialog aDlg( pDlgParent, WB_STDDIALOG | WB_SAVEAS ); -#ifdef WNT - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "prn" ) ) ); -#elif defined UNX - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "ps" ) ) ); -#endif - - if( aOldFile.getLength() ) - aDlg.SetPath( aOldFile ); - - if( aDlg.Execute() ) - { - String aTargetFile = aDlg.GetPath(); - maFiPrintFile.SetText( aOldFile = aTargetFile ); - return true; - } - - return false; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplModifyControlHdl, void*, p ) -{ - // Radiobuttons (Umfang) - if ( !p || (p == &maRbtAll) || (p == &maRbtPages) || (p == &maRbtSelection) ) - { - BOOL bCheck = maRbtPages.IsChecked(); - maEdtPages.Enable( bCheck ); - if ( p == &maRbtPages ) - maEdtPages.GrabFocus(); - ImplCheckOK(); - } - - // Edit-Felder (Seiten) - if ( p == &maEdtPages ) - ImplCheckOK(); - - if( p == &maEdtFaxNo ) - { - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - pPrinter->SetJobValue( String::CreateFromAscii( "FAX#" ), maEdtFaxNo.GetText() ); - } - - // Anzahl Kopien - BOOL bNumCopies = FALSE; - - if ( !p || p == &maNumCopies ) - { - if ( p ) - bNumCopies = TRUE; - //BOOL bCopies = maNumCopies.GetValue() > 1; - maCbxCollate.Enable( mbCollate ); - - /*if ( !bCopies ) - maCbxCollate.Check( FALSE ); - else*/ - if ( mbCollateCheck ) - maCbxCollate.Check( TRUE ); - } - - // Sortieren - if ( !p || p == &maCbxCollate || bNumCopies ) - { - BOOL bCheck = maCbxCollate.IsChecked(); - - if ( !bNumCopies ) - mbCollateCheck = maCbxCollate.IsChecked(); - - if( bCheck ) - { - maImgCollate.Show(); - maImgNotCollate.Hide(); - } - else - { - maImgCollate.Hide(); - maImgNotCollate.Show(); - } - } - - // Zus"atze - if ( p == &maBtnOptions ) - ClickOptionsHdl(); - - if( p == &maBtnOK ) - { - EndDialog( maCbxFilePrint.IsChecked() ? ImplGetFilename() : TRUE ); - } - - return 0; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::ClickOptionsHdl() -{ - if ( maOptionsHdlLink.IsSet() ) - return maOptionsHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::OK() -{ - if ( maOKHdlLink.IsSet() ) - return maOKHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::EnableSheetRange( bool bEnable, PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Enable( bEnable != false ); - break; - default: - DBG_ERRORFILE( "PrintDialog::EnableSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeEnabled( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsEnabled() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeEnabled(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::CheckSheetRange( PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Check(); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Check(); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Check(); - break; - default: - DBG_ERRORFILE( "PrintDialog::CheckSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -PrintSheetRange PrintDialog::GetCheckedSheetRange() const -{ - PrintSheetRange eRange = PRINTSHEETS_ALL; - if ( mbWithSheetsAndCells ) - { - if ( maRbtSelectedSheets.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_SHEETS; - else if ( maRbtSelectedCells.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_CELLS; - } - return eRange; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeChecked( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsChecked() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeChecked(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::Notify( NotifyEvent& rNEvt ) -{ - if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() ) - ImplStatusHdl( &maStatusTimer ); - else if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - if ( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F1 && mpPrinterImpl->m_bHelpDisabled ) - return 1; // do nothing - } - - return ModalDialog::Notify( rNEvt ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( rDCEvt.GetType() == DATACHANGED_PRINTER ) - { - TEMPPRINTER() = ImplPrnDlgUpdatePrinter( mpPrinter, TEMPPRINTER() ); - Printer* pPrn; - if ( TEMPPRINTER() ) - pPrn = TEMPPRINTER(); - else - pPrn = mpPrinter; - ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties ); - ImplSetInfo(); - ImplCheckOK(); - } - else if ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) - ImplSetImages(); - - ModalDialog::DataChanged( rDCEvt ); -} - -// ----------------------------------------------------------------------- - -short PrintDialog::Execute() -{ - if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() ) - { - DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" ); - return FALSE; - } - - // check if the printer brings up its own dialog - // in that case leave the work to that dialog - if( mpPrinter->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) ) - return TRUE; - - Printer::updatePrinters(); - - // Controls initialisieren - ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties ); - ImplSetInfo(); - maStatusTimer.Start(); - ImplInitControls(); - maNumCopies.GrabFocus(); - maNumCopies.SetSelection( Selection( 0, maNumCopies.GetText().Len() ) ); - ImplModifyControlHdl( NULL ); - - // Dialog starten - short nRet = ModalDialog::Execute(); - - // Wenn Dialog mit OK beendet wurde, dann die Daten updaten - if( nRet == TRUE ) - { - if ( TEMPPRINTER() ) - mpPrinter->SetPrinterProps( TEMPPRINTER() ); - ImplFillDialogData(); - } - - maStatusTimer.Stop(); - - return nRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DisableHelp() -{ - mpPrinterImpl->m_bHelpDisabled = sal_True; - maBtnHelp.Disable(); -} - diff --git a/svtools/source/dialogs/printdlg.hrc b/svtools/source/dialogs/printdlg.hrc deleted file mode 100644 index 83b7b0b28c82..000000000000 --- a/svtools/source/dialogs/printdlg.hrc +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <svtools/svtools.hrc> - -#define FL_PRINTER 1 -#define LB_NAMES 2 -#define BTN_PROPERTIES 3 -#define FT_NAME 4 -#define FT_STATUS 5 -#define FI_STATUS 6 -#define FT_TYPE 7 -#define FI_TYPE 8 -#define FT_LOCATION 9 -#define FI_LOCATION 10 -#define FT_COMMENT 11 -#define FI_COMMENT 12 -#define CBX_FILEPRINT 13 -#define FI_PRINTFILE 14 -#define FI_FAXNO 15 -#define EDT_FAXNO 16 - -#define FL_PRINT 20 -#define RBT_ALL_SHEETS 21 -#define RBT_SELECTED_SHEETS 22 -#define RBT_SELECTED_CELLS 23 - -#define FL_PRINTRANGE 30 -#define RBT_ALL 31 -#define RBT_PAGES 32 -#define EDT_PAGES 33 -#define RBT_SELECTION 34 - -#define FL_SEPCOPIESRANGE 35 - -#define FL_COPIES 40 -#define FT_COPIES 41 -#define NUM_COPIES 42 -#define CBX_COLLATE 43 -#define IMG_COLLATE 44 -#define IMG_NOT_COLLATE 45 - -#define FL_SEPBUTTONLINE 50 -#define BTN_OK 51 -#define BTN_CANCEL 52 -#define BTN_HELP 53 -#define BTN_OPTIONS 54 - -#define STR_ALLFILTER 10 - diff --git a/svtools/source/dialogs/printdlg.src b/svtools/source/dialogs/printdlg.src deleted file mode 100644 index 80c6e465d49a..000000000000 --- a/svtools/source/dialogs/printdlg.src +++ /dev/null @@ -1,349 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "printdlg.hrc" - -#define IMAGE_MAGENTA_MASK Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } - -ModalDialog DLG_SVT_PRNDLG_PRINTDLG -{ - HelpID = "svtools:ModalDialog:DLG_SVT_PRNDLG_PRINTDLG"; - SVLook = TRUE ; - OutputSize = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 265 , 210 ) ; - Text [ en-US ] = "Print" ; - FixedLine FL_PRINTER - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 253 , 8 ) ; - Text [ en-US ] = "Printer" ; - }; - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 45 , 10 ) ; - Text [ en-US ] = "~Name" ; - }; - ListBox LB_NAMES - { - HelpID = "svtools:ListBox:DLG_SVT_PRNDLG_PRINTDLG:LB_NAMES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 13 ) ; - Size = MAP_APPFONT ( 130 , 80 ) ; - DropDown = TRUE ; - Sort = TRUE ; - }; - PushButton BTN_PROPERTIES - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_PROPERTIES"; - Pos = MAP_APPFONT ( 193 , 12 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Propert~ies..." ; - }; - FixedText FT_STATUS - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Status" ; - }; - FixedText FI_STATUS - { - Pos = MAP_APPFONT ( 60 , 29 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_TYPE - { - Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Type" ; - }; - FixedText FI_TYPE - { - Pos = MAP_APPFONT ( 60 , 40 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_LOCATION - { - Pos = MAP_APPFONT ( 12 , 51 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Location" ; - }; - FixedText FI_LOCATION - { - Pos = MAP_APPFONT ( 60 , 51 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_COMMENT - { - Pos = MAP_APPFONT ( 12 , 62 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Comment" ; - }; - FixedText FI_COMMENT - { - Pos = MAP_APPFONT ( 60 , 62 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FI_FAXNO - { - Pos = MAP_APPFONT ( 12 , 75 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Fax number"; - }; - Edit EDT_FAXNO - { - HelpID = "svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_FAXNO"; - Border = TRUE; - Pos = MAP_APPFONT ( 60 , 73 ); - Size = MAP_APPFONT ( 188 , 12 ); - }; - CheckBox CBX_FILEPRINT - { - HelpID = "svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_FILEPRINT"; - Pos = MAP_APPFONT ( 12 , 73 ) ; - Size = MAP_APPFONT ( 75 , 10 ) ; - Text [ en-US ] = "Print to file" ; - }; - FixedText FI_PRINTFILE - { - Pos = MAP_APPFONT ( 90 , 74 ) ; - Size = MAP_APPFONT ( 163 , 8 ) ; - }; - /*!!! - PushButton BTN_BROWSE - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_BROWSE"; - Pos = MAP_APPFONT ( 234 , 75 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text = "~..." ; - Hide = TRUE ; - }; - */ - FixedLine FL_PRINT - { - Pos = MAP_APPFONT ( 6 , 91 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print" ; - }; - RadioButton RBT_ALL_SHEETS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL_SHEETS"; - Pos = MAP_APPFONT ( 12 , 102 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All sheets" ; - }; - RadioButton RBT_SELECTED_SHEETS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_SHEETS"; - Pos = MAP_APPFONT ( 12 , 115 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected sheets" ; - }; - RadioButton RBT_SELECTED_CELLS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_CELLS"; - Pos = MAP_APPFONT ( 12 , 128 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected cells" ; - }; - FixedLine FL_PRINTRANGE - { - Pos = MAP_APPFONT ( 6 , 141 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print range" ; - }; - RadioButton RBT_ALL - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL"; - Pos = MAP_APPFONT ( 12 , 152 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All pages" ; - }; - RadioButton RBT_PAGES - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_PAGES"; - Pos = MAP_APPFONT ( 12 , 165 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "Pages" ; - }; - Edit EDT_PAGES - { - HelpID = "svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_PAGES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 65 , 164 ) ; - Size = MAP_APPFONT ( 52 , 12 ) ; - }; - RadioButton RBT_SELECTION - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTION"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 12 , 179 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selection" ; - }; - FixedLine FL_SEPCOPIESRANGE - { - Pos = MAP_APPFONT( 126, 102 ); - Size = MAP_APPFONT( 1, 74 ); - Vert = TRUE; - }; - FixedLine FL_COPIES - { - Pos = MAP_APPFONT ( 129 , 91 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Copies" ; - }; - FixedText FT_COPIES - { - Pos = MAP_APPFONT ( 135 , 104 ) ; - Size = MAP_APPFONT ( 63 , 8 ) ; - Text [ en-US ] = "Number of copies" ; - }; - NumericField NUM_COPIES - { - HelpID = "svtools:NumericField:DLG_SVT_PRNDLG_PRINTDLG:NUM_COPIES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 201 , 102 ) ; - Size = MAP_APPFONT ( 33 , 12 ) ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 9999 ; - StrictFormat = TRUE ; - First = 1 ; - Last = 9999 ; - }; - CheckBox CBX_COLLATE - { - HelpID = "svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_COLLATE"; - Pos = MAP_APPFONT ( 201 , 123 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Co~llate" ; - }; - FixedImage IMG_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedImage IMG_NOT_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedLine FL_SEPBUTTONLINE - { - Pos = MAP_APPFONT( 0, 179 ); - Size = MAP_APPFONT( 265, 8 ); - }; - PushButton BTN_OPTIONS - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_OPTIONS"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 6 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Options..." ; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 100 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 153 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 209 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String STR_ALLFILTER - { - Text [ en-US ] = "<All>"; - }; -}; - -Image RID_IMG_PRNDLG_COLLATE -{ - ImageBitmap = Bitmap { File = "collate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE -{ - ImageBitmap = Bitmap { File = "ncollate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_COLLATE_HC -{ - ImageBitmap = Bitmap { File = "collate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE_HC -{ - ImageBitmap = Bitmap { File = "ncollate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx index 87585f5b2587..6ea9f05d78a1 100644 --- a/svtools/source/edit/syntaxhighlight.cxx +++ b/svtools/source/edit/syntaxhighlight.cxx @@ -523,7 +523,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType, c = getChar(); // '/' entfernen // Alle Zeichen bis Zeilen-Ende oder EOF entfernen - sal_Unicode cPeek = peekChar(); + sal_Unicode cPeek = c; while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE ) { getChar(); diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx index 16592bac8df7..027fac99c2e8 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx @@ -28,7 +28,7 @@ #ifndef _SV_FILTER_OPTIONS_DIALOG_HXX_ #define _SV_FILTER_OPTIONS_DIALOG_HXX_ -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <cppuhelper/implbase5.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 1b84206d6696..b26f7bbf091b 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -33,6 +33,8 @@ #include "ipwin.hxx" #include <toolkit/helper/convert.hxx> +#include <vos/mutex.hxx> +#include <vcl/svapp.hxx> using namespace ::com::sun::star; @@ -50,6 +52,8 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > const awt::Rectangle& aBounds, const awt::Size& aSize ) { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pParent = NULL; VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent ); @@ -117,7 +121,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. uno::Any aReturn( ::cppu::queryInterface( rType, static_cast< embed::XHatchWindow* >( this ) ) ); diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index 0eec027167c2..1222013372f7 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -31,6 +31,7 @@ #include "hatchwindowfactory.hxx" #include "hatchwindow.hxx" #include "cppuhelper/factory.hxx" +#include <vcl/svapp.hxx> #include "documentcloser.hxx" @@ -69,6 +70,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW if ( !xParent.is() ) throw lang::IllegalArgumentException(); // TODO + ::vos::OGuard aGuard( Application::GetSolarMutex() ); VCLXHatchWindow* pResult = new VCLXHatchWindow(); pResult->initializeWindow( xParent, aBounds, aHandlerSize ); return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) ); diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 8058213e11bb..5e20e2197fb7 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -30,7 +30,7 @@ #include <vos/mutex.hxx> #include <tools/debug.hxx> #include <tools/rcid.h> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #if defined(OS2) diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 3aa0016c225e..a96067f95186 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -343,6 +343,7 @@ void EmbeddedObjectRef::Assign( const NS_UNO::Reference < NS_EMBED::XEmbeddedObj mpImp->xListener = EmbedEventListener_Impl::Create( this ); //#i103460# + if ( IsChart() ) { ::com::sun::star::uno::Reference < ::com::sun::star::chart2::XDefaultSizeTransmitter > xSizeTransmitter( xObj, uno::UNO_QUERY ); DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" ); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index cbf87f40b7fc..e49cf0ab62cf 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <svtools/embedtransfer.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/outdev.hxx> #include <comphelper/storagehelper.hxx> #include <unotools/ucbstreamhelper.hxx> diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 90bc4899209b..6c58cb530330 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -948,8 +948,16 @@ namespace svt { namespace table //In the case that column headers are defined but data hasn't yet been set, //only column headers will be shown if(m_pModel->hasColumnHeaders()) + { if(m_nColHeaderHeightPixel>1) + { m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel()); + if(m_bResizingGrid) + //update column widths to fit in grid + impl_ni_updateColumnWidths(); + m_bResizingGrid = true; + } + } if(m_nColumnCount != 0) impl_ni_updateScrollbars(); } @@ -2011,8 +2019,11 @@ namespace svt { namespace table PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn); impl_ni_getAccVisibleColWidths(); int newColWidth = m_aColumnWidthsPixel[m_nCurColumn]; + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4; //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell - if(m_aVisibleColumnWidthsPixel[resizingColumn]-1 == rPoint.X() && pColumn->isResizable()) + int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1; + if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) aNewPointer = Pointer( POINTER_HSPLIT ); //MouseButton was pressed but not yet released, mouse is moving if(m_bResizing) @@ -2040,7 +2051,10 @@ namespace svt { namespace table m_bResizingGrid = false; m_nResizingColumn = m_nCurColumn; PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable()) + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4; + int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1; + if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) { m_pDataWindow->CaptureMouse(); m_bResizing = true; |