View | Details | Raw Unified | Return to issue 120389
Collapse All | Expand All

(-)a/main/sw/source/core/view/printdata.cxx (-3 / +8 lines)
Lines 78-83 void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, Link Here
78
    m_pPostItFields = new _SetGetExpFlds;
78
    m_pPostItFields = new _SetGetExpFlds;
79
    lcl_GetPostIts( pDoc, m_pPostItFields );
79
    lcl_GetPostIts( pDoc, m_pPostItFields );
80
    m_pPostItDoc    = new SwDoc;
80
    m_pPostItDoc    = new SwDoc;
81
    m_pPostItDoc->acquire();
81
82
82
    //!! Disable spell and grammar checking in the temporary document.
83
    //!! Disable spell and grammar checking in the temporary document.
83
    //!! Otherwise the grammar checker might process it and crash if we later on
84
    //!! Otherwise the grammar checker might process it and crash if we later on
Lines 94-104 void SwRenderData::DeletePostItData() Link Here
94
    if (HasPostItData())
95
    if (HasPostItData())
95
    {
96
    {
96
        m_pPostItDoc->setPrinter( 0, false, false );  //damit am echten DOC der Drucker bleibt
97
        m_pPostItDoc->setPrinter( 0, false, false );  //damit am echten DOC der Drucker bleibt
97
        delete m_pPostItShell;        //Nimmt das PostItDoc mit ins Grab.
98
        delete m_pPostItShell;
98
        delete m_pPostItFields;
99
        m_pPostItDoc    = 0;
100
        m_pPostItShell  = 0;
99
        m_pPostItShell  = 0;
100
        delete m_pPostItFields;
101
        m_pPostItFields = 0;
101
        m_pPostItFields = 0;
102
        if ( !m_pPostItDoc->release() )
103
        {
104
            delete m_pPostItDoc;
105
        }
106
        m_pPostItDoc    = 0;
102
    }
107
    }
103
}    
108
}    
104
109
(-)a/main/sw/source/ui/uno/unotxdoc.cxx (+4 lines)
Lines 2786-2791 sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( Link Here
2786
            const sal_Int16 nPostItMode = (sal_Int16) m_pPrintUIOptions->getIntValue( "PrintAnnotationMode", 0 );
2786
            const sal_Int16 nPostItMode = (sal_Int16) m_pPrintUIOptions->getIntValue( "PrintAnnotationMode", 0 );
2787
            if (nPostItMode != POSTITS_NONE)
2787
            if (nPostItMode != POSTITS_NONE)
2788
            {
2788
            {
2789
                if ( m_pRenderData->HasPostItData() )
2790
                {
2791
                    m_pRenderData->DeletePostItData();
2792
                }
2789
                OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
2793
                OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
2790
                m_pRenderData->CreatePostItData( pDoc, pViewShell->GetViewOptions(), pOutDev );
2794
                m_pRenderData->CreatePostItData( pDoc, pViewShell->GetViewOptions(), pOutDev );
2791
            }
2795
            }

Return to issue 120389