summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
committerMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
commit7d5eda2f44bfcbe301bc6dc256f7adeca28503f8 (patch)
tree23a84e8bb0bb9166e45fb2240407f14dfc2c43bf /filter
parent2ce16eb90db1f085513519fa038caf8594863073 (diff)
parentd1e7561aa828518dcbbbf78226877b4d564af2dd (diff)
CWS svxsplit: merge with m71
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx11
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/pdf/impdialog.cxx64
-rw-r--r--filter/source/pdf/impdialog.hrc1
-rw-r--r--filter/source/pdf/impdialog.hxx4
-rw-r--r--filter/source/pdf/impdialog.src13
-rw-r--r--filter/source/pdf/pdffilter.cxx3
7 files changed, 62 insertions, 38 deletions
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 534b7cee312c..f559b6e8d957 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -106,7 +106,7 @@ BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
if ( ( mbStatus = ImplReadHeader() ) == FALSE )
return FALSE;
- if ( mnWidth == 0 || mnHeight == 0 )
+ if ( ( mnMaxVal == 0 ) || ( mnWidth == 0 ) || ( mnHeight == 0 ) )
return FALSE;
// 0->PBM, 1->PGM, 2->PPM
@@ -172,6 +172,7 @@ BOOL PBMReader::ImplReadHeader()
*mpPBM >> nID[ 0 ] >> nID[ 1 ];
if ( nID[ 0 ] != 'P' )
return FALSE;
+ mnMaxVal = mnWidth = mnHeight = 0;
switch ( nID[ 1 ] )
{
case '1' :
@@ -179,6 +180,7 @@ BOOL PBMReader::ImplReadHeader()
case '4' :
mnMode = 0;
nMax = 2; // number of parameters in Header
+ mnMaxVal = 1;
break;
case '2' :
mbRaw = FALSE;
@@ -195,9 +197,6 @@ BOOL PBMReader::ImplReadHeader()
default:
return FALSE;
}
-
- mnMaxVal = mnWidth = mnHeight = 0;
-
while ( bFinished == FALSE )
{
if ( mpPBM->GetError() )
@@ -466,7 +465,9 @@ BOOL PBMReader::ImplReadBody()
if ( nCount == 3 )
{
nCount = 0;
- mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( (BYTE)nRGB[ 0 ], (BYTE)nRGB[ 1 ], (BYTE)nRGB[ 2 ] ) );
+ mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( static_cast< BYTE >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ),
+ static_cast< BYTE >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ),
+ static_cast< BYTE >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) );
nCount = 0;
nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0;
if ( nWidth == mnWidth )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 76e5e7c31873..0b3adee91394 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5174,7 +5174,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
else
{
fNumber = 0.0;
- seqAdjustmentValues[ 0 ].Value <<= fNumber;
+ seqAdjustmentValues[ 1 ].Value <<= fNumber;
seqAdjustmentValues[ 1 ].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
@@ -5310,7 +5310,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
SdrObject::Free( pRet );
pRet = new SdrEdgeObj();
+ ApplyAttributes( rSt, aSet, aObjData );
pRet->SetLogicRect( aObjData.aBoundRect );
+ pRet->SetMergedItemSet(aSet);
// Konnektoren
MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 8f1044cb38b3..a87b71c4c3c2 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -85,7 +85,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbReduceImageResolution( sal_False ),
mnMaxImageResolution( 300 ),
mbUseTaggedPDF( sal_False ),
- mbExportNotesBoth( sal_True ),
+ mbExportNotes( sal_True ),
+ mbExportNotesPages( sal_False ),
mbUseTransitionEffects( sal_False ),
mbIsSkipEmptyPages( sal_True ),
mnFormsType( 0 ),
@@ -189,9 +190,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
mbUseTaggedPDF = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTaggedPDF" ) ), sal_False );
mnPDFTypeSelection = maConfigItem.ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectPdfVersion" ) ), 0 );
if ( mbIsPresentation )
- mbExportNotesBoth = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ), sal_False );
- else
- mbExportNotesBoth = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_True );
+ mbExportNotesPages = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ), sal_False );
+ mbExportNotes = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_False );
mbExportBookmarks = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True );
mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 );
@@ -309,6 +309,14 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
// updating the FilterData sequence and storing FilterData to configuration
if( GetTabPage( RID_PDF_TAB_GENER ) )
( ( ImpPDFTabGeneralPage* )GetTabPage( RID_PDF_TAB_GENER ) )->GetFilterConfigItem( this );
+ if( GetTabPage( RID_PDF_TAB_VPREFER ) )
+ ( ( ImpPDFTabViewerPage* )GetTabPage( RID_PDF_TAB_VPREFER ) )->GetFilterConfigItem( this );
+ if( GetTabPage( RID_PDF_TAB_OPNFTR ) )
+ ( ( ImpPDFTabOpnFtrPage* )GetTabPage( RID_PDF_TAB_OPNFTR ) )->GetFilterConfigItem( this );
+ if( GetTabPage( RID_PDF_TAB_LINKS ) )
+ ( ( ImpPDFTabLinksPage* )GetTabPage( RID_PDF_TAB_LINKS ) )->GetFilterConfigItem( this );
+ if( GetTabPage( RID_PDF_TAB_SECURITY ) )
+ ( ( ImpPDFTabSecurityPage* )GetTabPage( RID_PDF_TAB_SECURITY ) )->GetFilterConfigItem( this );
//prepare the items to be returned
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseLosslessCompression" ) ), mbUseLosslessCompression );
@@ -320,9 +328,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectPdfVersion" ) ), mnPDFTypeSelection );
if ( mbIsPresentation )
- maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ), mbExportNotesBoth );
- else
- maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotesBoth );
+ maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ), mbExportNotesPages );
+ maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotes );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), mbExportBookmarks );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), mbUseTransitionEffects );
@@ -337,12 +344,6 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportFormFields" ) ), mbExportFormFields );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "AllowDuplicateFieldNames" ) ), mbAllowDuplicateFieldNames );
- if( GetTabPage( RID_PDF_TAB_VPREFER ) )
- ( ( ImpPDFTabViewerPage* )GetTabPage( RID_PDF_TAB_VPREFER ) )->GetFilterConfigItem( this );
-
- if( GetTabPage( RID_PDF_TAB_OPNFTR ) )
- ( ( ImpPDFTabOpnFtrPage* )GetTabPage( RID_PDF_TAB_OPNFTR ) )->GetFilterConfigItem( this );
-
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "HideViewerToolbar" ) ), mbHideViewerToolbar );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "HideViewerMenubar" ) ), mbHideViewerMenubar );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "HideViewerWindowControls" ) ), mbHideViewerWindowControls );
@@ -358,17 +359,11 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "FirstPageOnLeft" ) ), mbFirstPageLeft );
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), mnOpenBookmarkLevels );
- if( GetTabPage( RID_PDF_TAB_LINKS ) )
- ( ( ImpPDFTabLinksPage* )GetTabPage( RID_PDF_TAB_LINKS ) )->GetFilterConfigItem( this );
-
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportLinksRelativeFsys" ) ), mbExportRelativeFsysLinks );
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "PDFViewSelection" ) ), mnViewPDFMode );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ConvertOOoTargetToPDFTarget" ) ), mbConvertOOoTargets );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), mbExportBmkToPDFDestination );
- if( GetTabPage( RID_PDF_TAB_SECURITY ) )
- ( ( ImpPDFTabSecurityPage* )GetTabPage( RID_PDF_TAB_SECURITY ) )->GetFilterConfigItem( this );
-
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Printing" ) ), mnPrint );
maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Changes" ) ), mnChangesAllowed );
maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableCopyingOfContent" ) ), mbCanCopyOrExtract );
@@ -449,6 +444,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
+ maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
mbIsPresentation( sal_False ),
@@ -497,9 +493,6 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbExportEmptyPages.Enable( mbIsWriter );
-// SJ: Dont know if there are Notes available also for writer.
-// maCbExportNotes.Enable( paParent->mbIsPresentation );
-
maRbLosslessCompression.SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, ToggleCompressionHdl ) );
const sal_Bool bUseLosslessCompression = paParent->mbUseLosslessCompression;
if ( bUseLosslessCompression )
@@ -546,12 +539,27 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
maCbAllowDuplicateFieldNames.Check( paParent->mbAllowDuplicateFieldNames );
maCbAllowDuplicateFieldNames.Enable( paParent->mbExportFormFields );
+ maCbExportBookmarks.Check( paParent->mbExportBookmarks );
+
+ maCbExportNotes.Check( paParent->mbExportNotes );
+
if ( mbIsPresentation )
- maCbExportNotes.Check( paParent->mbExportNotesBoth );
+ {
+ maCbExportNotesPages.Show( TRUE );
+ maCbExportNotesPages.Check( paParent->mbExportNotesPages );
+ }
else
- maCbExportNotes.Check( paParent->mbExportNotesBoth );
-
- maCbExportBookmarks.Check( paParent->mbExportBookmarks );
+ {
+ long nCheckBoxHeight =
+ maCbExportNotesPages.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height();
+
+ Point aPos = maCbExportEmptyPages.GetPosPixel();
+ maCbExportEmptyPages.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
+ aPos = maCbAddStream.GetPosPixel();
+ maCbAddStream.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
+ maCbExportNotesPages.Show( FALSE );
+ maCbExportNotesPages.Check( FALSE );
+ }
maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages );
@@ -584,7 +592,9 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
paParent->mnQuality = static_cast<sal_Int32>(maNfQuality.GetValue());
paParent->mbReduceImageResolution = maCbReduceImageResolution.IsChecked();
paParent->mnMaxImageResolution = maCoReduceImageResolution.GetText().ToInt32();
- paParent->mbExportNotesBoth = maCbExportNotes.IsChecked();
+ paParent->mbExportNotes = maCbExportNotes.IsChecked();
+ if ( mbIsPresentation )
+ paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked();
paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked();
paParent->mbIsSkipEmptyPages = !maCbExportEmptyPages.IsChecked();
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index 91ff6a662ae3..ad214a752f77 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -88,6 +88,7 @@
#define CB_ADDSTREAM 25
#define CB_PDFA_1B_SELECT 26
+#define CB_EXPORTNOTESPAGES 27
#define FL_OLD_PAGES 51
#define RB_OLD_ALL 52
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 62fe73850254..7dacf4e34c76 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -101,7 +101,8 @@ protected:
sal_Int32 mnMaxImageResolution;
sal_Bool mbUseTaggedPDF;
sal_Int32 mnPDFTypeSelection;
- sal_Bool mbExportNotesBoth;
+ sal_Bool mbExportNotes;
+ sal_Bool mbExportNotesPages;
sal_Bool mbUseTransitionEffects;
sal_Bool mbIsSkipEmptyPages;
sal_Bool mbAddStream;
@@ -201,6 +202,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
CheckBox maCbExportBookmarks;
CheckBox maCbExportNotes;
+ CheckBox maCbExportNotesPages;
CheckBox maCbExportEmptyPages;
CheckBox maCbAddStream;
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index f47a6219c313..b20c5afb0237 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -30,7 +30,7 @@
#include "impdialog.hrc"
-#define TAB_PDF_SIZE Size = MAP_APPFONT ( 176, 239 )
+#define TAB_PDF_SIZE Size = MAP_APPFONT ( 176, 255 )
//string for TabDialog standard buttons
String STR_PDF_EXPORT
{
@@ -217,9 +217,16 @@ TabPage RID_PDF_TAB_GENER
TabStop = TRUE ;
Text[ en-US ] = "~Export comments";
};
- CheckBox CB_EXPORTEMPTYPAGES
+ CheckBox CB_EXPORTNOTESPAGES
{
Pos = MAP_APPFONT ( 12 , 216 ) ;
+ Size = MAP_APPFONT ( 158 , 10 ) ;
+ TabStop = TRUE ;
+ Text[ en-US ] = "Export ~notes pages";
+ };
+ CheckBox CB_EXPORTEMPTYPAGES
+ {
+ Pos = MAP_APPFONT ( 12 , 229 ) ;
Size = MAP_APPFONT ( 158 , 16 ) ;
TabStop = TRUE ;
WordBreak = TRUE ;
@@ -227,7 +234,7 @@ TabPage RID_PDF_TAB_GENER
};
CheckBox CB_ADDSTREAM
{
- Pos = MAP_APPFONT ( 12 , 235 ) ;
+ Pos = MAP_APPFONT ( 12 , 248 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
TabStop = TRUE ;
Text[ en-US ] = "Create ~hybrid file";
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 631b90021ea5..021123ed7eff 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -85,7 +85,8 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
aCfgItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "MaxImageResolution" ) ), 300 );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "UseTaggedPDF" ) ), sal_False );
aCfgItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "SelectPdfVersion" ) ), 0 );
- aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_True );
+ aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), sal_False );
+ aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) ), sal_False );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), sal_True );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), sal_False );
aCfgItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "ExportFormFields" ) ), sal_True );