diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-09 13:23:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-09 16:41:55 +0100 |
commit | f6b67d95d9b41a773189e445d0108c320d71e000 (patch) | |
tree | e87c427cf93bf09fa811069b29f30e4a7fc00380 /svtools | |
parent | fda9d127b2e355e4c440aa396a4e8e6c8a68e9da (diff) |
convert graphic export dialog to .ui
Change-Id: I3bd078e569c5cb1a55cfb44de7b1e569908e1698
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/AllLangResTarget_svt.mk | 2 | ||||
-rw-r--r-- | svtools/Module_svtools.mk | 1 | ||||
-rw-r--r-- | svtools/UI_svt.mk | 16 | ||||
-rw-r--r-- | svtools/inc/svtools/svtools.hrc | 15 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 803 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.hrc | 82 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.hxx | 111 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.src | 416 | ||||
-rw-r--r-- | svtools/source/misc/svtools.src | 52 | ||||
-rw-r--r-- | svtools/uiconfig/ui/graphicexport.ui | 1060 |
10 files changed, 1470 insertions, 1088 deletions
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk index 3cdff1a40bac..81f05b4792c0 100644 --- a/svtools/AllLangResTarget_svt.mk +++ b/svtools/AllLangResTarget_svt.mk @@ -66,12 +66,12 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\ svtools/source/dialogs/prnsetup.src \ svtools/source/dialogs/so3res.src \ svtools/source/dialogs/wizardmachine.src \ - svtools/source/filter/exportdialog.src \ svtools/source/java/javaerror.src \ svtools/source/misc/ehdl.src \ svtools/source/misc/helpagent.src \ svtools/source/misc/imagemgr.src \ svtools/source/misc/langtab.src \ + svtools/source/misc/svtools.src \ svtools/source/misc/undo.src \ svtools/source/toolpanel/toolpanel.src \ )) diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk index bfefee30d666..e182a3678bc9 100644 --- a/svtools/Module_svtools.mk +++ b/svtools/Module_svtools.mk @@ -33,6 +33,7 @@ $(eval $(call gb_Module_add_targets,svtools,\ Library_hatchwindowfactory \ Library_svt \ Package_inc \ + UI_svt \ )) ifneq ($(CROSS_COMPILING),YES) diff --git a/svtools/UI_svt.mk b/svtools/UI_svt.mk new file mode 100644 index 000000000000..7a8cf96a0054 --- /dev/null +++ b/svtools/UI_svt.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UI_UI,svt)) + +$(eval $(call gb_UI_add_uifiles,svt,\ + svtools/uiconfig/ui/graphicexport \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index e671679a5968..6988e1906c59 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -50,6 +50,16 @@ #define STR_SVT_FILEVIEW_COLUMN_TYPE (RID_SVTOOLS_START + 29) #define STR_FILTERNAME_ALL (RID_SVTOOLS_START + 30) #define RID_FILEVIEW_CONTEXTMENU (RID_SVTOOLS_START + 31) +#define STR_1BIT_THRESHOLD (RID_SVTOOLS_START + 32) +#define STR_1BIT_DITHERED (RID_SVTOOLS_START + 33) +#define STR_4BIT_GRAYSCALE (RID_SVTOOLS_START + 34) +#define STR_4BIT_COLOR_PALETTE (RID_SVTOOLS_START + 35) +#define STR_8BIT_GRAYSCALE (RID_SVTOOLS_START + 36) +#define STR_8BIT_COLOR_PALETTE (RID_SVTOOLS_START + 37) +#define STR_24BIT_TRUE_COLOR (RID_SVTOOLS_START + 38) +#define STR_ESTIMATED_SIZE_PIX_1 (RID_SVTOOLS_START + 39) +#define STR_ESTIMATED_SIZE_PIX_2 (RID_SVTOOLS_START + 40) +#define STR_ESTIMATED_SIZE_VEC (RID_SVTOOLS_START + 41) // doc template dialog #define DLG_DOCTEMPLATE (RID_SVTOOLS_START+50) @@ -216,9 +226,6 @@ //............................................................................. // dialogs -#define DLG_EXPORT_START (STR_ARR_SVT_LANGUAGE_TABLE_END + 1) -#define DLG_EXPORT (DLG_EXPORT_START) -#define DLG_EXPORT_TITLE (DLG_EXPORT_START+1) #define DLG_LOGIN (RID_SVTOOLS_START+113) #define DLG_ADDRESSBOOKSOURCE (RID_SVTOOLS_START+114) @@ -262,7 +269,7 @@ #define IMG_TRIANGLE_RIGHT (RID_SVTOOLS_START + 18) #define IMG_TRIANGLE_DOWN (RID_SVTOOLS_START + 20) -#define IMG_SVT_FOLDER (RID_SVTOOLS_START + 40) +#define IMG_SVT_FOLDER (RID_SVTOOLS_START + 42) #define IMG_SVT_NEWDOC (RID_SVTOOLS_START + 52) #define IMG_SVT_MYDOCS (RID_SVTOOLS_START + 53) diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index b2a7d3867dc8..ec95415a0491 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -34,6 +34,8 @@ #include <tools/stream.hxx> #include <svtools/filter.hxx> #include <svtools/FilterConfigItem.hxx> +#include <svtools/svtools.hrc> +#include <svtools/svtresid.hxx> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> @@ -53,7 +55,6 @@ #include <rtl/ustrbuf.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include "exportdialog.hxx" -#include "exportdialog.hrc" #define FORMAT_UNKNOWN 0 #define FORMAT_JPG 1 @@ -84,7 +85,7 @@ using namespace ::com::sun::star; -static sal_Int16 GetFilterFormat(const rtl::OUString& rExt) +static sal_Int16 GetFilterFormat(const OUString& rExt) { sal_Int16 nFormat = FORMAT_UNKNOWN; if ( rExt == "JPG" ) @@ -187,7 +188,7 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd { if ( bUpdateConfig ) { - sal_Int32 nUnit = maLbSizeX.GetSelectEntryPos(); + sal_Int32 nUnit = mpLbSizeX->GetSelectEntryPos(); if ( nUnit < 0 ) nUnit = UNIT_CM; @@ -200,20 +201,20 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd if ( nUnit > UNIT_MAX_ID ) nUnit = UNIT_PIXEL; - sal_Int32 nResolution = maNfResolution.GetValue(); + sal_Int32 nResolution = mpNfResolution->GetValue(); if ( nResolution < 1 ) nResolution = 96; - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), nUnit ); - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), nResolution ); - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), maLbResolution.GetSelectEntryPos() ); + mpOptionsItem->WriteInt32(OUString("PixelExportUnit"), nUnit); + mpOptionsItem->WriteInt32(OUString("PixelExportResolution"), nResolution); + mpOptionsItem->WriteInt32(OUString("PixelExportResolutionUnit"), mpLbResolution->GetSelectEntryPos()); } else { if ( nUnit >= UNIT_PIXEL ) nUnit = UNIT_CM; - mpOptionsItem->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), nUnit ); + mpOptionsItem->WriteInt32(OUString("VectorExportUnit"), nUnit); } } @@ -226,12 +227,12 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd pFilterOptions = new FilterConfigItem( &aFilterData ); } - const String sLogicalWidth( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ) ); - const String sLogicalHeight( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ) ); + const OUString sLogicalWidth(OUString("LogicalWidth")); + const OUString sLogicalHeight(OUString("LogicalHeight")); if ( mbIsPixelFormat ) { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelWidth" ) ), static_cast< sal_Int32 >( maSize.Width ) ); - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ), static_cast< sal_Int32 >( maSize.Height ) ); + pFilterOptions->WriteInt32(OUString("PixelWidth"), static_cast< sal_Int32 >( maSize.Width ) ); + pFilterOptions->WriteInt32(OUString("PixelHeight"), static_cast< sal_Int32 >( maSize.Height ) ); if ( maResolution.Width && maResolution.Height ) { const double f100thmmPerPixelX = 100000.0 / maResolution.Width; @@ -254,44 +255,44 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd { case FORMAT_JPG : { - sal_Int32 nColor = maLbColorDepth.GetSelectEntryPos(); + sal_Int32 nColor = mpLbColorDepth->GetSelectEntryPos(); if ( nColor == 1 ) nColor = 0; else nColor = 1; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), nColor ); - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + pFilterOptions->WriteInt32(OUString("ColorMode"), nColor); + pFilterOptions->WriteInt32(OUString("Quality"), static_cast<sal_Int32>(mpSbCompression->GetThumbPos())); } break; case FORMAT_PNG : { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), static_cast< sal_Int32 >( maSbCompression.GetThumbPos() ) ); + pFilterOptions->WriteInt32(OUString("Compression"), static_cast<sal_Int32>(mpSbCompression->GetThumbPos())); sal_Int32 nInterlace = 0; - if ( maCbInterlaced.IsChecked() ) + if ( mpCbInterlaced->IsChecked() ) nInterlace++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nInterlace ); + pFilterOptions->WriteInt32(OUString("Interlaced"), nInterlace); } break; case FORMAT_BMP : { - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), maLbColorDepth.GetSelectEntryPos() + 1 ); - pFilterOptions->WriteBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), maCbRLEEncoding.IsChecked() ); + pFilterOptions->WriteInt32(OUString("Color"), mpLbColorDepth->GetSelectEntryPos() + 1); + pFilterOptions->WriteBool(OUString("RLE_Coding"), mpCbRLEEncoding->IsChecked()); } break; case FORMAT_GIF : { sal_Int32 nValue = 0; - if ( maCbInterlaced.IsChecked() ) + if ( mpCbInterlaced->IsChecked() ) nValue++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), nValue ); + pFilterOptions->WriteInt32(OUString("Interlaced"), nValue); nValue = 0; - if ( maCbSaveTransparency.IsChecked() ) + if (mpCbSaveTransparency->IsChecked()) nValue++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), nValue ); + pFilterOptions->WriteInt32(OUString("Translucent"), nValue); } break; @@ -300,35 +301,35 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( sal_Bool bUpd case FORMAT_PPM : { sal_Int32 nFormat = 0; - if ( maRbText.IsChecked() ) + if ( mpRbText->IsChecked() ) nFormat++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), nFormat ); + pFilterOptions->WriteInt32(OUString("FileFormat"), nFormat); } break; case FORMAT_EPS : { sal_Int32 nCheck = 0; - if ( maCbEPSPreviewTIFF.IsChecked() ) + if ( mpCbEPSPreviewTIFF->IsChecked() ) nCheck++; - if ( maCbEPSPreviewEPSI.IsChecked() ) + if ( mpCbEPSPreviewEPSI->IsChecked() ) nCheck += 2; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), nCheck ); + pFilterOptions->WriteInt32(OUString("Preview"), nCheck); nCheck = 1; - if ( maRbEPSLevel2.IsChecked() ) + if ( mpRbEPSLevel2->IsChecked() ) nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), nCheck ); + pFilterOptions->WriteInt32(OUString("Version"), nCheck); nCheck = 1; - if ( maRbEPSColorFormat2.IsChecked() ) + if ( mpRbEPSColorFormat2->IsChecked() ) nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), nCheck ); + pFilterOptions->WriteInt32(OUString("ColorFormat"), nCheck); nCheck = 1; - if ( maRbEPSCompressionNone.IsChecked() ) + if ( mpRbEPSCompressionNone->IsChecked() ) nCheck++; - pFilterOptions->WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), nCheck ); + pFilterOptions->WriteInt32(OUString("CompressionMode"), nCheck); } break; } @@ -352,9 +353,9 @@ awt::Size ExportDialog::GetOriginalSize() sal_Int32 nWidth = 0; sal_Int32 nHeight= 0; com::sun::star::uno::Any aAny; - aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ); + aAny = xPagePropSet->getPropertyValue(OUString("Width")); aAny >>= nWidth; - aAny = xPagePropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ); + aAny = xPagePropSet->getPropertyValue(OUString("Height")); aAny >>= nHeight; aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight ); } @@ -362,7 +363,7 @@ awt::Size ExportDialog::GetOriginalSize() else { uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory( - mxMgr->createInstance( String( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.graphic.PrimitiveFactory2D" ) ) ), uno::UNO_QUERY ); + mxMgr->createInstance(OUString("com.sun.star.comp.graphic.PrimitiveFactory2D")), uno::UNO_QUERY); if ( xPrimitiveFactory.is() ) { basegfx::B2DHomMatrix aViewTransformation( Application::GetDefaultDevice()->GetViewTransformation() ); @@ -374,7 +375,7 @@ awt::Size ExportDialog::GetOriginalSize() aTransformation.m11 = aViewTransformation.get(1,1); aTransformation.m12 = aViewTransformation.get(1,2); - const rtl::OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) ); + const OUString sViewTransformation( RTL_CONSTASCII_USTRINGPARAM( "ViewTransformation" ) ); uno::Sequence< beans::PropertyValue > aViewInformation( 1 ); aViewInformation[ 0 ].Value <<= aTransformation; aViewInformation[ 0 ].Name = sViewTransformation; @@ -464,20 +465,20 @@ sal_Bool ExportDialog::GetGraphicStream() uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); uno::Reference< document::XExporter > xGraphicExporter( - mxMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), uno::UNO_QUERY_THROW ); + mxMgr->createInstance(OUString("com.sun.star.drawing.GraphicExportFilter")), uno::UNO_QUERY_THROW); uno::Reference< document::XFilter > xFilter( xGraphicExporter, uno::UNO_QUERY_THROW ); sal_Int32 nProperties = 2; uno::Sequence< beans::PropertyValue > aFilterData( nProperties ); - rtl::OUString sFormat( maExt ); + OUString sFormat( maExt ); uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); - aDescriptor[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OutputStream") ); + aDescriptor[0].Name = OUString("OutputStream"); aDescriptor[0].Value <<= xOutputStream; - aDescriptor[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); + aDescriptor[1].Name = OUString("FilterName"); aDescriptor[1].Value <<= sFormat; - aDescriptor[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") ); + aDescriptor[2].Name = OUString("FilterData"); aDescriptor[2].Value <<= aNewFilterData; uno::Reference< lang::XComponent > xSourceDoc; @@ -531,7 +532,7 @@ sal_uInt32 ExportDialog::GetRawFileSize() const if ( mbIsPixelFormat ) { sal_Int32 nBitsPerPixel = 24; - String aEntry( maLbColorDepth.GetSelectEntry() ); + String aEntry( mpLbColorDepth->GetSelectEntry() ); if ( ms1BitTreshold == aEntry ) nBitsPerPixel = 1; else if ( ms1BitDithered == aEntry ) @@ -566,80 +567,78 @@ sal_Bool ExportDialog::IsTempExportAvailable() const return GetRawFileSize() < static_cast< sal_uInt32 >( mnMaxFilesizeForRealtimePreview ); } -ExportDialog::ExportDialog( FltCallDialogParameter& rPara, +ExportDialog::ExportDialog(FltCallDialogParameter& rPara, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > rxMgr, - const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, - sal_Bool bExportSelection, sal_Bool bIsPixelFormat ) : - ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT, *rPara.pResMgr ) ), - mrFltCallPara ( rPara ), - mpMgr ( rPara.pResMgr ), - mxMgr ( rxMgr ), - mxSourceDocument ( rxSourceDocument ), - maFlExportSize ( this, ResId( FL_EXPORT_SIZE, *rPara.pResMgr ) ), - maFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), - maMfSizeX ( this, ResId( MF_SIZEX, *rPara.pResMgr ) ), - maLbSizeX ( this, ResId( LB_SIZEX, *rPara.pResMgr ) ), - maFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), - maMfSizeY ( this, ResId( MF_SIZEY, *rPara.pResMgr ) ), - maLbSizeY ( this, ResId( LB_SIZEY, *rPara.pResMgr ) ), - maFtResolution ( this, ResId( FT_RESOLUTION, *rPara.pResMgr ) ), - maNfResolution ( this, ResId( NF_RESOLUTION, *rPara.pResMgr ) ), - maLbResolution ( this, ResId( LB_RESOLUTION, *rPara.pResMgr ) ), - maFlColorDepth ( this, ResId( FL_COLOR_DEPTH, *rPara.pResMgr ) ), - maLbColorDepth ( this, ResId( LB_COLOR_DEPTH, *rPara.pResMgr ) ), - maFlJPGQuality ( this, ResId( FL_JPG_QUALITY, *rPara.pResMgr ) ), - maFlMode ( this, ResId( FL_MODE, *rPara.pResMgr ) ), - maSbCompression ( this, ResId( SB_COMPRESSION, *rPara.pResMgr ) ), - maNfCompression ( this, ResId( NF_COMPRESSION, *rPara.pResMgr ) ), - maFtJPGMin ( this, ResId( FT_JPG_MIN, *rPara.pResMgr ) ), - maFtJPGMax ( this, ResId( FT_JPG_MAX, *rPara.pResMgr ) ), - maFtPNGMin ( this, ResId( FT_PNG_MIN, *rPara.pResMgr ) ), - maFtPNGMax ( this, ResId( FT_PNG_MAX, *rPara.pResMgr ) ), - maCbInterlaced ( this, ResId( CB_INTERLACED, *rPara.pResMgr ) ), - maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, *rPara.pResMgr ) ), - maFlGIFDrawingObjects ( this, ResId( FL_GIF_DRAWING_OBJECTS, *rPara.pResMgr ) ), - maCbSaveTransparency ( this, ResId( CB_SAVE_TRANSPARENCY, *rPara.pResMgr ) ), - maRbBinary ( this, ResId( RB_BINARY, *rPara.pResMgr ) ), - maRbText ( this, ResId( RB_TEXT, *rPara.pResMgr ) ), - maFlEPSPreview ( this, ResId( FL_EPS_PREVIEW, *rPara.pResMgr ) ), - maCbEPSPreviewTIFF ( this, ResId( CB_EPS_PREVIEW_TIFF, *rPara.pResMgr ) ), - maCbEPSPreviewEPSI ( this, ResId( CB_EPS_PREVIEW_EPSI, *rPara.pResMgr ) ), - maFlEPSVersion ( this, ResId( FL_EPS_VERSION, *rPara.pResMgr ) ), - maRbEPSLevel1 ( this, ResId( RB_EPS_LEVEL1, *rPara.pResMgr ) ), - maRbEPSLevel2 ( this, ResId( RB_EPS_LEVEL2, *rPara.pResMgr ) ), - maFlEPSColorFormat ( this, ResId( FL_EPS_COLOR_FORMAT, *rPara.pResMgr ) ), - maRbEPSColorFormat1 ( this, ResId( RB_EPS_COLOR_FORMAT1, *rPara.pResMgr ) ), - maRbEPSColorFormat2 ( this, ResId( RB_EPS_COLOR_FORMAT2, *rPara.pResMgr ) ), - maFlCompression ( this, ResId( FL_COMPRESSION, *rPara.pResMgr ) ), - maRbEPSCompressionLZW ( this, ResId( RB_EPS_COMPRESSION_LZW, *rPara.pResMgr ) ), - maRbEPSCompressionNone ( this, ResId( RB_EPS_COMPRESSION_NONE, *rPara.pResMgr ) ), - maFlEstimatedSize ( this, ResId( FL_ESTIMATED_SIZE, *rPara.pResMgr ) ), - maFtEstimatedSize ( this, ResId( FT_ESTIMATED_SIZE, *rPara.pResMgr ) ), - msEstimatedSizePix1 ( ResId( STR_ESTIMATED_SIZE_PIX_1, *rPara.pResMgr ).toString() ), - msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, *rPara.pResMgr ).toString() ), - msEstimatedSizeVec ( ResId( STR_ESTIMATED_SIZE_VEC, *rPara.pResMgr ).toString() ), - maFlButtons ( this, ResId( FL_BUTTONS, *rPara.pResMgr ) ), - maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), - maBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), - maBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), - ms1BitTreshold ( ResId( STR_1BIT_THRESHOLD, *rPara.pResMgr ).toString() ), - ms1BitDithered ( ResId( STR_1BIT_DITHERED, *rPara.pResMgr ).toString() ), - ms4BitGrayscale ( ResId( STR_4BIT_GRAYSCALE, *rPara.pResMgr ).toString() ), - ms4BitColorPalette ( ResId( STR_4BIT_COLOR_PALETTE, *rPara.pResMgr ).toString() ), - ms8BitGrayscale ( ResId( STR_8BIT_GRAYSCALE, *rPara.pResMgr ).toString() ), - ms8BitColorPalette ( ResId( STR_8BIT_COLOR_PALETTE, *rPara.pResMgr ).toString() ), - ms24BitColor ( ResId( STR_24BIT_TRUE_COLOR, *rPara.pResMgr ).toString() ), - maExt ( rPara.aFilterExt ), - mnFormat ( FORMAT_UNKNOWN ), - mnMaxFilesizeForRealtimePreview( 0 ), - mpTempStream ( new SvMemoryStream() ), - maOriginalSize ( awt::Size( 0, 0 ) ), - mbIsPixelFormat ( bIsPixelFormat ), - mbExportSelection ( bExportSelection ), - mbPreserveAspectRatio ( sal_True ) + const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rxSourceDocument, + sal_Bool bExportSelection, sal_Bool bIsPixelFormat) + : ModalDialog(rPara.pWindow, "GraphicExportDialog", "svt/ui/graphicexport.ui") + , mrFltCallPara(rPara) + , mxMgr(rxMgr) + , mxSourceDocument(rxSourceDocument) + , mpSbCompression(NULL) + , mpNfCompression(NULL) + , msEstimatedSizePix1(SVT_RESSTR(STR_ESTIMATED_SIZE_PIX_1)) + , msEstimatedSizePix2(SVT_RESSTR(STR_ESTIMATED_SIZE_PIX_2)) + , msEstimatedSizeVec(SVT_RESSTR(STR_ESTIMATED_SIZE_VEC)) + , ms1BitTreshold(SVT_RESSTR(STR_1BIT_THRESHOLD)) + , ms1BitDithered(SVT_RESSTR(STR_1BIT_DITHERED)) + , ms4BitGrayscale(SVT_RESSTR(STR_4BIT_GRAYSCALE)) + , ms4BitColorPalette(SVT_RESSTR(STR_4BIT_COLOR_PALETTE)) + , ms8BitGrayscale(SVT_RESSTR(STR_8BIT_GRAYSCALE)) + , ms8BitColorPalette(SVT_RESSTR(STR_8BIT_COLOR_PALETTE)) + , ms24BitColor(SVT_RESSTR(STR_24BIT_TRUE_COLOR)) + , maExt(rPara.aFilterExt) + , mnFormat(FORMAT_UNKNOWN) + , mnMaxFilesizeForRealtimePreview(0) + , mpTempStream(new SvMemoryStream()) + , maOriginalSize(awt::Size(0, 0)) + , mbIsPixelFormat(bIsPixelFormat) + , mbExportSelection(bExportSelection) + , mbPreserveAspectRatio(sal_True) { + get(mpMfSizeX, "widthmf-nospin"); + get(mpMfSizeY, "heightmf-nospin"); + get(mpLbSizeX, "widthlb"); + get(mpFtResolution, "resolutionft"); + get(mpNfResolution, "resolutionmf-nospin"); + get(mpLbResolution, "resolutionlb"); + + get(mpColorDepth, "colordepth"); + get(mpLbColorDepth, "colordepthlb"); + + get(mpJPGQuality, "jpgquality"); + get(mpPNGCompression, "pngcompression"); + + get(mpBMPCompression, "bmpcompression"); + get(mpCbRLEEncoding, "rlecb"); + + get(mpMode, "mode"); + get(mpCbInterlaced, "interlacedcb"); + + get(mpDrawingObjects, "drawingobjects"); + get(mpCbSaveTransparency, "savetransparencycb"); + + get(mpEncoding, "encoding"); + get(mpRbBinary, "binarycb"); + get(mpRbText, "textcb"); + + get(mpEPSGrid, "epsgrid"); + get(mpCbEPSPreviewTIFF, "tiffpreviewcb"); + get(mpCbEPSPreviewEPSI, "epsipreviewcb"); + get(mpRbEPSLevel1, "level1rb"); + get(mpRbEPSLevel2, "level2rb"); + get(mpRbEPSColorFormat1, "color1rb"); + get(mpRbEPSColorFormat2, "color2rb"); + get(mpRbEPSCompressionLZW, "compresslzw"); + get(mpRbEPSCompressionNone, "compressnone"); + GetGraphicSource(); + get(mpInfo, "information"); + get(mpFtEstimatedSize, "estsizeft");; + + get(mpBtnOK, "ok"); + maExt.ToUpperAscii(); String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); @@ -648,15 +647,15 @@ ExportDialog::ExportDialog( FltCallDialogParameter& rPara, mpFilterOptionsItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); mnInitialResolutionUnit = mbIsPixelFormat - ? mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportUnit" ) ), UNIT_DEFAULT ) - : mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "VectorExportUnit" ) ), UNIT_DEFAULT ); + ? mpOptionsItem->ReadInt32(OUString("PixelExportUnit"), UNIT_DEFAULT) + : mpOptionsItem->ReadInt32(OUString( "VectorExportUnit"), UNIT_DEFAULT); - mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxFilesizeForRealtimePreview" ) ), 0 ); - maFtEstimatedSize.SetText( String( RTL_CONSTASCII_USTRINGPARAM( " \n " ) ) ); + mnMaxFilesizeForRealtimePreview = mpOptionsItem->ReadInt32(OUString("MaxFilesizeForRealtimePreview"), 0); + mpFtEstimatedSize->SetText(OUString(" \n ")); - String aTitle( maExt ); - aTitle += ResId(DLG_EXPORT_TITLE, *mpMgr).toString(); - SetText( aTitle ); + String aTitle(maExt); + aTitle += GetText(); + SetText(aTitle); mnFormat = GetFilterFormat( maExt ); @@ -675,98 +674,61 @@ ExportDialog::ExportDialog( FltCallDialogParameter& rPara, maSize = maOriginalSize; } + setupControls(); + // Size - maLbSizeX.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpLbSizeX->SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maSbCompression.SetScrollHdl( LINK( this, ExportDialog, SbCompressionUpdateHdl ) ); - maNfCompression.SetModifyHdl( LINK( this, ExportDialog, UpdateHdl ) ); + if (mpSbCompression) + mpSbCompression->SetScrollHdl(LINK(this, ExportDialog, SbCompressionUpdateHdl)); + if (mpNfCompression) + mpNfCompression->SetModifyHdl(LINK(this, ExportDialog, UpdateHdl)); - maMfSizeX.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) ); - maMfSizeY.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) ); + mpMfSizeX->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeX ) ); + mpMfSizeY->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlMtfSizeY ) ); - maNfResolution.SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) ); - maLbResolution.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpNfResolution->SetModifyHdl( LINK( this, ExportDialog, UpdateHdlNfResolution ) ); + mpLbResolution->SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maLbColorDepth.SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpLbColorDepth->SetSelectHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maCbInterlaced.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpCbInterlaced->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maCbSaveTransparency.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpCbSaveTransparency->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maCbEPSPreviewTIFF.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maCbEPSPreviewEPSI.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpCbEPSPreviewTIFF->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpCbEPSPreviewEPSI->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbEPSCompressionLZW.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbEPSCompressionNone.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbEPSCompressionLZW->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbEPSCompressionNone->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbBinary->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbText->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); // BMP - maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpCbRLEEncoding->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); // EPS - maRbEPSLevel1.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maRbEPSLevel2.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbEPSLevel1->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); + mpRbEPSLevel2->SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) ); - maBtnOK.SetClickHdl( LINK( this, ExportDialog, OK ) ); + mpBtnOK->SetClickHdl( LINK( this, ExportDialog, OK ) ); - setupLayout(); updateControls(); - - FreeResource(); } -void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) +void ExportDialog::setupSizeControls() { - size_t nIndex; - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - - // Size controls - rLayout.addWindow( &maFlExportSize ); - - Size aLbMax( maLbSizeX.GetSizePixel() ); - aLbMax.Width() = Max( aLbMax.Width(), maLbResolution.GetSizePixel().Width() ); - - boost::shared_ptr< vcl::LabelColumn > xSizeColumns( new vcl::LabelColumn( &rLayout ) ); - rLayout.addChild( xSizeColumns ); - - // row 1 - boost::shared_ptr< vcl::RowOrColumn > xColumn( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtSizeX, xColumn, nIndent ); - Size aMinSize( maMfSizeX.GetSizePixel() ); - nIndex = xColumn->addWindow( &maMfSizeX ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbSizeX ); - xColumn->setMinimumSize( nIndex, aLbMax ); - - // row 2 - xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtSizeY, xColumn, nIndent ); - nIndex = xColumn->addWindow( &maMfSizeY ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbSizeY ); - xColumn->setMinimumSize( nIndex, aLbMax ); - - // row 3 - if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) - { - xColumn = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xSizeColumns.get(), false ) ); - xSizeColumns->addRow( &maFtResolution, xColumn, nIndent ); - nIndex = xColumn->addWindow( &maNfResolution ); - xColumn->setMinimumSize( nIndex, aMinSize ); - nIndex = xColumn->addWindow( &maLbResolution ); - xColumn->setMinimumSize( nIndex, aLbMax ); - } - sal_Int32 nUnit = mnInitialResolutionUnit; - if ( nUnit == UNIT_DEFAULT ) + if (nUnit == UNIT_DEFAULT) nUnit = GetDefaultUnit(); - if ( !mbIsPixelFormat ) + if (!mbIsPixelFormat) { - maLbSizeX.RemoveEntry( UNIT_PIXEL ); // removing pixel + mpFtResolution->Hide(); + mpNfResolution->Hide(); + mpLbResolution->Hide(); + mpLbSizeX->RemoveEntry( UNIT_PIXEL ); // removing pixel if ( nUnit >= UNIT_PIXEL ) nUnit = UNIT_CM; } @@ -774,369 +736,165 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout ) nUnit = UNIT_PIXEL; if ( nUnit < 0 ) nUnit = UNIT_CM; - maLbSizeX.SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) ); + mpLbSizeX->SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) ); if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes { // sense eg for bitmap fillings in metafiles, to preserve high dpi output // (atm without special vector support the bitmaps are rendered with 96dpi) - sal_Int32 nResolution = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolution" ) ), 96 ); + sal_Int32 nResolution = mpOptionsItem->ReadInt32(OUString("PixelExportResolution"), 96); if ( nResolution < 1 ) nResolution = 96; - maNfResolution.SetValue( nResolution ); + mpNfResolution->SetValue( nResolution ); - sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 ); + sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32(OUString("PixelExportResolutionUnit"), 1); if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) ) nResolutionUnit = 1; - maLbResolution.SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) ); + mpLbResolution->SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) ); } - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); -} - -void ExportDialog::createColorDepthControls( vcl::RowOrColumn& rLayout ) -{ - // Color Depth - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - - boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - xRow->addWindow( &maFlColorDepth ); - - xRow = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - xRow->addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maLbColorDepth ); - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); -} - -void ExportDialog::createScrollBar( vcl::RowOrColumn& rLayout ) -{ - boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xRow ); - - Size aMinSize( maSbCompression.GetSizePixel() ); - size_t nIndex = xRow->addWindow( &maSbCompression ); - xRow->setMinimumSize( nIndex, aMinSize ); - aMinSize = maNfCompression.GetSizePixel(); - nIndex = xRow->addWindow( &maNfCompression ); - xRow->setMinimumSize( nIndex, aMinSize ); } -void ExportDialog::createFilterOptions( vcl::RowOrColumn& rLayout ) +void ExportDialog::createFilterOptions() { - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = aBorder.Width(); - switch( mnFormat ) { case FORMAT_JPG : { - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ); + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32(OUString("ColorMode"), 0); if ( nColor == 1 ) nColor = 0; else nColor = 1; - maLbColorDepth.InsertEntry( ms8BitGrayscale ); - maLbColorDepth.InsertEntry( ms24BitColor ); - maLbColorDepth.SelectEntryPos( nColor ); - createColorDepthControls( maLayout ); - - rLayout.addWindow( &maFlJPGQuality ); + mpLbColorDepth->InsertEntry( ms8BitGrayscale ); + mpLbColorDepth->InsertEntry( ms24BitColor ); + mpLbColorDepth->SelectEntryPos( nColor ); + mpColorDepth->Show(); // Quality - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - createScrollBar( *xRows.get() ); - xRows->addWindow( &maFtJPGMin ); - xRows->addWindow( &maFtJPGMax ); - - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); - if ( ( nQuality < 1 ) || ( nQuality > 100 ) ) + mpJPGQuality->Show(); + sal_Int32 nQuality = mpFilterOptionsItem->ReadInt32(OUString("Quality"), 75); + if ((nQuality < 1 ) || (nQuality > 100)) nQuality = 75; - - maSbCompression.SetRangeMin( 1 ); - maSbCompression.SetRangeMax( 100 ); - maNfCompression.SetMin( 1 ); - maNfCompression.SetMax( 100 ); - maNfCompression.SetValue( nQuality ); - maNfCompression.SetStrictFormat( sal_True ); + get(mpSbCompression, "compressionjpgsb"); + get(mpNfCompression, "compressionjpgnf-nospin"); + mpSbCompression->SetRangeMin( 1 ); + mpSbCompression->SetRangeMax( 100 ); + mpNfCompression->SetMin( 1 ); + mpNfCompression->SetMax( 100 ); + mpNfCompression->SetValue( nQuality ); + mpNfCompression->SetStrictFormat( sal_True ); } break; case FORMAT_PNG : { - rLayout.addWindow( &maFlCompression ); - // Compression 1..9 - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - createScrollBar( *xRows.get() ); - xRows->addWindow( &maFtPNGMin ); - xRows->addWindow( &maFtPNGMax ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - // Interlaced - rLayout.addWindow( &maFlMode ); - xIndenter.reset( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - xRows.reset( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbInterlaced ); - - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); + mpPNGCompression->Show(); + sal_Int32 nCompression = mpFilterOptionsItem->ReadInt32(OUString("Compression"), 6); if ( ( nCompression < 1 ) || ( nCompression > 9 ) ) nCompression = 6; - maSbCompression.SetRangeMin( 1 ); - maSbCompression.SetRangeMax( 9 ); - maNfCompression.SetMin( 1 ); - maNfCompression.SetMax( 9 ); - maNfCompression.SetValue( 9 ); - maNfCompression.SetStrictFormat( sal_True ); - - maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ) != 0 ); + get(mpSbCompression, "compressionpngsb"); + get(mpNfCompression, "compressionpngnf-nospin"); + mpSbCompression->SetRangeMin( 1 ); + mpSbCompression->SetRangeMax( 9 ); + mpNfCompression->SetMin( 1 ); + mpNfCompression->SetMax( 9 ); + mpNfCompression->SetValue( 9 ); + mpNfCompression->SetStrictFormat( sal_True ); + + // Interlaced + mpMode->Show(); + mpCbInterlaced->Check( mpFilterOptionsItem->ReadInt32(OUString("Interlaced"), 0) != 0); } break; case FORMAT_BMP : { - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32(OUString("Color"), 0); if ( nColor == 0 ) nColor = 6; else nColor--; - maLbColorDepth.InsertEntry( ms1BitTreshold ); - maLbColorDepth.InsertEntry( ms1BitDithered ); - maLbColorDepth.InsertEntry( ms4BitGrayscale ); - maLbColorDepth.InsertEntry( ms4BitColorPalette ); - maLbColorDepth.InsertEntry( ms8BitGrayscale ); - maLbColorDepth.InsertEntry( ms8BitColorPalette ); - maLbColorDepth.InsertEntry( ms24BitColor ); - maLbColorDepth.SelectEntryPos( nColor ); - createColorDepthControls( maLayout ); - - rLayout.addWindow( &maFlCompression ); + mpLbColorDepth->InsertEntry( ms1BitTreshold ); + mpLbColorDepth->InsertEntry( ms1BitDithered ); + mpLbColorDepth->InsertEntry( ms4BitGrayscale ); + mpLbColorDepth->InsertEntry( ms4BitColorPalette ); + mpLbColorDepth->InsertEntry( ms8BitGrayscale ); + mpLbColorDepth->InsertEntry( ms8BitColorPalette ); + mpLbColorDepth->InsertEntry( ms24BitColor ); + mpLbColorDepth->SelectEntryPos( nColor ); + mpColorDepth->Show(); + // RLE coding - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbRLEEncoding ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - maCbRLEEncoding.Check( mpFilterOptionsItem->ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ) ); + mpBMPCompression->Show(); + mpCbRLEEncoding->Check(mpFilterOptionsItem->ReadBool(OUString("RLE_Coding"), sal_True)); } break; case FORMAT_GIF : { - rLayout.addWindow( &maFlMode ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbInterlaced ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - rLayout.addWindow( &maFlGIFDrawingObjects ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbSaveTransparency ); - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - maCbInterlaced.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 1 ) != 0 ); - maCbSaveTransparency.Check( mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0 ); + mpMode->Show(); + mpCbInterlaced->Check(mpFilterOptionsItem->ReadInt32(OUString("Interlaced"), 1) != 0); + + mpDrawingObjects->Show(); + mpCbSaveTransparency->Check(mpFilterOptionsItem->ReadInt32(OUString("Translucent"), 1) != 0); } break; case FORMAT_PBM : case FORMAT_PGM : case FORMAT_PPM : { - rLayout.addWindow( &maFlJPGQuality ); - // RB Binary / Text - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( &rLayout, nIndent ) ); - rLayout.addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( &rLayout, true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbBinary ); - xRows->addWindow( &maRbText ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 1 ); - maRbBinary.Check( nFormat == 0 ); - maRbText.Check( nFormat != 0 ); + mpEncoding->Show(); + sal_Int32 nFormat = mpFilterOptionsItem->ReadInt32(OUString("FileFormat"), 1); + mpRbBinary->Check( nFormat == 0 ); + mpRbText->Check( nFormat != 0 ); } break; case FORMAT_EPS : { - boost::shared_ptr< vcl::RowOrColumn > xColumns( new vcl::RowOrColumn( &rLayout, false ) ); - rLayout.addChild( xColumns ); - boost::shared_ptr< vcl::RowOrColumn > xLeft( new vcl::RowOrColumn( &rLayout, true ) ); - xColumns->addChild( xLeft ); - - xLeft->addWindow( &maFlEPSPreview ); - boost::shared_ptr< vcl::Indenter > xIndenter( new vcl::Indenter( xLeft.get(), nIndent ) ); - xLeft->addChild( xIndenter ); - boost::shared_ptr< vcl::RowOrColumn > xRows( new vcl::RowOrColumn( xLeft.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maCbEPSPreviewTIFF ); - xRows->addWindow( &maCbEPSPreviewEPSI ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xLeft.get(), 2 ) ); - xLeft->addChild( xSpacer ); - - xLeft->addWindow( &maFlEPSVersion ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xLeft.get(), nIndent ) ); - xLeft->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xLeft.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSLevel1 ); - xRows->addWindow( &maRbEPSLevel2 ); - xSpacer.reset( new vcl::Spacer( xLeft.get(), 2 ) ); - xLeft->addChild( xSpacer ); - - boost::shared_ptr< vcl::RowOrColumn > xRight( new vcl::RowOrColumn( &rLayout, true ) ); - xColumns->addChild( xRight ); - - xRight->addWindow( &maFlEPSColorFormat ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); - xRight->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSColorFormat1 ); - xRows->addWindow( &maRbEPSColorFormat2 ); - xSpacer.reset( new vcl::Spacer( xRight.get(), 2 ) ); - xRight->addChild( xSpacer ); - - xRight->addWindow( &maFlCompression ); - xIndenter = boost::shared_ptr< vcl::Indenter >( new vcl::Indenter( xRight.get(), nIndent ) ); - xRight->addChild( xIndenter ); - xRows = boost::shared_ptr< vcl::RowOrColumn >( new vcl::RowOrColumn( xRight.get(), true ) ); - xIndenter->setChild( xRows ); - xRows->addWindow( &maRbEPSCompressionLZW ); - xRows->addWindow( &maRbEPSCompressionNone ); - - xSpacer.reset( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); - - sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ), 0 ); - sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 2 ); - sal_Int32 nColor = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ), 0 ); - sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ), 2 ); - - mpFilterOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ), 0 ); - - maCbEPSPreviewTIFF.Check( ( nPreview & 1 ) != 0 ); - maCbEPSPreviewEPSI.Check( ( nPreview & 2 ) != 0 ); - - maRbEPSLevel1.Check( nVersion == 1 ); - maRbEPSLevel2.Check( nVersion == 2 ); - - maRbEPSColorFormat1.Check( nColor == 1 ); - maRbEPSColorFormat2.Check( nColor != 1 ); - - maRbEPSCompressionLZW.Check( nCompr == 1 ); - maRbEPSCompressionNone.Check( nCompr != 1 ); - } - break; - } -} + mpEPSGrid->Show(); -void ExportDialog::createButtons( vcl::RowOrColumn& rLayout ) -{ - rLayout.addWindow( &maFlButtons ); - boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) ); - rLayout.addChild( xSpacer ); + sal_Int32 nPreview = mpFilterOptionsItem->ReadInt32(OUString("Preview"), 0); + sal_Int32 nVersion = mpFilterOptionsItem->ReadInt32(OUString("Version"), 2); + sal_Int32 nColor = mpFilterOptionsItem->ReadInt32(OUString("ColorFormat"), 0); + sal_Int32 nCompr = mpFilterOptionsItem->ReadInt32(OUString("CompressionMode"), 2); - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); + mpFilterOptionsItem->ReadInt32(OUString("TextMode"), 0); - boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &rLayout, false ) ); - size_t nIndex = rLayout.addChild( xButtons ); - rLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() ); + mpCbEPSPreviewTIFF->Check( ( nPreview & 1 ) != 0 ); + mpCbEPSPreviewEPSI->Check( ( nPreview & 2 ) != 0 ); - Size aMinSize( maBtnCancel.GetSizePixel() ); - // insert help button - xButtons->setMinimumSize( xButtons->addWindow( &maBtnHelp ), aMinSize ); + mpRbEPSLevel1->Check( nVersion == 1 ); + mpRbEPSLevel2->Check( nVersion == 2 ); - // insert a spacer, cancel and OK buttons are right aligned + mpRbEPSColorFormat1->Check( nColor == 1 ); + mpRbEPSColorFormat2->Check( nColor != 1 ); - xSpacer.reset( new vcl::Spacer( xButtons.get(), 2 ) ); - xButtons->addChild( xSpacer ); - xButtons->setMinimumSize( xButtons->addWindow( &maBtnOK ), aMinSize ); - xButtons->setMinimumSize( xButtons->addWindow( &maBtnCancel ), aMinSize ); + mpRbEPSCompressionLZW->Check( nCompr == 1 ); + mpRbEPSCompressionNone->Check( nCompr != 1 ); + } + break; + } } -void ExportDialog::setupLayout() +void ExportDialog::setupControls() { - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - maLayout.setParentWindow( this ); - maLayout.setOuterBorder( aBorder.Width() ); - - createSizeControls( maLayout ); - createFilterOptions( maLayout ); - - if ( mnMaxFilesizeForRealtimePreview || mbIsPixelFormat ) - { - maLayout.addWindow( &maFlEstimatedSize ); - maLayout.addWindow( &maFtEstimatedSize ); - } - createButtons( maLayout ); - - maLayout.show(); - maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED ); - maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) ); - SetOutputSizePixel( maDialogSize ); + setupSizeControls(); + createFilterOptions(); - maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), maFlButtons.GetSizePixel() ); - maRectBtnHelp = Rectangle( maBtnHelp.GetPosPixel(), maBtnHelp.GetSizePixel() ); - maRectBtnOK = Rectangle( maBtnOK.GetPosPixel(), maBtnOK.GetSizePixel() ); - maRectBtnCancel = Rectangle( maBtnCancel.GetPosPixel(), maBtnOK.GetSizePixel() ); - - maLbSizeY.Hide(); + if (mnMaxFilesizeForRealtimePreview || mbIsPixelFormat) + mpInfo->Show(); } -static rtl::OUString ImpValueOfInKB( const sal_Int64& rVal ) +static OUString ImpValueOfInKB( const sal_Int64& rVal ) { double fVal( static_cast<double>( rVal ) ); fVal /= ( 1 << 10 ); fVal += 0.05; - rtl::OUStringBuffer aVal( rtl::OUString::valueOf( fVal ) ); - sal_Int32 nX( rtl::OUString( aVal.getStr() ).indexOf( '.', 0 ) ); + OUStringBuffer aVal( OUString::valueOf( fVal ) ); + sal_Int32 nX( OUString( aVal.getStr() ).indexOf( '.', 0 ) ); if ( nX > 0 ) aVal.setLength( nX + 2 ); return aVal.makeStringAndClear(); } -void ExportDialog::updatePreview() -{ - SetOutputSizePixel( maDialogSize ); - - maFlButtons.SetSizePixel( Size( maRectFlButtons.GetWidth(), maRectFlButtons.GetHeight() ) ); - maBtnHelp.SetPosPixel( Point( maRectBtnHelp.Left(), maRectBtnHelp.Top() ) ); - maBtnOK.SetPosPixel( Point( maRectBtnOK.Left(), maRectBtnOK.Top() ) ); - maBtnCancel.SetPosPixel( Point( maRectBtnCancel.Left(), maRectBtnCancel.Top() ) ); -} - void ExportDialog::updateControls() { GetGraphicStream(); @@ -1146,26 +904,26 @@ void ExportDialog::updateControls() { awt::Size aSize100thmm( maSize ); Size aSize( LogicToLogic( Size( aSize100thmm.Width * 100, aSize100thmm.Height * 100 ), MAP_100TH_MM, - MapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) ) ); - maMfSizeX.SetValue( aSize.Width() ); - maMfSizeY.SetValue( aSize.Height() ); + MapMode( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ) ) ) ); + mpMfSizeX->SetValue( aSize.Width() ); + mpMfSizeY->SetValue( aSize.Height() ); } else { - MapUnit aMapUnit( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ); + MapUnit aMapUnit( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ) ); if ( aMapUnit == MAP_PIXEL ) { // calculating pixel count via resolution and original graphic size - maMfSizeX.SetDecimalDigits( 0 ); - maMfSizeY.SetDecimalDigits( 0 ); - maMfSizeX.SetValue( maSize.Width ); - maMfSizeY.SetValue( maSize.Height ); + mpMfSizeX->SetDecimalDigits( 0 ); + mpMfSizeY->SetDecimalDigits( 0 ); + mpMfSizeX->SetValue( maSize.Width ); + mpMfSizeY->SetValue( maSize.Height ); } else { - maMfSizeX.SetDecimalDigits( 2 ); - maMfSizeY.SetDecimalDigits( 2 ); + mpMfSizeX->SetDecimalDigits( 2 ); + mpMfSizeY->SetDecimalDigits( 2 ); double fRatio; - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + switch( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ) ) { case MAP_INCH : fRatio = static_cast< double >( maResolution.Width ) * 0.0254; break; case MAP_MM : fRatio = static_cast< double >( maResolution.Width ) * 0.001; break; @@ -1173,22 +931,22 @@ void ExportDialog::updateControls() default: case MAP_CM : fRatio = static_cast< double >( maResolution.Width ) * 0.01; break; } - maMfSizeX.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) ); - maMfSizeY.SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) ); + mpMfSizeX->SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Width * 100 ) / fRatio ) + 0.5 ) ); + mpMfSizeY->SetValue( static_cast< sal_Int32 >( ( static_cast< double >( maSize.Height * 100 ) / fRatio ) + 0.5 ) ); } } sal_Int32 nResolution = 0; - switch( maLbResolution.GetSelectEntryPos() ) + switch( mpLbResolution->GetSelectEntryPos() ) { case 0 : nResolution = maResolution.Width / 100; break; // pixels / cm case 2 : nResolution = maResolution.Width; break; // pixels / meter default: case 1 : nResolution = static_cast< sal_Int32 >(maResolution.Width * 0.0254); break; // pixels / inch } - maNfResolution.SetValue( nResolution ); + mpNfResolution->SetValue( nResolution ); - if ( maSbCompression.IsVisible() ) - maSbCompression.SetThumbPos( maNfCompression.GetValue() ); + if (mpSbCompression && mpSbCompression->IsVisible() && mpNfCompression) + mpSbCompression->SetThumbPos(mpNfCompression->GetValue()); // updating estimated size sal_Int64 nRealFileSize( mpTempStream->Tell() ); @@ -1204,7 +962,7 @@ void ExportDialog::updateControls() nInd = aEst.Search( '%', nInd ); aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); } - maFtEstimatedSize.SetText( aEst ); + mpFtEstimatedSize->SetText( aEst ); } else { @@ -1213,19 +971,18 @@ void ExportDialog::updateControls() String aEst( msEstimatedSizeVec ); xub_StrLen nInd = aEst.Search( '%', 0 ); aEst.Replace( nInd, 2, ImpValueOfInKB( nRealFileSize ) ); - maFtEstimatedSize.SetText( aEst ); + mpFtEstimatedSize->SetText( aEst ); } } - updatePreview(); // EPS - if ( maRbEPSLevel1.IsVisible() ) + if ( mpRbEPSLevel1->IsVisible() ) { - sal_Bool bEnabled = maRbEPSLevel1.IsChecked() == sal_False; - maRbEPSColorFormat1.Enable( bEnabled ); - maRbEPSColorFormat2.Enable( bEnabled ); - maRbEPSCompressionLZW.Enable( bEnabled ); - maRbEPSCompressionNone.Enable( bEnabled ); + sal_Bool bEnabled = mpRbEPSLevel1->IsChecked() == sal_False; + mpRbEPSColorFormat1->Enable( bEnabled ); + mpRbEPSColorFormat2->Enable( bEnabled ); + mpRbEPSCompressionLZW->Enable( bEnabled ); + mpRbEPSCompressionNone->Enable( bEnabled ); } } @@ -1253,24 +1010,24 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeX) if ( mbIsPixelFormat ) { - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + switch( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ) ) { - case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * maMfSizeX.GetValue() / 100.0 + 0.5 ); break; - case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * maMfSizeX.GetValue() / 100.0 * 72 + 0.5 ); break; + case MAP_INCH : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.01 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.001 * mpMfSizeX->GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Width = static_cast< sal_Int32 >( static_cast< double >( maResolution.Width ) * 0.0254 * mpMfSizeX->GetValue() / 100.0 * 72 + 0.5 ); break; default: - case MAP_PIXEL : maSize.Width = maMfSizeX.GetValue(); break; + case MAP_PIXEL : maSize.Width = mpMfSizeX->GetValue(); break; } maSize.Height = static_cast< sal_Int32 >( fRatio * maSize.Width + 0.5 ); } else { Fraction aFract( 1, 100 ); - sal_Int32 nWidth = maMfSizeX.GetValue(); + sal_Int32 nWidth = mpMfSizeX->GetValue(); sal_Int32 nHeight= static_cast< sal_Int32 >( nWidth * fRatio ); const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); - MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ),Point(), aFract, aFract ); Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); maSize.Width = aDest.Width(); @@ -1287,24 +1044,24 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY) if ( mbIsPixelFormat ) { - switch( GetMapUnit( maLbSizeX.GetSelectEntryPos() ) ) + switch( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ) ) { - case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * maMfSizeY.GetValue() / 100.0 + 0.5 ); break; - case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * maMfSizeY.GetValue() / 100.0 * 72 + 0.5 ); break; + case MAP_INCH : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break; + case MAP_CM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.01 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break; + case MAP_MM : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.001 * mpMfSizeY->GetValue() / 100.0 + 0.5 ); break; + case MAP_POINT : maSize.Height = static_cast< sal_Int32 >( static_cast< double >( maResolution.Height ) * 0.0254 * mpMfSizeY->GetValue() / 100.0 * 72 + 0.5 ); break; default: - case MAP_PIXEL : maSize.Height = maMfSizeY.GetValue(); break; + case MAP_PIXEL : maSize.Height = mpMfSizeY->GetValue(); break; } maSize.Width = static_cast< sal_Int32 >( fRatio * maSize.Height + 0.5 ); } else { Fraction aFract( 1, 100 ); - sal_Int32 nHeight= maMfSizeY.GetValue(); + sal_Int32 nHeight= mpMfSizeY->GetValue(); sal_Int32 nWidth = static_cast< sal_Int32 >( nHeight * fRatio ); const Size aSource( static_cast< sal_Int32 >( nWidth ), static_cast< sal_Int32 >( nHeight ) ); - MapMode aSourceMapMode( GetMapUnit( maLbSizeX.GetSelectEntryPos() ),Point(), aFract, aFract ); + MapMode aSourceMapMode( GetMapUnit( mpLbSizeX->GetSelectEntryPos() ),Point(), aFract, aFract ); Size aDest( LogicToLogic( aSource, aSourceMapMode, MAP_100TH_MM ) ); maSize.Height = aDest.Height(); @@ -1317,10 +1074,10 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlMtfSizeY) IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution) { - sal_Int32 nResolution = maNfResolution.GetValue(); - if ( maLbResolution.GetSelectEntryPos() == 0 ) // pixels / cm + sal_Int32 nResolution = mpNfResolution->GetValue(); + if ( mpLbResolution->GetSelectEntryPos() == 0 ) // pixels / cm nResolution *= 100; - else if ( maLbResolution.GetSelectEntryPos() == 1 ) // pixels / inch + else if ( mpLbResolution->GetSelectEntryPos() == 1 ) // pixels / inch nResolution = static_cast< sal_Int32 >( ( ( static_cast< double >( nResolution ) + 0.5 ) / 0.0254 ) ); maResolution.Width = nResolution; maResolution.Height= nResolution; @@ -1331,7 +1088,7 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution) IMPL_LINK_NOARG(ExportDialog, SbCompressionUpdateHdl) { - maNfCompression.SetValue( maSbCompression.GetThumbPos() ); + mpNfCompression->SetValue( mpSbCompression->GetThumbPos() ); updateControls(); return 0; } diff --git a/svtools/source/filter/exportdialog.hrc b/svtools/source/filter/exportdialog.hrc deleted file mode 100644 index 23df23b2a190..000000000000 --- a/svtools/source/filter/exportdialog.hrc +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include <svtools/svtools.hrc> - -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 - -#define FL_EXPORT_SIZE 1 -#define FL_COLOR_DEPTH 2 -#define FL_JPG_QUALITY 3 -#define FL_COMPRESSION 4 -#define FL_MODE 5 -#define FL_GIF_DRAWING_OBJECTS 6 -#define FL_EPS_PREVIEW 8 -#define FL_EPS_VERSION 9 -#define FL_EPS_COLOR_FORMAT 10 -#define FL_ESTIMATED_SIZE 11 -#define FL_BUTTONS 12 - -#define FT_SIZEX 1 -#define FT_SIZEY 2 -#define FT_RESOLUTION 3 -#define FT_JPG_MIN 4 -#define FT_JPG_MAX 5 -#define FT_PNG_MIN 6 -#define FT_PNG_MAX 7 -#define FT_ESTIMATED_SIZE 8 - -#define NF_RESOLUTION 1 -#define NF_COMPRESSION 2 - -#define MF_SIZEX 1 -#define MF_SIZEY 2 - -#define LB_SIZEX 1 -#define LB_SIZEY 2 -#define LB_RESOLUTION 3 -#define LB_COLOR_DEPTH 4 - -#define RB_BINARY 1 -#define RB_TEXT 2 -#define RB_EPS_LEVEL1 3 -#define RB_EPS_LEVEL2 4 -#define RB_EPS_COLOR_FORMAT1 5 -#define RB_EPS_COLOR_FORMAT2 6 -#define RB_EPS_COMPRESSION_LZW 7 -#define RB_EPS_COMPRESSION_NONE 8 - -#define CB_INTERLACED 2 -#define CB_RLE_ENCODING 3 -#define CB_SAVE_TRANSPARENCY 4 -#define CB_EPS_PREVIEW_TIFF 5 -#define CB_EPS_PREVIEW_EPSI 6 - -#define SB_COMPRESSION 1 - -#define STR_1BIT_THRESHOLD 1 -#define STR_1BIT_DITHERED 2 -#define STR_4BIT_GRAYSCALE 3 -#define STR_4BIT_COLOR_PALETTE 4 -#define STR_8BIT_GRAYSCALE 5 -#define STR_8BIT_COLOR_PALETTE 6 -#define STR_24BIT_TRUE_COLOR 7 -#define STR_ESTIMATED_SIZE_PIX_1 8 -#define STR_ESTIMATED_SIZE_PIX_2 9 -#define STR_ESTIMATED_SIZE_VEC 10 diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx index f98d971716bf..4d952ef7fbb7 100644 --- a/svtools/source/filter/exportdialog.hxx +++ b/svtools/source/filter/exportdialog.hxx @@ -26,9 +26,9 @@ #include <vcl/button.hxx> #include <vcl/fixed.hxx> #include <vcl/field.hxx> +#include <vcl/layout.hxx> #include <vcl/lstbox.hxx> #include <vcl/msgbox.hxx> -#include <vcl/arrange.hxx> #include <vcl/scrbar.hxx> #include <com/sun/star/document/XExporter.hpp> #include <com/sun/star/drawing/XShape.hpp> @@ -46,63 +46,60 @@ class ExportDialog : public ModalDialog { private: - FltCallDialogParameter& - mrFltCallPara; - - ResMgr* mpMgr; + FltCallDialogParameter& mrFltCallPara; const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMgr; const com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& mxSourceDocument; - FixedLine maFlExportSize; - FixedText maFtSizeX; - MetricField maMfSizeX; - ListBox maLbSizeX; - FixedText maFtSizeY; - MetricField maMfSizeY; - ListBox maLbSizeY; - FixedText maFtResolution; - NumericField maNfResolution; - ListBox maLbResolution; - FixedLine maFlColorDepth; - ListBox maLbColorDepth; - FixedLine maFlJPGQuality; - FixedLine maFlMode; - ScrollBar maSbCompression; - NumericField maNfCompression; - FixedText maFtJPGMin; - FixedText maFtJPGMax; - FixedText maFtPNGMin; - FixedText maFtPNGMax; - CheckBox maCbInterlaced; - CheckBox maCbRLEEncoding; - FixedLine maFlGIFDrawingObjects; - CheckBox maCbSaveTransparency; - RadioButton maRbBinary; - RadioButton maRbText; - FixedLine maFlEPSPreview; - CheckBox maCbEPSPreviewTIFF; - CheckBox maCbEPSPreviewEPSI; - FixedLine maFlEPSVersion; - RadioButton maRbEPSLevel1; - RadioButton maRbEPSLevel2; - FixedLine maFlEPSColorFormat; - RadioButton maRbEPSColorFormat1; - RadioButton maRbEPSColorFormat2; - FixedLine maFlCompression; - RadioButton maRbEPSCompressionLZW; - RadioButton maRbEPSCompressionNone; - FixedLine maFlEstimatedSize; - FixedText maFtEstimatedSize; + NumericField* mpMfSizeX; + ListBox* mpLbSizeX; + NumericField* mpMfSizeY; + FixedText* mpFtResolution; + NumericField* mpNfResolution; + ListBox* mpLbResolution; + + VclContainer* mpColorDepth; + ListBox* mpLbColorDepth; + + VclContainer* mpJPGQuality; + VclContainer* mpPNGCompression; + + ScrollBar* mpSbCompression; + NumericField* mpNfCompression; + + VclContainer* mpMode; + CheckBox* mpCbInterlaced; + + VclContainer* mpBMPCompression; + CheckBox* mpCbRLEEncoding; + + VclContainer* mpDrawingObjects; + CheckBox* mpCbSaveTransparency; + + VclContainer* mpEncoding; + RadioButton* mpRbBinary; + RadioButton* mpRbText; + + VclContainer* mpEPSGrid; + CheckBox* mpCbEPSPreviewTIFF; + CheckBox* mpCbEPSPreviewEPSI; + RadioButton* mpRbEPSLevel1; + RadioButton* mpRbEPSLevel2; + RadioButton* mpRbEPSColorFormat1; + RadioButton* mpRbEPSColorFormat2; + RadioButton* mpRbEPSCompressionLZW; + RadioButton* mpRbEPSCompressionNone; + + VclContainer* mpInfo; + FixedText* mpFtEstimatedSize; + + OKButton* mpBtnOK; + String msEstimatedSizePix1; String msEstimatedSizePix2; String msEstimatedSizeVec; - FixedLine maFlButtons; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; String ms1BitTreshold; String ms1BitDithered; @@ -112,7 +109,6 @@ private: String ms8BitColorPalette; String ms24BitColor; - vcl::RowOrColumn maLayout; Size maDialogSize; FilterConfigItem* mpOptionsItem; @@ -123,11 +119,6 @@ private: sal_Int16 mnFormat; sal_Int32 mnMaxFilesizeForRealtimePreview; - Rectangle maRectFlButtons; - Rectangle maRectBtnHelp; - Rectangle maRectBtnOK; - Rectangle maRectBtnCancel; - SvStream* mpTempStream; Bitmap maBitmap; @@ -163,13 +154,9 @@ private: DECL_LINK( OK, void* p ); - void createSizeControls( vcl::RowOrColumn& ); - void createColorDepthControls( vcl::RowOrColumn& ); - void createFilterOptions( vcl::RowOrColumn& ); - void createButtons( vcl::RowOrColumn& ); - void createScrollBar( vcl::RowOrColumn& ); - void setupLayout(); - void updatePreview(); + void setupSizeControls(); + void createFilterOptions(); + void setupControls(); void updateControls(); void GetGraphicSource(); diff --git a/svtools/source/filter/exportdialog.src b/svtools/source/filter/exportdialog.src deleted file mode 100644 index ef82a6cf802e..000000000000 --- a/svtools/source/filter/exportdialog.src +++ /dev/null @@ -1,416 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "exportdialog.hrc" - -String DLG_EXPORT_TITLE -{ - Text [ en-US ] = " Options" ; -}; - -ModalDialog DLG_EXPORT -{ - HelpID = "svtools:ModalDialog:DLG_EXPORT"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 178 , 135 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - - FixedLine FL_EXPORT_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Size" ; - }; - FixedText FT_SIZEX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Width:" ; - }; - MetricField MF_SIZEX - { - HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEX"; - Hide = TRUE; - Border = TRUE; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE; - Repeat = TRUE; - Spin = FALSE; - StrictFormat = TRUE; - DecimalDigits = 2; - Unit = FUNIT_NONE; - Maximum = 99999; - Last = 255; - }; - ListBox LB_SIZEX - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEX"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "inches" ; > ; - < "cm" ; Default ; > ; - < "mm" ; > ; - < "points" ; > ; - < "pixels" ; > ; - }; - }; - FixedText FT_SIZEY - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Height:" ; - }; - MetricField MF_SIZEY - { - HelpID = "svtools:MetricField:DLG_EXPORT:MF_SIZEY"; - Hide = TRUE; - Border = TRUE; - Size = MAP_APPFONT ( 30, 12 ); - TabStop = TRUE; - Repeat = TRUE; - Spin = FALSE; - StrictFormat = TRUE; - DecimalDigits = 2; - Unit = FUNIT_NONE; - Maximum = 99999; - Last = 255 ; - }; - ListBox LB_SIZEY - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_SIZEY"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "inches" ; > ; - < "cm" ; Default ; > ; - < "mm" ; > ; - < "points" ; > ; - < "pixels" ; > ; - }; - }; - FixedText FT_RESOLUTION - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Resolution:" ; - }; - NumericField NF_RESOLUTION - { - HelpID = "svtools:NumericField:DLG_EXPORT:NF_RESOLUTION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = FALSE ; - Maximum = 99999; - Last = 255 ; - }; - ListBox LB_RESOLUTION - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_RESOLUTION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - StringList [ en-US ] = - { - < "pixels/cm" ; > ; - < "pixels/inch" ; Default ; > ; - < "pixels/meter" ; > ; - }; - }; - FixedLine FL_COLOR_DEPTH - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Color Depth" ; - }; - ListBox LB_COLOR_DEPTH - { - HelpID = "svtools:ListBox:DLG_EXPORT:LB_COLOR_DEPTH"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 60, 80 ) ; - DropDown = TRUE ; - Sort = FALSE ; - }; - String STR_1BIT_THRESHOLD - { - Text [ en-US ] = "1 bit threshold"; - }; - String STR_1BIT_DITHERED - { - Text [ en-US ] = "1 bit dithered"; - }; - String STR_4BIT_GRAYSCALE - { - Text [ en-US ] = "4 bit grayscale"; - }; - String STR_4BIT_COLOR_PALETTE - { - Text [ en-US ] = "4 bit color"; - }; - String STR_8BIT_GRAYSCALE - { - Text [ en-US ] = "8 bit grayscale"; - }; - String STR_8BIT_COLOR_PALETTE - { - Text [ en-US ] = "8 bit color"; - }; - String STR_24BIT_TRUE_COLOR - { - Text [ en-US ] = "24 bit true color"; - }; - FixedLine FL_JPG_QUALITY - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Quality" ; - }; - FixedLine FL_COMPRESSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Compression" ; - }; - FixedLine FL_MODE - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Mode" ; - }; - ScrollBar SB_COMPRESSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 48, 10 ) ; - VScroll = FALSE ; - HScroll = TRUE; - Drag = TRUE ; - }; - NumericField NF_COMPRESSION - { - HelpID = "svtools:NumericField:DLG_EXPORT:NF_COMPRESSION"; - Hide = TRUE; - Border = TRUE ; - Size = MAP_APPFONT ( 30, 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = FALSE ; - Maximum = 99999; - Last = 255 ; - }; - FixedText FT_JPG_MIN - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "1 is minimum Quality and smallest file size." ; - }; - FixedText FT_JPG_MAX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "100 is maximum Quality and biggest file size." ; - }; - FixedText FT_PNG_MIN - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "0 is biggest file size and fastest loading." ; - }; - FixedText FT_PNG_MAX - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "9 is smallest file size and slowest loading." ; - }; - CheckBox CB_INTERLACED - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_INTERLACED"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Interlaced" ; - }; - CheckBox CB_RLE_ENCODING - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_RLE_ENCODING"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "RLE encoding" ; - }; - FixedLine FL_GIF_DRAWING_OBJECTS - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Drawing Objects" ; - }; - CheckBox CB_SAVE_TRANSPARENCY - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_SAVE_TRANSPARENCY"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Save transparency" ; - }; - RadioButton RB_BINARY - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_BINARY"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Binary" ; - }; - RadioButton RB_TEXT - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_TEXT"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Text" ; - }; - FixedLine FL_EPS_PREVIEW - { - Hide = TRUE; - Size = MAP_APPFONT ( 110 , 8 ) ; - Text [ en-US ] = "Preview" ; - }; - CheckBox CB_EPS_PREVIEW_TIFF - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_TIFF"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Image Preview (TIFF)" ; - }; - CheckBox CB_EPS_PREVIEW_EPSI - { - HelpID = "svtools:CheckBox:DLG_EXPORT:CB_EPS_PREVIEW_EPSI"; - Hide = TRUE; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Interchange (EPSI)" ; - }; - FixedLine FL_EPS_VERSION - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Version" ; - }; - RadioButton RB_EPS_LEVEL1 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL1"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Level 1" ; - }; - RadioButton RB_EPS_LEVEL2 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_LEVEL2"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Level 2" ; - }; - FixedLine FL_EPS_COLOR_FORMAT - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - Text [ en-US ] = "Color format" ; - }; - RadioButton RB_EPS_COLOR_FORMAT1 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT1"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Color" ; - }; - RadioButton RB_EPS_COLOR_FORMAT2 - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COLOR_FORMAT2"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Grayscale" ; - }; - RadioButton RB_EPS_COMPRESSION_LZW - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_LZW"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "LZW encoding" ; - }; - RadioButton RB_EPS_COMPRESSION_NONE - { - HelpID = "svtools:RadioButton:DLG_EXPORT:RB_EPS_COMPRESSION_NONE"; - Hide = TRUE; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "None" ; - }; - FixedLine FL_ESTIMATED_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - FixedText FT_ESTIMATED_SIZE - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - String STR_ESTIMATED_SIZE_PIX_1 - { - Text [ en-US ] = "The picture needs about %1 KB of memory."; - }; - String STR_ESTIMATED_SIZE_PIX_2 - { - Text [ en-US ] = "The picture needs about %1 KB of memory,\n the file size is %2 KB."; - }; - String STR_ESTIMATED_SIZE_VEC - { - Text [ en-US ] = "The file size is %1 KB."; - }; - FixedLine FL_BUTTONS - { - Hide = TRUE; - Size = MAP_APPFONT ( 41 , 10 ) ; - }; - OKButton BTN_OK - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Hide = TRUE; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; diff --git a/svtools/source/misc/svtools.src b/svtools/source/misc/svtools.src new file mode 100644 index 000000000000..1ae9e3a45bf5 --- /dev/null +++ b/svtools/source/misc/svtools.src @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "svtools/svtools.hrc" + +String STR_1BIT_THRESHOLD +{ + Text [ en-US ] = "1 bit threshold"; +}; +String STR_1BIT_DITHERED +{ + Text [ en-US ] = "1 bit dithered"; +}; +String STR_4BIT_GRAYSCALE +{ + Text [ en-US ] = "4 bit grayscale"; +}; +String STR_4BIT_COLOR_PALETTE +{ + Text [ en-US ] = "4 bit color"; +}; +String STR_8BIT_GRAYSCALE +{ + Text [ en-US ] = "8 bit grayscale"; +}; +String STR_8BIT_COLOR_PALETTE +{ + Text [ en-US ] = "8 bit color"; +}; +String STR_24BIT_TRUE_COLOR +{ + Text [ en-US ] = "24 bit true color"; +}; +String STR_ESTIMATED_SIZE_PIX_1 +{ + Text [ en-US ] = "The picture needs about %1 KB of memory."; +}; +String STR_ESTIMATED_SIZE_PIX_2 +{ + Text [ en-US ] = "The picture needs about %1 KB of memory, the file size is %2 KB."; +}; +String STR_ESTIMATED_SIZE_VEC +{ + Text [ en-US ] = "The file size is %1 KB."; +}; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/uiconfig/ui/graphicexport.ui b/svtools/uiconfig/ui/graphicexport.ui new file mode 100644 index 000000000000..c0da519527fb --- /dev/null +++ b/svtools/uiconfig/ui/graphicexport.ui @@ -0,0 +1,1060 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1</property> + <property name="upper">100</property> + <property name="value">75</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment2"> + <property name="lower">1</property> + <property name="upper">9</property> + <property name="value">9</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment3"> + <property name="upper">999.99000000000001</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="GraphicExportDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes"> Options</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Width</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Height</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="resolutionft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Resolution</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="widthmf-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment3</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="heightmf-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment3</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="resolutionmf-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment3</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="widthlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore2</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="resolutionlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore1</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Size</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="colordepth"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkComboBox" id="colordepthlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Color Depth</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="jpgquality"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">1 is minimum Quality and smallest file size.</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">100 is maximum Quality and biggest file size.</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="compressionjpgnf-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkScrollbar" id="compressionjpgsb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">True</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Quality</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="pngcompression"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkSpinButton" id="compressionpngnf-nospin"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkScrollbar" id="compressionpngsb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">True</property> + <property name="adjustment">adjustment2</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">0 is biggest file size and fastest loading.</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label23"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">9 is smallest file size and slowest loading.</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Compression</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="bmpcompression"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkCheckButton" id="rlecb"> + <property name="label" translatable="yes">RLE Encoding</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Compression</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="mode"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkCheckButton" id="interlacedcb"> + <property name="label" translatable="yes">Interlaced</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Mode</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="drawingobjects"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkCheckButton" id="savetransparencycb"> + <property name="label" translatable="yes">Save transparency</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="labe"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Drawing Objects</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="encoding"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="binarycb"> + <property name="label" translatable="yes">Binary</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">textcb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="textcb"> + <property name="label" translatable="yes">Text</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">binarycb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Encoding</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="epsgrid"> + <property name="can_focus">False</property> + <child> + <object class="GtkFrame" id="frame9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkCheckButton" id="tiffpreviewcb"> + <property name="label" translatable="yes">Image Preview (TIFF)</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="epsipreviewcb"> + <property name="label" translatable="yes">Interchange (EPSI)</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label17"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Preview</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="color1rb"> + <property name="label" translatable="yes">Color</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">color2rb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="color2rb"> + <property name="label" translatable="yes">Grayscale</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">color1rb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label18"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Color format</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="level1rb"> + <property name="label" translatable="yes">Level 1</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">level2rb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="level2rb"> + <property name="label" translatable="yes">Level 2</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0.059999998658895493</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">level1rb</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Version</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="EPSCompression"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkRadioButton" id="compresslzw"> + <property name="label" translatable="yes">LZW encoding</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">compressnone</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="compressnone"> + <property name="label" translatable="yes">None</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">compresslzw</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Compression</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="information"> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkLabel" id="estsizeft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="xpad">3</property> + <property name="wrap">True</property> + <property name="max_width_chars">30</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Information</property> + <property name="use_markup">True</property> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">help</action-widget> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> + <object class="GtkListStore" id="liststore1"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">pixels/cm</col> + </row> + <row> + <col id="0" translatable="yes">pixels/inch</col> + </row> + <row> + <col id="0" translatable="yes">pixels/meter</col> + </row> + </data> + </object> + <object class="GtkListStore" id="liststore2"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">inches</col> + </row> + <row> + <col id="0" translatable="yes">cm</col> + </row> + <row> + <col id="0" translatable="yes">mm</col> + </row> + <row> + <col id="0" translatable="yes">points</col> + </row> + <row> + <col id="0" translatable="yes">pixels</col> + </row> + </data> + </object> +</interface> |