[Libreoffice-commits] .: 4 commits - filter/source sc/source sd/source vcl/inc vcl/source

Pierre-André Jacquod pjacquod at kemper.freedesktop.org
Wed Dec 28 12:46:59 PST 2011


 filter/source/pdf/impdialog.cxx     |   13 
 filter/source/pdf/impdialog.hrc     |    1 
 filter/source/pdf/impdialog.hxx     |    2 
 filter/source/pdf/impdialog.src     |   12 
 filter/source/pdf/pdfexport.cxx     |    4 
 filter/source/pdf/pdfexport.hxx     |    1 
 filter/source/pdf/pdffilter.cxx     |    1 
 sc/source/core/tool/dbdata.cxx      |    6 
 sc/source/ui/unoobj/cursuno.cxx     |    2 
 sc/source/ui/vba/vbarange.cxx       |    2 
 sd/source/ui/unoidl/unomodel.cxx    |  498 ++++++++++++++++++------------------
 vcl/inc/vcl/pdfextoutdevdata.hxx    |    4 
 vcl/source/gdi/pdfextoutdevdata.cxx |    9 
 13 files changed, 300 insertions(+), 255 deletions(-)

New commits:
commit 7da3f1bad5f7791756f8450391d94ba78b3d10cc
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Sat Dec 24 00:16:59 2011 +0100

    option to export hidden slides to pdf files
    
    This add the checkbox hidden pages to the PDF export general tab
    and if checked, export also to PDF the hidden slides

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 2f0682c..b10bf68 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
     mbExportFormFields( sal_True ),
     mbAllowDuplicateFieldNames( sal_False ),
     mbExportBookmarks( sal_True ),
+    mbExportHiddenSlides ( sal_False),
     mnOpenBookmarkLevels( -1 ),
 
     mbHideViewerToolbar( sal_False ),
@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
     mbExportNotes = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes"  ) ), sal_False );
 
     mbExportBookmarks = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True );
+    if ( mbIsPresentation )
+        mbExportHiddenSlides = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), sal_False );
     mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 );
     mbUseTransitionEffects = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects"  ) ), sal_True );
     mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages"  ) ), sal_False );
@@ -341,6 +344,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ) ), mbExportNotes );
 
     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), mbExportBookmarks );
+    if ( mbIsPresentation )
+        maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), mbExportHiddenSlides );
     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ) ), mbUseTransitionEffects );
     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) ), mbIsSkipEmptyPages );
     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAddStream" ) ), mbAddStream );
@@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
     maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
     maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
     maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
+    maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
     maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
     maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
     maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) ),
@@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
     {
         maCbExportNotesPages.Show( sal_True );
         maCbExportNotesPages.Check( paParent->mbExportNotesPages );
+        maCbExportHiddenSlides.Show( sal_True);
+        maCbExportHiddenSlides.Check( paParent->mbExportHiddenSlides );
+
     }
     else
     {
@@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent
         maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - nCheckBoxHeight ) );
         maCbExportNotesPages.Show( sal_False );
         maCbExportNotesPages.Check( sal_False );
+        maCbExportHiddenSlides.Show( sal_False);
+        maCbExportHiddenSlides.Check( sal_False );
     }
 
     maCbExportEmptyPages.Check( !paParent->mbIsSkipEmptyPages );
@@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
     if ( mbIsPresentation )
         paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked();
     paParent->mbExportBookmarks = maCbExportBookmarks.IsChecked();
+    if ( mbIsPresentation )
+        paParent->mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked();
 
     paParent->mbIsSkipEmptyPages =  !maCbExportEmptyPages.IsChecked();
     paParent->mbAddStream = maCbAddStream.IsVisible() && maCbAddStream.IsChecked();
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index c8afb6d..b84d13f 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -89,6 +89,7 @@
 #define CB_EXPORTNOTESPAGES         27
 #define CB_EMBEDSTANDARDFONTS       28
 #define FT_ADDSTREAMDESCRIPTION     29
+#define CB_EXPORTHIDDENSLIDES       30
 
 #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 d55c6c9..ffa08b0 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -113,6 +113,7 @@ protected:
     sal_Bool                    mbExportFormFields;
     sal_Bool                    mbAllowDuplicateFieldNames;
     sal_Bool                    mbExportBookmarks;
+    sal_Bool                    mbExportHiddenSlides;
     sal_Int32                   mnOpenBookmarkLevels;
 
     sal_Bool                    mbHideViewerToolbar;
@@ -207,6 +208,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
     CheckBox                    maCbAllowDuplicateFieldNames;
 
     CheckBox                    maCbExportBookmarks;
+    CheckBox                    maCbExportHiddenSlides;
     CheckBox                    maCbExportNotes;
     CheckBox                    maCbExportNotesPages;
 
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 910bbac..006fa3a 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -260,10 +260,18 @@ TabPage  RID_PDF_TAB_GENER
         TabStop = TRUE ;
         Text[ en-US ] = "Export ~notes pages";
     };
+    CheckBox CB_EXPORTHIDDENSLIDES
+    {
+        HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTHIDDENSLIDES";
+        Pos = MAP_APPFONT ( 188 , 144 ) ;
+        Size = MAP_APPFONT ( 158 , 10 ) ;
+        TabStop = TRUE ;
+        Text[ en-US ] = "Export ~hidden pages";
+    };
     CheckBox CB_EXPORTEMPTYPAGES
     {
         HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES";
-        Pos = MAP_APPFONT ( 188 , 144 ) ;
+        Pos = MAP_APPFONT ( 188 , 157 ) ;
         Size = MAP_APPFONT ( 158 , 16 ) ;
         TabStop = TRUE ;
         WordBreak = TRUE ;
@@ -272,7 +280,7 @@ TabPage  RID_PDF_TAB_GENER
     CheckBox CB_EMBEDSTANDARDFONTS
     {
         HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EMBEDSTANDARDFONTS";
-        Pos = MAP_APPFONT ( 188 , 163 ) ;
+        Pos = MAP_APPFONT ( 188 , 176 ) ;
         Size = MAP_APPFONT ( 158 , 10 ) ;
         TabStop = TRUE ;
         Text[ en-US ] = "E~mbed standard fonts";
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index a027f74..8a5869c 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -113,6 +113,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
                                               //already used for i59651 (PDF/A-1)
     mbUseTransitionEffects      ( sal_True ),
     mbExportBookmarks           ( sal_True ),
+    mbExportHiddenSlides        ( sal_False ),
     mnOpenBookmarkLevels        ( -1 ),
     mbUseLosslessCompression    ( sal_False ),
     mbReduceImageResolution     ( sal_False ),
@@ -550,6 +551,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
                       rFilterData[ nData ].Value >>= mbExportBmkToDest;
                 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ) )
                     rFilterData[ nData ].Value >>= mbExportBookmarks;
+                else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ) )
+                    rFilterData[ nData ].Value >>= mbExportHiddenSlides;
                 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ) )
                     rFilterData[ nData ].Value >>= mnOpenBookmarkLevels;
             }
@@ -809,6 +812,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
                 pPDFExtOutDevData->SetFormsFormat( mnFormsFormat );
                 pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields );
                 pPDFExtOutDevData->SetIsExportBookmarks( mbExportBookmarks );
+                pPDFExtOutDevData->SetIsExportHiddenSlides( mbExportHiddenSlides );
                 pPDFExtOutDevData->SetIsLosslessCompression( mbUseLosslessCompression );
                 pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
                 pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index 12355d1..3374d0a 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -66,6 +66,7 @@ private:
     sal_Bool                mbEmbedStandardFonts;
     sal_Bool                mbUseTransitionEffects;
     sal_Bool                mbExportBookmarks;
+    sal_Bool                mbExportHiddenSlides;
     sal_Int32               mnOpenBookmarkLevels;
 
     sal_Bool                mbUseLosslessCompression;
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index fc263d3..7ee1655 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -114,6 +114,7 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
         aCfgItem.ReadBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarksToPDFDestination" ) ), sal_False );
 
         aCfgItem.ReadBool(  String( RTL_CONSTASCII_USTRINGPARAM( "ExportBookmarks" ) ), sal_True );
+        aCfgItem.ReadBool(  String( RTL_CONSTASCII_USTRINGPARAM( "ExportHiddenSlides" ) ), sal_False );
         aCfgItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "OpenBookmarkLevels" ) ), -1 );
         aFilterData = aCfgItem.GetFilterData();
     }
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 1f75de0..6dfb029 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1824,7 +1824,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
             {
                 vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
 
-                if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) )
+                if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) ||
+                    pPDFExtOutDevData->GetIsExportHiddenSlides() )
                 {
                     ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
                     Rectangle               aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index ab9f44e..c1be576 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -92,6 +92,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
     sal_Bool                        mbReduceImageResolution;
     sal_Bool                        mbExportFormFields;
     sal_Bool                        mbExportBookmarks;
+    sal_Bool                        mbExportHiddenSlides;
     sal_Bool                        mbExportNDests; //i56629
     sal_Int32                       mnFormsFormat;
     sal_Int32                       mnPage;
@@ -136,6 +137,9 @@ public :
     sal_Bool    GetIsExportBookmarks() const;
     void        SetIsExportBookmarks( const sal_Bool bExportBookmarks );
 
+    sal_Bool    GetIsExportHiddenSlides() const;
+    void        SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides );
+
     sal_Bool    GetIsExportNamedDestinations() const; //i56629
     void        SetIsExportNamedDestinations( const sal_Bool bExportNDests ); //i56629
 
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index d742bee..a2d856d 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -512,6 +512,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
     mbUseLosslessCompression( sal_True ),
     mbReduceImageResolution ( sal_False ),
     mbExportNDests          ( sal_False ),
+    mbExportHiddenSlides    ( sal_False ),
     mnFormsFormat           ( 0 ),
     mnPage                  ( -1 ),
     mpPageSyncData          ( NULL ),
@@ -614,6 +615,14 @@ void PDFExtOutDevData::SetIsExportBookmarks( const sal_Bool bExportBookmarks )
 {
     mbExportBookmarks = bExportBookmarks;
 }
+sal_Bool PDFExtOutDevData::GetIsExportHiddenSlides() const
+{
+    return mbExportHiddenSlides;
+}
+void PDFExtOutDevData::SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides )
+{
+    mbExportHiddenSlides = bExportHiddenSlides;
+}
 std::vector< PDFExtOutDevBookmarkEntry >& PDFExtOutDevData::GetBookmarks()
 {
     return maBookmarks;
commit f9fd800b79ddeda00c9b576d059a03984dc13090
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Thu Dec 22 23:12:40 2011 +0100

    fdo43033 do not export to PDF hidden slides

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 1a49b7f..1f75de0 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1824,321 +1824,324 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
             {
                 vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
 
-                ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
-                Rectangle               aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
-                Region                  aRegion( aVisArea );
-                Point                   aOrigin;
-
-                ::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell();
-                ::sd::View* pOldSdView = pOldViewSh ? pOldViewSh->GetView() : NULL;
+                if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) )
+                {
+                    ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
+                    Rectangle               aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
+                    Region                  aRegion( aVisArea );
+                    Point                   aOrigin;
 
-                if  ( pOldSdView )
-                    pOldSdView->SdrEndTextEdit();
+                    ::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell();
+                    ::sd::View* pOldSdView = pOldViewSh ? pOldViewSh->GetView() : NULL;
 
-                pView->SetHlplVisible( sal_False );
-                pView->SetGridVisible( sal_False );
-                pView->SetBordVisible( sal_False );
-                pView->SetPageVisible( sal_False );
-                pView->SetGlueVisible( sal_False );
+                    if  ( pOldSdView )
+                        pOldSdView->SdrEndTextEdit();
 
-                pOut->SetMapMode( MAP_100TH_MM );
-                pOut->IntersectClipRegion( aVisArea );
+                    pView->SetHlplVisible( sal_False );
+                    pView->SetGridVisible( sal_False );
+                    pView->SetBordVisible( sal_False );
+                    pView->SetPageVisible( sal_False );
+                    pView->SetGlueVisible( sal_False );
 
+                    pOut->SetMapMode( MAP_100TH_MM );
+                    pOut->IntersectClipRegion( aVisArea );
 
 
-                uno::Reference< frame::XModel > xModel;
-                rSelection >>= xModel;
 
-                if( xModel == mpDocShell->GetModel() )
-                {
-                    pView->ShowSdrPage( mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind ));
-                    SdrPageView* pPV = pView->GetSdrPageView();
+                    uno::Reference< frame::XModel > xModel;
+                    rSelection >>= xModel;
 
-                    if( pOldSdView )
+                    if( xModel == mpDocShell->GetModel() )
                     {
-                        SdrPageView* pOldPV = pOldSdView->GetSdrPageView();
-                        if( pPV && pOldPV )
+                        pView->ShowSdrPage( mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind ));
+                        SdrPageView* pPV = pView->GetSdrPageView();
+
+                        if( pOldSdView )
                         {
-                            pPV->SetVisibleLayers( pOldPV->GetVisibleLayers() );
-                            pPV->SetPrintableLayers( pOldPV->GetPrintableLayers() );
+                            SdrPageView* pOldPV = pOldSdView->GetSdrPageView();
+                            if( pPV && pOldPV )
+                            {
+                                pPV->SetVisibleLayers( pOldPV->GetVisibleLayers() );
+                                pPV->SetPrintableLayers( pOldPV->GetPrintableLayers() );
+                            }
                         }
-                    }
 
-                    ImplRenderPaintProc aImplRenderPaintProc( mpDoc->GetLayerAdmin(),
-                        pPV, pPDFExtOutDevData );
+                        ImplRenderPaintProc aImplRenderPaintProc( mpDoc->GetLayerAdmin(),
+                            pPV, pPDFExtOutDevData );
 
-                    // background color for outliner :o
-                    SdPage* pPage = (SdPage*)pPV->GetPage();
-                    if( pPage )
-                    {
-                        SdrOutliner& rOutl = mpDoc->GetDrawOutliner( NULL );
-                        bool bScreenDisplay(true);
-
-                        if(bScreenDisplay && pOut && OUTDEV_PRINTER == pOut->GetOutDevType())
+                        // background color for outliner :o
+                        SdPage* pPage = (SdPage*)pPV->GetPage();
+                        if( pPage )
                         {
-                            // #i75566# printing; suppress AutoColor BackgroundColor generation
-                            // for visibility reasons by giving GetPageBackgroundColor()
-                            // the needed hint
-                            bScreenDisplay = false;
-                        }
+                            SdrOutliner& rOutl = mpDoc->GetDrawOutliner( NULL );
+                            bool bScreenDisplay(true);
 
-                        if(bScreenDisplay && pOut && pOut->GetPDFWriter())
-                        {
-                            // #i75566# PDF export; suppress AutoColor BackgroundColor generation (see above)
-                            bScreenDisplay = false;
-                        }
+                            if(bScreenDisplay && pOut && OUTDEV_PRINTER == pOut->GetOutDevType())
+                            {
+                                // #i75566# printing; suppress AutoColor BackgroundColor generation
+                                // for visibility reasons by giving GetPageBackgroundColor()
+                                // the needed hint
+                                bScreenDisplay = false;
+                            }
 
-                        // #i75566# Name change GetBackgroundColor -> GetPageBackgroundColor and
-                        // hint value if screen display. Only then the AutoColor mechanisms shall be applied
-                        rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor( pPV, bScreenDisplay ) );
-                    }
-                    pView->SdrPaintView::CompleteRedraw( pOut, aRegion, &aImplRenderPaintProc );
+                            if(bScreenDisplay && pOut && pOut->GetPDFWriter())
+                            {
+                                // #i75566# PDF export; suppress AutoColor BackgroundColor generation (see above)
+                                bScreenDisplay = false;
+                            }
 
-                    if ( pPDFExtOutDevData )
-                    {
-                        try
+                            // #i75566# Name change GetBackgroundColor -> GetPageBackgroundColor and
+                            // hint value if screen display. Only then the AutoColor mechanisms shall be applied
+                            rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor( pPV, bScreenDisplay ) );
+                        }
+                        pView->SdrPaintView::CompleteRedraw( pOut, aRegion, &aImplRenderPaintProc );
+
+                        if ( pPDFExtOutDevData )
                         {
-                            uno::Any aAny;
-                            uno::Reference< drawing::XDrawPage > xPage( uno::Reference< drawing::XDrawPage >::query( pPage->getUnoPage() ) );
-                            if ( xPage.is() )
+                            try
                             {
-                                if ( pPDFExtOutDevData->GetIsExportNotes() )
-                                    ImplPDFExportComments( xPage, *pPDFExtOutDevData );
-                                uno::Reference< beans::XPropertySet > xPagePropSet( xPage, uno::UNO_QUERY );
-                                if( xPagePropSet.is() )
+                                uno::Any aAny;
+                                uno::Reference< drawing::XDrawPage > xPage( uno::Reference< drawing::XDrawPage >::query( pPage->getUnoPage() ) );
+                                if ( xPage.is() )
                                 {
-                                    // exporting object interactions to pdf
-
-                                    // if necessary, the master page interactions will be exported first
-                                    sal_Bool bIsBackgroundObjectsVisible = sal_False;   // #i39428# IsBackgroundObjectsVisible not available for Draw
-                                    const rtl::OUString sIsBackgroundObjectsVisible( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundObjectsVisible" ) );
-                                    if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sIsBackgroundObjectsVisible ) )
-                                        xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible;
-                                    if ( mbImpressDoc && bIsBackgroundObjectsVisible && !pPDFExtOutDevData->GetIsExportNotesPages() )
+                                    if ( pPDFExtOutDevData->GetIsExportNotes() )
+                                        ImplPDFExportComments( xPage, *pPDFExtOutDevData );
+                                    uno::Reference< beans::XPropertySet > xPagePropSet( xPage, uno::UNO_QUERY );
+                                    if( xPagePropSet.is() )
                                     {
-                                        uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( xPage, uno::UNO_QUERY );
-                                        if ( xMasterPageTarget.is() )
+                                        // exporting object interactions to pdf
+
+                                        // if necessary, the master page interactions will be exported first
+                                        sal_Bool bIsBackgroundObjectsVisible = sal_False;   // #i39428# IsBackgroundObjectsVisible not available for Draw
+                                        const rtl::OUString sIsBackgroundObjectsVisible( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundObjectsVisible" ) );
+                                        if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sIsBackgroundObjectsVisible ) )
+                                            xPagePropSet->getPropertyValue( sIsBackgroundObjectsVisible ) >>= bIsBackgroundObjectsVisible;
+                                        if ( mbImpressDoc && bIsBackgroundObjectsVisible && !pPDFExtOutDevData->GetIsExportNotesPages() )
                                         {
-                                            uno::Reference< drawing::XDrawPage > xMasterPage = xMasterPageTarget->getMasterPage();
-                                            if ( xMasterPage.is() )
+                                            uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( xPage, uno::UNO_QUERY );
+                                            if ( xMasterPageTarget.is() )
                                             {
-                                                uno::Reference< drawing::XShapes> xShapes( xMasterPage, uno::UNO_QUERY );
-                                                sal_Int32 i, nCount = xShapes->getCount();
-                                                for ( i = 0; i < nCount; i++ )
+                                                uno::Reference< drawing::XDrawPage > xMasterPage = xMasterPageTarget->getMasterPage();
+                                                if ( xMasterPage.is() )
                                                 {
-                                                    aAny = xShapes->getByIndex( i );
-                                                    uno::Reference< drawing::XShape > xShape;
-                                                    if ( aAny >>= xShape )
-                                                        ImplPDFExportShapeInteraction( xShape, *mpDoc, *pPDFExtOutDevData );
+                                                    uno::Reference< drawing::XShapes> xShapes( xMasterPage, uno::UNO_QUERY );
+                                                    sal_Int32 i, nCount = xShapes->getCount();
+                                                    for ( i = 0; i < nCount; i++ )
+                                                    {
+                                                        aAny = xShapes->getByIndex( i );
+                                                        uno::Reference< drawing::XShape > xShape;
+                                                        if ( aAny >>= xShape )
+                                                            ImplPDFExportShapeInteraction( xShape, *mpDoc, *pPDFExtOutDevData );
+                                                    }
                                                 }
                                             }
                                         }
-                                    }
 
-                                    // exporting slide page object interactions
-                                    uno::Reference< drawing::XShapes> xShapes( xPage, uno::UNO_QUERY );
-                                    sal_Int32 i, nCount = xShapes->getCount();
-                                    for ( i = 0; i < nCount; i++ )
-                                    {
-                                        aAny = xShapes->getByIndex( i );
-                                        uno::Reference< drawing::XShape > xShape;
-                                        if ( aAny >>= xShape )
-                                            ImplPDFExportShapeInteraction( xShape, *mpDoc, *pPDFExtOutDevData );
-                                    }
+                                        // exporting slide page object interactions
+                                        uno::Reference< drawing::XShapes> xShapes( xPage, uno::UNO_QUERY );
+                                        sal_Int32 i, nCount = xShapes->getCount();
+                                        for ( i = 0; i < nCount; i++ )
+                                        {
+                                            aAny = xShapes->getByIndex( i );
+                                            uno::Reference< drawing::XShape > xShape;
+                                            if ( aAny >>= xShape )
+                                                ImplPDFExportShapeInteraction( xShape, *mpDoc, *pPDFExtOutDevData );
+                                        }
 
-                                    // exporting transition effects to pdf
-                                    if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() && pPDFExtOutDevData->GetIsExportTransitionEffects() )
-                                    {
-                                        const rtl::OUString sEffect( RTL_CONSTASCII_USTRINGPARAM( "Effect" ) );
-                                        const rtl::OUString sSpeed ( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) );
-                                        sal_Int32 nTime = 800;
-                                        presentation::AnimationSpeed aAs;
-                                        if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
+                                        // exporting transition effects to pdf
+                                        if ( mbImpressDoc && !pPDFExtOutDevData->GetIsExportNotesPages() && pPDFExtOutDevData->GetIsExportTransitionEffects() )
                                         {
-                                            aAny = xPagePropSet->getPropertyValue( sSpeed );
-                                            if ( aAny >>= aAs )
+                                            const rtl::OUString sEffect( RTL_CONSTASCII_USTRINGPARAM( "Effect" ) );
+                                            const rtl::OUString sSpeed ( RTL_CONSTASCII_USTRINGPARAM( "Speed" ) );
+                                            sal_Int32 nTime = 800;
+                                            presentation::AnimationSpeed aAs;
+                                            if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
                                             {
-                                                switch( aAs )
+                                                aAny = xPagePropSet->getPropertyValue( sSpeed );
+                                                if ( aAny >>= aAs )
                                                 {
-                                                    case presentation::AnimationSpeed_SLOW : nTime = 1500; break;
-                                                    case presentation::AnimationSpeed_FAST : nTime = 300; break;
-                                                    default:
-                                                    case presentation::AnimationSpeed_MEDIUM : nTime = 800;
+                                                    switch( aAs )
+                                                    {
+                                                        case presentation::AnimationSpeed_SLOW : nTime = 1500; break;
+                                                        case presentation::AnimationSpeed_FAST : nTime = 300; break;
+                                                        default:
+                                                        case presentation::AnimationSpeed_MEDIUM : nTime = 800;
+                                                    }
                                                 }
                                             }
-                                        }
-                                        presentation::FadeEffect eFe;
-                                        vcl::PDFWriter::PageTransition eType = vcl::PDFWriter::Regular;
-                                        if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) )
-                                        {
-                                            aAny = xPagePropSet->getPropertyValue( sEffect );
-                                            if ( aAny >>= eFe )
+                                            presentation::FadeEffect eFe;
+                                            vcl::PDFWriter::PageTransition eType = vcl::PDFWriter::Regular;
+                                            if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) )
                                             {
-                                                switch( eFe )
+                                                aAny = xPagePropSet->getPropertyValue( sEffect );
+                                                if ( aAny >>= eFe )
                                                 {
-                                                    case presentation::FadeEffect_HORIZONTAL_LINES :
-                                                    case presentation::FadeEffect_HORIZONTAL_CHECKERBOARD :
-                                                    case presentation::FadeEffect_HORIZONTAL_STRIPES : eType = vcl::PDFWriter::BlindsHorizontal; break;
-
-                                                    case presentation::FadeEffect_VERTICAL_LINES :
-                                                    case presentation::FadeEffect_VERTICAL_CHECKERBOARD :
-                                                    case presentation::FadeEffect_VERTICAL_STRIPES : eType = vcl::PDFWriter::BlindsVertical; break;
-
-                                                    case presentation::FadeEffect_UNCOVER_TO_RIGHT :
-                                                    case presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT :
-                                                    case presentation::FadeEffect_ROLL_FROM_LEFT :
-                                                    case presentation::FadeEffect_FADE_FROM_UPPERLEFT :
-                                                    case presentation::FadeEffect_MOVE_FROM_UPPERLEFT :
-                                                    case presentation::FadeEffect_FADE_FROM_LEFT :
-                                                    case presentation::FadeEffect_MOVE_FROM_LEFT : eType = vcl::PDFWriter::WipeLeftToRight; break;
-
-                                                    case presentation::FadeEffect_UNCOVER_TO_BOTTOM :
-                                                    case presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT :
-                                                    case presentation::FadeEffect_ROLL_FROM_TOP :
-                                                    case presentation::FadeEffect_FADE_FROM_UPPERRIGHT :
-                                                    case presentation::FadeEffect_MOVE_FROM_UPPERRIGHT :
-                                                    case presentation::FadeEffect_FADE_FROM_TOP :
-                                                    case presentation::FadeEffect_MOVE_FROM_TOP : eType = vcl::PDFWriter::WipeTopToBottom; break;
-
-                                                    case presentation::FadeEffect_UNCOVER_TO_LEFT :
-                                                    case presentation::FadeEffect_UNCOVER_TO_LOWERLEFT :
-                                                    case presentation::FadeEffect_ROLL_FROM_RIGHT :
-
-                                                    case presentation::FadeEffect_FADE_FROM_LOWERRIGHT :
-                                                    case presentation::FadeEffect_MOVE_FROM_LOWERRIGHT :
-                                                    case presentation::FadeEffect_FADE_FROM_RIGHT :
-                                                    case presentation::FadeEffect_MOVE_FROM_RIGHT : eType = vcl::PDFWriter::WipeRightToLeft; break;
-
-                                                    case presentation::FadeEffect_UNCOVER_TO_TOP :
-                                                    case presentation::FadeEffect_UNCOVER_TO_UPPERLEFT :
-                                                    case presentation::FadeEffect_ROLL_FROM_BOTTOM :
-                                                    case presentation::FadeEffect_FADE_FROM_LOWERLEFT :
-                                                    case presentation::FadeEffect_MOVE_FROM_LOWERLEFT :
-                                                    case presentation::FadeEffect_FADE_FROM_BOTTOM :
-                                                    case presentation::FadeEffect_MOVE_FROM_BOTTOM : eType = vcl::PDFWriter::WipeBottomToTop; break;
-
-                                                    case presentation::FadeEffect_OPEN_VERTICAL : eType = vcl::PDFWriter::SplitHorizontalInward; break;
-                                                    case presentation::FadeEffect_CLOSE_HORIZONTAL : eType = vcl::PDFWriter::SplitHorizontalOutward; break;
-
-                                                    case presentation::FadeEffect_OPEN_HORIZONTAL : eType = vcl::PDFWriter::SplitVerticalInward; break;
-                                                    case presentation::FadeEffect_CLOSE_VERTICAL : eType = vcl::PDFWriter::SplitVerticalOutward; break;
-
-                                                    case presentation::FadeEffect_FADE_TO_CENTER : eType = vcl::PDFWriter::BoxInward; break;
-                                                    case presentation::FadeEffect_FADE_FROM_CENTER : eType = vcl::PDFWriter::BoxOutward; break;
-
-                                                    case presentation::FadeEffect_NONE : eType = vcl::PDFWriter::Regular; break;
-
-                                                    case presentation::FadeEffect_RANDOM :
-                                                    case presentation::FadeEffect_DISSOLVE :
-                                                    default: eType = vcl::PDFWriter::Dissolve; break;
+                                                    switch( eFe )
+                                                    {
+                                                        case presentation::FadeEffect_HORIZONTAL_LINES :
+                                                        case presentation::FadeEffect_HORIZONTAL_CHECKERBOARD :
+                                                        case presentation::FadeEffect_HORIZONTAL_STRIPES : eType = vcl::PDFWriter::BlindsHorizontal; break;
+
+                                                        case presentation::FadeEffect_VERTICAL_LINES :
+                                                        case presentation::FadeEffect_VERTICAL_CHECKERBOARD :
+                                                        case presentation::FadeEffect_VERTICAL_STRIPES : eType = vcl::PDFWriter::BlindsVertical; break;
+
+                                                        case presentation::FadeEffect_UNCOVER_TO_RIGHT :
+                                                        case presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT :
+                                                        case presentation::FadeEffect_ROLL_FROM_LEFT :
+                                                        case presentation::FadeEffect_FADE_FROM_UPPERLEFT :
+                                                        case presentation::FadeEffect_MOVE_FROM_UPPERLEFT :
+                                                        case presentation::FadeEffect_FADE_FROM_LEFT :
+                                                        case presentation::FadeEffect_MOVE_FROM_LEFT : eType = vcl::PDFWriter::WipeLeftToRight; break;
+
+                                                        case presentation::FadeEffect_UNCOVER_TO_BOTTOM :
+                                                        case presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT :
+                                                        case presentation::FadeEffect_ROLL_FROM_TOP :
+                                                        case presentation::FadeEffect_FADE_FROM_UPPERRIGHT :
+                                                        case presentation::FadeEffect_MOVE_FROM_UPPERRIGHT :
+                                                        case presentation::FadeEffect_FADE_FROM_TOP :
+                                                        case presentation::FadeEffect_MOVE_FROM_TOP : eType = vcl::PDFWriter::WipeTopToBottom; break;
+
+                                                        case presentation::FadeEffect_UNCOVER_TO_LEFT :
+                                                        case presentation::FadeEffect_UNCOVER_TO_LOWERLEFT :
+                                                        case presentation::FadeEffect_ROLL_FROM_RIGHT :
+
+                                                        case presentation::FadeEffect_FADE_FROM_LOWERRIGHT :
+                                                        case presentation::FadeEffect_MOVE_FROM_LOWERRIGHT :
+                                                        case presentation::FadeEffect_FADE_FROM_RIGHT :
+                                                        case presentation::FadeEffect_MOVE_FROM_RIGHT : eType = vcl::PDFWriter::WipeRightToLeft; break;
+
+                                                        case presentation::FadeEffect_UNCOVER_TO_TOP :
+                                                        case presentation::FadeEffect_UNCOVER_TO_UPPERLEFT :
+                                                        case presentation::FadeEffect_ROLL_FROM_BOTTOM :
+                                                        case presentation::FadeEffect_FADE_FROM_LOWERLEFT :
+                                                        case presentation::FadeEffect_MOVE_FROM_LOWERLEFT :
+                                                        case presentation::FadeEffect_FADE_FROM_BOTTOM :
+                                                        case presentation::FadeEffect_MOVE_FROM_BOTTOM : eType = vcl::PDFWriter::WipeBottomToTop; break;
+
+                                                        case presentation::FadeEffect_OPEN_VERTICAL : eType = vcl::PDFWriter::SplitHorizontalInward; break;
+                                                        case presentation::FadeEffect_CLOSE_HORIZONTAL : eType = vcl::PDFWriter::SplitHorizontalOutward; break;
+
+                                                        case presentation::FadeEffect_OPEN_HORIZONTAL : eType = vcl::PDFWriter::SplitVerticalInward; break;
+                                                        case presentation::FadeEffect_CLOSE_VERTICAL : eType = vcl::PDFWriter::SplitVerticalOutward; break;
+
+                                                        case presentation::FadeEffect_FADE_TO_CENTER : eType = vcl::PDFWriter::BoxInward; break;
+                                                        case presentation::FadeEffect_FADE_FROM_CENTER : eType = vcl::PDFWriter::BoxOutward; break;
+
+                                                        case presentation::FadeEffect_NONE : eType = vcl::PDFWriter::Regular; break;
+
+                                                        case presentation::FadeEffect_RANDOM :
+                                                        case presentation::FadeEffect_DISSOLVE :
+                                                        default: eType = vcl::PDFWriter::Dissolve; break;
+                                                    }
                                                 }
                                             }
-                                        }
 
-                                        if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) ||
-                                             xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
-                                        {
-                                             pPDFExtOutDevData->SetPageTransition( eType, nTime, -1 );
+                                            if ( xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sEffect ) ||
+                                                xPagePropSet->getPropertySetInfo( )->hasPropertyByName( sSpeed ) )
+                                            {
+                                                pPDFExtOutDevData->SetPageTransition( eType, nTime, -1 );
+                                            }
                                         }
                                     }
                                 }
-                            }
 
-                            Size        aPageSize( mpDoc->GetSdPage( 0, PK_STANDARD )->GetSize() );
-                            Point aPoint( 0, 0 );
-                            Rectangle   aPageRect( aPoint, aPageSize );
+                                Size        aPageSize( mpDoc->GetSdPage( 0, PK_STANDARD )->GetSize() );
+                                Point aPoint( 0, 0 );
+                                Rectangle   aPageRect( aPoint, aPageSize );
 
-                            // resolving links found in this page by the method ImpEditEngine::Paint
-                            std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFExtOutDevData->GetBookmarks();
-                            std::vector< vcl::PDFExtOutDevBookmarkEntry >::iterator aIBeg = rBookmarks.begin();
-                            std::vector< vcl::PDFExtOutDevBookmarkEntry >::iterator aIEnd = rBookmarks.end();
-                            while ( aIBeg != aIEnd )
-                            {
-                                sal_Int32 nPage = ImplPDFGetBookmarkPage( aIBeg->aBookmark, *mpDoc );
-                                if ( nPage != -1 )
+                                // resolving links found in this page by the method ImpEditEngine::Paint
+                                std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFExtOutDevData->GetBookmarks();
+                                std::vector< vcl::PDFExtOutDevBookmarkEntry >::iterator aIBeg = rBookmarks.begin();
+                                std::vector< vcl::PDFExtOutDevBookmarkEntry >::iterator aIEnd = rBookmarks.end();
+                                while ( aIBeg != aIEnd )
                                 {
-                                    if ( aIBeg->nLinkId != -1 )
-                                        pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) );
+                                    sal_Int32 nPage = ImplPDFGetBookmarkPage( aIBeg->aBookmark, *mpDoc );
+                                    if ( nPage != -1 )
+                                    {
+                                        if ( aIBeg->nLinkId != -1 )
+                                            pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) );
+                                        else
+                                            pPDFExtOutDevData->DescribeRegisteredDest( aIBeg->nDestId, aPageRect, nPage, vcl::PDFWriter::FitRectangle );
+                                    }
                                     else
-                                        pPDFExtOutDevData->DescribeRegisteredDest( aIBeg->nDestId, aPageRect, nPage, vcl::PDFWriter::FitRectangle );
+                                        pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aIBeg->aBookmark );
+                                    ++aIBeg;
                                 }
-                                else
-                                    pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aIBeg->aBookmark );
-                                ++aIBeg;
-                            }
-                            rBookmarks.clear();
-                            //---> #i56629, #i40318
-                            //get the page name, will be used as outline element in PDF bookmark pane
-                            String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName();
-                            if( aPageName.Len() > 0 )
-                            {
-                                // insert the bookmark to this page into the NamedDestinations
-                                if( pPDFExtOutDevData->GetIsExportNamedDestinations() )
-                                    pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect,  nPageNumber - 1 );
-                                //
-                                // add the name to the outline, (almost) same code as in sc/source/ui/unoobj/docuno.cxx
-                                // issue #i40318.
-                                //
-                                if( pPDFExtOutDevData->GetIsExportBookmarks() )
+                                rBookmarks.clear();
+                                //---> #i56629, #i40318
+                                //get the page name, will be used as outline element in PDF bookmark pane
+                                String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName();
+                                if( aPageName.Len() > 0 )
                                 {
-                                    // Destination Export
-                                    const sal_Int32 nDestId =
-                                        pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber - 1 );
+                                    // insert the bookmark to this page into the NamedDestinations
+                                    if( pPDFExtOutDevData->GetIsExportNamedDestinations() )
+                                        pPDFExtOutDevData->CreateNamedDest( aPageName, aPageRect,  nPageNumber - 1 );
+                                    //
+                                    // add the name to the outline, (almost) same code as in sc/source/ui/unoobj/docuno.cxx
+                                    // issue #i40318.
+                                    //
+                                    if( pPDFExtOutDevData->GetIsExportBookmarks() )
+                                    {
+                                        // Destination Export
+                                        const sal_Int32 nDestId =
+                                            pPDFExtOutDevData->CreateDest( aPageRect , nPageNumber - 1 );
 
-                                    // Create a new outline item:
-                                    pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName, nDestId );
+                                        // Create a new outline item:
+                                        pPDFExtOutDevData->CreateOutlineItem( -1 , aPageName, nDestId );
+                                    }
                                 }
+                                //<--- #i56629, #i40318
+                            }
+                            catch (const uno::Exception&)
+                            {
                             }
-                            //<--- #i56629, #i40318
-                        }
-                        catch (const uno::Exception&)
-                        {
-                        }
 
+                        }
                     }
-                }
-                else
-                {
-                    uno::Reference< drawing::XShapes > xShapes;
-                    rSelection >>= xShapes;
-
-                    if( xShapes.is() && xShapes->getCount() )
+                    else
                     {
-                       SdrPageView* pPV = NULL;
+                        uno::Reference< drawing::XShapes > xShapes;
+                        rSelection >>= xShapes;
 
-                       ImplRenderPaintProc  aImplRenderPaintProc( mpDoc->GetLayerAdmin(),
-                                        pOldSdView ? pOldSdView->GetSdrPageView() : NULL, pPDFExtOutDevData );
-
-                        for( sal_uInt32 i = 0, nCount = xShapes->getCount(); i < nCount; i++ )
+                        if( xShapes.is() && xShapes->getCount() )
                         {
-                            uno::Reference< drawing::XShape > xShape;
-                            xShapes->getByIndex( i ) >>= xShape;
+                        SdrPageView* pPV = NULL;
+
+                        ImplRenderPaintProc  aImplRenderPaintProc( mpDoc->GetLayerAdmin(),
+                                            pOldSdView ? pOldSdView->GetSdrPageView() : NULL, pPDFExtOutDevData );
 
-                            if( xShape.is() )
+                            for( sal_uInt32 i = 0, nCount = xShapes->getCount(); i < nCount; i++ )
                             {
-                                SvxShape* pShape = SvxShape::getImplementation( xShape );
+                                uno::Reference< drawing::XShape > xShape;
+                                xShapes->getByIndex( i ) >>= xShape;
 
-                                if( pShape )
+                                if( xShape.is() )
                                 {
-                                    SdrObject* pObj = pShape->GetSdrObject();
-                                    if( pObj && pObj->GetPage()
-                                        && aImplRenderPaintProc.IsVisible( pObj )
-                                            && aImplRenderPaintProc.IsPrintable( pObj ) )
+                                    SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+                                    if( pShape )
                                     {
-                                        if( !pPV )
-                                            pPV = pView->ShowSdrPage( pObj->GetPage() );
+                                        SdrObject* pObj = pShape->GetSdrObject();
+                                        if( pObj && pObj->GetPage()
+                                            && aImplRenderPaintProc.IsVisible( pObj )
+                                                && aImplRenderPaintProc.IsPrintable( pObj ) )
+                                        {
+                                            if( !pPV )
+                                                pPV = pView->ShowSdrPage( pObj->GetPage() );
 
-                                        if( pPV )
-                                            pView->MarkObj( pObj, pPV );
+                                            if( pPV )
+                                                pView->MarkObj( pObj, pPV );
+                                        }
                                     }
                                 }
                             }
+                            pView->DrawMarkedObj(*pOut);
                         }
-                        pView->DrawMarkedObj(*pOut);
                     }
-                }
 
-                delete pView;
+                    delete pView;
+                }
             }
         }
     }
commit d18350785a4c549ea7fda80a68d21fec265dbefe
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Fri Dec 16 20:19:46 2011 +0100

    use of bool instead of sal_bool

diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index 4252070..0c7c7f4 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -131,7 +131,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
         SCTAB nTab = aOneRange.aStart.Tab();
 
         pDocSh->GetDocument()->GetDataArea(
-                        nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, false );
+                        nTab, nStartCol, nStartRow, nEndCol, nEndRow, true, false );
 
         ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
         SetNewRange( aNew );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index f969b8f..9aeda09 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4548,7 +4548,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
                 SCROW nStartRow = autoFiltAddress.StartRow;
                 SCCOL nEndCol = autoFiltAddress.EndColumn;
                 SCROW nEndRow = autoFiltAddress.EndRow;
-                pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, true );
+                pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, true, true );
                 autoFiltAddress.StartColumn = nStartCol;
                 autoFiltAddress.StartRow = nStartRow;
                 autoFiltAddress.EndColumn = nEndCol;
commit 8818a009bf5947d3d709310ec7fa13a6eb56a9c7
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date:   Thu Dec 15 19:29:17 2011 +0100

    fdo42286 better solution: extend and shrink end of row if needed

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 3d60554..3cc4146 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -544,10 +544,8 @@ void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
 void ScDBData::ExtendDataArea(ScDocument* pDoc)
 {
     // Extend the DB area to include data rows immediately below.
-    SCCOL nCol1a = nStartCol, nCol2a = nEndCol;
-    SCROW nRow1a = nStartRow, nRow2a = nEndRow;
-    pDoc->GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true);
-    nEndRow = nRow2a;
+    // or shrink it if all cells are empty
+    pDoc->GetDataArea(nTable, nStartCol, nStartRow, nEndCol, nEndRow, false, true);
 }
 
 namespace {


More information about the Libreoffice-commits mailing list