[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 25 05:01:58 PDT 2012


 sw/source/core/doc/docnew.cxx |  134 +++++++++++++++++++++---------------------
 1 file changed, 68 insertions(+), 66 deletions(-)

New commits:
commit de6c8db94a2fd805fcfc6e1147f33cb727e27919
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Oct 21 15:31:22 2012 +0200

    More efficient way to initialize SwDoc
    
    Change-Id: Icde740ea12e8839b0a4c8e0317143dbe2157a964
    Reviewed-on: https://gerrit.libreoffice.org/894
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 00da7bd..60430ef 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -256,67 +256,96 @@ SwDoc::SwDoc()
     pStyleAccess( 0 ),
     pLayoutCache( 0 ),
     pUnoCallBack(new SwModify(0)),
-    mpGrammarContact( 0 ),
+    mpGrammarContact(createGrammarContact()),
     aChartDataProviderImplRef(),
     pChartControllerHelper( 0 ),
     mpListItemsList( new tImplSortedNodeNumList() ), // #i83479#
     m_pXmlIdRegistry(),
     nAutoFmtRedlnCommentNo( 0 ),
     nLinkUpdMode( GLOBALSETTING ),
-     eFldUpdMode( AUTOUPD_GLOBALSETTING ),
+    eFldUpdMode( AUTOUPD_GLOBALSETTING ),
     eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)),
     eChrCmprType( CHARCOMPRESS_NONE ),
     mReferenceCount(0),
     mIdleBlockCount(0),
     nLockExpFld( 0 ),
+    mbGlossDoc(false),
+    mbModified(false),
+    mbDtor(false),
+    mbPageNums(false),
+    mbLoaded(false),
+    mbUpdateExpFld(false),
+    mbNewDoc(false),
+    mbNewFldLst(true),
+    mbCopyIsMove(false),
+    mbVisibleLinks(true),
+    mbInReading(false),
+    mbInXMLImport(false),
+    mbUpdateTOX(false),
+    mbInLoadAsynchron(false),
+    mbHTMLMode(false),
+    mbInCallModified(false),
+    mbIsGlobalDoc(false),
+    mbGlblDocSaveLinks(false),
+    mbIsLabelDoc(false),
+    mbIsAutoFmtRedline(false),
+    mbOLEPrtNotifyPending(false),
+    mbAllOLENotify(false),
+    mbIsRedlineMove(false),
+    mbInsOnlyTxtGlssry(false),
+    mbContains_MSVBasic(false),
+    mbPurgeOLE(true),
+    mbKernAsianPunctuation(false),
     mbReadlineChecked(false),
-    mbLinksUpdated( sal_False ), //#i38810#
+    mbLinksUpdated( false ), //#i38810#
     mbClipBoard( false ),
     mbColumnSelection( false ),
+#ifdef DBG_UTIL
+    mbXMLExport(false),
+#endif
+
+    mbApplyWorkaroundForB6375613(false),
+
+    // COMPATIBILITY FLAGS START
+
+    mbAddFlyOffsets(false),
+    mbUseHiResolutionVirtualDevice(true),
+    mbMathBaselineAlignment(false), // default for *old* documents is 'off'
+    mbStylesNoDefault(false),
+    mbFloattableNomargins(false),
+    mEmbedFonts(false),
+    mEmbedSystemFonts(false),
+    mbOldNumbering(false),
+    mbIgnoreFirstLineIndentInNumbering(false),
+    mbDoNotResetParaAttrsForNumFont(false),
+    mbTableRowKeep(false),
+    mbIgnoreTabsAndBlanksForLineCalculation(false),
+    mbDoNotCaptureDrawObjsOnPage(false),
+    mbOutlineLevelYieldsOutlineRule(false),
+    mbClipAsCharacterAnchoredWriterFlyFrames(false),
+    mbUnixForceZeroExtLeading(false),
+    mbOldPrinterMetrics(false),
+    mbTabRelativeToIndent(true),
     mbProtectForm(false), // i#78591#
+    mbInvertBorderSpacing (false),
+    mbCollapseEmptyCellPara(true),
+    mbTabAtLeftIndentForParagraphsInList(false), //#i89181#
+    mbSmallCapsPercentage66(false),
+    mbTabOverflow(true),
+    mbUnbreakableNumberings(false),
+    mbClippedPictures(false),
+    mbBackgroundParaOverDrawings(false),
     mbLastBrowseMode( false ),
     n32DummyCompatabilityOptions1(0),
     n32DummyCompatabilityOptions2(0),
+
+    // COMPATIBILITY FLAGS END
+
     mbStartIdleTimer(sal_False),
     mbSetDrawDefaults(false)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDoc::SwDoc" );
 
-    mbGlossDoc =
-    mbModified =
-    mbDtor =
-    mbPageNums =
-    mbLoaded =
-    mbUpdateExpFld =
-    mbNewDoc =
-    mbCopyIsMove =
-    mbInReading =
-    mbInXMLImport =
-    mbUpdateTOX =
-    mbInLoadAsynchron =
-    mbHTMLMode =
-    mbInCallModified =
-    mbIsGlobalDoc =
-    mbGlblDocSaveLinks =
-    mbIsLabelDoc =
-    mbIsAutoFmtRedline =
-    mbOLEPrtNotifyPending =
-    mbAllOLENotify =
-    mbIsRedlineMove =
-    mbInsOnlyTxtGlssry =
-    mbContains_MSVBasic =
-    mbKernAsianPunctuation =
-#ifdef DBG_UTIL
-    mbXMLExport =
-#endif
-    mbApplyWorkaroundForB6375613 =
-                            false;
-
-    mbNewFldLst =
-    mbVisibleLinks =
-    mbPurgeOLE =
-                            true;
-
     //
     // COMPATIBILITY FLAGS START
     //
@@ -335,40 +364,13 @@ SwDoc::SwDoc()
     mbUseFormerObjectPos                = aOptions.IsUseObjectPositioning();
     mbUseFormerTextWrapping             = aOptions.IsUseOurTextWrapping();
     mbConsiderWrapOnObjPos              = aOptions.IsConsiderWrappingStyle();
-    mbMathBaselineAlignment                 = false;        // default for *old* documents is 'off'
-    mbStylesNoDefault                       = false;
-    mbAddFlyOffsets                         = false;        // hidden
-    mbOldNumbering                          = false;        // hidden
-    mbUseHiResolutionVirtualDevice          = true;         // hidden
-    mbIgnoreFirstLineIndentInNumbering      = false;        // hidden
+
     mbDoNotJustifyLinesWithManualBreak      = !aOptions.IsExpandWordSpace();
-    mbDoNotResetParaAttrsForNumFont         = false;        // hidden
-    mbOutlineLevelYieldsOutlineRule         = false;        // hidden
-    mbTableRowKeep                          = false;        // hidden
-    mbIgnoreTabsAndBlanksForLineCalculation = false;        // hidden
-    mbDoNotCaptureDrawObjsOnPage            = false;        // hidden
-    mbClipAsCharacterAnchoredWriterFlyFrames= false;        // hidden
-    mbUnixForceZeroExtLeading               = false;        // hidden
-    mbOldPrinterMetrics                     = false;        // hidden
-    mbTabRelativeToIndent                   = true;         // hidden
-    mbTabAtLeftIndentForParagraphsInList    = false;        // hidden #i89181#
-    mbInvertBorderSpacing                   = false;        // hidden
-    mbCollapseEmptyCellPara                 = true;        // hidden
-    mbSmallCapsPercentage66                 = false;        // hidden
-    mbTabOverflow                           = true;
-    mbUnbreakableNumberings                 = false;
-    mbFloattableNomargins                   = false;
-    mbClippedPictures                       = false;
-    mbBackgroundParaOverDrawings            = false;
-    mEmbedFonts                             = false;
-    mEmbedSystemFonts                       = false;
 
     //
     // COMPATIBILITY FLAGS END
     //
 
-    mpGrammarContact = ::createGrammarContact();
-
     /*
      * DefaultFormats and DefaultFormatCollections (FmtColl)
      * are inserted at position 0 at the respective array.


More information about the Libreoffice-commits mailing list