You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/10/09 12:42:27 UTC
svn commit: r1530557 - /openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx
Author: orw
Date: Wed Oct 9 10:42:26 2013
New Revision: 1530557
URL: http://svn.apache.org/r1530557
Log:
123444: method <SwXTextDocument::getRendererCount(..)> - clear of rendering data before determine needed <SwView> instance
Modified:
openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx
Modified: openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx?rev=1530557&r1=1530556&r2=1530557&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx Wed Oct 9 10:42:26 2013
@@ -2666,6 +2666,8 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
if(!IsValid())
throw RuntimeException();
+ CleanUpRenderingData();
+
const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
bool bIsSwSrcView = false;
SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
@@ -2677,20 +2679,6 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
return 0;
}
- // clean up <RenderData> and <PrintUIOptions>
- {
- if ( m_pRenderData )
- {
- delete m_pRenderData;
- m_pRenderData = 0;
- }
- if ( m_pPrintUIOptions )
- {
- delete m_pPrintUIOptions;
- m_pPrintUIOptions = 0;
- }
- }
-
if ( !bIsSwSrcView )
{
m_pRenderData = new SwRenderData;
@@ -3067,8 +3055,7 @@ SfxViewShell * SwXTextDocument::GuessVie
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False );
// look for the view shell with the same controller in use,
- // otherwise look for a suitable view, preferably a SwView,
- // if that one is not found use a SwPagePreView if found.
+ // otherwise look for a suitable view
while (pFrame)
{
pView = pFrame->GetViewShell();
@@ -3081,7 +3068,7 @@ SfxViewShell * SwXTextDocument::GuessVie
if (pView && pView->GetController() == xController)
break;
}
- else if (pSwView || pSwSrcView)
+ else if ( pSwView || pSwSrcView || pSwPagePreView )
break;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False );
}