[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 8 commits - cppcanvas/source pyuno/zipcore scaddins/source sc/inc sc/source sd/source sd/uiconfig sw/source vcl/source
Michael Stahl
mstahl at redhat.com
Fri Dec 6 03:23:17 PST 2013
cppcanvas/source/mtfrenderer/emfplus.cxx | 2 +
pyuno/zipcore/python.cxx | 32 ++++++++++++++--------------
sc/inc/scmod.hxx | 1
sc/source/ui/app/inputhdl.cxx | 14 ++++++++++++
sc/source/ui/app/scmod.cxx | 7 ++++++
sc/source/ui/formdlg/formula.cxx | 2 -
sc/source/ui/inc/inputhdl.hxx | 1
scaddins/source/analysis/analysishelper.cxx | 2 -
sd/source/ui/view/drvwshrg.cxx | 1
sd/uiconfig/simpress/menubar/menubar.xml | 1
sw/source/core/access/accmap.cxx | 14 ++++++++----
sw/source/core/frmedt/fecopy.cxx | 23 ++++++++------------
vcl/source/gdi/gdimtf.cxx | 7 ++++++
13 files changed, 73 insertions(+), 34 deletions(-)
New commits:
commit 9e5b39c7a48f52cd86376b1f39297fcaa660f24b
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Dec 5 21:58:11 2013 +0100
fdo#71892: sw: fix crash when pasting table in footnote
The code that updates RSIDs assumes that the number of nodes copied is
the same as the number of nodes inserted, which is not true when pasting
a table into a footnote because Writer can't do that, hence all table
nodes are missing. Count inserted nodes instead.
(regression from 062eaeffe7cb986255063bb9b0a5f3fb3fc8e34c)
(cherry picked from commit 4580094d2d9d5b952c4526ee23204f75a5bb2f1b)
Conflicts:
sw/source/core/frmedt/fecopy.cxx
(cherry picked from commit 2171fff4c1a57ede8f9693d7c0d95c1171a49a70)
Change-Id: I77b5b7751d1036a6401f708532537d874969502e
Reviewed-on: https://gerrit.libreoffice.org/6951
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 3fa4a73..6c503dc 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1039,25 +1039,22 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
aIndexBefore--;
pClpDoc->CopyRange( aCpyPam, rInsPos, false );
+ // Note: aCpyPam is invalid now
- {
- ++aIndexBefore;
- SwPaM aPaM(SwPosition(aIndexBefore),
- SwPosition(rInsPos.nNode));
+ ++aIndexBefore;
+ SwPaM aPaM(SwPosition(aIndexBefore),
+ SwPosition(rInsPos.nNode));
- aPaM.GetDoc()->MakeUniqueNumRules(aPaM);
- }
- }
+ aPaM.GetDoc()->MakeUniqueNumRules(aPaM);
- // Update the rsid of each pasted text node.
- {
- xub_StrLen nNodesCnt = aCpyPam.End()->nNode.GetIndex() - aCpyPam.Start()->nNode.GetIndex();
+ // Update the rsid of each pasted text node.
SwNodes &rDestNodes = GetDoc()->GetNodes();
- xub_StrLen nDestStart = PCURCRSR->GetPoint()->nNode.GetIndex() - nNodesCnt;
+ sal_uLong const nEndIdx = aPaM.End()->nNode.GetIndex();
- for ( sal_uInt64 nIdx = 0; nIdx <= nNodesCnt; nIdx++ )
+ for (sal_uLong nIdx = aPaM.Start()->nNode.GetIndex();
+ nIdx <= nEndIdx; ++nIdx)
{
- SwTxtNode *pTxtNode = rDestNodes[ nDestStart + nIdx ]->GetTxtNode();
+ SwTxtNode *const pTxtNode = rDestNodes[nIdx]->GetTxtNode();
if ( pTxtNode )
{
GetDoc()->UpdateParRsid( pTxtNode );
commit a0bf832660765305a27985b1cd7517a0579a751e
Author: Rob Snelders <programming at ertai.nl>
Date: Thu Dec 5 23:56:52 2013 +0100
Partly revert "Resolves: #ii122335# Disabling the old task pane"
This partly reverts commit 95ae39c0c34c9a5e6fa6e72bf3a631a9a799b872.
SideBar is experimental, Impress still needs the TaskPane slot, otherwise once
disabled / clicked away the user won't get the TaskPane back.
Change-Id: I65b9e4a52ef2f3f1e7240fc01b828d2ff5d1589c
Reviewed-on: https://gerrit.libreoffice.org/6943
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index bb20370..c71959c 100644
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -94,6 +94,7 @@ SFX_IMPL_INTERFACE(GraphicViewShell, SfxShell, SdResId(STR_DRAWVIEWSHELL)) //SOH
{
SFX_POPUPMENU_REGISTRATION( SdResId(RID_DRAW_TEXTOBJ_INSIDE_POPUP) );
SFX_CHILDWINDOW_CONTEXT_REGISTRATION( SID_NAVIGATOR );
+ SFX_CHILDWINDOW_REGISTRATION( SID_TASKPANE );
SFX_CHILDWINDOW_REGISTRATION( SfxTemplateDialogWrapper::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SvxFontWorkChildWindow::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SvxColorChildWindow::GetChildWindowId() );
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 9ad2019..9a5b874 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -113,6 +113,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
<menu:menuitem menu:id=".uno:Sidebar"/>
<menu:menuitem menu:id=".uno:LeftPaneImpress"/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
commit 27bfae718f9e7806bcdf237fa5e78370f2aef7d0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 4 13:10:16 2013 +0000
Relater: rhbz#903281 NULL follow frames on drag/drop
Change-Id: I50319fb218518edd23ff8c859c355265595050d6
(cherry picked from commit f141505929c95c97ae4765d7c7221f07e41ef8e7)
Reviewed-on: https://gerrit.libreoffice.org/6926
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 5435961..5b81a26 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -747,12 +747,18 @@ static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc,
if( pAccImpl->GetFrm()->IsCellFrm() )
{
const SwTabFrm *pTabFrm1 = pAccImpl->GetFrm()->FindTabFrm();
- while( pTabFrm1->GetFollow() )
- pTabFrm1 = pTabFrm1->GetFollow();
+ if (pTabFrm1)
+ {
+ while (pTabFrm1->GetFollow())
+ pTabFrm1 = pTabFrm1->GetFollow();
+ }
const SwTabFrm *pTabFrm2 = pFrm->FindTabFrm();
- while( pTabFrm2->GetFollow() )
- pTabFrm2 = pTabFrm2->GetFollow();
+ if (pTabFrm2)
+ {
+ while (pTabFrm2->GetFollow())
+ pTabFrm2 = pTabFrm2->GetFollow();
+ }
bRet = (pTabFrm1 == pTabFrm2);
}
commit d6e809dbfe3af18a56c9bc0f93e0899f3933b613
Author: Andrzej J.R. Hunt <andrzej.hunt at collabora.com>
Date: Thu Dec 5 11:36:53 2013 +0000
EMF+: force canvas if EMF+ comments are used.
Without this the drawinglayer renderer is used, whereas
only the canvas renderer supports EMF+.
Change-Id: Id8a10e400e08c1913e7d6864a51f7b73fc9be437
(cherry picked from commit be7d87bea2611eb316b9b379aebc031179d4f794)
Reviewed-on: https://gerrit.libreoffice.org/6940
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index f5666a6..1240500 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2765,6 +2765,13 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
+ if (pAction->GetType() == META_COMMENT_ACTION)
+ {
+ MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
+ if ( pCommentAct->GetComment() == "EMF_PLUS" )
+ rGDIMetaFile.UseCanvas( sal_True );
+ }
+
if( pAction )
rGDIMetaFile.AddAction( pAction );
}
commit c480a301a39cce79e8f670b5b258f9d5788223fc
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 5 15:57:50 2013 +0100
Revert "Resolves: fdo#72174 convert_add from "at" or "atm" to "Pa" gives same answer"
This reverts commit 4139dc70da04fe3d6a86bbab1e7bf6f11d812f04.
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index d5ff83b..d84dc39 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2541,7 +2541,7 @@ ConvertDataList::ConvertDataList( void )
// PRESSURE: 1 Pascal is...
NEWDP( "Pa", 1.0000000000000000E00, CDC_Pressure ); // Pascal
NEWDP( "atm", 9.8692329999819300E-06, CDC_Pressure ); // Atmosphere
- NEWDP( "at", 1.0197162129779000E-05, CDC_Pressure ); // Atmosphere also
+ NEWDP( "at", 9.8692329999819300E-06, CDC_Pressure ); // Atmosphere also
NEWDP( "mmHg", 7.5006170799862700E-03, CDC_Pressure ); // mm Hg (Mercury)
NEWD( "Torr", 7.5006380000000000E-03, CDC_Pressure ); // *** Torr
NEWD( "psi", 1.4503770000000000E-04, CDC_Pressure ); // *** Psi
commit 516dfa47d35e934cacd0ab66ae032f57482a6ded
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Wed Dec 4 16:57:34 2013 +0100
EMF+: Do not ignore source rectangle of the image to be rendered.
Change-Id: I4f861c7653c89d8f1ca73696e885f33f7bfc3b06
Reviewed-on: https://gerrit.libreoffice.org/6932
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index a289610..a8fca09 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1857,6 +1857,7 @@ namespace cppcanvas
sal_Int32 aCount;
ReadRectangle (rMF, sx, sy, sw, sh);
+ Rectangle aSource(Point(sx, sy), Size(sw, sh));
SAL_INFO("cppcanvas.emf", "EMF+ " << (type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage") << " source rectangle: " << sx << "," << sy << " " << sw << "x" << sh);
@@ -1897,6 +1898,7 @@ namespace cppcanvas
if (bValid) {
BitmapEx aBmp( image.graphic.GetBitmapEx () );
+ aBmp.Crop( aSource );
Size aSize( aBmp.GetSizePixel() );
SAL_INFO("cppcanvas.emf", "EMF+ bitmap size: " << aSize.Width() << "x" << aSize.Height());
commit e8a049e0f099bf0716ab8b8be77eb70aa1d198a6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Nov 29 17:26:54 2013 +0100
wsprintf is broken by design and never writes more than 1024 characters
Change-Id: I791e55bb5d98ee82c01271dcebafa7c4672cd424
(cherry picked from commit 50bd5c11f551f5274be9a4411c5ddcbd32bd9a03)
Reviewed-on: https://gerrit.libreoffice.org/6930
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx
index 34ff2e2..2d090fc 100644
--- a/pyuno/zipcore/python.cxx
+++ b/pyuno/zipcore/python.cxx
@@ -192,10 +192,12 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
exit(EXIT_FAILURE);
}
}
- wchar_t * value = new wchar_t[
- (urepathEnd - urepath) + MY_LENGTH(L";") + (pathEnd - path) +
- (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1]; //TODO: overflow
- wsprintfW(value, L"%s;%s%s%s", urepath, path, n == 0 ? L"" : L";", orig);
+ std::size_t len = (urepathEnd - urepath) + MY_LENGTH(L";") +
+ (pathEnd - path) + (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1;
+ //TODO: overflow
+ wchar_t * value = new wchar_t[len];
+ _snwprintf(
+ value, len, L"%s;%s%s%s", urepath, path, n == 0 ? L"" : L";", orig);
if (!SetEnvironmentVariableW(L"PATH", value)) {
exit(EXIT_FAILURE);
}
@@ -218,21 +220,21 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
}
}
#ifdef __MINGW32__
- value = new wchar_t[
- (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
+ len = (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
MY_LENGTH(L";") + (pythonpath4End - pythonpath4) +
MY_LENGTH(L";") + (pythonpath3End - pythonpath3) +
- (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1]; //TODO: overflow
- wsprintfW(
- value, L"%s;%s;%s;%s%s%s", path, pythonpath2, pythonpath4, pythonpath3,
- n == 0 ? L"" : L";", orig);
+ (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1; //TODO: overflow
+ value = new wchar_t[len];
+ _snwprintf(
+ value, len, L"%s;%s;%s;%s%s%s", path, pythonpath2, pythonpath4,
+ pythonpath3, n == 0 ? L"" : L";", orig);
#else
- value = new wchar_t[
- (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
+ len = (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
MY_LENGTH(L";") + (pythonpath3End - pythonpath3) +
- (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1]; //TODO: overflow
- wsprintfW(
- value, L"%s;%s;%s%s%s", path, pythonpath2, pythonpath3,
+ (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1; //TODO: overflow
+ value = new wchar_t[len];
+ _snwprintf(
+ value, len, L"%s;%s;%s%s%s", path, pythonpath2, pythonpath3,
n == 0 ? L"" : L";", orig);
#endif
if (!SetEnvironmentVariableW(L"PYTHONPATH", value)) {
commit 77dc09487f8c9eb6cc52722daefd3d63e0dbc0a7
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 5 01:50:38 2013 +0100
resolved fdo#71667 and fdo#72278, fdo#69971 follow-up fix
a9d85d62a889288b17899c8defc020da487d8b36 used
ScInputHandler::EnterHandler() to reset all sort of things related to
input EditEngine, but that is a handler for Enter and does not enter a
handler and actually attempts to finalize input, which lead to various
unwanted side effects.
Introduced ScInputHandler::InputTurnOffWinEngine() as only the input bar
window EditEngine needs to be reset in the window switching case (which
EnterHandler also does hence it did prevent that bug). The approach
could be polished with further refinement but most importantly fixes the
actual problems now.
(cherry picked from commit dfd1a47a38dac743f9ed0f1e9507714bac027d35)
Conflicts:
sc/inc/scmod.hxx
sc/source/ui/app/scmod.cxx
Change-Id: I9a0bc452b49ba11a3313cafbc1e5972f41dc65c7
Reviewed-on: https://gerrit.libreoffice.org/6935
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 5f2e61a..014edb1 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -222,6 +222,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd );
void InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd );
void InputReplaceSelection( const String& rStr );
+ void InputTurnOffWinEngine();
String InputGetFormulaStr();
void ActivateInputWindow( const String* pStr = NULL,
sal_Bool bMatrix = false );
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 76e0752..b31489c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3894,6 +3894,20 @@ void ScInputHandler::InputReplaceSelection( const OUString& rStr )
bModified = true;
}
+void ScInputHandler::InputTurnOffWinEngine()
+{
+ bInOwnChange = true; // disable ModifyHdl (reset below)
+
+ eMode = SC_INPUT_NONE;
+ /* TODO: it would be better if there was some way to reset the input bar
+ * engine instead of deleting and having it recreate through
+ * GetFuncEditView(), but first least invasively let this fix fdo#71667 and
+ * fdo#72278 without reintroducing fdo#69971. */
+ StopInputWinEngine(true);
+
+ bInOwnChange = false;
+}
+
//========================================================================
// ScInputHdlState
//========================================================================
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 5a57479..182eb6e 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1543,6 +1543,13 @@ void ScModule::InputReplaceSelection( const String& rStr )
pHdl->InputReplaceSelection( rStr );
}
+void ScModule::InputTurnOffWinEngine()
+{
+ ScInputHandler* pHdl = GetInputHdl();
+ if (pHdl)
+ pHdl->InputTurnOffWinEngine();
+}
+
String ScModule::InputGetFormulaStr()
{
ScInputHandler* pHdl = GetInputHdl();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 80268da..2deaf0d 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -621,7 +621,7 @@ void ScFormulaDlg::setCurrentFormula(const String& _sReplacement)
//ScMultiTextWnd::Paint a new editengine will have been created via
//GetEditView with its default Modification handler enabled. So ensure
//its off when we will access it via InputReplaceSelection
- pScMod->InputEnterHandler();
+ pScMod->InputTurnOffWinEngine();
}
pScMod->InputReplaceSelection(_sReplacement);
}
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 0f0ac6e..8d0d44f 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -233,6 +233,7 @@ public:
void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
void InputSetSelection ( xub_StrLen nStart, xub_StrLen nEnd );
void InputReplaceSelection ( const OUString& rStr );
+ void InputTurnOffWinEngine();
bool IsFormulaMode() const { return bFormulaMode; }
ScInputWindow* GetInputWindow() { return pInputWin; }
More information about the Libreoffice-commits
mailing list