summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 16:47:42 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 16:47:42 +0100
commit830d8f01a790698dfccb34aafc1dc709e48e2a3d (patch)
tree3c9dc27662551af733927aa99e9992da0d14b5c3
parenta09f0d9897db8fececed6080e88ea944b82b2a43 (diff)
parent848718f6c267a77103c35ef98a2ca866c184af50 (diff)
CWS-TOOLING: integrate CWS printerpullpagesooo/DEV300_m70
-rw-r--r--binfilter/bf_sc/source/core/data/sc_documen2.cxx3
-rw-r--r--filter/source/pdf/impdialog.cxx331
-rw-r--r--filter/source/pdf/impdialog.hxx36
-rw-r--r--filter/source/pdf/pdfdialog.cxx10
-rw-r--r--filter/source/pdf/pdfdialog.hxx22
-rw-r--r--filter/source/pdf/pdfexport.cxx15
6 files changed, 190 insertions, 227 deletions
diff --git a/binfilter/bf_sc/source/core/data/sc_documen2.cxx b/binfilter/bf_sc/source/core/data/sc_documen2.cxx
index b5aa7eeb3..65b6bbadd 100644
--- a/binfilter/bf_sc/source/core/data/sc_documen2.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_documen2.cxx
@@ -67,7 +67,7 @@
//#define _FSYS_HXX ***
//#define _STREAM_HXX ***
#define _CACHESTR_HXX
-#define _SV_MULTISEL_HXX
+//#define _SV_MULTISEL_HXX
@@ -195,7 +195,6 @@
#define _SVDIO_HXX
//#define _SVDLAYER_HXX
#define _SVINCVW_HXX
-#define _SV_MULTISEL_HXX
#define _SVRTV_HXX
#define _SVTABBX_HXX
#define _SVTREEBOX_HXX
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index c8d2c49a4..99e606c67 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -33,15 +33,27 @@
#include "impdialog.hxx"
#include "impdialog.hrc"
-#include <vcl/svapp.hxx>
-#include <vcl/msgbox.hxx>
-#include <sfx2/passwd.hxx>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include "vcl/svapp.hxx"
+#include "vcl/msgbox.hxx"
+#include "sfx2/passwd.hxx"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/drawing/XShapes.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+
+#include <boost/shared_ptr.hpp>
+
+static ResMgr& getPDFFilterResMgr()
+{
+ static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale());
+ return *pRes;
+}
+
+PDFFilterResId::PDFFilterResId( sal_uInt32 nId ) : ResId( nId, getPDFFilterResMgr() )
+{
+}
// ----------------
// - ImpPDFDialog -
@@ -55,12 +67,11 @@ using namespace ::com::sun::star;
// they should be the same in PDFFilter::implExport and in PDFExport::PDFExport
// -----------------------------------------------------------------------------
ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
- ResMgr& rResMgr,
Sequence< PropertyValue >& rFilterData,
const Reference< XComponent >& rxDoc,
const Reference< lang::XMultiServiceFactory >& xFact
) :
- SfxTabDialog( pParent, ResId( RID_PDF_EXPORT_DLG, rResMgr ), 0, FALSE, 0 ),
+ SfxTabDialog( pParent, PDFFilterResId( RID_PDF_EXPORT_DLG ), 0, FALSE, 0 ),
mxMSF( xFact ),
maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/PDF/Export/" ) ), &rFilterData ),
maConfigI18N( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/I18N/CTL/" ) ) ),
@@ -114,7 +125,6 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbExportBmkToPDFDestination( sal_False )
{
FreeResource();
- mprResMgr = &rResMgr;
// check for selection
try
{
@@ -242,7 +252,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
//change text on the Ok button: get the relevant string from resources, update it on the button
//according to the exported pdf file destination: send as e-mail or write to file?
GetOKButton().SetText( ( sOkButtonText.getLength() > 0 ) ?
- sOkButtonText : OUString( String( ResId( STR_PDF_EXPORT, rResMgr ) ) ));
+ sOkButtonText : OUString( String( PDFFilterResId( STR_PDF_EXPORT ) ) ));
//remove the reset button, not needed in this tabbed dialog
RemoveResetButton();
@@ -407,45 +417,44 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
// -----------------------------------------------------------------------------
ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_GENER, *paResMgr ), rCoreSet ),
-
- maFlPages( this, ResId( FL_PAGES, *paResMgr ) ),
- maRbAll( this, ResId( RB_ALL, *paResMgr) ),
- maRbRange( this, ResId( RB_RANGE, *paResMgr ) ),
- maRbSelection( this, ResId( RB_SELECTION, *paResMgr ) ),
- maEdPages( this, ResId( ED_PAGES, *paResMgr ) ),
-
- maFlCompression( this, ResId( FL_IMAGES, *paResMgr ) ),
- maRbLosslessCompression( this, ResId( RB_LOSSLESSCOMPRESSION, *paResMgr ) ),
- maRbJPEGCompression( this, ResId( RB_JPEGCOMPRESSION, *paResMgr ) ),
- maFtQuality( this, ResId( FT_QUALITY, *paResMgr ) ),
- maNfQuality( this, ResId( NF_QUALITY, *paResMgr ) ),
- maCbReduceImageResolution( this, ResId( CB_REDUCEIMAGERESOLUTION, *paResMgr ) ),
- maCoReduceImageResolution( this, ResId( CO_REDUCEIMAGERESOLUTION, *paResMgr ) ),
-
- maFlGeneral( this, ResId( FL_GENERAL, *paResMgr ) ),
- maCbPDFA1b( this, ResId( CB_PDFA_1B_SELECT, *paResMgr ) ),
-
- maCbTaggedPDF( this, ResId( CB_TAGGEDPDF, *paResMgr ) ),
+ const SfxItemSet& rCoreSet
+ ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_GENER ), rCoreSet ),
+
+ maFlPages( this, PDFFilterResId( FL_PAGES ) ),
+ maRbAll( this, PDFFilterResId( RB_ALL ) ),
+ maRbRange( this, PDFFilterResId( RB_RANGE ) ),
+ maRbSelection( this, PDFFilterResId( RB_SELECTION ) ),
+ maEdPages( this, PDFFilterResId( ED_PAGES ) ),
+
+ maFlCompression( this, PDFFilterResId( FL_IMAGES ) ),
+ maRbLosslessCompression( this, PDFFilterResId( RB_LOSSLESSCOMPRESSION ) ),
+ maRbJPEGCompression( this, PDFFilterResId( RB_JPEGCOMPRESSION ) ),
+ maFtQuality( this, PDFFilterResId( FT_QUALITY ) ),
+ maNfQuality( this, PDFFilterResId( NF_QUALITY ) ),
+ maCbReduceImageResolution( this, PDFFilterResId( CB_REDUCEIMAGERESOLUTION ) ),
+ maCoReduceImageResolution( this, PDFFilterResId( CO_REDUCEIMAGERESOLUTION ) ),
+
+ maFlGeneral( this, PDFFilterResId( FL_GENERAL ) ),
+ maCbPDFA1b( this, PDFFilterResId( CB_PDFA_1B_SELECT ) ),
+
+ maCbTaggedPDF( this, PDFFilterResId( CB_TAGGEDPDF ) ),
mbTaggedPDFUserSelection( sal_False ),
- maCbExportFormFields( this, ResId( CB_EXPORTFORMFIELDS, *paResMgr ) ),
+ maCbExportFormFields( this, PDFFilterResId( CB_EXPORTFORMFIELDS ) ),
mbExportFormFieldsUserSelection( sal_False ),
- maFtFormsFormat( this, ResId( FT_FORMSFORMAT, *paResMgr ) ),
- maLbFormsFormat( this, ResId( LB_FORMSFORMAT, *paResMgr ) ),
- maCbAllowDuplicateFieldNames( this, ResId( CB_ALLOWDUPLICATEFIELDNAMES, *paResMgr ) ),
-
- maCbExportBookmarks( this, ResId( CB_EXPORTBOOKMARKS, *paResMgr ) ),
- maCbExportNotes( this, ResId( CB_EXPORTNOTES, *paResMgr ) ),
- maCbExportEmptyPages( this, ResId( CB_EXPORTEMPTYPAGES, *paResMgr ) ),
- maCbAddStream( this, ResId( CB_ADDSTREAM, *paResMgr ) ),
+ maFtFormsFormat( this, PDFFilterResId( FT_FORMSFORMAT ) ),
+ maLbFormsFormat( this, PDFFilterResId( LB_FORMSFORMAT ) ),
+ maCbAllowDuplicateFieldNames( this, PDFFilterResId( CB_ALLOWDUPLICATEFIELDNAMES ) ),
+
+ maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
+ maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
+ maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
+ maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
mbIsPresentation( sal_False ),
mbIsWriter( sal_False),
mpaParent( 0 )
{
- mpaResMgr = paResMgr;
FreeResource();
// pb: #i91991# maCbExportEmptyPages double-spaced if necessary
@@ -465,7 +474,6 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabGeneralPage::~ImpPDFTabGeneralPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
@@ -618,9 +626,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
SfxTabPage* ImpPDFTabGeneralPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabGeneralPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabGeneralPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -719,34 +725,32 @@ IMPL_LINK( ImpPDFTabGeneralPage, ToggleExportPDFAHdl, void*, EMPTYARG )
// the option features tab page
// -----------------------------------------------------------------------------
ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_OPNFTR, *paResMgr ), rCoreSet ),
-
- maFlInitialView( this, ResId( FL_INITVIEW, *paResMgr ) ),
- maRbOpnPageOnly( this, ResId( RB_OPNMODE_PAGEONLY, *paResMgr ) ),
- maRbOpnOutline( this, ResId( RB_OPNMODE_OUTLINE, *paResMgr ) ),
- maRbOpnThumbs( this, ResId( RB_OPNMODE_THUMBS, *paResMgr ) ),
- maFtInitialPage( this, ResId( FT_MAGNF_INITIAL_PAGE, *paResMgr ) ),
- maNumInitialPage( this, ResId( NUM_MAGNF_INITIAL_PAGE, *paResMgr ) ),
-
- maFlMagnification( this, ResId( FL_MAGNIFICATION, *paResMgr ) ),
- maRbMagnDefault( this, ResId( RB_MAGNF_DEFAULT, *paResMgr ) ),
- maRbMagnFitWin( this, ResId( RB_MAGNF_WIND, *paResMgr ) ),
- maRbMagnFitWidth( this, ResId( RB_MAGNF_WIDTH, *paResMgr ) ),
- maRbMagnFitVisible( this, ResId( RB_MAGNF_VISIBLE, *paResMgr ) ),
- maRbMagnZoom( this, ResId( RB_MAGNF_ZOOM, *paResMgr ) ),
- maNumZoom( this, ResId( NUM_MAGNF_ZOOM, *paResMgr ) ),
-
- maFlPageLayout( this, ResId( FL_PAGE_LAYOUT, *paResMgr ) ),
- maRbPgLyDefault( this, ResId( RB_PGLY_DEFAULT, *paResMgr ) ),
- maRbPgLySinglePage( this, ResId( RB_PGLY_SINGPG, *paResMgr ) ),
- maRbPgLyContinue( this, ResId( RB_PGLY_CONT, *paResMgr ) ),
- maRbPgLyContinueFacing( this, ResId( RB_PGLY_CONTFAC, *paResMgr ) ),
- maCbPgLyFirstOnLeft( this, ResId( CB_PGLY_FIRSTLEFT, *paResMgr ) ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_OPNFTR ), rCoreSet ),
+
+ maFlInitialView( this, PDFFilterResId( FL_INITVIEW ) ),
+ maRbOpnPageOnly( this, PDFFilterResId( RB_OPNMODE_PAGEONLY ) ),
+ maRbOpnOutline( this, PDFFilterResId( RB_OPNMODE_OUTLINE ) ),
+ maRbOpnThumbs( this, PDFFilterResId( RB_OPNMODE_THUMBS ) ),
+ maFtInitialPage( this, PDFFilterResId( FT_MAGNF_INITIAL_PAGE ) ),
+ maNumInitialPage( this, PDFFilterResId( NUM_MAGNF_INITIAL_PAGE ) ),
+
+ maFlMagnification( this, PDFFilterResId( FL_MAGNIFICATION ) ),
+ maRbMagnDefault( this, PDFFilterResId( RB_MAGNF_DEFAULT ) ),
+ maRbMagnFitWin( this, PDFFilterResId( RB_MAGNF_WIND ) ),
+ maRbMagnFitWidth( this, PDFFilterResId( RB_MAGNF_WIDTH ) ),
+ maRbMagnFitVisible( this, PDFFilterResId( RB_MAGNF_VISIBLE ) ),
+ maRbMagnZoom( this, PDFFilterResId( RB_MAGNF_ZOOM ) ),
+ maNumZoom( this, PDFFilterResId( NUM_MAGNF_ZOOM ) ),
+
+ maFlPageLayout( this, PDFFilterResId( FL_PAGE_LAYOUT ) ),
+ maRbPgLyDefault( this, PDFFilterResId( RB_PGLY_DEFAULT ) ),
+ maRbPgLySinglePage( this, PDFFilterResId( RB_PGLY_SINGPG ) ),
+ maRbPgLyContinue( this, PDFFilterResId( RB_PGLY_CONT ) ),
+ maRbPgLyContinueFacing( this, PDFFilterResId( RB_PGLY_CONTFAC ) ),
+ maCbPgLyFirstOnLeft( this, PDFFilterResId( CB_PGLY_FIRSTLEFT ) ),
mbUseCTLFont( sal_False )
{
- mpaResMgr = paResMgr;
FreeResource();
maRbMagnDefault.SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
@@ -759,16 +763,13 @@ ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabOpnFtrPage::~ImpPDFTabOpnFtrPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabOpnFtrPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabOpnFtrPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabOpnFtrPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -896,29 +897,27 @@ IMPL_LINK( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, void*, )
// The Viewer preferences tab page
// -----------------------------------------------------------------------------
ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr* paResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_VPREFER, *paResMgr ), rCoreSet ),
-
- maFlWindowOptions( this, ResId( FL_WINOPT, *paResMgr ) ),
- maCbResWinInit( this, ResId( CB_WNDOPT_RESINIT, *paResMgr ) ),
- maCbCenterWindow( this, ResId( CB_WNDOPT_CNTRWIN, *paResMgr ) ),
- maCbOpenFullScreen( this, ResId( CB_WNDOPT_OPNFULL, *paResMgr ) ),
- maCbDispDocTitle( this, ResId( CB_DISPDOCTITLE, *paResMgr ) ),
-
- maFlUIOptions( this, ResId( FL_USRIFOPT, *paResMgr ) ),
- maCbHideViewerMenubar( this, ResId( CB_UOP_HIDEVMENUBAR, *paResMgr ) ),
- maCbHideViewerToolbar( this, ResId( CB_UOP_HIDEVTOOLBAR, *paResMgr ) ),
- maCbHideViewerWindowControls( this, ResId( CB_UOP_HIDEVWINCTRL, *paResMgr ) ),
- maFlTransitions( this, ResId( FL_TRANSITIONS, *paResMgr ) ),
- maCbTransitionEffects( this, ResId( CB_TRANSITIONEFFECTS, *paResMgr ) ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_VPREFER ), rCoreSet ),
+
+ maFlWindowOptions( this, PDFFilterResId( FL_WINOPT ) ),
+ maCbResWinInit( this, PDFFilterResId( CB_WNDOPT_RESINIT ) ),
+ maCbCenterWindow( this, PDFFilterResId( CB_WNDOPT_CNTRWIN ) ),
+ maCbOpenFullScreen( this, PDFFilterResId( CB_WNDOPT_OPNFULL ) ),
+ maCbDispDocTitle( this, PDFFilterResId( CB_DISPDOCTITLE ) ),
+
+ maFlUIOptions( this, PDFFilterResId( FL_USRIFOPT ) ),
+ maCbHideViewerMenubar( this, PDFFilterResId( CB_UOP_HIDEVMENUBAR ) ),
+ maCbHideViewerToolbar( this, PDFFilterResId( CB_UOP_HIDEVTOOLBAR ) ),
+ maCbHideViewerWindowControls( this, PDFFilterResId( CB_UOP_HIDEVWINCTRL ) ),
+ maFlTransitions( this, PDFFilterResId( FL_TRANSITIONS ) ),
+ maCbTransitionEffects( this, PDFFilterResId( CB_TRANSITIONEFFECTS ) ),
mbIsPresentation( sal_True ),
- maFlBookmarks( this, ResId( FL_BOOKMARKS, *paResMgr ) ),
- maRbAllBookmarkLevels( this, ResId( RB_ALLBOOKMARKLEVELS, *paResMgr ) ),
- maRbVisibleBookmarkLevels( this, ResId( RB_VISIBLEBOOKMARKLEVELS, *paResMgr ) ),
- maNumBookmarkLevels( this, ResId( NUM_BOOKMARKLEVELS, *paResMgr ) )
+ maFlBookmarks( this, PDFFilterResId( FL_BOOKMARKS ) ),
+ maRbAllBookmarkLevels( this, PDFFilterResId( RB_ALLBOOKMARKLEVELS ) ),
+ maRbVisibleBookmarkLevels( this, PDFFilterResId( RB_VISIBLEBOOKMARKLEVELS ) ),
+ maNumBookmarkLevels( this, PDFFilterResId( NUM_BOOKMARKLEVELS ) )
{
- mpaResMgr = paResMgr;
FreeResource();
maRbAllBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) );
maRbVisibleBookmarkLevels.SetToggleHdl( LINK( this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl ) );
@@ -927,7 +926,6 @@ ImpPDFTabViewerPage::ImpPDFTabViewerPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabViewerPage::~ImpPDFTabViewerPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
@@ -940,9 +938,7 @@ IMPL_LINK( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, void*, )
SfxTabPage* ImpPDFTabViewerPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabViewerPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabViewerPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -991,51 +987,48 @@ void ImpPDFTabViewerPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
// The Security preferences tab page
// -----------------------------------------------------------------------------
ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent,
- const SfxItemSet& i_rCoreSet,
- ResMgr* i_pResMgr ) :
- SfxTabPage( i_pParent, ResId( RID_PDF_TAB_SECURITY, *i_pResMgr ), i_rCoreSet ),
- maPbUserPwd( this, ResId( BTN_USER_PWD, *i_pResMgr ) ),
- maFtUserPwd( this, ResId( FT_USER_PWD, *i_pResMgr ) ),
- maUserPwdSet( ResId( STR_USER_PWD_SET, *i_pResMgr ) ),
- maUserPwdUnset( ResId( STR_USER_PWD_UNSET, *i_pResMgr ) ),
-
- maPbOwnerPwd( this, ResId( BTN_OWNER_PWD, *i_pResMgr ) ),
- maFtOwnerPwd( this, ResId( FT_OWNER_PWD, *i_pResMgr ) ),
- maOwnerPwdSet( ResId( STR_OWNER_PWD_SET, *i_pResMgr ) ),
- maOwnerPwdUnset( ResId( STR_OWNER_PWD_UNSET, *i_pResMgr ) ),
-
- maFlPrintPermissions( this, ResId( FL_PRINT_PERMISSIONS , *i_pResMgr ) ),
- maRbPrintNone( this, ResId( RB_PRINT_NONE, *i_pResMgr ) ),
- maRbPrintLowRes( this, ResId( RB_PRINT_LOWRES , *i_pResMgr ) ),
- maRbPrintHighRes( this, ResId( RB_PRINT_HIGHRES , *i_pResMgr ) ),
-
- maFlChangesAllowed( this, ResId( FL_CHANGES_ALLOWED , *i_pResMgr ) ),
- maRbChangesNone( this, ResId( RB_CHANGES_NONE , *i_pResMgr ) ),
- maRbChangesInsDel( this, ResId( RB_CHANGES_INSDEL , *i_pResMgr ) ),
- maRbChangesFillForm( this, ResId( RB_CHANGES_FILLFORM , *i_pResMgr ) ),
- maRbChangesComment( this, ResId( RB_CHANGES_COMMENT , *i_pResMgr ) ),
- maRbChangesAnyNoCopy( this, ResId( RB_CHANGES_ANY_NOCOPY , *i_pResMgr ) ),
-
- maCbEnableCopy( this, ResId( CB_ENDAB_COPY , *i_pResMgr ) ),
- maCbEnableAccessibility( this, ResId( CB_ENAB_ACCESS , *i_pResMgr ) ),
-
- msUserPwdTitle( ResId( STR_PDF_EXPORT_UDPWD, *i_pResMgr ) ),
-
- msOwnerPwdTitle( ResId( STR_PDF_EXPORT_ODPWD, *i_pResMgr ) )
+ const SfxItemSet& i_rCoreSet ) :
+ SfxTabPage( i_pParent, PDFFilterResId( RID_PDF_TAB_SECURITY ), i_rCoreSet ),
+ maPbUserPwd( this, PDFFilterResId( BTN_USER_PWD ) ),
+ maFtUserPwd( this, PDFFilterResId( FT_USER_PWD ) ),
+ maUserPwdSet( PDFFilterResId( STR_USER_PWD_SET ) ),
+ maUserPwdUnset( PDFFilterResId( STR_USER_PWD_UNSET ) ),
+
+ maPbOwnerPwd( this, PDFFilterResId( BTN_OWNER_PWD ) ),
+ maFtOwnerPwd( this, PDFFilterResId( FT_OWNER_PWD ) ),
+ maOwnerPwdSet( PDFFilterResId( STR_OWNER_PWD_SET ) ),
+ maOwnerPwdUnset( PDFFilterResId( STR_OWNER_PWD_UNSET ) ),
+
+ maFlPrintPermissions( this, PDFFilterResId( FL_PRINT_PERMISSIONS ) ),
+ maRbPrintNone( this, PDFFilterResId( RB_PRINT_NONE ) ),
+ maRbPrintLowRes( this, PDFFilterResId( RB_PRINT_LOWRES ) ),
+ maRbPrintHighRes( this, PDFFilterResId( RB_PRINT_HIGHRES ) ),
+
+ maFlChangesAllowed( this, PDFFilterResId( FL_CHANGES_ALLOWED ) ),
+ maRbChangesNone( this, PDFFilterResId( RB_CHANGES_NONE ) ),
+ maRbChangesInsDel( this, PDFFilterResId( RB_CHANGES_INSDEL ) ),
+ maRbChangesFillForm( this, PDFFilterResId( RB_CHANGES_FILLFORM ) ),
+ maRbChangesComment( this, PDFFilterResId( RB_CHANGES_COMMENT ) ),
+ maRbChangesAnyNoCopy( this, PDFFilterResId( RB_CHANGES_ANY_NOCOPY ) ),
+
+ maCbEnableCopy( this, PDFFilterResId( CB_ENDAB_COPY ) ),
+ maCbEnableAccessibility( this, PDFFilterResId( CB_ENAB_ACCESS ) ),
+
+ msUserPwdTitle( PDFFilterResId( STR_PDF_EXPORT_UDPWD ) ),
+
+ msOwnerPwdTitle( PDFFilterResId( STR_PDF_EXPORT_ODPWD ) )
{
- mpaResMgr = i_pResMgr;
-
maUserPwdSet.Append( sal_Unicode( '\n' ) );
- maUserPwdSet.Append( String( ResId( STR_USER_PWD_ENC, *i_pResMgr ) ) );
+ maUserPwdSet.Append( String( PDFFilterResId( STR_USER_PWD_ENC ) ) );
maUserPwdUnset.Append( sal_Unicode( '\n' ) );
- maUserPwdUnset.Append( String( ResId( STR_USER_PWD_UNENC, *i_pResMgr ) ) );
+ maUserPwdUnset.Append( String( PDFFilterResId( STR_USER_PWD_UNENC ) ) );
maOwnerPwdSet.Append( sal_Unicode( '\n' ) );
- maOwnerPwdSet.Append( String( ResId( STR_OWNER_PWD_REST, *i_pResMgr ) ) );
+ maOwnerPwdSet.Append( String( PDFFilterResId( STR_OWNER_PWD_REST ) ) );
maOwnerPwdUnset.Append( sal_Unicode( '\n' ) );
- maOwnerPwdUnset.Append( String( ResId( STR_OWNER_PWD_UNREST, *i_pResMgr ) ) );
+ maOwnerPwdUnset.Append( String( PDFFilterResId( STR_OWNER_PWD_UNREST ) ) );
FreeResource();
@@ -1065,16 +1058,13 @@ ImpPDFTabSecurityPage::ImpPDFTabSecurityPage( Window* i_pParent,
// -----------------------------------------------------------------------------
ImpPDFTabSecurityPage::~ImpPDFTabSecurityPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabSecurityPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabSecurityPage( pParent, rAttrSet, paResMgr ) );
+ return ( new ImpPDFTabSecurityPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -1238,23 +1228,21 @@ void ImpPDFTabSecurityPage::ImplPDFASecurityControl( sal_Bool bEnableSecurity
// The link preferences tab page (relative and other stuff)
// -----------------------------------------------------------------------------
ImpPDFTabLinksPage::ImpPDFTabLinksPage( Window* pParent,
- const SfxItemSet& rCoreSet,
- ResMgr& rResMgr ) :
- SfxTabPage( pParent, ResId( RID_PDF_TAB_LINKS, rResMgr ), rCoreSet ),
+ const SfxItemSet& rCoreSet ) :
+ SfxTabPage( pParent, PDFFilterResId( RID_PDF_TAB_LINKS ), rCoreSet ),
- maCbExprtBmkrToNmDst( this, ResId( CB_EXP_BMRK_TO_DEST , rResMgr ) ),
- maCbOOoToPDFTargets( this, ResId( CB_CNV_OOO_DOCTOPDF , rResMgr ) ),
- maCbExportRelativeFsysLinks( this, ResId( CB_ENAB_RELLINKFSYS , rResMgr ) ),
+ maCbExprtBmkrToNmDst( this, PDFFilterResId( CB_EXP_BMRK_TO_DEST ) ),
+ maCbOOoToPDFTargets( this, PDFFilterResId( CB_CNV_OOO_DOCTOPDF ) ),
+ maCbExportRelativeFsysLinks( this, PDFFilterResId( CB_ENAB_RELLINKFSYS ) ),
- maFlDefaultTitle( this, ResId( FL_DEFAULT_LINK_ACTION , rResMgr ) ),
- maRbOpnLnksDefault( this, ResId( CB_VIEW_PDF_DEFAULT , rResMgr ) ),
+ maFlDefaultTitle( this, PDFFilterResId( FL_DEFAULT_LINK_ACTION ) ),
+ maRbOpnLnksDefault( this, PDFFilterResId( CB_VIEW_PDF_DEFAULT ) ),
mbOpnLnksDefaultUserState( sal_False ),
- maRbOpnLnksLaunch( this, ResId( CB_VIEW_PDF_APPLICATION , rResMgr ) ),
+ maRbOpnLnksLaunch( this, PDFFilterResId( CB_VIEW_PDF_APPLICATION ) ),
mbOpnLnksLaunchUserState( sal_False ),
- maRbOpnLnksBrowser( this, ResId( CB_VIEW_PDF_BROWSER , rResMgr ) ),
+ maRbOpnLnksBrowser( this, PDFFilterResId( CB_VIEW_PDF_BROWSER ) ),
mbOpnLnksBrowserUserState( sal_False )
{
- mpaResMgr = &rResMgr;
FreeResource();
// pb: #i91991# checkboxes only double-spaced if necessary
@@ -1311,16 +1299,13 @@ ImpPDFTabLinksPage::ImpPDFTabLinksPage( Window* pParent,
// -----------------------------------------------------------------------------
ImpPDFTabLinksPage::~ImpPDFTabLinksPage()
{
- delete mpaResMgr;
}
// -----------------------------------------------------------------------------
SfxTabPage* ImpPDFTabLinksPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr * paResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- return ( new ImpPDFTabLinksPage( pParent, rAttrSet, *paResMgr ) );
+ return ( new ImpPDFTabLinksPage( pParent, rAttrSet ) );
}
// -----------------------------------------------------------------------------
@@ -1436,18 +1421,18 @@ IMPL_LINK( ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, void*, EMPTYARG )
return 0;
}
-ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& rErrors, ResMgr& rResMgr ) :
- ModalDialog( NULL, ResId( RID_PDF_ERROR_DLG, rResMgr ) ),
+ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& rErrors ) :
+ ModalDialog( NULL, PDFFilterResId( RID_PDF_ERROR_DLG ) ),
maFI( this, 0 ),
- maProcessText( this, ResId( FT_PROCESS, rResMgr ) ),
+ maProcessText( this, PDFFilterResId( FT_PROCESS ) ),
maErrors( this, WB_BORDER | WB_AUTOVSCROLL ),
maExplanation( this, WB_WORDBREAK ),
maButton( this, WB_DEFBUTTON )
{
// load images
- Image aWarnImg = Image ( BitmapEx( ResId( IMG_WARN, rResMgr ) ) );
- Image aErrImg= Image ( BitmapEx( ResId( IMG_ERR, rResMgr ) ) );
+ Image aWarnImg( BitmapEx( PDFFilterResId( IMG_WARN ) ) );
+ Image aErrImg( BitmapEx( PDFFilterResId( IMG_ERR ) ) );
for( std::set<vcl::PDFWriter::ErrorCode>::const_iterator it = rErrors.begin();
it != rErrors.end(); ++it )
@@ -1456,30 +1441,30 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
{
case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_PDFA_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_PDFA, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_VERSION_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_VERSION, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) );
}
break;
case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_FORMACTION_PDFA_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_FORMACTION_PDFA, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) );
}
break;
case vcl::PDFWriter::Warning_Transparency_Converted:
{
- USHORT nPos = maErrors.InsertEntry( String( ResId( STR_WARN_TRANSP_CONVERTED_SHORT, rResMgr ) ),
+ USHORT nPos = maErrors.InsertEntry( String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
aWarnImg );
- maErrors.SetEntryData( nPos, new String( ResId( STR_WARN_TRANSP_CONVERTED, rResMgr ) ) );
+ maErrors.SetEntryData( nPos, new String( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
}
break;
default:
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 51e2eb81e..e99511888 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -57,6 +57,12 @@ class ImpPDFTabViewerPage;
class ImpPDFTabOpnFtrPage;
class ImpPDFTabLinksPage;
+class PDFFilterResId : public ResId
+{
+public:
+ PDFFilterResId( sal_uInt32 nId );
+};
+
class ImplErrorDialog : public ModalDialog
{
FixedImage maFI;
@@ -68,7 +74,7 @@ class ImplErrorDialog : public ModalDialog
DECL_LINK( SelectHdl, ListBox* );
public:
- ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >&, ResMgr& rResMgr );
+ ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& );
~ImplErrorDialog();
};
@@ -84,8 +90,6 @@ private:
Any maSelection;
protected:
-
- ResMgr* mprResMgr;
//the following data are the configuration used throughout the dialog and pages
sal_Bool mbIsPresentation;
sal_Bool mbIsWriter;
@@ -149,7 +153,7 @@ public:
friend class ImpPDFTabSecurityPage;
friend class ImpPDFTabLinksPage;
- ImpPDFTabDialog( Window* pParent, ResMgr& rResMgr,
+ ImpPDFTabDialog( Window* pParent,
Sequence< PropertyValue >& rFilterData,
const Reference< XComponent >& rDoc,
const Reference< lang::XMultiServiceFactory >& xFact
@@ -204,8 +208,6 @@ class ImpPDFTabGeneralPage : public SfxTabPage
sal_Bool mbIsPresentation;
sal_Bool mbIsWriter;
- ResMgr* mpaResMgr;
-
const ImpPDFTabDialog* mpaParent;
DECL_LINK( TogglePagesHdl, void* );
@@ -218,8 +220,7 @@ public:
DECL_LINK( ToggleExportPDFAHdl, void* );
ImpPDFTabGeneralPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabGeneralPage();
static SfxTabPage* Create( Window* pParent,
@@ -256,15 +257,13 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage
CheckBox maCbPgLyFirstOnLeft;
sal_Bool mbUseCTLFont;
- ResMgr* mpaResMgr;
DECL_LINK( ToggleRbPgLyContinueFacingHdl, void* );
DECL_LINK( ToggleRbMagnHdl, void* );
public:
ImpPDFTabOpnFtrPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabOpnFtrPage();
static SfxTabPage* Create( Window* pParent,
@@ -297,13 +296,10 @@ class ImpPDFTabViewerPage : public SfxTabPage
RadioButton maRbVisibleBookmarkLevels;
NumericField maNumBookmarkLevels;
- ResMgr* mpaResMgr;
-
DECL_LINK( ToggleRbBookmarksHdl, void* );
public:
ImpPDFTabViewerPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabViewerPage();
static SfxTabPage* Create( Window* pParent,
@@ -347,8 +343,6 @@ class ImpPDFTabSecurityPage : public SfxTabPage
String msOwnerPassword;
String msOwnerPwdTitle;
- ResMgr* mpaResMgr;
-
long nWidth;
DECL_LINK( ClickmaPbUserPwdHdl, void* );
@@ -360,8 +354,7 @@ class ImpPDFTabSecurityPage : public SfxTabPage
public:
ImpPDFTabSecurityPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr* paResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabSecurityPage();
static SfxTabPage* Create( Window* pParent,
@@ -387,8 +380,6 @@ class ImpPDFTabLinksPage : public SfxTabPage
RadioButton maRbOpnLnksBrowser;
sal_Bool mbOpnLnksBrowserUserState;
- ResMgr* mpaResMgr;
-
long nWidth;
DECL_LINK( ClickRbOpnLnksDefaultHdl, void* );
@@ -396,8 +387,7 @@ class ImpPDFTabLinksPage : public SfxTabPage
public:
ImpPDFTabLinksPage( Window* pParent,
- const SfxItemSet& rSet,
- ResMgr& rResMgr );
+ const SfxItemSet& rSet );
~ImpPDFTabLinksPage();
static SfxTabPage* Create( Window* pParent,
diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx
index 0adf8b598..d3ea3423f 100644
--- a/filter/source/pdf/pdfdialog.cxx
+++ b/filter/source/pdf/pdfdialog.cxx
@@ -45,8 +45,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
-//uncomment this to use the Tabbed PDF dialog (under development !)
-
// -----------------------
// - PDFDialog functions -
// -----------------------
@@ -100,16 +98,12 @@ Reference< XInterface > SAL_CALL PDFDialog_createInstance( const Reference< XMul
PDFDialog::PDFDialog( const Reference< XMultiServiceFactory > &rxMSF )
: PDFDialog_Base( rxMSF )
{
- ByteString aResMgrName( "pdffilter" );
-
- mpResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
}
// -----------------------------------------------------------------------------
PDFDialog::~PDFDialog()
{
- delete mpResMgr;
}
// -----------------------------------------------------------------------------
@@ -142,9 +136,9 @@ Dialog* PDFDialog::createDialog( Window* pParent )
{
Dialog* pRet = NULL;
- if( mpResMgr && mxSrcDoc.is() )
+ if( mxSrcDoc.is() )
{
- ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, *mpResMgr, maFilterData, mxSrcDoc, m_aContext.getLegacyServiceFactory() );
+ ImpPDFTabDialog* pDlg = new ImpPDFTabDialog( pParent, maFilterData, mxSrcDoc, m_aContext.getLegacyServiceFactory() );
pRet = pDlg;
}
diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx
index fc6acdda1..aed8c8ab7 100644
--- a/filter/source/pdf/pdfdialog.hxx
+++ b/filter/source/pdf/pdfdialog.hxx
@@ -34,7 +34,7 @@
#include "pdffilter.hxx"
#include <svtools/genericunodialog.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase2.hxx>
// -------------
// - PDFDialog -
@@ -43,19 +43,17 @@
class Window;
class ResMgr;
-typedef ::svt::OGenericUnoDialog PDFDialog_DialogBase;
-typedef ::cppu::ImplInheritanceHelper2 <
- PDFDialog_DialogBase,
- XPropertyAccess,
- XExporter
- > PDFDialog_Base;
-
-class PDFDialog : public PDFDialog_Base,
- public ::comphelper::OPropertyArrayUsageHelper< PDFDialog >
+typedef ::svt::OGenericUnoDialog PDFDialog_DialogBase;
+typedef ::cppu::ImplInheritanceHelper2 <
+ PDFDialog_DialogBase,
+ XPropertyAccess,
+ XExporter
+ > PDFDialog_Base;
+
+class PDFDialog : public PDFDialog_Base,
+ public ::comphelper::OPropertyArrayUsageHelper< PDFDialog >
{
private:
-
- ResMgr* mpResMgr;
Sequence< PropertyValue > maMediaDescriptor;
Sequence< PropertyValue > maFilterData;
Reference< XComponent > mxSrcDoc;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 79d2afa5e..f189ce71c 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -895,7 +895,10 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
}
}
- bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aMultiSelection, aRenderOptions, nPageCount );
+ if( nPageCount > 0 )
+ bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aMultiSelection, aRenderOptions, nPageCount );
+ else
+ bRet = FALSE;
if ( bRet && bSecondPassForImpressNotes )
{
@@ -944,14 +947,8 @@ void PDFExport::showErrors( const std::set< PDFWriter::ErrorCode >& rErrors )
{
if( ! rErrors.empty() )
{
- ByteString aResMgrName( "pdffilter" );
- ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
- if ( pResMgr )
- {
- ImplErrorDialog aDlg( rErrors, *pResMgr );
- aDlg.Execute();
- delete pResMgr;
- }
+ ImplErrorDialog aDlg( rErrors );
+ aDlg.Execute();
}
}