summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--desktop/source/lib/init.cxx10
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx61
-rw-r--r--pyuno/source/module/pyuno.cxx3
-rw-r--r--pyuno/source/module/pyuno_callable.cxx3
-rw-r--r--pyuno/source/module/pyuno_iterator.cxx6
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx3
-rw-r--r--pyuno/source/module/pyuno_struct.cxx3
-rw-r--r--sc/qa/unit/tiledrendering/data/right-aligned-with-overflow.odsbin0 -> 8251 bytes
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx30
-rw-r--r--sc/sdi/scalc.sdi2
-rw-r--r--sc/source/core/data/patattr.cxx3
-rw-r--r--sc/source/core/data/table1.cxx27
-rw-r--r--sc/source/ui/view/cellsh1.cxx35
-rw-r--r--sc/source/ui/view/gridwin4.cxx19
-rw-r--r--sc/source/ui/view/tabview3.cxx5
-rw-r--r--sd/source/ui/view/drviews5.cxx10
-rw-r--r--sw/CppunitTest_sw_core_text.mk1
-rw-r--r--sw/inc/PostItMgr.hxx3
-rw-r--r--sw/qa/core/text/data/clearing-break-wrap-through.docxbin0 -> 13056 bytes
-rw-r--r--sw/qa/core/text/txtfly.cxx52
-rw-r--r--sw/source/core/text/txtfly.cxx7
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx9
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx23
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx45
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx8
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx9
-rw-r--r--writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx23
-rw-r--r--writerfilter/qa/cppunittests/dmapper/data/clearing-break-sect-end.docxbin0 -> 12202 bytes
-rw-r--r--writerfilter/qa/cppunittests/ooxml/data/recursive_header_rels.docxbin0 -> 16911 bytes
-rw-r--r--writerfilter/qa/cppunittests/ooxml/ooxml.cxx7
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx3
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx3
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.hxx2
36 files changed, 358 insertions, 68 deletions
diff --git a/configure.ac b/configure.ac
index bae560edb635..00c3645f0454 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([Collabora Office],[23.05.11.1],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[23.05.12.1],[],[],[https://collaboraoffice.com/])
dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 81366621ec15..dec02b7c3103 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5959,7 +5959,7 @@ static char* getDocReadOnly(LibreOfficeKitDocument* pThis)
aTree.put("success", pObjectShell->IsLoadReadonly());
std::stringstream aStream;
- boost::property_tree::write_json(aStream, aTree);
+ boost::property_tree::write_json(aStream, aTree, false /* pretty */);
char* pJson = static_cast<char*>(malloc(aStream.str().size() + 1));
if (!pJson)
return nullptr;
@@ -6006,7 +6006,7 @@ static char* getLanguages(const char* pCommand)
addLocale(aValues, rLocale);
aTree.add_child("commandValues", aValues);
std::stringstream aStream;
- boost::property_tree::write_json(aStream, aTree);
+ boost::property_tree::write_json(aStream, aTree, false /* pretty */);
char* pJson = static_cast<char*>(malloc(aStream.str().size() + 1));
assert(pJson); // Don't handle OOM conditions
strcpy(pJson, aStream.str().c_str());
@@ -6047,7 +6047,7 @@ static char* getFonts (const char* pCommand)
}
aTree.add_child("commandValues", aValues);
std::stringstream aStream;
- boost::property_tree::write_json(aStream, aTree);
+ boost::property_tree::write_json(aStream, aTree, false /* pretty */);
char* pJson = static_cast<char*>(malloc(aStream.str().size() + 1));
assert(pJson); // Don't handle OOM conditions
strcpy(pJson, aStream.str().c_str());
@@ -6082,7 +6082,7 @@ static char* getFontSubset (std::string_view aFontName)
aTree.add_child("commandValues", aValues);
std::stringstream aStream;
- boost::property_tree::write_json(aStream, aTree);
+ boost::property_tree::write_json(aStream, aTree, false /* pretty */);
char* pJson = static_cast<char*>(malloc(aStream.str().size() + 1));
assert(pJson); // Don't handle OOM conditions
strcpy(pJson, aStream.str().c_str());
@@ -6205,7 +6205,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
aTree.add_child("commandValues", aValues);
std::stringstream aStream;
- boost::property_tree::write_json(aStream, aTree);
+ boost::property_tree::write_json(aStream, aTree, false /* pretty */);
char* pJson = static_cast<char*>(malloc(aStream.str().size() + 1));
assert(pJson); // Don't handle OOM conditions
strcpy(pJson, aStream.str().c_str());
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index f7dcba3f9853..ddf3b09dfe90 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -33,6 +33,7 @@
#include <unotools/charclass.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
@@ -966,28 +967,58 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::CreateOpCodeMap(
static bool lcl_fillNativeSymbols( FormulaCompiler::NonConstOpCodeMapPtr& xMap, FormulaCompiler::InitSymbols eWhat = FormulaCompiler::InitSymbols::INIT )
{
static OpCodeMapData aSymbolMap;
+ static std::map<OUString, OpCodeMapData> aLocaleSymbolMap;
osl::MutexGuard aGuard(&aSymbolMap.maMtx);
- if (eWhat == FormulaCompiler::InitSymbols::ASK)
+ if (comphelper::LibreOfficeKit::isActive())
{
- return bool(aSymbolMap.mxSymbolMap);
- }
- else if (eWhat == FormulaCompiler::InitSymbols::DESTROY)
- {
- aSymbolMap.mxSymbolMap.reset();
+ OUString langauge = comphelper::LibreOfficeKit::getLanguageTag().getLanguage();
+ if (eWhat == FormulaCompiler::InitSymbols::ASK)
+ {
+ return aLocaleSymbolMap.find(langauge) != aLocaleSymbolMap.end()
+ && bool(aLocaleSymbolMap[langauge].mxSymbolMap);
+ }
+ else if (eWhat == FormulaCompiler::InitSymbols::DESTROY)
+ {
+ aLocaleSymbolMap[langauge].mxSymbolMap.reset();
+ }
+ else if (!aLocaleSymbolMap[langauge].mxSymbolMap)
+ {
+ // Core
+ aLocaleSymbolMap[langauge].mxSymbolMap = std::make_shared<FormulaCompiler::OpCodeMap>(
+ SC_OPCODE_LAST_OPCODE_ID + 1, true, FormulaGrammar::GRAM_NATIVE_UI);
+ OpCodeList aOpCodeListSymbols(RID_STRLIST_FUNCTION_NAMES_SYMBOLS,
+ aLocaleSymbolMap[langauge].mxSymbolMap);
+ OpCodeList aOpCodeListNative(RID_STRLIST_FUNCTION_NAMES,
+ aLocaleSymbolMap[langauge].mxSymbolMap);
+ // No AddInMap for native core mapping.
+ }
+
+ xMap = aLocaleSymbolMap[langauge].mxSymbolMap;
}
- else if (!aSymbolMap.mxSymbolMap)
+ else
{
- // Core
- aSymbolMap.mxSymbolMap =
- std::make_shared<FormulaCompiler::OpCodeMap>(
+ if (eWhat == FormulaCompiler::InitSymbols::ASK)
+ {
+ return bool(aSymbolMap.mxSymbolMap);
+ }
+ else if (eWhat == FormulaCompiler::InitSymbols::DESTROY)
+ {
+ aSymbolMap.mxSymbolMap.reset();
+ }
+ else if (!aSymbolMap.mxSymbolMap)
+ {
+ // Core
+ aSymbolMap.mxSymbolMap = std::make_shared<FormulaCompiler::OpCodeMap>(
SC_OPCODE_LAST_OPCODE_ID + 1, true, FormulaGrammar::GRAM_NATIVE_UI);
- OpCodeList aOpCodeListSymbols(RID_STRLIST_FUNCTION_NAMES_SYMBOLS, aSymbolMap.mxSymbolMap);
- OpCodeList aOpCodeListNative(RID_STRLIST_FUNCTION_NAMES, aSymbolMap.mxSymbolMap);
- // No AddInMap for native core mapping.
- }
+ OpCodeList aOpCodeListSymbols(RID_STRLIST_FUNCTION_NAMES_SYMBOLS,
+ aSymbolMap.mxSymbolMap);
+ OpCodeList aOpCodeListNative(RID_STRLIST_FUNCTION_NAMES, aSymbolMap.mxSymbolMap);
+ // No AddInMap for native core mapping.
+ }
- xMap = aSymbolMap.mxSymbolMap;
+ xMap = aSymbolMap.mxSymbolMap;
+ }
return true;
}
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index cc4858279949..e8fa6c89d991 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1667,6 +1667,9 @@ static PyTypeObject PyUNOType =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx
index f22de316b7de..8f19fc8eb654 100644
--- a/pyuno/source/module/pyuno_callable.cxx
+++ b/pyuno/source/module/pyuno_callable.cxx
@@ -244,6 +244,9 @@ static PyTypeObject PyUNO_callable_Type =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx
index 134f318a1017..2fc70a32fcff 100644
--- a/pyuno/source/module/pyuno_iterator.cxx
+++ b/pyuno/source/module/pyuno_iterator.cxx
@@ -177,6 +177,9 @@ static PyTypeObject PyUNO_iterator_Type =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
@@ -323,6 +326,9 @@ static PyTypeObject PyUNO_list_iterator_Type =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 7f3eb7a6e95f..02f02c2f6679 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -138,6 +138,9 @@ static PyTypeObject RuntimeImpl_Type =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx
index c8fd7e987905..364f2776011a 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -354,6 +354,9 @@ static PyTypeObject PyUNOStructType =
#pragma clang diagnostic pop
#endif
#endif
+#if PY_VERSION_HEX >= 0x030C00A1
+ , 0 // tp_watched
+#endif
#endif
#endif
};
diff --git a/sc/qa/unit/tiledrendering/data/right-aligned-with-overflow.ods b/sc/qa/unit/tiledrendering/data/right-aligned-with-overflow.ods
new file mode 100644
index 000000000000..6a32fdc579c2
--- /dev/null
+++ b/sc/qa/unit/tiledrendering/data/right-aligned-with-overflow.ods
Binary files differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 53a558b6ea52..1c3f58d7530d 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -185,6 +185,7 @@ public:
void testEditShapeText();
void testCopyMultiSelection();
void testNumberFormatLocaleMultiUser();
+ void testLeftOverflowEdit();
CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
CPPUNIT_TEST(testRowColumnHeaders);
@@ -268,6 +269,7 @@ public:
CPPUNIT_TEST(testEditShapeText);
CPPUNIT_TEST(testCopyMultiSelection);
CPPUNIT_TEST(testNumberFormatLocaleMultiUser);
+ CPPUNIT_TEST(testLeftOverflowEdit);
CPPUNIT_TEST_SUITE_END();
private:
@@ -4237,6 +4239,34 @@ void ScTiledRenderingTest::testNumberFormatLocaleMultiUser()
}
}
+void ScTiledRenderingTest::testLeftOverflowEdit()
+{
+ comphelper::LibreOfficeKit::setCompatFlag(comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+ ScModelObj* pModelObj = createDoc("right-aligned-with-overflow.ods");
+ ViewCallback aView;
+
+ // Go to Cell B5000
+ uno::Sequence<beans::PropertyValue> aPropertyValues = {
+ comphelper::makePropertyValue("ToPoint", OUString("$B$5000")),
+ };
+ dispatchCommand(mxComponent, ".uno:GoToCell", aPropertyValues);
+
+ // Enter edit mode and select all text.
+ aView.m_aTextSelectionResult.clear();
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::F2);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::F2);
+ Scheduler::ProcessEventsToIdle();
+ // CTRL + A
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_MOD1 | awt::Key::A);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_MOD1 | awt::Key::A);
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the accompanying fix this would fail with
+ // - Expected: 20
+ // - Actual : 1300
+ CPPUNIT_ASSERT_EQUAL(tools::Long(20), aView.m_aTextSelectionResult.m_aRefPoint.getX());
+}
+
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index db3832133b70..f158aa4bbede 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -338,7 +338,7 @@ SfxBoolItem AutoComplete FID_AUTOCOMPLETE
SfxVoidItem AutoFill FID_FILL_AUTO
-(SfxStringItem EndCell FID_FILL_AUTO)
+(SfxStringItem EndCell FID_FILL_AUTO,SfxBoolItem Copy FN_PARAM_1)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 34cfa1c52175..2de19a4d952b 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -509,7 +509,8 @@ void ScPatternAttr::fillColor(model::ComplexColor& rComplexColor, const SfxItemS
if (pViewShell)
{
const ScViewRenderingOptions& rViewRenderingOptions = pViewShell->GetViewRenderingData();
- aBackColor = rViewRenderingOptions.GetDocColor();
+ aBackColor = eAutoMode == SC_AUTOCOL_PRINT ? COL_WHITE :
+ rViewRenderingOptions.GetDocColor();
}
}
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 9064c5241acf..a2a577bf4e60 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -48,6 +48,7 @@
#include <refupdatecontext.hxx>
#include <rowheightcontext.hxx>
#include <compressedarray.hxx>
+#include <tabvwsh.hxx>
#include <vcl/svapp.hxx>
#include <formula/vectortoken.hxx>
@@ -487,6 +488,18 @@ bool ScTable::SetOptimalHeight(
mpRowHeights->enableTreeSearch(true);
+ if (bChanged)
+ {
+ if (ScViewData* pViewData = ScDocShell::GetViewData())
+ {
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pViewData->GetViewShell(),
+ false /* bColsAffected */, true /* bRowsAffected */,
+ true /* bSizes*/, false /* bHidden */, false /* bFiltered */,
+ false /* bGroups */, nTab);
+ }
+ }
+
return bChanged;
}
@@ -508,10 +521,22 @@ void ScTable::SetOptimalHeightOnly(
SetRowHeightOnlyFunc aFunc(this);
- SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow, true);
+ bool bChanged = SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow, true);
if ( pProgress != pOuterProgress )
delete pProgress;
+
+ if (bChanged)
+ {
+ if (ScViewData* pViewData = ScDocShell::GetViewData())
+ {
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pViewData->GetViewShell(),
+ false /* bColsAffected */, true /* bRowsAffected */,
+ true /* bSizes*/, false /* bHidden */, false /* bFiltered */,
+ false /* bGroups */, nTab);
+ }
+ }
}
bool ScTable::GetCellArea( SCCOL& rEndCol, SCROW& rEndRow )
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 9a0542355497..3a44db570119 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -873,6 +873,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
SCROW nFillRow = GetViewData().GetRefEndY();
ScDocument& rDoc = GetViewData().GetDocument();
+ sal_uInt16 nOrigScFillModeMouseModifier = nScFillModeMouseModifier;
+ bool bUseSelection = true;
+
if( pReqArgs != nullptr )
{
if( const SfxStringItem* pItem = pReqArgs->GetItemIfSet( FID_FILL_AUTO ) )
@@ -885,13 +888,33 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
nFillRow = aScAddress.Row();
nFillCol = aScAddress.Col();
}
+
+ SCTAB nStartTab, nEndTab;
+ GetViewData().GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol,
+ nEndRow, nEndTab);
+ bUseSelection = false;
}
- SCTAB nStartTab, nEndTab;
- GetViewData().GetSimpleArea( nStartCol,nStartRow,nStartTab,
- nEndCol,nEndRow,nEndTab );
+ const SfxPoolItem* pItem;
+ if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
+ {
+ /*
+ nScFillModeMouseModifier controls if we "Copy cells" or "Fill series"
+ - if nScFillModeMouseModifier is set to "KEY_MOD1", use "Copy cells"
+ - otherwise use "Fill series"
+
+ This is also the same with auto fill by dragging mouse
+ - dragging with Ctrl key will set nScFillModeMouseModifier to KEY_MOD1, use "Copy cells"
+ - only dragging will use "Fill series" (no Ctrl key)
+ */
+ const bool bCopyCells = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ nScFillModeMouseModifier &= ~KEY_MOD1; // turn off, reset to 0
+
+ if (bCopyCells)
+ nScFillModeMouseModifier |= KEY_MOD1; // turn on
+ }
}
- else // call via mouse
+ if (bUseSelection) // call via mouse or if FN_PARAM_1 exists
{
// not in a merged cell
@@ -965,6 +988,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
OSL_FAIL( "Direction not unique for autofill" );
}
}
+
+ // reset nScFillModeMouseModifier to its original state
+ // otherwise, auto fill by dragging will not work as expected
+ nScFillModeMouseModifier = nOrigScFillModeMouseModifier;
}
break;
case FID_FILL_SINGLE_EDIT:
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index d487afb9db03..13ad72e720b9 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1380,10 +1380,21 @@ namespace
aBoundsProvider.GetStartIndexAndPosition(nStartIndex, nStartPosPx); ++nStartIndex;
aBoundsProvider.GetEndIndexAndPosition(nEndIndex, nEndPosPx);
- nTopLeftTileOffset = nTileStartPosPx - nStartPosPx;
- nTopLeftTileOrigin = nStartPosPx;
- nTopLeftTileIndex = nStartIndex;
- nBottomRightTileIndex = nEndIndex;
+ bool reverse = nStartIndex > nEndIndex;
+ if (reverse)
+ {
+ nTopLeftTileOffset = nTileEndPosPx - nEndPosPx;
+ nTopLeftTileOrigin = nEndPosPx;
+ nTopLeftTileIndex = nEndIndex;
+ nBottomRightTileIndex = nStartIndex;
+ }
+ else {
+ nTopLeftTileOffset = nTileStartPosPx - nStartPosPx;
+ nTopLeftTileOrigin = nStartPosPx;
+ nTopLeftTileIndex = nStartIndex;
+ nBottomRightTileIndex = nEndIndex;
+ }
+
}
void lcl_RTLAdjustTileColOffset(ScViewData& rViewData, sal_Int32& nTileColOffset,
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8f5fe8ae13b8..94cff18abab5 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2176,14 +2176,15 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW
// MapMode must be set after HideCursor
pGridWin[i]->SetMapMode(aViewData.GetLogicMode());
- aViewData.SetEditEngine( static_cast<ScSplitPos>(i), pEngine, pGridWin[i], nCol, nRow );
-
if ( !bPosVisible )
{
// move the edit view area to the real (possibly negative) position,
// or hide if completely above or left of the window
pGridWin[i]->UpdateEditViewPos();
}
+
+ aViewData.SetEditEngine(static_cast<ScSplitPos>(i), pEngine, pGridWin[i], nCol,
+ nRow);
}
}
}
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index c6774537cfea..160b5c5edf27 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -312,7 +312,15 @@ void DrawViewShell::WriteFrameViewData()
mpFrameView->SetGridCoarse( mpDrawView->GetGridCoarse() );
mpFrameView->SetGridFine( mpDrawView->GetGridFine() );
mpFrameView->SetSnapGridWidth(mpDrawView->GetSnapGridWidthX(), mpDrawView->GetSnapGridWidthY());
- mpFrameView->SetGridVisible( mpDrawView->IsGridVisible() );
+
+ // In LOK, Grid isn't implemented, and it appears in the slide thumbnails
+ // Remove this when Grid is implemented and/or thumbnails are fixed to no longer
+ // show the grid.
+ if (comphelper::LibreOfficeKit::isActive())
+ mpFrameView->SetGridVisible( false );
+ else
+ mpFrameView->SetGridVisible( mpDrawView->IsGridVisible() );
+
mpFrameView->SetGridFront( mpDrawView->IsGridFront() );
mpFrameView->SetSnapAngle( mpDrawView->GetSnapAngle() );
mpFrameView->SetGridSnap( mpDrawView->IsGridSnap() );
diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk
index ce27696b3c4c..5e623d3b0cd0 100644
--- a/sw/CppunitTest_sw_core_text.mk
+++ b/sw/CppunitTest_sw_core_text.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_core_text, \
sw/qa/core/text/porlay \
sw/qa/core/text/porrst \
sw/qa/core/text/text \
+ sw/qa/core/text/txtfly \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_core_text, \
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 98d9f4f2ef30..5a877a6c8afe 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -172,6 +172,8 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener
SwSidebarItem* InsertItem( SfxBroadcaster* pItem, bool bCheckExistence, bool bFocus);
void RemoveItem( SfxBroadcaster* pBroadcast );
+ VclPtr<sw::annotation::SwAnnotationWin> GetOrCreateAnnotationWindow(SwSidebarItem& rItem);
+
public:
SwPostItMgr(SwView* aDoc);
virtual ~SwPostItMgr() override;
@@ -231,6 +233,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener
sw::annotation::SwAnnotationWin* GetNextPostIt( sal_uInt16 aDirection,
sw::annotation::SwAnnotationWin* aPostIt);
SwPostItField* GetLatestPostItField();
+ sw::annotation::SwAnnotationWin* GetOrCreateAnnotationWindowForLatestPostItField();
tools::Long GetNextBorder();
diff --git a/sw/qa/core/text/data/clearing-break-wrap-through.docx b/sw/qa/core/text/data/clearing-break-wrap-through.docx
new file mode 100644
index 000000000000..c96e8c27da5e
--- /dev/null
+++ b/sw/qa/core/text/data/clearing-break-wrap-through.docx
Binary files differ
diff --git a/sw/qa/core/text/txtfly.cxx b/sw/qa/core/text/txtfly.cxx
new file mode 100644
index 000000000000..461ed81e2203
--- /dev/null
+++ b/sw/qa/core/text/txtfly.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <doc.hxx>
+#include <frame.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/txtfly.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testClearingBreakWrapThrough)
+{
+ // Given a document with a clearing break, then a shape in the next paragraph:
+ createSwDoc("clearing-break-wrap-through.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure we layout these 2 paragraphs on a single page, since there is enough space for
+ // them:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage);
+ // Without the accompanying fix in place, this test would have failed, we had an unexpected 2nd
+ // page.
+ CPPUNIT_ASSERT(!pPage->GetNext());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index a4f625651f1e..dc4d24f27aab 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1043,6 +1043,13 @@ SwTwips SwTextFly::GetMaxBottom(const SwBreakPortion& rPortion, const SwTextForm
continue;
}
+ const SwFormatSurround& rSurround = pAnchoredObj->GetFrameFormat().GetSurround();
+ if (rSurround.GetValue() == text::WrapTextMode_THROUGH)
+ {
+ // Wrap through has no influence on clearing breaks.
+ continue;
+ }
+
SwRect aRect(pAnchoredObj->GetObjRectWithSpaces());
if (m_pCurrFrame->IsVertical())
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index 16acc0cbf589..adc487422466 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -119,9 +119,12 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
}
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
- mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame),
- mrSidebarItem.GetFormatField(),
- *this );
+ if (rSidebarItem.maLayoutInfo.mpAnchorFrame)
+ {
+ mrMgr.ConnectSidebarWinToFrame( *(rSidebarItem.maLayoutInfo.mpAnchorFrame),
+ mrSidebarItem.GetFormatField(),
+ *this );
+ }
#endif
if (SupportsDoubleBuffering())
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index c5ca676895c0..ef7300ad8314 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1101,6 +1101,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
case FN_POSTIT:
case FN_REPLY:
{
+ const bool bReply = nSlot == FN_REPLY;
// if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note
// will be created
if (!mpOutliner->GetEditEngine().GetText().isEmpty())
@@ -1111,15 +1112,32 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
if (mrMgr.HasActiveSidebarWin())
mrMgr.SetActiveSidebarWin(nullptr);
SwitchToFieldPos();
+
+ SwDocShell* pShell = mrView.GetDocShell();
+ if (bReply)
+ pShell->GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
+
+ // synchronous dispatch
mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
- if (nSlot == FN_REPLY)
+ if (bReply)
{
// Get newly created SwPostItField and set its paraIdParent
auto pPostItField = mrMgr.GetLatestPostItField();
pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
pPostItField->SetParentPostItId(GetTopReplyNote()->GetPostItField()->GetPostItId());
+ this->GeneratePostItName();
pPostItField->SetParentName(GetTopReplyNote()->GetPostItField()->GetName());
+
+ // In this case, force generating the associated window
+ // synchronously so we can bundle its use of the registered
+ // "Answer" into the same undo group that the synchronous
+ // FN_POSTIT was put in
+ mrMgr.GetOrCreateAnnotationWindowForLatestPostItField();
+
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UndoArg1, pPostItField->GetDescription());
+ pShell->GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, &aRewriter);
}
break;
}
@@ -1460,7 +1478,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem )
{
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame;
- if ( bAnchorChanged )
+ if (bAnchorChanged && mpAnchorFrame)
{
mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this );
}
@@ -1468,6 +1486,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem )
mrSidebarItem = rSidebarItem;
mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame;
+ assert(mpAnchorFrame);
#if !ENABLE_WASM_STRIP_ACCESSIBILITY
if (mxSidebarWinAccessible)
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index ee7cb16685f2..efd6e847563e 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -710,6 +710,28 @@ void SwPostItMgr::PreparePageContainer()
}
}
+VclPtr<SwAnnotationWin> SwPostItMgr::GetOrCreateAnnotationWindow(SwSidebarItem& rItem)
+{
+ VclPtr<SwAnnotationWin> pPostIt = rItem.mpPostIt;
+ if (!pPostIt)
+ {
+ pPostIt = rItem.GetSidebarWindow( mpView->GetEditWin(),
+ *this );
+ pPostIt->InitControls();
+ pPostIt->SetReadonly(mbReadOnly);
+ rItem.mpPostIt = pPostIt;
+ if (mpAnswer)
+ {
+ if (pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we really have another note in front of this one
+ {
+ pPostIt->InitAnswer(*mpAnswer);
+ }
+ mpAnswer.reset();
+ }
+ }
+ return rItem.mpPostIt;
+}
+
void SwPostItMgr::LayoutPostIts()
{
const bool bLoKitActive = comphelper::LibreOfficeKit::isActive();
@@ -739,24 +761,9 @@ void SwPostItMgr::LayoutPostIts()
for (auto const& pItem : pPage->mvSidebarItems)
{
- VclPtr<SwAnnotationWin> pPostIt = pItem->mpPostIt;
-
if (pItem->mbShow)
{
- if (!pPostIt)
- {
- pPostIt = pItem->GetSidebarWindow( mpView->GetEditWin(),
- *this );
- pPostIt->InitControls();
- pPostIt->SetReadonly(mbReadOnly);
- pItem->mpPostIt = pPostIt;
- if (mpAnswer)
- {
- if (pPostIt->GetPostItField()->GetParentPostItId() != 0) //do we really have another note in front of this one
- pPostIt->InitAnswer(*mpAnswer);
- mpAnswer.reset();
- }
- }
+ VclPtr<SwAnnotationWin> pPostIt = GetOrCreateAnnotationWindow(*pItem);
pPostIt->SetChangeTracking(
pItem->mLayoutStatus,
@@ -823,6 +830,7 @@ void SwPostItMgr::LayoutPostIts()
}
else // we don't want to see it
{
+ VclPtr<SwAnnotationWin> pPostIt = pItem->mpPostIt;
if (pPostIt)
pPostIt->HideNote();
}
@@ -1858,6 +1866,11 @@ SwPostItField* SwPostItMgr::GetLatestPostItField()
return static_cast<SwPostItField*>(mvPostItFields.back()->GetFormatField().GetField());
}
+sw::annotation::SwAnnotationWin* SwPostItMgr::GetOrCreateAnnotationWindowForLatestPostItField()
+{
+ return GetOrCreateAnnotationWindow(*mvPostItFields.back());
+}
+
SwAnnotationWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
SwAnnotationWin* aPostIt )
{
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 44282cd665db..2fc090258d77 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1153,7 +1153,15 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
auto & rEntry = aTabRows.GetEntry(nIndex);
tools::Long nNewPosition = rEntry.nPos + nOffset;
nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
+ tools::Long nActualOffset = nNewPosition - rEntry.nPos;
rEntry.nPos = nNewPosition;
+ // Maintain the size of the other rows
+ for (size_t i = nIndex + 1; i < aTabRows.Count(); ++i)
+ {
+ auto& rNextEntry = aTabRows.GetEntry(i);
+ rNextEntry.nPos += nActualOffset;
+ }
+ aTabRows.SetRight(aTabRows.GetRight() + nActualOffset);
}
rSh.SetTabRows(aTabRows, false);
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index e11f5d82204b..58ebc35cb6af 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -15,7 +15,6 @@
#include "webdavresponseparser.hxx"
#include <comphelper/attributelist.hxx>
-#include <comphelper/lok.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/string.hxx>
@@ -697,14 +696,6 @@ CurlSession::CurlSession(uno::Reference<uno::XComponentContext> xContext,
rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_FORBID_REUSE, 1L);
assert(rc == CURLE_OK);
}
- // If WOPI-like host has self-signed certificate, it's not possible to insert images
- // to the document, so here is a compromise. The user has already accepted the self
- // signed certificate in the browser, when we get here.
- if (comphelper::LibreOfficeKit::isActive())
- {
- rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_SSL_VERIFYPEER, 0L);
- assert(rc == CURLE_OK);
- }
}
CurlSession::~CurlSession() {}
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index dc99e6ae2168..c299294d92cd 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -411,6 +411,29 @@ CPPUNIT_TEST_FIXTURE(Test, testRedlinedShapeThenSdt)
CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"),
xPortion->getPropertyValue("TextPortionType").get<OUString>());
}
+
+CPPUNIT_TEST_FIXTURE(Test, testClearingBreakSectEnd)
+{
+ // Given a file with a single-paragraph section, ends with a clearing break:
+ // When importing that document:
+ loadFromURL(u"clearing-break-sect-end.docx");
+
+ // Then make sure the clearing break is not lost before a cont sect break:
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<container::XEnumerationAccess> xPortionEnumAccess(xParaEnum->nextElement(),
+ uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xPortionEnum = xPortionEnumAccess->createEnumeration();
+ uno::Reference<beans::XPropertySet> xPortion(xPortionEnum->nextElement(), uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: LineBreak
+ // - Actual : Text
+ // i.e. the clearing break at sect end was lost, leading to text overlap.
+ CPPUNIT_ASSERT_EQUAL(OUString("LineBreak"),
+ xPortion->getPropertyValue("TextPortionType").get<OUString>());
+}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/clearing-break-sect-end.docx b/writerfilter/qa/cppunittests/dmapper/data/clearing-break-sect-end.docx
new file mode 100644
index 000000000000..5052b2dd1649
--- /dev/null
+++ b/writerfilter/qa/cppunittests/dmapper/data/clearing-break-sect-end.docx
Binary files differ
diff --git a/writerfilter/qa/cppunittests/ooxml/data/recursive_header_rels.docx b/writerfilter/qa/cppunittests/ooxml/data/recursive_header_rels.docx
new file mode 100644
index 000000000000..8000760017ed
--- /dev/null
+++ b/writerfilter/qa/cppunittests/ooxml/data/recursive_header_rels.docx
Binary files differ
diff --git a/writerfilter/qa/cppunittests/ooxml/ooxml.cxx b/writerfilter/qa/cppunittests/ooxml/ooxml.cxx
index 8602ecd8e77d..532ff4e9d2e1 100644
--- a/writerfilter/qa/cppunittests/ooxml/ooxml.cxx
+++ b/writerfilter/qa/cppunittests/ooxml/ooxml.cxx
@@ -62,6 +62,13 @@ CPPUNIT_TEST_FIXTURE(Test, testFloatingTableLeak)
CPPUNIT_ASSERT(xParagraph->supportsService("com.sun.star.text.Paragraph"));
CPPUNIT_ASSERT(!xParaEnum->hasMoreElements());
}
+
+CPPUNIT_TEST_FIXTURE(Test, testRecursiveHeaderRels)
+{
+ // Given a document with self-referencing rels in a header/footer:
+ loadFromURL(u"recursive_header_rels.docx");
+ // It should not crash/hang on load
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index f75e765ba07c..24c626fb83de 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4165,13 +4165,13 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
else if (len == 1 && sText[0] == '\r')
{
// Clear "last" one linebreak at end of section
- if (m_pImpl->GetIsLastParagraphInSection() && m_pImpl->isBreakDeferred(LINE_BREAK))
+ if (m_pImpl->GetIsLastParagraphInSection() && m_pImpl->isBreakDeferred(LINE_BREAK) && !m_pImpl->HasLineBreakClear())
m_pImpl->clearDeferredBreak(LINE_BREAK);
// And emit all other linebreaks
while (m_pImpl->isBreakDeferred(LINE_BREAK))
{
m_pImpl->clearDeferredBreak(LINE_BREAK);
- m_pImpl->appendTextPortion("\n", m_pImpl->GetTopContext());
+ m_pImpl->HandleLineBreak(m_pImpl->GetTopContext());
}
}
else if (len == 1 && sText[0] == '\t' )
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a4f3a4877f3a..3e2feed37b66 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4824,6 +4824,11 @@ void DomainMapper_Impl::HandleLineBreakClear(sal_Int32 nClear)
}
}
+bool DomainMapper_Impl::HasLineBreakClear() const
+{
+ return m_oLineBreakClear.has_value();
+}
+
void DomainMapper_Impl::HandleLineBreak(const PropertyMapPtr& pPropertyMap)
{
if (!m_oLineBreakClear.has_value())
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 3fcd02048251..4b1364115e03 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -1211,6 +1211,9 @@ public:
/// Handles <w:br w:clear="...">.
void HandleLineBreakClear(sal_Int32 nClear);
+ /// Checks if we have a pending <w:br w:clear="...">.
+ bool HasLineBreakClear() const;
+
/// Handles <w:br>.
void HandleLineBreak(const PropertyMapPtr& pPropertyMap);
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 8e0cd9aa8a86..368b8d07465a 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -764,8 +764,9 @@ void OOXMLDocumentImpl::resolveEmbeddingsStream(const OOXMLStream::Pointer_t& pS
{
importSubStreamRelations(pStream, OOXMLStream::CHARTS);
}
- if(bHeaderFooterFound)
+ if (bHeaderFooterFound && maSeenStreams.find(customTarget) == maSeenStreams.end())
{
+ maSeenStreams.insert(customTarget);
try
{
OOXMLStream::Pointer_t Stream = OOXMLDocumentFactory::createStream(pStream, streamType);
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
index 3f57696b2d25..917ffffea002 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
@@ -30,6 +30,7 @@
#include <vector>
#include <stack>
+#include <set>
namespace writerfilter::ooxml
{
@@ -55,6 +56,7 @@ class OOXMLDocumentImpl : public OOXMLDocument
css::uno::Reference<css::io::XInputStream> mxEmbeddings;
css::uno::Sequence < css::beans::PropertyValue > mxEmbeddingsList;
std::vector<css::beans::PropertyValue> aEmbeddings;
+ std::set<OUString> maSeenStreams;
bool mbIsSubstream;
bool mbSkipImages;
/// How many paragraphs equal to 1 percent?