[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 14 commits - cui/source dbaccess/Module_dbaccess.mk dtrans/source filter/source include/oox oox/source sc/source svx/source sw/source sw/uiconfig writerfilter/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 11 11:18:51 UTC 2020
cui/source/inc/autocdlg.hxx | 2
cui/source/tabpages/autocdlg.cxx | 4
dbaccess/Module_dbaccess.mk | 3
dtrans/source/win32/clipb/WinClipbImpl.cxx | 12
dtrans/source/win32/clipb/WinClipbImpl.hxx | 1
filter/source/msfilter/eschesdo.cxx | 23 -
include/oox/token/relationship.hxx | 1
oox/source/token/relationship.inc | 1
sc/source/filter/excel/excdoc.cxx | 7
sc/source/filter/excel/xeescher.cxx | 351 ++++++++++++++++++++--
sc/source/filter/inc/xcl97rec.hxx | 2
sc/source/filter/inc/xeescher.hxx | 17 +
sc/source/filter/xcl97/xcl97rec.cxx | 73 ++++
svx/source/items/customshapeitem.cxx | 2
sw/source/core/crsr/swcrsr.cxx | 3
sw/source/core/text/porlay.cxx | 24 +
sw/source/core/undo/undel.cxx | 27 +
sw/source/core/undo/undobj.cxx | 8
sw/source/core/undo/untblk.cxx | 2
sw/source/filter/ww8/wrtw8nds.cxx | 6
sw/source/ui/misc/bookmark.cxx | 3
sw/uiconfig/swriter/ui/insertbookmark.ui | 7
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 16 -
writerfilter/source/dmapper/NumberingManager.cxx | 38 +-
writerfilter/source/dmapper/NumberingManager.hxx | 6
25 files changed, 565 insertions(+), 74 deletions(-)
New commits:
commit eb9641b043ca140c7386732b839ec64425f7084b
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 9 11:36:06 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:18:09 2020 +0200
tdf#133641 sw: fix crash double-clicking CH_TXT_ATR_FORMELEMENT
Only search for separator if there is one.
(regression from 1c94842e053a20a739a181d38a35c324df3e62a7)
Change-Id: I6697faa7cb83cab48084f9710f8c5018b9e738e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95905
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit cb28054d831c38ef645f635ecd80475fb5735679)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95979
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 92b4e941876e..8cfa09e8c9ac 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1405,7 +1405,8 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType
// Should we select the whole fieldmark?
const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
sw::mark::IFieldmark const*const pMark(pMarksAccess->getFieldmarkFor(*GetPoint()));
- if ( pMark )
+ if (pMark && (IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK
+ || IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::DATE_FIELDMARK))
{
*GetPoint() = sw::mark::FindFieldSep(*pMark);
++GetPoint()->nContent; // Don't select the separator
commit e06b83be93139f7ae3b28fb43a17bec78ed7647b
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jun 10 11:59:00 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:18:03 2020 +0200
tdf#132725 sw: SwUndoDelete: don't group if flys are be deleted
The fly would not be deleted by CanGrouping() but would be deleted later
in RedoImpl() via the IsAtStartOfSection() check so just force a new
Undo action in this case.
(regression from 91b2325808a75174f284c48c8b8afc118fad74e4
and 28b77c89dfcafae82cf2a6d85731b643ff9290e5)
Change-Id: I68f9f6b7fd0306bc0853a370b1030463a0024edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96002
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 32c162ad1723512763b74d01eaec32c1296f3a55)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96037
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index c9dc7fdae063..b12696554e65 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -562,6 +562,33 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
rCC.isLetterNumeric( *m_aSttStr, nUChrPos ) )
return false;
+ // tdf#132725 - if at-char/at-para flys would be deleted, don't group!
+ // DelContentIndex() would be called at the wrong time here, the indexes
+ // in the stored SwHistoryTextFlyCnt would be wrong when Undo is invoked
+ for (SwFrameFormat const*const pFly : *pDoc->GetSpzFrameFormats())
+ {
+ SwFormatAnchor const& rAnchor(pFly->GetAnchor());
+ switch (rAnchor.GetAnchorId())
+ {
+ case RndStdIds::FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ {
+ SwPosition const*const pAnchorPos(rAnchor.GetContentAnchor());
+ // can this really be null?
+ if (pAnchorPos != nullptr
+ && ((rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR)
+ ? IsDestroyFrameAnchoredAtChar(*pAnchorPos, *pStt, *pEnd)
+ : IsSelectFrameAnchoredAtPara(*pAnchorPos, *pStt, *pEnd)))
+ {
+ return false;
+ }
+ }
+ break;
+ default: // other types not relevant
+ break;
+ }
+ }
+
{
SwRedlineSaveDatas aTmpSav;
const bool bSaved = FillSaveData( rDelPam, aTmpSav, false );
commit b4c6ebec50543c9f86744c4ab4028be41c18167a
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Mon Jun 8 12:43:53 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:58 2020 +0200
tdf#101856 evaluate condition to expand / collapse bookmarks
Change-Id: I7c135eab0feeca0ede794f6c88a2b06e339d6a14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95795
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96003
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index d9406a4e28c1..2bb9e87bd2c9 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -54,9 +54,11 @@
#include <doc.hxx>
#include <swscanner.hxx>
#include <txatbase.hxx>
+#include <calc.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentContentOperations.hxx>
+#include <IDocumentFieldsAccess.hxx>
#include <IMark.hxx>
using namespace ::com::sun::star;
@@ -2283,7 +2285,29 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode, MultiSelect
{
const sw::mark::IMark* pMark = pIndex->GetMark();
const sw::mark::IBookmark* pBookmark = dynamic_cast<const sw::mark::IBookmark*>(pMark);
+
+ bool bHide = false;
if (pBookmark && pBookmark->IsHidden())
+ {
+ // bookmark is marked as hidden
+ bHide = true;
+
+ // bookmark is marked as hidden with conditions
+ if (!pBookmark->GetHideCondition().isEmpty())
+ {
+ SwDoc& rDoc = *const_cast<SwDoc*>(rNode.GetDoc());
+ SwCalc aCalc(rDoc);
+ rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, rNode.GetIndex(), USHRT_MAX);
+
+ SwSbxValue aValue = aCalc.Calculate(pBookmark->GetHideCondition());
+ if(!aValue.IsVoidValue())
+ {
+ bHide = aValue.GetBool();
+ }
+ }
+ }
+
+ if (bHide)
{
// intersect bookmark range with textnode range and add the intersection to rHiddenMulti
commit c009a739d080645b93329ee069aa0b776f27ba5e
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 9 16:12:04 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:53 2020 +0200
tdf#132597 sw: fix inconsistent handling of ExcludeFlyAtStartEnd
IsDestroyFrameAnchoredAtChar() checks the position but the only caller,
SwUndoInserts::UndoImpl(), really wants to exclude the entire nodes,
see IsCreateUndoForNewFly().
(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)
Change-Id: I763ad3b7d82af03f6910dcf34315f793d090c62e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95952
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit f9fb86408e6e06c262332be26674305ae5c05bb7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95982
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index a73ceeb9f048..e6a6d5a509d7 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1560,10 +1560,15 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
return (rStart < rAnchorPos) && (rAnchorPos < rEnd);
}
+ if (nDelContentType & DelContentType::ExcludeFlyAtStartEnd)
+ { // exclude selection start and end node
+ return (rAnchorPos.nNode < rEnd.nNode)
+ && (rStart.nNode < rAnchorPos.nNode);
+ }
+
// in general, exclude the start and end position
return ((rStart < rAnchorPos)
|| (rStart == rAnchorPos
- && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd)
// special case: fully deleted node
&& ((rStart.nNode != rEnd.nNode && rStart.nContent == 0
// but not if the selection is backspace/delete!
@@ -1571,7 +1576,6 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
|| (IsAtStartOfSection(rAnchorPos) && IsAtEndOfSection(rEnd)))))
&& ((rAnchorPos < rEnd)
|| (rAnchorPos == rEnd
- && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd)
// special case: fully deleted node
&& ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.nNode.GetNode().GetTextNode()->Len()
&& IsNotBackspaceHeuristic(rStart, rEnd))
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index db586c615e4b..134db4698ee2 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -170,7 +170,7 @@ bool SwUndoInserts::IsCreateUndoForNewFly(SwFormatAnchor const& rAnchor,
assert(nStartNode <= nEndNode);
// check all at-char flys at the start/end nodes:
- // ExcludeAtCharFlyAtStartEnd will exclude them!
+ // ExcludeFlyAtStartEnd will exclude them!
SwPosition const*const pAnchorPos = rAnchor.GetContentAnchor();
return pAnchorPos != nullptr
&& ( rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
commit 91f583f8e497506ad5146d9bc74b54af1853fafb
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri May 15 18:36:08 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:43 2020 +0200
tdf#120394: docx import: support for w:styleLink
Previous implementation for w:numStyleLink was referring
just ordinal styles, but there can be another abstract
list marked with w:styleLink which should be used in
given context.
Change-Id: Ic5d4fe8bfd41b19e2f65d74defb6961e38ec9a9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94332
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95892
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 5a74e421a31b..be74368bfcf7 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -1068,6 +1068,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
m_pCurrentDefinition->SetNumStyleLink(sStyleName);
}
break;
+ case NS_ooxml::LN_CT_AbstractNum_styleLink:
+ {
+ OUString sStyleName = rSprm.getValue()->getString();
+ m_pCurrentDefinition->SetStyleLink(sStyleName);
+ }
+ break;
case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties
case NS_ooxml::LN_EG_RPrBase_color:
case NS_ooxml::LN_EG_RPrBase_u:
@@ -1106,21 +1112,17 @@ void ListsManager::lcl_entry(writerfilter::Reference<Properties>::Pointer_t ref
AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId )
{
- AbstractListDef::Pointer pAbstractList;
-
- int nLen = m_aAbstractLists.size( );
- int i = 0;
- while ( !pAbstractList.get( ) && i < nLen )
+ for (const auto& listDef : m_aAbstractLists)
{
- if ( m_aAbstractLists[i]->GetId( ) == nId )
+ if (listDef->GetId( ) == nId)
{
- if ( m_aAbstractLists[i]->GetNumStyleLink().getLength() > 0 )
+ if (listDef->GetNumStyleLink().getLength() > 0)
{
// If the abstract num has a style linked, check the linked style's number id.
StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( );
const StyleSheetEntryPtr pStyleSheetEntry =
- pStylesTable->FindStyleSheetByISTD( m_aAbstractLists[i]->GetNumStyleLink() );
+ pStylesTable->FindStyleSheetByISTD(listDef->GetNumStyleLink() );
const StyleSheetPropertyMap* pStyleSheetProperties =
dynamic_cast<const StyleSheetPropertyMap*>(pStyleSheetEntry ? pStyleSheetEntry->pProperties.get() : nullptr);
@@ -1130,20 +1132,24 @@ AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId )
ListDef::Pointer pList = GetList( pStyleSheetProperties->GetNumId() );
if ( pList!=nullptr )
return pList->GetAbstractDefinition();
- else
- pAbstractList = m_aAbstractLists[i];
}
+ // In stylesheet we did not found anything useful. Try to find base abstractnum having this stylelink
+ for (const auto & baseListDef : m_aAbstractLists)
+ {
+ if (baseListDef->GetStyleLink() == listDef->GetNumStyleLink())
+ {
+ return baseListDef;
+ }
+ }
}
- else
- {
- pAbstractList = m_aAbstractLists[i];
- }
+
+ // Standalone abstract list
+ return listDef;
}
- i++;
}
- return pAbstractList;
+ return nullptr;
}
ListDef::Pointer ListsManager::GetList( sal_Int32 nId )
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 88ce887869a1..3d70257029f4 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -133,6 +133,9 @@ private:
// The style name linked to.
OUString m_sNumStyleLink;
+ // This absract numbering is a base definition for this style
+ OUString m_sStyleLink;
+
/// list id to use for all derived numbering definitions
boost::optional<OUString> m_oListId;
@@ -160,6 +163,9 @@ public:
void SetNumStyleLink(const OUString& sValue) { m_sNumStyleLink = sValue; };
const OUString& GetNumStyleLink() const { return m_sNumStyleLink; };
+ void SetStyleLink(const OUString& sValue) { m_sStyleLink = sValue; };
+ const OUString& GetStyleLink() const { return m_sStyleLink; };
+
const OUString& MapListId(OUString const& rId);
};
commit 1f81d22eef92bab7b8552fb57178bb408c681882
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jun 8 17:24:18 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:34 2020 +0200
tdf#133604 sw: DOCX export: put CH_TXT_ATR_FORMELEMENT in its own run
Commit b03fefcc4dbdfee3b9eeb5fa0e586dd12ddcd3d2 ought to have fixed this
but didn't; the run following the CH_TXT_ATR_FORMELEMENT still ended up
inside the field result.
But when importing that into Writer, it appeared correct; Word shows the
problem.
(regression from 94e0b8407b02d76b27324b8b08012eb024aca9e9)
Change-Id: I1fc1328223353422a83d403e8f790d156dbec4e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95843
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 7f2908b83a39bbb6fa648d6815265ad203f86ddc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95882
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 05a50e7f8b68..f7dc3e2207d2 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -259,7 +259,11 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
}
sal_Int32 fieldSepPos = aText.indexOf(CH_TXT_ATR_FIELDSEP, nStartPos);
sal_Int32 fieldStartPos = aText.indexOf(CH_TXT_ATR_FIELDSTART, nStartPos);
- sal_Int32 formElementPos = aText.indexOf(CH_TXT_ATR_FORMELEMENT, nStartPos);
+ sal_Int32 formElementPos = aText.indexOf(CH_TXT_ATR_FORMELEMENT, nStartPos - 1);
+ if (0 <= formElementPos && formElementPos < nStartPos)
+ {
+ ++formElementPos; // tdf#133604 put this in its own run
+ }
const sal_Int32 pos = lcl_getMinPos(
lcl_getMinPos(lcl_getMinPos(fieldEndPos, fieldSepPos), fieldStartPos),
commit baa0bb6b4d8483d1d7649be0ea7b1396bd7be3e5
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Thu Jun 4 11:14:39 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:29 2020 +0200
tdf#133595 FILESAVE XLSX: invalid content when opening file with shape
Change-Id: I67fe29bbc9b982328a3efe63874922e7ed1a5854
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95490
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 2081ab036bfd203d4d3be07064ef783baae97c3b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95671
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
(cherry picked from commit 23506180a82bae5c77bd1df4bef73dd4f687dae2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95880
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 277f3157afd7..37c55e9d629c 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -277,6 +277,21 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm )
void SaveFormControlObjects(XclExpObjList& rList, XclExpXmlStream& rStrm)
{
+ bool hasControls = false;
+ for (const auto& rxObj : rList)
+ {
+ if (IsFormControlObject(rxObj.get()))
+ {
+ hasControls = true;
+ break;
+ }
+ }
+
+ if (!hasControls)
+ {
+ return;
+ }
+
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent),
commit f165c12617fecef2aab411c24266dee12b61012b
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Mon Jun 8 20:13:04 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:24 2020 +0200
tdf#101856 correct Insert bookmark dialog
- left align checkbox "Hide"
- do not resize "Close" button
- place "Close" button at the bottom of the dialog
Change-Id: I57caa83edde2c377dfbf0aaacb60281e4966fbaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95855
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95938
Tested-by: Vasily Melenchuk <vasily.melenchuk at cib.de>
Reviewed-by: Vasily Melenchuk <vasily.melenchuk at cib.de>
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 3c99ab0c6848..e5be414d7bdb 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -344,6 +344,9 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS,
m_xConditionED->set_visible( false );
}
+ // disabled until "Hide" flag is not checked
+ m_xConditionED->set_sensitive(false);
+ m_xConditionFT->set_sensitive(false);
}
IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
diff --git a/sw/uiconfig/swriter/ui/insertbookmark.ui b/sw/uiconfig/swriter/ui/insertbookmark.ui
index f062451af767..8b65bfc619b9 100644
--- a/sw/uiconfig/swriter/ui/insertbookmark.ui
+++ b/sw/uiconfig/swriter/ui/insertbookmark.ui
@@ -71,9 +71,9 @@
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">6</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -145,6 +145,7 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="valign">start</property>
+ <property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
commit 3c9f3feaa4811125611316ef5345fa2a77e7e371
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri May 29 18:15:30 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:16 2020 +0200
cache foreign content in win32 clipboard code (tdf#133267)
The slowness in tdf#133267 on Windows is because the Calc operation
repeatedly calls ScDocument::IsClipboardSource(), which calls
ScModule::GetClipDoc(), which proceeds to fetch the clipboard
content, which means fetching it from the system clipboard if it's
not owned by LO.
Other LO clipboard implementations such as gtk3 or qt5 already
do caching, and it seems that it's easy to do for the win32 code.
Change-Id: I4696cc7488d66803fd5dd2963d27900957decdec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
(cherry picked from commit fda6ad1458fcd5087c3dde56300b9d0367af6db5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95246
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
(cherry picked from commit 9b311cabd908c6bc9e7f7d461ee11eaf0ea6b18c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95749
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx
index 003a266f84bc..8d59be7ca430 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.cxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx
@@ -83,6 +83,10 @@ Reference< XTransferable > CWinClipbImpl::getContents( )
return m_pCurrentClipContent->m_XTransferable;
}
+ // Content cached?
+ if (m_foreignContent.is())
+ return m_foreignContent;
+
// release the mutex, so that the variable may be
// changed by other threads
}
@@ -101,6 +105,9 @@ Reference< XTransferable > CWinClipbImpl::getContents( )
// remember pIDo destroys itself due to the smart pointer
rClipContent = CDOTransferable::create( m_pWinClipboard->m_xContext, pIDo );
+
+ MutexGuard aGuard(m_ClipContentMutex);
+ m_foreignContent = rClipContent;
}
return rClipContent;
@@ -117,6 +124,8 @@ void CWinClipbImpl::setContents(
{
MutexGuard aGuard(m_ClipContentMutex);
+ m_foreignContent.clear();
+
m_pCurrentClipContent
= new CXNotifyingDataObject(CDTransObjFactory::createDataObjFromTransferable(
m_pWinClipboard->m_xContext, xTransferable),
@@ -176,7 +185,10 @@ void WINAPI CWinClipbImpl::onClipboardContentChanged()
// reassociation to instance through static member
if ( nullptr != s_pCWinClipbImpl )
+ {
+ s_pCWinClipbImpl->m_foreignContent.clear();
s_pCWinClipbImpl->m_pWinClipboard->notifyAllClipboardListener( );
+ }
}
void CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller )
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx
index 55a9d8d600bc..cd5878e6b794 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.hxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.hxx
@@ -87,6 +87,7 @@ private:
CMtaOleClipboard m_MtaOleClipboard;
CWinClipboard* m_pWinClipboard;
CXNotifyingDataObject* m_pCurrentClipContent;
+ com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_foreignContent;
osl::Mutex m_ClipContentMutex;
static osl::Mutex s_aMutex;
commit e855aab53c0674664f4296bf69d31910d55c0a10
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 6 20:27:24 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:10 2020 +0200
Resolves: tdf#125981 use original label, not current label
Change-Id: Iddc1d3e38e70d91d60947d9867dcfb03cb5128d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95678
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Jenkins
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 083f3824713c..4a283c8229ad 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -286,7 +286,7 @@ private:
std::unique_ptr<weld::Button> m_xDblEndQuotePB;
std::unique_ptr<weld::Label> m_xDblEndExFT;
std::unique_ptr<weld::Button> m_xDblStandardPB;
- std::unique_ptr<weld::Label> m_xStandard;
+ OUString m_sStandard;
/// For anything but writer
std::unique_ptr<weld::TreeView> m_xCheckLB;
/// Just for writer
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index cae7b77fdd40..0ea7f65c9b25 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1553,7 +1553,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(weld::Container* pPage, weld::DialogController*
, m_xDblEndQuotePB(m_xBuilder->weld_button("enddouble"))
, m_xDblEndExFT(m_xBuilder->weld_label("doubleendex"))
, m_xDblStandardPB(m_xBuilder->weld_button("defaultdouble"))
- , m_xStandard(m_xBuilder->weld_label("singlestartex"))
+ , m_sStandard(m_xSglStartExFT->get_label())
, m_xCheckLB(m_xBuilder->weld_tree_view("checklist"))
, m_xSwCheckLB(m_xBuilder->weld_tree_view("list"))
{
@@ -1830,7 +1830,7 @@ IMPL_LINK(OfaQuoteTabPage, StdQuoteHdl, weld::Button&, rBtn, void)
OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar )
{
if (!cChar)
- return m_xStandard->get_label();
+ return m_sStandard;
// convert codepoint value to unicode-hex string
sal_UCS4 aStrCodes[32] = { 0, ' ', '(', 'U', '+', '0' };
commit d9b33332dd48507784647d78b8ab6ad399bc3154
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jun 8 22:44:40 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:17:01 2020 +0200
tdf#126025: Non-const GetPropertyValueByName must use non-const Sequence []
...which internally calls getArray to make sure it references a unique sequence.
Regression introduced with 85f28ec44a2c169c91dac9346e9c71feda6a6cab "Clean up C-
style casts from pointers to void".
Change-Id: Id80b75f06322c65fc31040cc0b1892fe3a0aeaab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit b505cd8635171e39d055b9a800f672a6313d8cea)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95873
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index 095aa6cec868..b67a8d6eca54 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -90,7 +90,7 @@ css::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const OUStrin
PropertyPairHashMap::iterator aHashIter( aPropPairHashMap.find( PropertyPair( rSequenceName, rPropName ) ) );
if ( aHashIter != aPropPairHashMap.end() )
{
- pRet = const_cast<css::uno::Any *>(&(*rSecSequence)[ (*aHashIter).second ].Value);
+ pRet = &const_cast<css::uno::Sequence<css::beans::PropertyValue> &>(*rSecSequence)[ (*aHashIter).second ].Value;
}
}
}
commit d8169824a626877d721d929e43a7b6af64f3e679
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jun 8 13:05:27 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:16:56 2020 +0200
tdf#132596 writerfilter: fix paste of RTF with header/footer
The problem is that writerfilter inserts the content of header/footer
into the body text, but then DomainMapper_Impl::PopPageHeaderFooter()
calls RemoveLastParagraph() and deletes a body paragraph containing a
fieldmark, and then in Undo some SwHistoryTextFieldmark can't find it,
and since ffb26b81e1c7ff1d64959200247bb2edd5a569da this crashes.
This is because of the borked error handling in
DomainMapper_Impl::PushPageHeaderFooter(); the
m_xBodyText->createTextCursorByRange() call throws an exception that is
swallowed, so the m_aTextAppendStack doesn't have an entry containing
the position in the header.
To fix the error handling, set m_bDiscardHeaderFooter = false only when
everything was successful.
Also fix the call to be xText->createTextCursorByRange instead
(this is a regression from 232ad2f2588beff50cb5c1f3b689c581ba317583).
Then it turns out that Undo still crashes, because sw can't Undo
changes of header/footer content, so just return early unless it's
a new document.
Change-Id: Ie5aeb45447c5fbd4b3ae15c4cffb9800583a6d1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95797
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 27151ccf2305eac4192f8c4ceeee267170096a19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95824
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d37082120bdd..61fa9bf80d45 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2243,6 +2243,7 @@ void DomainMapper_Impl::PushPageHeaderFooter(bool bHeader, SectionPropertyMap::P
const PropertyIds ePropTextLeft = bHeader? PROP_HEADER_TEXT_LEFT: PROP_FOOTER_TEXT_LEFT;
const PropertyIds ePropText = bHeader? PROP_HEADER_TEXT: PROP_FOOTER_TEXT;
+ m_bDiscardHeaderFooter = true;
m_eInHeaderFooterImport
= bHeader ? HeaderFooterImportState::header : HeaderFooterImportState::footer;
@@ -2256,6 +2257,11 @@ void DomainMapper_Impl::PushPageHeaderFooter(bool bHeader, SectionPropertyMap::P
// content is not copied from the previous section
pSectionContext->ClearHeaderFooterLinkToPrevious(bHeader, eType);
+ if (!m_bIsNewDoc)
+ {
+ return; // TODO sw cannot Undo insert header/footer without crashing
+ }
+
uno::Reference< beans::XPropertySet > xPageStyle =
pSectionContext->GetPageStyle(
*this,
@@ -2283,15 +2289,15 @@ void DomainMapper_Impl::PushPageHeaderFooter(bool bHeader, SectionPropertyMap::P
xPageStyle->getPropertyValue(getPropertyName(bLeft? ePropTextLeft: ePropText)) >>= xText;
m_aTextAppendStack.push(TextAppendContext(uno::Reference< text::XTextAppend >(xText, uno::UNO_QUERY_THROW),
- m_bIsNewDoc? uno::Reference<text::XTextCursor>(): m_xBodyText->createTextCursorByRange(xText->getStart())));
- }
- else
- {
- m_bDiscardHeaderFooter = true;
+ m_bIsNewDoc
+ ? uno::Reference<text::XTextCursor>()
+ : xText->createTextCursorByRange(xText->getStart())));
+ m_bDiscardHeaderFooter = false; // set only on success!
}
}
catch( const uno::Exception& )
{
+ DBG_UNHANDLED_EXCEPTION("writerfilter.dmapper");
}
}
}
commit 1c59f8f696e845705641e420013f62a3dc1ab07c
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed May 13 22:52:52 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:16:50 2020 +0200
tdf#106181 XLSX export: output form controls
Prepared general algorithm to ouput form controls into XLSX.
For now only CHECKBOX is supported with a possibility to
link withem to any worksheet/cell.
Change-Id: Ide8739d81ffb755aeae074c4ebecf24251383e34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94161
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit fd238380ae7820f12ac1f7c52d0f7180a93f3ba3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94835
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index b145cbef20c8..70212ea7c662 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -417,11 +417,16 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
const Reference< XPropertySet > xPropSet = rObj.mXPropSet;
const Reference<XPropertySetInfo> xPropInfo = xPropSet.is() ? xPropSet->getPropertySetInfo() : Reference<XPropertySetInfo>();
// This code is expected to be called only for DOCX format.
- if (xPropInfo.is() && xPropInfo->hasPropertyByName("AnchorType") && bOOxmlExport)
+ if (xPropInfo.is())
{
- text::TextContentAnchorType eAnchorType;
- xPropSet->getPropertyValue("AnchorType") >>= eAnchorType;
- bool bInline = eAnchorType == text::TextContentAnchorType_AS_CHARACTER;
+ bool bInline = false;
+ if (xPropInfo->hasPropertyByName("AnchorType"))
+ {
+ text::TextContentAnchorType eAnchorType;
+ xPropSet->getPropertyValue("AnchorType") >>= eAnchorType;
+ bInline = eAnchorType == text::TextContentAnchorType_AS_CHARACTER;
+ }
+
mpEscherEx->OpenContainer( ESCHER_SpContainer );
if(bInline)
{
@@ -828,20 +833,14 @@ void ImplEESdrWriter::ImplWritePage(
{
ImplInitPageValues();
- sal_uInt32 nLastPer = 0, nShapes = mXShapes->getCount();
+ const sal_uInt32 nShapes = mXShapes->getCount();
for( sal_uInt32 n = 0; n < nShapes; ++n )
{
- sal_uInt32 nPer = ( 5 * n ) / nShapes;
- if( nPer != nLastPer )
- {
- nLastPer = nPer;
- }
-
ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
- ImplWriteShape( aObj, rSolverContainer );
+ ImplWriteShape( aObj, rSolverContainer, true );
}
}
}
diff --git a/include/oox/token/relationship.hxx b/include/oox/token/relationship.hxx
index ae1580bf2bc5..adc25f4a73b6 100644
--- a/include/oox/token/relationship.hxx
+++ b/include/oox/token/relationship.hxx
@@ -23,6 +23,7 @@ enum class Relationship
COMMENTS,
COMMENTAUTHORS,
CONTROL,
+ CTRLPROP,
CUSTOMXML,
CUSTOMXMLPROPS,
DIAGRAMCOLORS,
diff --git a/oox/source/token/relationship.inc b/oox/source/token/relationship.inc
index 9b163038b169..2b973ded1653 100644
--- a/oox/source/token/relationship.inc
+++ b/oox/source/token/relationship.inc
@@ -3,6 +3,7 @@
{Relationship::COMMENTS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"},
{Relationship::COMMENTAUTHORS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"},
{Relationship::CONTROL, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control"},
+{Relationship::CTRLPROP, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp"},
{Relationship::CUSTOMXML, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"},
{Relationship::CUSTOMXMLPROPS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps"},
{Relationship::DIAGRAMCOLORS, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"},
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 4d9975d034cc..2355f8db4a34 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -687,8 +687,11 @@ void ExcTable::WriteXml( XclExpXmlStream& rStrm )
rStrm.PushStream( pWorksheet );
pWorksheet->startElement( XML_worksheet,
- XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
- FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
+ XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
+ FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
+ FSNS(XML_xmlns, XML_xdr), "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing", // rStrm.getNamespaceURL(OOX_NS(xm)).toUtf8() -> "http://schemas.microsoft.com/office/excel/2006/main",
+ FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
SetCurrScTab( mnScTab );
if (mxCellTable)
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index c49e6a709177..fc634e319549 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -146,7 +146,15 @@ void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, const
rComments->endElement( FSNS( XML_xdr, XML_rowOff ) );
}
-void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_Int32 nTab, tools::Rectangle &aFrom, tools::Rectangle &aTo )
+long lcl_hmm2output(long value, bool bInEMU)
+{
+ if (bInEMU)
+ return oox::drawingml::convertHmmToEmu(value);
+ else
+ return lcl_hmm2px(value);
+}
+
+void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_Int32 nTab, tools::Rectangle &aFrom, tools::Rectangle &aTo, bool bInEMU = false )
{
sal_Int32 nCol = 0, nRow = 0;
sal_Int32 nColOff = 0, nRowOff= 0;
@@ -169,8 +177,8 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
}
if( r.Left() > aRect.Left() && r.Top() > aRect.Top() )
{
- aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ),
- nRow-1, lcl_hmm2px( nRowOff ) );
+ aFrom = tools::Rectangle( nCol-1, lcl_hmm2output( nColOff, bInEMU ),
+ nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
break;
}
}
@@ -192,8 +200,8 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
}
if( r.Left() < aRect.Left() && r.Top() > aRect.Top() )
{
- aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ),
- nRow-1, lcl_hmm2px( nRowOff ) );
+ aFrom = tools::Rectangle( nCol-1, lcl_hmm2output( nColOff, bInEMU ),
+ nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
break;
}
}
@@ -209,8 +217,8 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
nRow++;
if( r.Right() >= aRect.Right() && r.Bottom() >= aRect.Bottom() )
{
- aTo = tools::Rectangle( nCol, lcl_hmm2px( aRect.Right() - r.Left() ),
- nRow, lcl_hmm2px( aRect.Bottom() - r.Top() ));
+ aTo = tools::Rectangle( nCol, lcl_hmm2output( aRect.Right() - r.Left(), bInEMU ),
+ nRow, lcl_hmm2output( aRect.Bottom() - r.Top(), bInEMU ));
break;
}
}
@@ -226,8 +234,8 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
nRow++;
if( r.Right() < aRect.Right() && r.Bottom() >= aRect.Bottom() )
{
- aTo = tools::Rectangle( nCol, lcl_hmm2px( r.Left() - aRect.Right() ),
- nRow, lcl_hmm2px( aRect.Bottom() - r.Top() ));
+ aTo = tools::Rectangle( nCol, lcl_hmm2output( r.Left() - aRect.Right(), bInEMU ),
+ nRow, lcl_hmm2output( aRect.Bottom() - r.Top(), bInEMU ));
break;
}
}
@@ -455,6 +463,7 @@ XclExpControlHelper::~XclExpControlHelper()
void XclExpControlHelper::ConvertSheetLinks( Reference< XShape > const & xShape )
{
mxCellLink.reset();
+ mxCellLinkAddress.SetInvalid();
mxSrcRange.reset();
mnEntryCount = 0;
@@ -475,10 +484,9 @@ void XclExpControlHelper::ConvertSheetLinks( Reference< XShape > const & xShape
CellAddress aApiAddress;
if( aBindProp.GetProperty( aApiAddress, SC_UNONAME_BOUNDCELL ) )
{
- ScAddress aCellLink;
- ScUnoConversion::FillScAddress( aCellLink, aApiAddress );
- if( GetTabInfo().IsExportTab( aCellLink.Tab() ) )
- mxCellLink = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_CONTROL, aCellLink );
+ ScUnoConversion::FillScAddress( mxCellLinkAddress, aApiAddress );
+ if( GetTabInfo().IsExportTab( mxCellLinkAddress.Tab() ) )
+ mxCellLink = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_CONTROL, mxCellLinkAddress );
}
}
}
@@ -633,6 +641,7 @@ void XclExpOcxControlObj::WriteSubRecs( XclExpStream& rStrm )
XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const tools::Rectangle* pChildAnchor ) :
XclObj( rRoot, EXC_OBJTYPE_UNKNOWN, true ),
XclMacroHelper( rRoot ),
+ mxShape( xShape ),
meEventType( EXC_TBX_EVENT_ACTION ),
mnHeight( 0 ),
mnState( 0 ),
@@ -646,7 +655,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
mbFlatButton( false ),
mbFlatBorder( false ),
mbMultiSel( false ),
- mbScrollHor( false )
+ mbScrollHor( false ),
+ mbPrint( false ),
+ mbVisible( false ),
+ mnShapeId( 0 )
{
namespace FormCompType = css::form::FormComponentType;
namespace AwtVisualEffect = css::awt::VisualEffect;
@@ -682,7 +694,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
// OBJ record flags
SetLocked( true );
- SetPrintable( aCtrlProp.GetBoolProperty( "Printable" ) );
+ mbPrint = aCtrlProp.GetBoolProperty( "Printable" );
+ SetPrintable( mbPrint );
SetAutoFill( false );
SetAutoLine( false );
@@ -690,8 +703,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
mrEscherEx.OpenContainer( ESCHER_SpContainer );
mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty );
EscherPropertyContainer aPropOpt;
- bool bVisible = aCtrlProp.GetBoolProperty( "EnableVisible" );
- aPropOpt.AddOpt( ESCHER_Prop_fPrint, bVisible ? 0x00080000 : 0x00080002 ); // visible flag
+ mbVisible = aCtrlProp.GetBoolProperty( "EnableVisible" );
+ aPropOpt.AddOpt( ESCHER_Prop_fPrint, mbVisible ? 0x00080000 : 0x00080002 ); // visible flag
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x01000100 ); // bool field
aPropOpt.AddOpt( ESCHER_Prop_lTxid, 0 ); // Text ID
@@ -701,9 +714,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x00080000 ); // bool field
// #i51348# name of the control, may overwrite shape name
- OUString aCtrlName;
- if( aCtrlProp.GetProperty( aCtrlName, "Name" ) && !aCtrlName.isEmpty() )
- aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
+ if( aCtrlProp.GetProperty( msCtrlName, "Name" ) && !msCtrlName.isEmpty() )
+ aPropOpt.AddOpt( ESCHER_Prop_wzName, msCtrlName );
//Export description as alt text
if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) )
@@ -725,8 +737,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
mrEscherEx.UpdateDffFragmentEnd();
// control label
- OUString aString;
- if( aCtrlProp.GetProperty( aString, "Label" ) )
+ if( aCtrlProp.GetProperty( msLabel, "Label" ) )
{
/* Be sure to construct the MSODRAWING record containing the
ClientTextbox atom after the base OBJ's MSODRAWING record data is
@@ -736,7 +747,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
mrEscherEx.UpdateDffFragmentEnd();
sal_uInt16 nXclFont = EXC_FONT_APP;
- if( !aString.isEmpty() )
+ if( !msLabel.isEmpty() )
{
XclFontData aFontData;
GetFontPropSetHelper().ReadFontProperties( aFontData, aCtrlProp, EXC_FONTPROPSET_CONTROL );
@@ -744,7 +755,7 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
nXclFont = GetFontBuffer().Insert( aFontData, EXC_COLOR_CTRLTEXT );
}
- pTxo.reset( new XclTxo( aString, nXclFont ) );
+ pTxo.reset( new XclTxo( msLabel, nXclFont ) );
pTxo->SetHorAlign( (mnObjType == EXC_OBJTYPE_BUTTON) ? EXC_OBJ_HOR_CENTER : EXC_OBJ_HOR_LEFT );
pTxo->SetVerAlign( EXC_OBJ_VER_CENTER );
}
@@ -881,6 +892,29 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference<
break;
}
+ {
+ Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( xShape );
+ if( xCtrlModel.is() )
+ {
+ Reference< XBindableValue > xBindable( xCtrlModel, UNO_QUERY );
+ if( xBindable.is() )
+ {
+ Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY );
+ if( xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_VALBIND ) )
+ {
+ ScfPropertySet aBindProp( xServInfo );
+ CellAddress aApiAddress;
+ if( aBindProp.GetProperty( aApiAddress, SC_UNONAME_BOUNDCELL ) )
+ {
+ ScUnoConversion::FillScAddress( mxCellLinkAddress, aApiAddress );
+ if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) )
+ lcl_GetFromTo( rRoot, pSdrObj->GetLogicRect(), mxCellLinkAddress.Tab(), maAreaFrom, maAreaTo, true );
+ }
+ }
+ }
+ }
+ }
+
// spreadsheet links
ConvertSheetLinks( xShape );
}
@@ -1052,6 +1086,275 @@ void XclExpTbxControlObj::WriteSbs( XclExpStream& rStrm )
rStrm.EndRecord();
}
+void XclExpTbxControlObj::setShapeId(sal_Int32 aShapeId)
+{
+ mnShapeId = aShapeId;
+}
+
+// save into xl\drawings\drawing1.xml
+void XclExpTbxControlObj::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& pDrawing = rStrm.GetCurrentStream();
+
+ pDrawing->startElement(FSNS(XML_mc, XML_AlternateContent),
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
+ pDrawing->startElement(FSNS(XML_mc, XML_Choice),
+ FSNS(XML_xmlns, XML_a14), rStrm.getNamespaceURL(OOX_NS(a14)).toUtf8(),
+ XML_Requires, "a14");
+
+ pDrawing->startElement(FSNS(XML_xdr, XML_twoCellAnchor), XML_editAs, "oneCell");
+ {
+ pDrawing->startElement(FSNS(XML_xdr, XML_from));
+ lcl_WriteAnchorVertex(pDrawing, maAreaFrom);
+ pDrawing->endElement(FSNS(XML_xdr, XML_from));
+ pDrawing->startElement(FSNS(XML_xdr, XML_to));
+ lcl_WriteAnchorVertex(pDrawing, maAreaTo);
+ pDrawing->endElement(FSNS(XML_xdr, XML_to));
+
+ pDrawing->startElement(FSNS(XML_xdr, XML_sp));
+ {
+ // xdr:nvSpPr
+ pDrawing->startElement(FSNS(XML_xdr, XML_nvSpPr));
+ {
+ pDrawing->singleElement(FSNS(XML_xdr, XML_cNvPr),
+ XML_id, OString::number(mnShapeId).getStr(),
+ XML_name, msCtrlName.toUtf8(), // control name
+ XML_descr, msLabel.toUtf8(), // description as alt text
+ XML_hidden, mbVisible ? "0" : "1");
+ pDrawing->singleElement(FSNS(XML_xdr, XML_cNvSpPr));
+ }
+ pDrawing->endElement(FSNS(XML_xdr, XML_nvSpPr));
+
+ // xdr:spPr
+ pDrawing->startElement(FSNS(XML_xdr, XML_spPr));
+ {
+ // a:xfrm
+ pDrawing->startElement(FSNS(XML_a, XML_xfrm));
+ {
+ pDrawing->singleElement(FSNS(XML_a, XML_off),
+ XML_x, "0",
+ XML_y, "0");
+ pDrawing->singleElement(FSNS(XML_a, XML_ext),
+ XML_cx, "0",
+ XML_cy, "0");
+ }
+ pDrawing->endElement(FSNS(XML_a, XML_xfrm));
+
+ // a:prstGeom
+ pDrawing->startElement(FSNS(XML_a, XML_prstGeom), XML_prst, "rect");
+ {
+ pDrawing->singleElement(FSNS(XML_a, XML_avLst));
+ }
+ pDrawing->endElement(FSNS(XML_a, XML_prstGeom));
+ }
+ pDrawing->endElement(FSNS(XML_xdr, XML_spPr));
+
+ // xdr:txBody
+ {
+ pDrawing->startElement(FSNS(XML_xdr, XML_txBody));
+
+#define DEFLRINS 254
+#define DEFTBINS 127
+ sal_Int32 nLeft, nRight, nTop, nBottom;
+ nLeft = nRight = DEFLRINS;
+ nTop = nBottom = DEFTBINS;
+
+ // top inset looks a bit different compared to ppt export
+ // check if something related doesn't work as expected
+ Reference< XPropertySet > rXPropSet(mxShape, UNO_QUERY);
+
+ try
+ {
+ css::uno::Any mAny;
+
+ mAny = rXPropSet->getPropertyValue("TextLeftDistance");
+ if (mAny.hasValue())
+ mAny >>= nLeft;
+
+ mAny = rXPropSet->getPropertyValue("TextRightDistance");
+ if (mAny.hasValue())
+ mAny >>= nRight;
+
+ mAny = rXPropSet->getPropertyValue("TextUpperDistance");
+ if (mAny.hasValue())
+ mAny >>= nTop;
+
+ mAny = rXPropSet->getPropertyValue("TextLowerDistance");
+ if (mAny.hasValue())
+ mAny >>= nBottom;
+ }
+ catch (...)
+ {
+ }
+
+ // Specifies the inset of the bounding rectangle.
+ // Insets are used just as internal margins for text boxes within shapes.
+ // If this attribute is omitted, then a value of 45720 or 0.05 inches is implied.
+ pDrawing->startElementNS(XML_a, XML_bodyPr,
+ XML_lIns, (nLeft != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nLeft)).getStr() : nullptr,
+ XML_rIns, (nRight != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nRight)).getStr() : nullptr,
+ XML_tIns, (nTop != DEFTBINS) ? OString::number(oox::drawingml::convertHmmToEmu(nTop)).getStr() : nullptr,
+ XML_bIns, (nBottom != DEFTBINS) ? OString::number(oox::drawingml::convertHmmToEmu(nBottom)).getStr() : nullptr,
+ XML_anchor, "ctr");
+
+ {
+ bool bTextAutoGrowHeight = false;
+
+ try
+ {
+ css::uno::Any mAny;
+
+ mAny = rXPropSet->getPropertyValue("TextAutoGrowHeight");
+ if (mAny.hasValue())
+ mAny >>= bTextAutoGrowHeight;
+ }
+ catch (...)
+ {
+ }
+
+ pDrawing->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
+ }
+
+ pDrawing->endElementNS(XML_a, XML_bodyPr);
+
+ {
+ pDrawing->startElementNS(XML_a, XML_p);
+ pDrawing->startElementNS(XML_a, XML_r);
+ pDrawing->startElementNS(XML_a, XML_t);
+ pDrawing->write(msLabel.toUtf8());
+ pDrawing->endElementNS(XML_a, XML_t);
+ pDrawing->endElementNS(XML_a, XML_r);
+ pDrawing->endElementNS(XML_a, XML_p);
+ }
+
+ pDrawing->endElement(FSNS(XML_xdr, XML_txBody));
+ }
+ }
+ pDrawing->endElement(FSNS(XML_xdr, XML_sp));
+ pDrawing->singleElement(FSNS(XML_xdr, XML_clientData));
+ }
+ pDrawing->endElement(FSNS(XML_xdr, XML_twoCellAnchor));
+ pDrawing->endElement( FSNS( XML_mc, XML_Choice ) );
+ pDrawing->endElement( FSNS( XML_mc, XML_AlternateContent ) );
+}
+
+// output into ctrlProp1.xml
+OUString XclExpTbxControlObj::SaveControlPropertiesXml(XclExpXmlStream& rStrm) const
+{
+ OUString sIdFormControlPr;
+
+ switch (mnObjType)
+ {
+ case EXC_OBJTYPE_CHECKBOX:
+ {
+ const sal_Int32 nDrawing = XclExpObjList::getNewDrawingUniqueId();
+ sax_fastparser::FSHelperPtr pFormControl = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "ctrlProps/ctrlProps", nDrawing ),
+ XclXmlUtils::GetStreamName( "../", "ctrlProps/ctrlProps", nDrawing ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.ms-excel.controlproperties+xml",
+ OUStringToOString(oox::getRelationship(Relationship::CTRLPROP), RTL_TEXTENCODING_UTF8).getStr(),
+ &sIdFormControlPr );
+
+ rStrm.PushStream( pFormControl );
+ // checkbox
+ // <formControlPr
+ // xmlns="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
+ // objectType="CheckBox" checked="Checked" lockText="1" noThreeD="1"/>
+ //
+ pFormControl->write("<formControlPr xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\" objectType=\"CheckBox\"");
+ if (mnState == EXC_OBJ_CHECKBOX_CHECKED)
+ pFormControl->write(" checked=\"Checked\"");
+
+ pFormControl->write(" autoLine=\"false\"");
+
+ if (mbPrint)
+ pFormControl->write(" print=\"true\"");
+ else
+ pFormControl->write(" print=\"false\"");
+
+ if (mxCellLinkAddress.IsValid())
+ {
+ OUString aCellLink = mxCellLinkAddress.Format(ScRefFlags::ADDR_ABS,
+ &GetDoc(),
+ ScAddress::Details(::formula::FormulaGrammar::CONV_XL_A1));
+
+ // "Sheet1!$C$5"
+ pFormControl->write(" fmlaLink=\"");
+ if (aCellLink.indexOf('!') < 0)
+ {
+ pFormControl->write(GetTabInfo().GetScTabName( mxCellLinkAddress.Tab() ).toUtf8());
+ pFormControl->write("!");
+ }
+ pFormControl->write(aCellLink);
+ pFormControl->write("\"");
+ }
+
+ pFormControl->write(" lockText=\"1\" noThreeD=\"1\"/>");
+ rStrm.PopStream();
+
+ break;
+ }
+ }
+
+ return sIdFormControlPr;
+}
+
+// output into sheet1.xml
+void XclExpTbxControlObj::SaveSheetXml(XclExpXmlStream& rStrm, const OUString& aIdFormControlPr) const
+{
+ switch (mnObjType)
+ {
+ case EXC_OBJTYPE_CHECKBOX:
+ {
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+
+ rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent),
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
+ rWorksheet->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "x14");
+
+ rWorksheet->startElement(
+ XML_control,
+ XML_shapeId, OString::number(mnShapeId).getStr(),
+ FSNS(XML_r, XML_id), aIdFormControlPr.toUtf8(),
+ XML_name, msLabel.toUtf8()); // text to display with checkbox button
+
+ rWorksheet->write("<controlPr defaultSize=\"0\" locked=\"1\" autoFill=\"0\" autoLine=\"0\" autoPict=\"0\"");
+
+ if (mbPrint)
+ rWorksheet->write(" print=\"true\"");
+ else
+ rWorksheet->write(" print=\"false\"");
+
+ if (!msCtrlName.isEmpty())
+ {
+ rWorksheet->write(" altText=\"");
+ rWorksheet->write(msCtrlName.toUtf8()); // alt text
+ rWorksheet->write("\"");
+ }
+
+ rWorksheet->write(">");
+
+ rWorksheet->startElement(XML_anchor, XML_moveWithCells, "true", XML_sizeWithCells, "false");
+ rWorksheet->startElement(XML_from);
+ lcl_WriteAnchorVertex(rWorksheet, maAreaFrom);
+ rWorksheet->endElement(XML_from);
+ rWorksheet->startElement(XML_to);
+ lcl_WriteAnchorVertex(rWorksheet, maAreaTo);
+ rWorksheet->endElement(XML_to);
+ rWorksheet->endElement( XML_anchor );
+
+ rWorksheet->write("</controlPr>");
+
+ rWorksheet->endElement(XML_control);
+ rWorksheet->endElement( FSNS( XML_mc, XML_Choice ) );
+ rWorksheet->endElement( FSNS( XML_mc, XML_AlternateContent ) );
+
+ break;
+ }
+ }
+}
+
//#endif
XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor, ScDocument* pDoc ) :
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 0999f0ea3dd2..afb381b57060 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -84,6 +84,8 @@ public:
static void ResetCounters();
+ static sal_Int32 getNewDrawingUniqueId() { return ++mnDrawingMLCount; }
+
private:
static sal_Int32 mnDrawingMLCount, mnVmlCount;
SCTAB const mnScTab;
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index 62660b8e1b9e..c5b0ac8067bd 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -190,6 +190,8 @@ private:
XclTokenArrayRef mxCellLink; /// Formula for linked cell.
XclTokenArrayRef mxSrcRange; /// Formula for source data range.
sal_uInt16 mnEntryCount; /// Number of entries in source range.
+protected:
+ ScAddress mxCellLinkAddress;
};
class XclMacroHelper : public XclExpControlHelper
@@ -257,6 +259,13 @@ public:
@return true = The passed event descriptor was valid, macro name has been found. */
bool SetMacroLink( const css::script::ScriptEventDescriptor& rEvent );
+ virtual void SaveXml( XclExpXmlStream& rStrm ) override;
+
+ OUString SaveControlPropertiesXml(XclExpXmlStream& rStrm) const;
+ void SaveSheetXml(XclExpXmlStream& rStrm, const OUString& aIdFormControlPr) const;
+
+ void setShapeId(sal_Int32 aShapeId);
+
private:
virtual void WriteSubRecs( XclExpStream& rStrm ) override;
@@ -266,6 +275,7 @@ private:
void WriteSbs( XclExpStream& rStrm );
private:
+ const css::uno::Reference< css::drawing::XShape > mxShape;
ScfInt16Vec maMultiSel; /// Indexes of all selected entries in a multi selection.
XclTbxEventType meEventType; /// Type of supported macro event.
sal_Int32 mnHeight; /// Height of the control.
@@ -281,6 +291,13 @@ private:
bool mbFlatBorder; /// False = 3D border style; True = Flat border style.
bool mbMultiSel; /// true = Multi selection in listbox.
bool mbScrollHor; /// Scrollbar: true = horizontal.
+ bool mbPrint;
+ bool mbVisible;
+ OUString msCtrlName;
+ OUString msLabel;
+ sal_Int32 mnShapeId;
+ tools::Rectangle maAreaFrom;
+ tools::Rectangle maAreaTo;
};
//#endif
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 5597b635ecbd..277f3157afd7 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -152,6 +152,17 @@ void XclExpObjList::Save( XclExpStream& rStrm )
namespace {
+bool IsFormControlObject( const XclObj *rObj )
+{
+ switch( rObj->GetObjType() )
+ {
+ case EXC_OBJTYPE_CHECKBOX:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool IsVmlObject( const XclObj *rObj )
{
switch( rObj->GetObjType() )
@@ -210,7 +221,7 @@ bool IsValidObject( const XclObj& rObj )
return true;
}
-void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nDrawingMLCount )
+void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm )
{
std::vector<XclObj*> aList;
aList.reserve(rList.size());
@@ -225,7 +236,7 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int
if (aList.empty())
return;
- sal_Int32 nDrawing = ++nDrawingMLCount;
+ sal_Int32 nDrawing = XclExpObjList::getNewDrawingUniqueId();
OUString sId;
sax_fastparser::FSHelperPtr pDrawing = rStrm.CreateOutputStream(
XclXmlUtils::GetStreamName( "xl/", "drawings/drawing", nDrawing ),
@@ -243,14 +254,54 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int
FSNS(XML_xmlns, XML_a), rStrm.getNamespaceURL(OOX_NS(dml)).toUtf8(),
FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
+ sal_Int32 nShapeId = 1000; // unique id of the shape inside one worksheet (not the whole document)
for (const auto& rpObj : aList)
+ {
+ // validate shapeId
+ if ( IsFormControlObject( rpObj ) )
+ {
+ XclExpTbxControlObj* pXclExpTbxControlObj = dynamic_cast<XclExpTbxControlObj*>(rpObj);
+ if (pXclExpTbxControlObj)
+ {
+ pXclExpTbxControlObj->setShapeId(++nShapeId);
+ }
+ }
+
rpObj->SaveXml(rStrm);
+ }
pDrawing->endElement( FSNS( XML_xdr, XML_wsDr ) );
rStrm.PopStream();
}
+void SaveFormControlObjects(XclExpObjList& rList, XclExpXmlStream& rStrm)
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+
+ rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent),
+ FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
+ rWorksheet->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "x14");
+ rWorksheet->startElement(XML_controls);
+
+ for (const auto& rxObj : rList)
+ {
+ if (IsFormControlObject(rxObj.get()))
+ {
+ XclExpTbxControlObj* pXclExpTbxControlObj = dynamic_cast<XclExpTbxControlObj*>(rxObj.get());
+ if (pXclExpTbxControlObj)
+ {
+ const OUString aIdFormControlPr = pXclExpTbxControlObj->SaveControlPropertiesXml(rStrm);
+ pXclExpTbxControlObj->SaveSheetXml(rStrm, aIdFormControlPr);
+ }
+ }
+ }
+
+ rWorksheet->endElement(XML_controls);
+ rWorksheet->endElement(FSNS(XML_mc, XML_Choice));
+ rWorksheet->endElement(FSNS(XML_mc, XML_AlternateContent));
+}
+
void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nVmlCount )
{
if( GetVmlObjectCount( rList ) == 0 )
@@ -297,7 +348,8 @@ void XclExpObjList::SaveXml( XclExpXmlStream& rStrm )
if( maObjs.empty())
return;
- SaveDrawingMLObjects( *this, rStrm, mnDrawingMLCount );
+ SaveDrawingMLObjects( *this, rStrm );
+ SaveFormControlObjects( *this, rStrm );
SaveVmlObjects( *this, rStrm, mnVmlCount );
}
commit 32da039326b6707ae4ad66300467b991f5880888
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 4 10:41:44 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 13:16:43 2020 +0200
disable dbaccess_hsqldb test on macos
fails 50% of the time with a core dump, and we have no way of debugging
that
Change-Id: Ieda3a241a964327d3c70a6f519a032980ce312ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95487
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 8ad4ec9eea1224b9bfe1f7ce28393b234c083c89)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95871
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 50d601e853ae..2d263973f23e 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -61,12 +61,15 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_hsqlschema_import \
))
+# this test fails 50% of the time on the mac jenkins buildbots
ifeq ($(ENABLE_JAVA),TRUE)
+ifneq ($(OS),MACOSX)
$(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_hsqldb_test \
CppunitTest_dbaccess_RowSetClones \
))
endif
+endif
# This runs a suite of performance tests on embedded firebird and HSQLDB.
# Instructions on running the test can be found in qa/unit/embeddedb_performancetest
More information about the Libreoffice-commits
mailing list