Kaydet (Commit) 90716272 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

setting the document modified during import is insane

This helps with some huge documents and takes 90% of the time of the
import. The correct next step is to get rid of UNO in the calc style
import.

Change-Id: I6cbd315906405d8f438d99effad122af8edeb01d
üst 6acfb0e7
...@@ -704,7 +704,8 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno:: ...@@ -704,7 +704,8 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden
pDocShell->SetDocumentModified(); // verwendet wird der neue Style noch nicht if (!rDoc.IsImportingXML())
pDocShell->SetDocumentModified(); // verwendet wird der neue Style noch nicht
bDone = true; bDone = true;
} }
else else
...@@ -1103,8 +1104,11 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle ) ...@@ -1103,8 +1104,11 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
Fraction aZoom(1,1); Fraction aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); if (!rDoc.IsImportingXML())
pDocShell->SetDocumentModified(); {
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
}
} }
else else
{ {
...@@ -1467,8 +1471,11 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() ...@@ -1467,8 +1471,11 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
Fraction aZoom(1,1); Fraction aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); if (!rDoc.IsImportingXML())
pDocShell->SetDocumentModified(); {
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
}
} }
else else
{ {
...@@ -1846,8 +1853,11 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt ...@@ -1846,8 +1853,11 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
Fraction aZoom(1,1); Fraction aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom ); rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT ); if (!rDoc.IsImportingXML())
pDocShell->SetDocumentModified(); {
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment