[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - svgio/source sw/source
Oliver-Rainer Wittmann
orw at apache.org
Wed Oct 9 05:08:14 PDT 2013
svgio/source/svgreader/svgstyleattributes.cxx | 10 ++++++----
sw/source/ui/uno/unotxdoc.cxx | 21 ++++-----------------
2 files changed, 10 insertions(+), 21 deletions(-)
New commits:
commit 5d5b1156b3db3997b75779b0d007e46b5884c617
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Wed Oct 9 10:42:26 2013 +0000
123444: method <SwXTextDocument::getRendererCount(..)> - clear of rendering data before determine needed <SwView> instance
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index f45c64c..9f9da57 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2666,6 +2666,8 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
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::getRendererCount(
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::GuessViewShell(
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::GuessViewShell(
if (pView && pView->GetController() == xController)
break;
}
- else if (pSwView || pSwSrcView)
+ else if ( pSwView || pSwSrcView || pSwPagePreView )
break;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False );
}
commit 4e63c0f73c37097b24c113841fd86e53629dfd24
Author: Regina Henschel <regina at apache.org>
Date: Wed Oct 9 10:25:00 2013 +0000
#i123379 SVG wrong kind of markers on mid position
Author:Christina RoÃmanith
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 795b8bc..817f3a8 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -958,7 +958,7 @@ namespace svgio
basegfx::B2DRange aClipRange;
const SvgMarkerNode* pPrepared = 0;
- if(pStart)
+ if(pStart && a==0)
{
if(prepare_singleMarker(aMarkerPrimitives, aMarkerTransform, aClipRange, *pStart))
{
@@ -967,20 +967,22 @@ namespace svgio
}
}
- if(pMid && nMarkerCount > 2)
+ if(pMid)
{
if(pMid == pPrepared || prepare_singleMarker(aMarkerPrimitives, aMarkerTransform, aClipRange, *pMid))
{
pPrepared = pMid;
+ const sal_uInt32 nFirstIndex(a==0 ? 1 : 0);
+ const sal_uInt32 nLastIndex(a==nCount-1 ? nMarkerCount-1 : nMarkerCount);
- for(sal_uInt32 b(1); b < nMarkerCount - 1; b++)
+ for(sal_uInt32 b(nFirstIndex); b < nLastIndex; b++)
{
add_singleMarker(rTarget, aMarkerPrimitives, aMarkerTransform, aClipRange, *pPrepared, aCandidate, b);
}
}
}
- if(pEnd)
+ if(pEnd && a==nCount-1)
{
if(pEnd == pPrepared || prepare_singleMarker(aMarkerPrimitives, aMarkerTransform, aClipRange, *pEnd))
{
More information about the Libreoffice-commits
mailing list