[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 13 commits - connectivity/source extensions/source javaunohelper/com lotuswordpro/source sc/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jan 4 03:16:23 PST 2016
connectivity/source/drivers/firebird/PreparedStatement.cxx | 10 +-
connectivity/source/drivers/firebird/Util.cxx | 16 +--
extensions/source/abpilot/typeselectionpage.cxx | 2
javaunohelper/com/sun/star/comp/helper/Bootstrap.java | 58 +++++++++++--
lotuswordpro/source/filter/lwpfrib.cxx | 4
lotuswordpro/source/filter/lwpfribmark.cxx | 4
lotuswordpro/source/filter/lwpfribptr.cxx | 9 +-
lotuswordpro/source/filter/lwpfribsection.cxx | 47 ++++++----
lotuswordpro/source/filter/lwpfribtable.cxx | 10 +-
lotuswordpro/source/filter/lwplayout.cxx | 11 +-
lotuswordpro/source/filter/lwplayout.hxx | 12 ++
lotuswordpro/source/filter/lwppara.cxx | 6 -
lotuswordpro/source/filter/lwptoc.cxx | 7 +
lotuswordpro/source/filter/xfilter/xfcell.cxx | 2
sc/source/filter/excel/xechart.cxx | 1
sw/source/core/view/viewsh.cxx | 4
16 files changed, 139 insertions(+), 64 deletions(-)
New commits:
commit 5800444912989f58e827daabcb51be080b42bfb1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 29 10:54:53 2015 +0000
return early if Container invalidated
Change-Id: I3983070f1fe447e4b75b956cf95d3b3c5266b3f9
(cherry picked from commit 78c6be9cf3c9c3c87d2f41981bdc61047171eafe)
(cherry picked from commit 312ae095c17812f40d08997acc058a1314675af5)
Reviewed-on: https://gerrit.libreoffice.org/21001
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 7fd61a5e182597ddf41bb957dcaef11fe0eef816)
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 520be75..1825dee 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -253,6 +253,8 @@ void LwpPara::Parse(IXFStream* pOutputStream)
{
m_pXFContainer = new XFContentContainer;
XFConvert(m_pXFContainer);
+ if (!m_pXFContainer)
+ return;
m_pXFContainer->ToXml(pOutputStream);
m_pXFContainer->Reset();
delete m_pXFContainer;
commit 176802fa72c9952b1ea7ea632cfcaa198b9c0290
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 28 14:43:50 2015 +0000
guard against infinite recursion in GetGeometry
(cherry picked from commit 9ec011f6874cf663db54d0420c41d9299e4ed882)
(cherry picked from commit 02c113a3ab57d7880bb1f794e192fb42aea078e1)
Change-Id: I901f77f5846512cb528f2e14bbc50409fa29bef2
Reviewed-on: https://gerrit.libreoffice.org/20988
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit ab8c84b1b1d14adc0cabbc063ba8a5132a540201)
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index a0d3a510..53e1261 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -585,9 +585,12 @@ void LwpLayoutMisc::Read(LwpObjectStream* pStrm)
}
LwpMiddleLayout::LwpMiddleLayout( LwpObjectHeader &objHdr, LwpSvStream* pStrm )
- : LwpVirtualLayout(objHdr, pStrm),
- m_pStyleStuff(new LwpLayoutStyle), m_pMiscStuff(new LwpLayoutMisc)
-{}
+ : LwpVirtualLayout(objHdr, pStrm)
+ , m_pStyleStuff(new LwpLayoutStyle)
+ , m_pMiscStuff(new LwpLayoutMisc)
+ , m_bGettingGeometry(false)
+{
+}
LwpMiddleLayout::~LwpMiddleLayout()
{
@@ -663,7 +666,7 @@ rtl::Reference<LwpObject> LwpMiddleLayout::GetBasedOnStyle()
* @descr: Get the geometry of current layout
*
*/
-LwpLayoutGeometry* LwpMiddleLayout::GetGeometry()
+LwpLayoutGeometry* LwpMiddleLayout::Geometry()
{
if( !m_LayGeometry.IsNull() )
{
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index 749513b..f540aec 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -321,7 +321,15 @@ public:
virtual bool MarginsSameAsParent() SAL_OVERRIDE;
virtual double MarginsValue(const sal_uInt8& nWhichSide) SAL_OVERRIDE;
virtual double GetExtMarginsValue(const sal_uInt8& nWhichSide) SAL_OVERRIDE;
- LwpLayoutGeometry* GetGeometry();
+ LwpLayoutGeometry* GetGeometry()
+ {
+ if (m_bGettingGeometry)
+ throw std::runtime_error("recursion in layout");
+ m_bGettingGeometry = true;
+ auto pRet = Geometry();
+ m_bGettingGeometry = false;
+ return pRet;
+ }
double GetGeometryHeight();
double GetGeometryWidth();
LwpBorderStuff* GetBorderStuff();
@@ -369,6 +377,7 @@ protected:
void Read() SAL_OVERRIDE;
private:
LwpObjectID m_BasedOnStyle;
+ LwpLayoutGeometry* Geometry();
protected:
enum
{
@@ -387,6 +396,7 @@ protected:
LwpObjectID m_LayBorderStuff;
LwpObjectID m_LayBackgroundStuff;
LwpObjectID m_LayExtBorderStuff;
+ bool m_bGettingGeometry;
public:
LwpObjectID& GetContent() { return m_Content; }
LwpTabOverride* GetTabOverride();
commit 733974d3d2b85ae094bbe9a810e6a87008781962
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 27 20:14:27 2015 +0000
guard against missing Foundry
Change-Id: I5ba66ff020b8226ac01af985f68c3ef67057c01a
(cherry picked from commit 7f9b57bda4d88262ecbe45188888c744913b9770)
(cherry picked from commit 5ae038d2341e4a7f8dedb77be75efd557d01bcc9)
Reviewed-on: https://gerrit.libreoffice.org/20967
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 934e28385b5e7462a36780a04a08013d00924fb5)
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx
index 143a00f..2a51e0e 100644
--- a/lotuswordpro/source/filter/lwpfribmark.cxx
+++ b/lotuswordpro/source/filter/lwpfribmark.cxx
@@ -136,12 +136,12 @@ void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory)
void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
{
OUString name;
- LwpBookMark* pBook = pFoundry->GetBookMark(GetMarkerID());
+ LwpBookMark* pBook = pFoundry ? pFoundry->GetBookMark(GetMarkerID()) : nullptr;
if (pBook)
name = pBook->GetName();
OUString sDivision;
- LwpDocument* pDoc = pFoundry->GetDocument();
+ LwpDocument* pDoc = pFoundry ? pFoundry->GetDocument() : nullptr;
if (pDoc)
{
LwpObjectID& rID = pDoc->GetDivInfoID();
commit b2a62de9bee2eeaa38a273feb266c024ea024439
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Dec 27 20:18:08 2015 +0000
guard against missing Container Layout
Change-Id: Ie43b13448a6cacd3af4822b85f06ed84a2d38ff9
(cherry picked from commit 932c74e38ca397d82d609831e79ceaef2183cf64)
(cherry picked from commit 1b2015281ee34f187fdb747db5f6223e8de63df4)
Reviewed-on: https://gerrit.libreoffice.org/20968
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 7f4fcdbda41753c7923974c0af58271e38cdabe3)
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index ce2c239..ec6cb5e 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -287,7 +287,10 @@ void LwpTocSuperLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nSt
XFContentContainer * pTableContainer = pXFFrame;
// if *this is a TOCSuperTableLayout and it's located in a cell
// add the frame to upper level and add TOCSuperTableLayout into the frame
- if ( GetContainerLayout()->IsCell() )
+ rtl::Reference<LwpVirtualLayout> xContainer(GetContainerLayout());
+ if (!xContainer.is())
+ return;
+ if (xContainer->IsCell())
{
pTableContainer = pCont; // TOC contain table directly
pXFFrame->Add(pCont);
@@ -296,7 +299,7 @@ void LwpTocSuperLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nSt
else
{
//add frame to the container
- pCont ->Add(pXFFrame);
+ pCont->Add(pXFFrame);
}
pTableLayout->XFConvert(pTableContainer);
}
commit ea16a20b15db733cc9bf35d4fc9cd9624ed2e2ce
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Dec 18 16:54:00 2015 +0100
tdf#96572 firebird correctly transmit request for NULL
even if column is not nullable
Conflicts:
connectivity/source/drivers/firebird/Util.cxx
Change-Id: I72ceda68e983125aef26c8f0aacc06320bd16b77
Reviewed-on: https://gerrit.libreoffice.org/20793
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 93c15f226cfd424682178883b0a525707d5303ea)
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 3a78378..e4548a4 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -706,13 +706,13 @@ void OPreparedStatement::setParameterNull(sal_Int32 nParameterIndex,
bool bSetNull)
{
XSQLVAR* pVar = m_pInSqlda->sqlvar + (nParameterIndex - 1);
- if (pVar->sqltype & 1)
+ if (bSetNull)
{
- if (bSetNull)
- *pVar->sqlind = -1;
- else
- *pVar->sqlind = 0;
+ pVar->sqltype |= 1;
+ *pVar->sqlind = -1;
}
+ else
+ *pVar->sqlind = 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index c8f182d..263d1cf 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -254,11 +254,8 @@ void firebird::mallocSQLVAR(XSQLDA* pSqlda)
assert(false);
break;
}
- if (pVar->sqltype & 1)
- {
- /* allocate variable to hold NULL status */
- pVar->sqlind = static_cast<short *>(malloc(sizeof(short)));
- }
+ /* allocate variable to hold NULL status */
+ pVar->sqlind = static_cast<short *>(malloc(sizeof(short)));
}
}
@@ -302,13 +299,10 @@ void firebird::freeSQLVAR(XSQLDA* pSqlda)
break;
}
- if (pVar->sqltype & 1)
+ if(pVar->sqlind)
{
- if(pVar->sqlind)
- {
- free(pVar->sqlind);
- pVar->sqlind = NULL;
- }
+ free(pVar->sqlind);
+ pVar->sqlind = NULL;
}
}
}
commit f8887d73444afe1a61beb24e3d4469f99159afbe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 23 15:33:36 2015 +0000
guard against missing DropcapMgr and Foundry
Change-Id: I1007d4fac2514bc165941c70109cd8e3d57153cd
(cherry picked from commit 330127baf96c417e0eeaef9808d124788b547cf3)
(cherry picked from commit e616ff7e29ee10d0c3ea2dc6a8fc135b87b572b7)
Reviewed-on: https://gerrit.libreoffice.org/20910
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit ec066b44392f8ed1015540220b6b4620facd873e)
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index 79486a2..e69b508 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -288,10 +288,15 @@ void LwpFribPtr::XFConvert()
LwpFribFrame* frameFrib= static_cast<LwpFribFrame*>(pFrib);
rtl::Reference<LwpObject> pLayout = frameFrib->GetLayout();
if (pLayout.is() && pLayout->GetTag() == VO_DROPCAPLAYOUT)
- m_pPara->GetFoundry()->GetDropcapMgr()->SetXFPara(m_pXFPara);
+ {
+ LwpFoundry* pFoundry = m_pPara->GetFoundry();
+ LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : nullptr;
+ if (pMgr)
+ pMgr->SetXFPara(m_pXFPara);
+ }
frameFrib->XFConvert(m_pXFPara);
- }
break;
+ }
case FRIB_TAG_CHBLOCK:
{
LwpFribCHBlock* chbFrib = static_cast<LwpFribCHBlock*>(pFrib);
commit 9b2abf2d84b37050f47484e515f26902b4ac88d4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 22 20:09:17 2015 +0000
guard against missing ContentContainer
Change-Id: I4f2c5d53148deb02d990edc42140c23f02409cea
(cherry picked from commit 8a05b74eeb8d5e0955fbe3cefd945cdc9bffa3f5)
(cherry picked from commit e439aebde0f60e7fe9bb19e96964eb3d26e50e3c)
Reviewed-on: https://gerrit.libreoffice.org/20884
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 3968eec7145d20b398a196bf72ce51f16cebae9e)
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index 6066592..9b69ac7 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -112,7 +112,7 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
pXFContentContainer = m_pPara->GetXFContainer();
//delete the additional blank para, 06/28/2005
XFParagraph* pCurrPara = m_pPara->GetFribs().GetXFPara();
- if(!pCurrPara->HasContents())
+ if (pXFContentContainer && !pCurrPara->HasContents())
{
if(pXFContentContainer->GetLastContent() == pCurrPara)
{
@@ -144,18 +144,20 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
sChangeID = pChangeMgr->GetChangeID(this);
- if (!sChangeID.isEmpty())
+ if (!sChangeID.isEmpty() && pXFContentContainer)
{
XFChangeStart* pChangeStart = new XFChangeStart;
pChangeStart->SetChangeID(sChangeID);
pXFContentContainer->Add(pChangeStart);
}
}
- pSuper->XFConvert(pXFContentContainer);
+
+ if (pXFContentContainer)
+ pSuper->XFConvert(pXFContentContainer);
if(m_bRevisionFlag)
{
- if (!sChangeID.isEmpty())
+ if (!sChangeID.isEmpty() && pXFContentContainer)
{
XFChangeEnd* pChangeEnd = new XFChangeEnd;
pChangeEnd->SetChangeID(sChangeID);
commit b6f2b0ad2dfd49aa58ebfbd9576ca5eb1b10e279
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Dec 19 12:34:34 2015 +0000
coverity#1343623 Logically dead code
(cherry picked from commit 8f3c796ecf926f81f6229fbb040095286c8adbfe)
coverity#1343624 Unchecked dynamic_cast
(cherry picked from commit 26fddc3196c7ab932ada544b84b74da06fa2596d)
coverity#1343625 Unchecked dynamic_cast
(cherry picked from commit 9e83e31019cdc68e5324a10ef76417b46720cfe9)
coverity#1343626 Unchecked dynamic_cast
(cherry picked from commit c2f1731685014b9df386dfb59900783c3ca3acb7)
coverity#1343627 Unchecked dynamic_cast
(cherry picked from commit 1276f6daf28f61d911da9885e0cac738931e4de4)
coverity#1343629 Unchecked dynamic_cast
(cherry picked from commit 274d265e42ab89be29af21ef5cc1cbf20b3d35a2)
1343630 Dereference after null check
(cherry picked from commit 960cfb7e3ba56fe06f45c523e086ee6d4b95e685)
(cherry picked from commit 7e6e8aa8c51e13b016118720fc28f39a572bb8e4)
Change-Id: Ibcf05263f7bea50f70d55f4d8944d0a41d54851d
a303a5dc97fb5e491e86a3484040e657f1b480d4
b534e4e8ecf50a9159c5e98e2c899bf13f44c654
52e6d6c9cb48880185293fb9825d7a6530ee767d
83c0febcbbf0f19a05818e0575921d1d6254935f
93b7298d785e57a4ef854cea3e9cd5c2c0f35849
81223b868f069755e8a46c57bfe0282021f26de7
Reviewed-on: https://gerrit.libreoffice.org/20832
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit b8b7669d2e48f491cd9d8e6a32f61a121ae8034f)
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index d578007..96833c7 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -257,11 +257,13 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
}
if (pNamedStyle)
{
+ LwpCharacterStyle* pCharStyle = nullptr;
if (m_pModifiers->FontID && pFoundry)
+ pCharStyle = dynamic_cast<LwpCharacterStyle*>(m_pModifiers->CharStyleID.obj().get());
+ if (pCharStyle)
{
pStyle = new XFTextStyle();
*pStyle = *pNamedStyle;
- LwpCharacterStyle* pCharStyle = dynamic_cast<LwpCharacterStyle*>(m_pModifiers->CharStyleID.obj().get());
pStyle->SetStyleName("");
pFont = pFoundry->GetFontManger().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID);
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index e14993c..74cc81d 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -193,7 +193,7 @@ void LwpFribSection::SetDefaultAlphaIndex(XFIndex * pXFIndex)
LwpIndexSection* pIndexSection = dynamic_cast<LwpIndexSection*>(m_Section.obj().get());
XFIndexTemplate * pTemplateSep = new XFIndexTemplate();
- if (pIndexSection->IsFormatSeparator())
+ if (pIndexSection && pIndexSection->IsFormatSeparator())
{
pXFIndex->SetSeparator(true);
pTemplateSep->AddEntry(enumXFIndexTemplateText,"");
@@ -219,7 +219,7 @@ void LwpFribSection::SetDefaultAlphaIndex(XFIndex * pXFIndex)
pTemplate3->AddEntry(enumXFIndexTemplateTab,"");
pTemplate3->AddEntry(enumXFIndexTemplatePage,"");
- if (pIndexSection->IsFormatRunin())
+ if (pIndexSection && pIndexSection->IsFormatRunin())
{
//pXFIndex->AddTemplate(OUString::number(2),"Primary",pTemplate2);
//pXFIndex->AddTemplate(OUString::number(3),"Primary",pTemplate3);
@@ -247,10 +247,13 @@ LwpMasterPage::LwpMasterPage(LwpPara* pPara, LwpPageLayout* pLayout)
*/
bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
{
- //if there is no other frib after current firb, register master page in starting para of next page
- if(IsNextPageType()&&(!pFrib->HasNextFrib()))
+ //if there is no other frib after current frib, register master page in starting para of next page
+ LwpStory* pStory = nullptr;
+ if (IsNextPageType()&&(!pFrib->HasNextFrib()))
+ pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
+
+ if (pStory)
{
- LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
pStory->SetCurrentLayout(m_pLayout);
RegisterFillerPageStyle();
return false;
@@ -281,14 +284,17 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
case LwpLayout::StartOnOddPage: //fall through
case LwpLayout::StartOnEvenPage:
{
- LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
- pStory->SetCurrentLayout(m_pLayout);
- //get odd page layout when the current pagelayout is mirror
- m_pLayout = pStory->GetCurrentLayout();
- m_bNewSection = IsNeedSection();
- //bSectionColumns = m_bNewSection;
- pOverStyle->SetMasterPage( m_pLayout->GetStyleName());
- RegisterFillerPageStyle();
+ pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
+ if (pStory)
+ {
+ pStory->SetCurrentLayout(m_pLayout);
+ //get odd page layout when the current pagelayout is mirror
+ m_pLayout = pStory->GetCurrentLayout();
+ m_bNewSection = IsNeedSection();
+ //bSectionColumns = m_bNewSection;
+ pOverStyle->SetMasterPage( m_pLayout->GetStyleName());
+ RegisterFillerPageStyle();
+ }
break;
}
default:
@@ -296,7 +302,10 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
}
//register tab style;
- LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
+ pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
+ if (!pStory)
+ return false;
+
pStory->SetTabLayout(m_pLayout);
m_pPara->RegisterTabStyle(pOverStyle);
@@ -308,7 +317,7 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
XFSectionStyle* pSectStyle= new XFSectionStyle();
//set margin
pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
- if(pStory)
+ if (pStory)
{
LwpPageLayout* pCurrentLayout = pStory->GetCurrentLayout();
double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT)- pCurrentLayout->GetMarginsValue(MARGIN_LEFT);
@@ -341,7 +350,7 @@ bool LwpMasterPage::IsNeedSection()
//get story
LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
//if pagelayout is modified, register the pagelayout
- if(pStory->IsPMModified())
+ if (pStory && pStory->IsPMModified())
{
bNewSection = pStory->IsNeedSection();
}
@@ -398,13 +407,13 @@ void LwpMasterPage::ParseSection(LwpFrib* pFrib)
pCurrContainer->RemoveLastContent();
}
}
- //end,06/28/2005
- pStory->AddXFContent( pContent );
+ if (pStory)
+ pStory->AddXFContent( pContent );
}
else
{
LwpStory* pStory = dynamic_cast<LwpStory*> ( m_pPara->GetStoryID().obj().get() );
- pContent = pStory->GetXFContent();
+ pContent = pStory ? pStory->GetXFContent() : nullptr;
}
if(pContent)
{
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index e021833..520be75 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -311,7 +311,7 @@ void LwpPara::XFConvert(XFContentContainer* pCont)
m_Fribs.SetXFPara(pPara);
m_Fribs.XFConvert();
- if (m_pBreaks)
+ if (m_pBreaks && m_pXFContainer)
AddBreakAfter(m_pXFContainer);
}
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index 31ad0a0..7dde717 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -100,7 +100,7 @@ void XFCell::Add(XFContent *pContent)
}
if( pContent->GetContentType() == enumXFContentTable )
{
- XFTable *pTable = static_cast<XFTable*>(pContent);
+ XFTable *pTable = dynamic_cast<XFTable*>(pContent);
if( !pTable )
return;
//the sub table will fill all the cell, there can't be other contents.
commit 743fc27ca8e647982faabc0ab60346586eb44ceb
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Dec 9 22:14:21 2015 +0100
tdf#96368: Address book wizard with no selection returns Evolution
Don't select an option which is not even visible
Change-Id: I003c835d7d623e559d67098de48efdf057a64422
Reviewed-on: https://gerrit.libreoffice.org/20552
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 7b69dd64be71d1420158a553fb5ec861039cb017)
Reviewed-on: https://gerrit.libreoffice.org/20558
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 6158def661f8281c4fc3493c7e2a1753d3891437)
Reviewed-on: https://gerrit.libreoffice.org/20559
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit dc66e55c53d55a91fffa7591fec96cb9578e71e3)
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 90bdf31..cfc9464 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -219,7 +219,7 @@ namespace abp
loop != m_aAllTypes.end(); ++loop )
{
ButtonItem aItem = (*loop);
- if ( aItem.m_pItem->IsChecked() )
+ if ( aItem.m_pItem->IsChecked() && aItem.m_bVisible )
return aItem.m_eType;
}
commit dc399464d62687bf0a0aed1a4c6f1413b8b06197
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Dec 22 09:08:18 2015 +0100
tdf#93009 SwViewShell: fix printing of comments on the margin
Clipping was set not only in case of VCL-level double buffering, but
also during printing, which means comments were excluded from the
output.
(cherry picked from commit d6913850585eae90ea9179129fe7b60a2a4305ad)
Change-Id: Iffb7d91ca78c09e2b43133f5049d52bd7dc4e730
Reviewed-on: https://gerrit.libreoffice.org/20872
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit be005a7a4ec5934372d4b13b96b22d2c8659ed95)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 9112bfb..a660c96 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -211,8 +211,8 @@ void SwViewShell::DLPrePaint2(const vcl::Region& rRegion)
mpBufferedOut = mpOut;
mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
}
- else
- // In case mpOut is used without buffering, need to set clipping.
+ else if (isOutputToWindow())
+ // In case mpOut is used without buffering and we're not printing, need to set clipping.
mpOut->SetClipRegion(rRegion);
// remember original paint MapMode for wrapped FlyFrame paints
commit c2fb34b741ddc41e7adfb4a02087940d69fd5ec4
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Tue Dec 15 14:44:44 2015 +0100
tdf#86784: Pass custom options to Java bootstrap
Reviewed-on: https://gerrit.libreoffice.org/20720
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
(cherry picked from commit 02002f83f156117cf178532d48abaa9319ee8cb4)
Change-Id: I9e9c78387627e173dea8062e4a3f16bc396e8115
Reviewed-on: https://gerrit.libreoffice.org/20802
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit bb6939cc689a44c1039508935312df98e12f4081)
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 537959b..ba06ea9 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -91,6 +91,34 @@ public class Bootstrap {
}
/**
+ * Returns an array of default commandline options to start bootstrapped
+ * instance of soffice with. You may use it in connection with bootstrap
+ * method for example like this:
+ * <pre>
+ * List list = Arrays.asList( Bootstrap.getDefaultOptions() );
+ * list.remove("--nologo");
+ * list.remove("--nodefault");
+ * list.add("--invisible");
+ *
+ * Bootstrap.bootstrap( list.toArray( new String[list.size()] );
+ * </pre>
+ *
+ * @return an array of default commandline options
+ * @see #bootstrap( String[] )
+ * @since LibreOffice 5.1
+ */
+ public static final String[] getDefaultOptions()
+ {
+ return new String[]
+ {
+ "--nologo",
+ "--nodefault",
+ "--norestore",
+ "--nolockcheck"
+ };
+ }
+
+ /**
* backwards compatibility stub.
*/
static public XComponentContext createInitialComponentContext( Hashtable<String, Object> context_entries )
@@ -247,6 +275,24 @@ public class Bootstrap {
public static final XComponentContext bootstrap()
throws BootstrapException {
+ String[] defaultArgArray = getDefaultOptions();
+ return bootstrap( defaultArgArray );
+ }
+
+ /**
+ * Bootstraps the component context from a UNO installation.
+ *
+ * @param argArray
+ * an array of strings - commandline options to start instance of
+ * soffice with
+ * @see #getDefaultOptions()
+ * @return a bootstrapped component context.
+ *
+ * @since LibreOffice 5.1
+ */
+ public static final XComponentContext bootstrap( String[] argArray )
+ throws BootstrapException {
+
XComponentContext xContext = null;
try {
@@ -270,13 +316,11 @@ public class Bootstrap {
Long.toString( (new Random()).nextLong() & 0x7fffffffffffffffL );
// create call with arguments
- String[] cmdArray = new String[] {
- fOffice.getPath(),
- "--nologo",
- "--nodefault",
- "--norestore",
- "--nolockcheck",
- "--accept=pipe,name=" + sPipeName + ";urp;" };
+ String[] cmdArray = new String[ argArray.length + 2 ];
+ cmdArray[0] = fOffice.getPath();
+ cmdArray[1] = ( "--accept=pipe,name=" + sPipeName + ";urp;" );
+
+ System.arraycopy( argArray, 0, cmdArray, 2, argArray.length );
// start office process
Process p = Runtime.getRuntime().exec( cmdArray );
commit ef6ee11e41aa8841317555236b0877eed0670920
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 18 17:06:17 2015 +0000
guard against missing XFContentContainer
Change-Id: Ic974159f816bae465339e1b9abd2e247bbc2f206
(cherry picked from commit 0063b891424ba7023d376d12a7c54522bca087c6)
(cherry picked from commit b2cc385892c24dba6481bff396d4125f58c92f65)
Reviewed-on: https://gerrit.libreoffice.org/20795
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 01ef568cbc3f33092c1ed3f04afced7cb85badf3)
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index ea746dd..e021833 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -880,7 +880,7 @@ void LwpPara::ParseDropcapContent()
*/
void LwpPara::AddBreakBefore(XFContentContainer* pCont)
{
- if (!m_pBreaks)
+ if (!m_pBreaks || !pCont)
return;
if (m_pBreaks->IsPageBreakBefore())
{
commit 0fd184698adecd1bf79817b73e7dae7bb0267734
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Sun Dec 20 22:13:19 2015 +0100
tdf#93949 ensure memory stream is properly flushed
Change-Id: I6d6a926f5d3fd62dd3b7b78a5721f6483b3b4ee7
(cherry picked from commit c6b11cf681f8e8d131031ea7e5d19c4b6473503a)
Reviewed-on: https://gerrit.libreoffice.org/20842
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit a0a35440453102d215456e3e2f16b4ee207b16de)
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 4b6c300..ce6746a 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -720,6 +720,7 @@ void XclExpChEscherFormat::WriteBody( XclExpStream& rStrm )
// write Escher property container via temporary memory stream
SvMemoryStream aMemStrm;
maData.mxEscherSet->Commit( aMemStrm );
+ aMemStrm.Flush();
aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
rStrm.CopyFromStream( aMemStrm );
}
More information about the Libreoffice-commits
mailing list