[Libreoffice-commits] core.git: 3 commits - include/editeng sc/source sd/source sw/source

Tor Lillqvist tml at collabora.com
Thu Oct 2 11:56:33 PDT 2014


 include/editeng/editstat.hxx          |    3 ---
 sc/source/core/tool/editutil.cxx      |    2 --
 sc/source/ui/view/viewdata.cxx        |    1 -
 sd/source/core/drawdoc.cxx            |    2 --
 sd/source/ui/docshell/docshel4.cxx    |   22 ++++++++++++++++++++++
 sd/source/ui/view/Outliner.cxx        |    1 -
 sd/source/ui/view/sdview.cxx          |    1 -
 sw/source/uibase/docvw/SidebarWin.cxx |    2 +-
 sw/source/uibase/uiview/viewdraw.cxx  |    1 -
 9 files changed, 23 insertions(+), 12 deletions(-)

New commits:
commit ede0abe6b1a0bf1ffbfe2ff9258e5b78f2cc606e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 2 18:07:04 2014 +0300

    Bin EE_CNTRL_URLSFXEXECUTE which was only set, never tested
    
    Change-Id: I18a9355bb902b19f0eeecb26d33eba4fb25db8cb

diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index 2914821..243ff07 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -39,7 +39,6 @@
 #define EE_CNTRL_ONLINESPELLING     0x00001000  // During the edit Spelling
 #define EE_CNTRL_STRETCHING         0x00002000  // Stretch mode
 #define EE_CNTRL_MARKFIELDS         0x00004000  // Mark Fields with color
-#define EE_CNTRL_URLSFXEXECUTE      0x00008000  // !!!OLD!!!: SFX-URL-Execute.
 #define EE_CNTRL_RESTOREFONT        0x00010000  // Restore Font in OutDev
 #define EE_CNTRL_RTFSTYLESHEETS     0x00020000  // Use Stylesheets when imported
 #define EE_CNTRL_AUTOCORRECT        0x00080000  // AutoCorrect
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 245831f..59d39c8 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -852,8 +852,6 @@ ScFieldEditEngine::ScFieldEditEngine(
 {
     if ( pTextObjectPool )
         SetEditTextObjectPool( pTextObjectPool );
-    //  EE_CNTRL_URLSFXEXECUTE nicht, weil die Edit-Engine den ViewFrame nicht kennt
-    // wir haben keine StyleSheets fuer Text
     SetControlWord( (GetControlWord() | EE_CNTRL_MARKFIELDS) & ~EE_CNTRL_RTFSTYLESHEETS );
 }
 
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 688813c..af08c70 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2997,7 +2997,6 @@ void ScViewData::UpdateOutlinerFlags( Outliner& rOutl ) const
     bool bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell();
 
     sal_uLong nCntrl = rOutl.GetControlWord();
-    nCntrl |= EE_CNTRL_URLSFXEXECUTE;
     nCntrl |= EE_CNTRL_MARKFIELDS;
     nCntrl |= EE_CNTRL_AUTOCORRECT;
     if( bOnlineSpell )
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 89d5f2b..772364f 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -279,7 +279,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
 
     sal_uLong nCntrl = rOutliner.GetControlWord();
     nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
-    nCntrl |= EE_CNTRL_URLSFXEXECUTE;
 
     if (mbOnlineSpell)
         nCntrl |= EE_CNTRL_ONLINESPELLING;
@@ -327,7 +326,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
 
     sal_uLong nCntrl2 = pHitTestOutliner->GetControlWord();
     nCntrl2 |= EE_CNTRL_ALLOWBIGOBJS;
-    nCntrl2 |= EE_CNTRL_URLSFXEXECUTE;
     nCntrl2 &= ~EE_CNTRL_ONLINESPELLING;
 
     nCntrl2 &= ~ EE_CNTRL_ULSPACESUMMATION;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index ccca487..7a25bcd 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -173,7 +173,6 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
 
     sal_uLong nCntrl = GetControlWord();
     nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
-    nCntrl |= EE_CNTRL_URLSFXEXECUTE;
     nCntrl |= EE_CNTRL_MARKFIELDS;
     nCntrl |= EE_CNTRL_AUTOCORRECT;
 
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 98d90a4..3a4fc53 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -681,7 +681,6 @@ bool View::SdrBeginTextEdit(
         pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
         sal_uLong nCntrl = pOutl->GetControlWord();
         nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
-        nCntrl |= EE_CNTRL_URLSFXEXECUTE;
         nCntrl |= EE_CNTRL_MARKFIELDS;
         nCntrl |= EE_CNTRL_AUTOCORRECT;
 
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 454eb71..d3c1b0b 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -420,7 +420,7 @@ void SwSidebarWin::InitControls()
     const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
     sal_uLong nCntrl = mpOutliner->GetControlWord();
     // TODO: crash when AUTOCOMPLETE enabled
-    nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT  | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
+    nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT  | EV_CNTRL_AUTOSCROLL; // | EE_CNTRL_AUTOCOMPLETE;
     if (SwViewOption::IsFieldShadings())
         nCntrl |= EE_CNTRL_MARKFIELDS;
     else
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 3169d2d..14c416f7 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -523,7 +523,6 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
 
         sal_uInt32 nCntrl = pOutliner->GetControlWord();
         nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
-        nCntrl |= EE_CNTRL_URLSFXEXECUTE;
 
         const SwViewOption *pOpt = pSh->GetViewOptions();
 
commit 1d0636ebc660a9f74269807b416f2f1480f49530
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 2 18:03:44 2014 +0300

    Bin commented-out #defines
    
    Change-Id: I01f473658708a75c3eac6219efd38cd8ec5aa44f

diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index 8fd9f40..2914821 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -42,7 +42,6 @@
 #define EE_CNTRL_URLSFXEXECUTE      0x00008000  // !!!OLD!!!: SFX-URL-Execute.
 #define EE_CNTRL_RESTOREFONT        0x00010000  // Restore Font in OutDev
 #define EE_CNTRL_RTFSTYLESHEETS     0x00020000  // Use Stylesheets when imported
-//#define EE_CNTRL_NOREDLINES            0x00040000  // No RedLines when OnlineSpellError     /* removed #i91949 */
 #define EE_CNTRL_AUTOCORRECT        0x00080000  // AutoCorrect
 #define EE_CNTRL_AUTOCOMPLETE       0x00100000  // AutoComplete
 #define EE_CNTRL_AUTOPAGESIZEX      0x00200000  // Adjust paper width to Text
@@ -71,7 +70,6 @@
 #define EE_STAT_TEXTWIDTHCHANGED    0x00000020
 #define EE_STAT_TEXTHEIGHTCHANGED   0x00000040
 #define EE_STAT_WRONGWORDCHANGED    0x00000080
-// #define EE_STAT_MODIFIED         0x00000100
 
 /*
     EE_STAT_CRSRLEFTPARA at the time cursor movement and the enter.
commit 96d210bf9ca0a99fc8256d6e0a4952207cce69e0
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 2 16:52:54 2014 +0300

    bnc#657899: Paragraph vertical spacing differs from PowerPoint
    
    We need to set the "paragraph summation" flag also for .pptx import. (As is
    already done for .ppt import.)
    
    This is what in the Options (Preferences) UI is called "Add spacing between
    paragraphs and tables (in current document)", on the LibreOffice
    Impress:General page. This is a setting that when set becomes local to the
    document. I actually don't really understand why this needs to be a
    user-visible option, wouldn't it be enough for it to be an internal flag that
    is set for documents imported from .ppt and .pptx, and is clear otherwise?
    
    Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27

diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 1108721..3be0607 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -23,6 +23,8 @@
 #include <sfx2/progress.hxx>
 #include <vcl/waitobj.hxx>
 #include <svx/svxids.hrc>
+#include <editeng/editeng.hxx>
+#include <editeng/editstat.hxx>
 #include <editeng/flstitem.hxx>
 #include <editeng/eeitem.hxx>
 #include <svl/aeitem.hxx>
@@ -374,6 +376,26 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
 bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
         uno::Reference<text::XTextRange> const& xInsertPosition)
 {
+    const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
+    if( aFilterName == "Impress MS PowerPoint 2007 XML" ||
+        aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" )
+    {
+        // As this is a MSFT format, we should use the "MS Compat"
+        // mode for spacing before and after paragraphs.
+
+        // This is copied from what is done for .ppt import in
+        // ImplSdPPTImport::Import() in sd/source/filter/ppt/pptin.cxx
+        // in. We need to tell both the edit engine of the draw outliner,
+        // and the document, to do "summation of paragraphs".
+        SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
+        sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord();
+        nControlWord |=  EE_CNTRL_ULSPACESUMMATION;
+        nControlWord &=~ EE_CNTRL_ULSPACEFIRSTPARA;
+        ((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
+
+        mpDoc->SetSummationOfParagraphs( true );
+    }
+
     const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
 
     SfxItemSet* pSet = rMedium.GetItemSet();


More information about the Libreoffice-commits mailing list