Rebased ref, commits from common ancestor:
commit 6e266e0aa3821382cb3eca38eabab53930745ed9
Author: Michael Meeks <[email protected]>
AuthorDate: Mon Apr 3 09:39:53 2023 +0100
Commit: Michael Meeks <[email protected]>
CommitDate: Mon Apr 3 15:20:32 2023 +0100
Sketch of BinaryDataContainer swap out ...
Change-Id: Ib7ca45afb8499460b1852461f7c11afca3f3cdfa
diff --git a/include/vcl/BinaryDataContainer.hxx
b/include/vcl/BinaryDataContainer.hxx
index eb4ed13f4750..fb9150bceda3 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -56,6 +56,9 @@ public:
/// return the in-memory size in bytes as of now.
std::size_t getSizeBytes() const;
+ /// swap out to disk for now
+ void swapOut() const;
+
size_t calculateHash() const;
};
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 2749bd13119b..e87b639c0bcd 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1253,6 +1253,9 @@ bool ImpGraphic::swapOutGraphic(SvStream& rStream)
break;
}
+ if (mpGfxLink)
+ mpGfxLink->getDataContainer().swapOut();
+
return true;
}
diff --git a/vcl/source/graphic/BinaryDataContainer.cxx
b/vcl/source/graphic/BinaryDataContainer.cxx
index 7c05144e4897..079eb2a090d0 100644
--- a/vcl/source/graphic/BinaryDataContainer.cxx
+++ b/vcl/source/graphic/BinaryDataContainer.cxx
@@ -73,4 +73,9 @@ bool BinaryDataContainer::isEmpty() const { return !mpData ||
mpData->empty(); }
const sal_uInt8* BinaryDataContainer::getData() const { return mpData ?
mpData->data() : nullptr; }
+void BinaryDataContainer::swapOut() const
+{
+ // FIXME: swap out the data to disk - and force it in again in above
methods.
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit cff31b7f57d177397642aa429a8ab4c3c579deaf
Author: Michael Meeks <[email protected]>
AuthorDate: Mon Apr 3 09:34:54 2023 +0100
Commit: Michael Meeks <[email protected]>
CommitDate: Mon Apr 3 15:04:34 2023 +0100
BinaryDataContainer: account for in-memory size of un-compressed image.
Change-Id: Ia86d4dda706959bb58e941e65f2b2f7fffa8dc3d
diff --git a/include/vcl/BinaryDataContainer.hxx
b/include/vcl/BinaryDataContainer.hxx
index 3e5b4395a61a..eb4ed13f4750 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -53,6 +53,9 @@ public:
/// writes the contents to the given stream
std::size_t writeToStream(SvStream& rStream) const;
+ /// return the in-memory size in bytes as of now.
+ std::size_t getSizeBytes() const;
+
size_t calculateHash() const;
};
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 8c0f5fd32b05..531633b3f738 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -85,6 +85,9 @@ public:
sal_uInt32 GetDataSize() const { return
maDataContainer.getSize(); }
const sal_uInt8* GetData() const;
+ /// return the in-memory size as of now.
+ size_t getSizeBytes() const { return
maDataContainer.getSizeBytes(); }
+
const BinaryDataContainer& getDataContainer() const
{
return maDataContainer;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index a4569f95e200..2749bd13119b 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -999,6 +999,9 @@ sal_uLong ImpGraphic::getSizeBytes() const
break;
}
+ if (mpGfxLink)
+ mnSizeBytes += mpGfxLink->getSizeBytes();
+
return mnSizeBytes;
}
@@ -1434,6 +1437,8 @@ void ImpGraphic::dumpState(rtl::OStringBuffer &rState)
rState.append(static_cast<sal_Int32>(meType));
rState.append("\tsize:\t");
rState.append(static_cast<sal_Int64>(mnSizeBytes));
+ rState.append("\tgfxl:\t");
+ rState.append(static_cast<sal_Int64>(mpGfxLink ? mpGfxLink->getSizeBytes()
: -1));
rState.append("\t");
rState.append(static_cast<sal_Int32>(maSwapInfo.maSizePixel.Width()));
rState.append("x");
diff --git a/vcl/source/graphic/BinaryDataContainer.cxx
b/vcl/source/graphic/BinaryDataContainer.cxx
index 0eaaa75e380c..7c05144e4897 100644
--- a/vcl/source/graphic/BinaryDataContainer.cxx
+++ b/vcl/source/graphic/BinaryDataContainer.cxx
@@ -67,6 +67,8 @@ std::size_t BinaryDataContainer::writeToStream(SvStream&
rStream) const
size_t BinaryDataContainer::getSize() const { return mpData ? mpData->size() :
0; }
+size_t BinaryDataContainer::getSizeBytes() const { return getSize(); }
+
bool BinaryDataContainer::isEmpty() const { return !mpData || mpData->empty();
}
const sal_uInt8* BinaryDataContainer::getData() const { return mpData ?
mpData->data() : nullptr; }
commit bd1b5a3a6e9ab4201aa5dde4f6433e0bfcefbbac
Author: Michael Meeks <[email protected]>
AuthorDate: Sat Apr 1 21:17:15 2023 +0100
Commit: Michael Meeks <[email protected]>
CommitDate: Mon Apr 3 15:04:33 2023 +0100
clang-format noise to make porting to/from master easier.
Change-Id: I0df08baa9504c09d8f850ce54670dfa9671220bb
diff --git a/include/vcl/BinaryDataContainer.hxx
b/include/vcl/BinaryDataContainer.hxx
index 78cb52d05f8a..3e5b4395a61a 100644
--- a/include/vcl/BinaryDataContainer.hxx
+++ b/include/vcl/BinaryDataContainer.hxx
@@ -51,7 +51,7 @@ public:
std::shared_ptr<SvStream> getAsStream();
/// writes the contents to the given stream
- std::size_t writeToStream(SvStream &rStream) const;
+ std::size_t writeToStream(SvStream& rStream) const;
size_t calculateHash() const;
};
diff --git a/vcl/source/graphic/BinaryDataContainer.cxx
b/vcl/source/graphic/BinaryDataContainer.cxx
index c0992421223f..0eaaa75e380c 100644
--- a/vcl/source/graphic/BinaryDataContainer.cxx
+++ b/vcl/source/graphic/BinaryDataContainer.cxx
@@ -46,10 +46,11 @@ css::uno::Sequence<sal_Int8>
BinaryDataContainer::getAsSequence() const
class ReferencedMemoryStream : public SvMemoryStream
{
std::shared_ptr<std::vector<sal_uInt8>> mpData;
+
public:
- ReferencedMemoryStream(const std::shared_ptr<std::vector<sal_uInt8>>
&rData)
- : SvMemoryStream(rData ? rData->data() : nullptr, rData->size(),
StreamMode::READ),
- mpData(rData)
+ ReferencedMemoryStream(const std::shared_ptr<std::vector<sal_uInt8>>&
rData)
+ : SvMemoryStream(rData ? rData->data() : nullptr, rData->size(),
StreamMode::READ)
+ , mpData(rData)
{
}
};
@@ -59,25 +60,15 @@ std::shared_ptr<SvStream> BinaryDataContainer::getAsStream()
return std::make_shared<ReferencedMemoryStream>(mpData);
}
-std::size_t BinaryDataContainer::writeToStream(SvStream &rStream) const
+std::size_t BinaryDataContainer::writeToStream(SvStream& rStream) const
{
return rStream.WriteBytes(getData(), getSize());
}
-size_t BinaryDataContainer::getSize() const
-{
- return mpData ? mpData->size() : 0;
-}
-
-bool BinaryDataContainer::isEmpty() const
-{
- return !mpData || mpData->empty();
-}
+size_t BinaryDataContainer::getSize() const { return mpData ? mpData->size() :
0; }
-const sal_uInt8* BinaryDataContainer::getData() const
-{
- return mpData ? mpData->data() : nullptr;
-}
+bool BinaryDataContainer::isEmpty() const { return !mpData || mpData->empty();
}
+const sal_uInt8* BinaryDataContainer::getData() const { return mpData ?
mpData->data() : nullptr; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 437b45e14343488b143cbd341f386077d6ae69ff
Author: Szymon Kłos <[email protected]>
AuthorDate: Fri Mar 24 10:52:13 2023 +0100
Commit: Szymon Kłos <[email protected]>
CommitDate: Mon Apr 3 08:12:13 2023 +0200
jsdialog: enable and make async chart line prop dialog
Change-Id: I21817b21fe6d2ce0a6f6bd784c0e24fe35b17fec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149502
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Szymon Kłos <[email protected]>
diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
index 19534aa1e0b0..3cf5996ed300 100644
--- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
+++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
@@ -205,22 +205,22 @@ SplineResourceGroup::SplineResourceGroup(weld::Builder*
pBuilder, weld::Window*
m_xLB_LineType->connect_changed(LINK(this, SplineResourceGroup,
LineTypeChangeHdl));
}
-SplinePropertiesDialog& SplineResourceGroup::getSplinePropertiesDialog()
+std::shared_ptr<SplinePropertiesDialog>
SplineResourceGroup::getSplinePropertiesDialog()
{
if (!m_xSplinePropertiesDialog)
{
m_xSplinePropertiesDialog.reset(new SplinePropertiesDialog(m_pParent));
}
- return *m_xSplinePropertiesDialog;
+ return m_xSplinePropertiesDialog;
}
-SteppedPropertiesDialog& SplineResourceGroup::getSteppedPropertiesDialog()
+std::shared_ptr<SteppedPropertiesDialog>
SplineResourceGroup::getSteppedPropertiesDialog()
{
if (!m_xSteppedPropertiesDialog)
{
m_xSteppedPropertiesDialog.reset(new
SteppedPropertiesDialog(m_pParent));
}
- return *m_xSteppedPropertiesDialog;
+ return m_xSteppedPropertiesDialog;
}
void SplineResourceGroup::showControls(bool bShow)
@@ -245,7 +245,7 @@ void SplineResourceGroup::fillControls(const
ChartTypeParameter& rParameter)
m_xPB_DetailsDialog->connect_clicked(
LINK(this, SplineResourceGroup, SplineDetailsDialogHdl));
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_SMOOTH_LINE_PROPERTIES));
- getSplinePropertiesDialog().fillControls(rParameter);
+ getSplinePropertiesDialog()->fillControls(rParameter);
break;
case CurveStyle_STEP_START:
case CurveStyle_STEP_END:
@@ -256,7 +256,7 @@ void SplineResourceGroup::fillControls(const
ChartTypeParameter& rParameter)
m_xPB_DetailsDialog->connect_clicked(
LINK(this, SplineResourceGroup, SteppedDetailsDialogHdl));
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_STEPPED_LINE_PROPERTIES));
- getSteppedPropertiesDialog().fillControls(rParameter);
+ getSteppedPropertiesDialog()->fillControls(rParameter);
break;
default:
m_xLB_LineType->set_active(-1);
@@ -268,10 +268,10 @@ void
SplineResourceGroup::fillParameter(ChartTypeParameter& rParameter)
switch (m_xLB_LineType->get_active())
{
case POS_LINETYPE_SMOOTH:
- getSplinePropertiesDialog().fillParameter(rParameter, true);
+ getSplinePropertiesDialog()->fillParameter(rParameter, true);
break;
case POS_LINETYPE_STEPPED:
- getSteppedPropertiesDialog().fillParameter(rParameter, true);
+ getSteppedPropertiesDialog()->fillParameter(rParameter, true);
break;
default: // includes POS_LINETYPE_STRAIGHT
rParameter.eCurveStyle = CurveStyle_LINES;
@@ -288,43 +288,65 @@ IMPL_LINK_NOARG(SplineResourceGroup, LineTypeChangeHdl,
weld::ComboBox&, void)
IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl, weld::Button&,
void)
{
ChartTypeParameter aOldParameter;
- getSplinePropertiesDialog().fillParameter(aOldParameter,
- m_xLB_LineType->get_active() ==
POS_LINETYPE_SMOOTH);
+ std::shared_ptr<SplinePropertiesDialog> xDlg = getSplinePropertiesDialog();
+ xDlg->fillParameter(aOldParameter, m_xLB_LineType->get_active() ==
POS_LINETYPE_SMOOTH);
const sal_Int32 iOldLineTypePos = m_xLB_LineType->get_active();
m_xLB_LineType->set_active(POS_LINETYPE_SMOOTH);
- if (getSplinePropertiesDialog().run() == RET_OK)
- {
- if (m_pChangeListener)
- m_pChangeListener->stateChanged();
- }
- else
- {
- //restore old state:
- m_xLB_LineType->set_active(iOldLineTypePos);
- getSplinePropertiesDialog().fillControls(aOldParameter);
- }
+ weld::GenericDialogController::runAsync(xDlg, [this, xDlg, aOldParameter,
+ iOldLineTypePos](sal_Int32
nResult) {
+ m_xSplinePropertiesDialog = nullptr;
+ auto xNewDlg = getSplinePropertiesDialog();
+
+ if (nResult == RET_OK)
+ {
+ ChartTypeParameter aNewParameter;
+ xDlg->fillParameter(aNewParameter, m_xLB_LineType->get_active() ==
POS_LINETYPE_SMOOTH);
+ xNewDlg->fillControls(aNewParameter);
+
+ if (m_pChangeListener)
+ m_pChangeListener->stateChanged();
+ }
+ else
+ {
+ //restore old state:
+ m_xLB_LineType->set_active(iOldLineTypePos);
+ xNewDlg->fillControls(aOldParameter);
+ }
+ });
}
IMPL_LINK_NOARG(SplineResourceGroup, SteppedDetailsDialogHdl, weld::Button&,
void)
{
ChartTypeParameter aOldParameter;
- getSteppedPropertiesDialog().fillParameter(aOldParameter,
m_xLB_LineType->get_active()
- ==
POS_LINETYPE_STEPPED);
+ std::shared_ptr<SteppedPropertiesDialog> xDlg =
getSteppedPropertiesDialog();
+ xDlg->fillParameter(aOldParameter, m_xLB_LineType->get_active() ==
POS_LINETYPE_STEPPED);
const sal_Int32 iOldLineTypePos = m_xLB_LineType->get_active();
m_xLB_LineType->set_active(POS_LINETYPE_STEPPED);
- if (getSteppedPropertiesDialog().run() == RET_OK)
- {
- if (m_pChangeListener)
- m_pChangeListener->stateChanged();
- }
- else
- {
- //restore old state:
- m_xLB_LineType->set_active(iOldLineTypePos);
- getSteppedPropertiesDialog().fillControls(aOldParameter);
- }
+
+ weld::GenericDialogController::runAsync(
+ xDlg, [this, xDlg, aOldParameter, iOldLineTypePos](sal_Int32 nResult) {
+ m_xSteppedPropertiesDialog = nullptr;
+ auto xNewDlg = getSplinePropertiesDialog();
+
+ if (nResult == RET_OK)
+ {
+ ChartTypeParameter aNewParameter;
+ xDlg->fillParameter(aNewParameter,
+ m_xLB_LineType->get_active() ==
POS_LINETYPE_STEPPED);
+ xNewDlg->fillControls(aNewParameter);
+
+ if (m_pChangeListener)
+ m_pChangeListener->stateChanged();
+ }
+ else
+ {
+ //restore old state:
+ m_xLB_LineType->set_active(iOldLineTypePos);
+ xDlg->fillControls(aOldParameter);
+ }
+ });
}
GeometryResourceGroup::GeometryResourceGroup(weld::Builder* pBuilder)
diff --git a/chart2/source/inc/ChartResourceGroups.hxx
b/chart2/source/inc/ChartResourceGroups.hxx
index 8c263a7a6a75..9ae397d84f2f 100644
--- a/chart2/source/inc/ChartResourceGroups.hxx
+++ b/chart2/source/inc/ChartResourceGroups.hxx
@@ -113,16 +113,16 @@ private:
DECL_LINK(LineTypeChangeHdl, weld::ComboBox&, void);
DECL_LINK(SplineDetailsDialogHdl, weld::Button&, void);
DECL_LINK(SteppedDetailsDialogHdl, weld::Button&, void);
- SplinePropertiesDialog& getSplinePropertiesDialog();
- SteppedPropertiesDialog& getSteppedPropertiesDialog();
+ std::shared_ptr<SplinePropertiesDialog> getSplinePropertiesDialog();
+ std::shared_ptr<SteppedPropertiesDialog> getSteppedPropertiesDialog();
private:
weld::Window* m_pParent;
std::unique_ptr<weld::Label> m_xFT_LineType;
std::unique_ptr<weld::ComboBox> m_xLB_LineType;
std::unique_ptr<weld::Button> m_xPB_DetailsDialog;
- std::unique_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
- std::unique_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
+ std::shared_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
+ std::shared_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
};
class GeometryResourceGroup final : public ChangingResource
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 5efd2a15d921..5249e2e1ffdb 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -136,6 +136,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool
bMobile)
|| rUIFile == u"modules/schart/ui/datarangedialog.ui"
|| rUIFile == u"modules/schart/ui/insertaxisdlg.ui"
|| rUIFile == u"modules/schart/ui/inserttitledlg.ui"
+ || rUIFile == u"modules/schart/ui/smoothlinesdlg.ui"
+ || rUIFile == u"modules/schart/ui/steppedlinesdlg.ui"
|| rUIFile == u"modules/schart/ui/tp_ChartType.ui"
|| rUIFile == u"modules/schart/ui/tp_RangeChooser.ui"
|| rUIFile == u"modules/schart/ui/tp_DataSource.ui"
commit 36662eb360fcde47ef5f2d3a2f2b2b605dba5a44
Author: László Németh <[email protected]>
AuthorDate: Fri Mar 31 19:08:50 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:20 2023 +0200
tdf#154521 sw Navigator: fix selection change event of bookmark
In Navigator, double click or enter on a bookmark name selects
the bookmark in the text, but the triggered selectionChanged event
didn't give access to the actual selection, but only to the start
of the previous one.
Note: newly enabled Navigator tree item "Bookmarks" is not stateless
on some test platform, so adjust unit tests according to the (now)
unknown index of the requested tree items.
Change-Id: Iade4ea40c524a1eb14737669bb3d21f22b556c76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149895
Tested-by: Jenkins
Reviewed-by: László Németh <[email protected]>
(cherry picked from commit 117b1fcdf94eb7959240c09c544cb6754d8c7b44)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149880
Tested-by: László Németh <[email protected]>
diff --git a/sw/qa/uitest/navigator/tdf134960.py
b/sw/qa/uitest/navigator/tdf134960.py
index db864d2d5b18..8388b63e40f9 100644
--- a/sw/qa/uitest/navigator/tdf134960.py
+++ b/sw/qa/uitest/navigator/tdf134960.py
@@ -12,6 +12,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf134960_hyperlinks(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def launch_sidebar(self, xWriterEdit):
self.xUITest.executeCommand(".uno:Sidebar")
@@ -22,7 +28,7 @@ class tdf134960_hyperlinks(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
- xHyperlinks = xContentTree.getChild('7')
+ xHyperlinks = self.get_item(xContentTree, 'Hyperlinks')
self.assertEqual('Hyperlinks', get_state_as_dict(xHyperlinks)['Text'])
xHyperlinks.executeAction("EXPAND", tuple())
diff --git a/sw/qa/uitest/navigator/tdf137274.py
b/sw/qa/uitest/navigator/tdf137274.py
index a25f449abe9b..5192045b8264 100644
--- a/sw/qa/uitest/navigator/tdf137274.py
+++ b/sw/qa/uitest/navigator/tdf137274.py
@@ -12,6 +12,12 @@ from uitest.uihelper.common import get_state_as_dict
class tdf137274(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_tdf137274(self):
with self.ui_test.create_doc_in_start_center("writer"):
@@ -36,7 +42,7 @@ class tdf137274(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
- xComments = xContentTree.getChild('10')
+ xComments = self.get_item(xContentTree, 'Comments')
self.assertEqual('Comments', get_state_as_dict(xComments)['Text'])
xComments.executeAction("EXPAND", tuple())
@@ -53,7 +59,7 @@ class tdf137274(UITestCase):
self.ui_test.wait_until_child_is_available('Comment2')
# xComments needs reassigned after content tree change
- xComments = xContentTree.getChild('10')
+ xComments = self.get_item(xContentTree, 'Comments')
self.assertEqual('Comments', get_state_as_dict(xComments)['Text'])
xComments.executeAction("EXPAND", tuple())
diff --git a/sw/qa/uitest/navigator/tdf140661.py
b/sw/qa/uitest/navigator/tdf140661.py
index da585a9ebc9b..c3689f51cf66 100644
--- a/sw/qa/uitest/navigator/tdf140661.py
+++ b/sw/qa/uitest/navigator/tdf140661.py
@@ -12,6 +12,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf140661(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def launch_navigator(self, bIsBeforeUngroup):
xMainWindow = self.xUITest.getTopFocusWindow()
xWriterEdit = xMainWindow.getChild("writer_edit")
@@ -24,7 +30,7 @@ class tdf140661(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
- xDrawings = xContentTree.getChild('11')
+ xDrawings = self.get_item(xContentTree, 'Drawing objects')
self.assertEqual('Drawing objects',
get_state_as_dict(xDrawings)['Text'])
xDrawings.executeAction("EXPAND", tuple())
diff --git a/sw/qa/uitest/navigator/tdf144672.py
b/sw/qa/uitest/navigator/tdf144672.py
index fdef04ca37dc..4bded66dcb08 100644
--- a/sw/qa/uitest/navigator/tdf144672.py
+++ b/sw/qa/uitest/navigator/tdf144672.py
@@ -13,6 +13,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf144672(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_Tdf144672(self):
with self.ui_test.load_file(get_url_for_data_file("tdf144672.odt")):
@@ -28,14 +34,14 @@ class tdf144672(UITestCase):
xContentTree = xNavigatorPanel.getChild("contenttree")
- xReferences = xContentTree.getChild('8')
+ xReferences = self.get_item(xContentTree, 'References')
self.assertEqual('References',
get_state_as_dict(xReferences)['Text'])
# tdf#129625: Without the fix in place, this test would have
failed with
# AssertionError: 'true' != 'false'
self.assertEqual('true',
get_state_as_dict(xReferences)['IsSemiTransparent'])
- xIndexes = xContentTree.getChild('9')
+ xIndexes = self.get_item(xContentTree, 'Indexes')
self.assertEqual('Indexes', get_state_as_dict(xIndexes)['Text'])
self.assertEqual('false',
get_state_as_dict(xIndexes)['IsSemiTransparent'])
diff --git a/sw/qa/uitest/navigator/tdf148198.py
b/sw/qa/uitest/navigator/tdf148198.py
index d273bb6b5e2b..3e7b00e7d5e0 100644
--- a/sw/qa/uitest/navigator/tdf148198.py
+++ b/sw/qa/uitest/navigator/tdf148198.py
@@ -13,6 +13,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf148198(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_tdf148198(self):
sHyperlink0 = 'a hyperlink with an anchor, different character styles,
a footnote1, a field This is a bookmark, and a rsid'
sHyperlink1 = 'another hyperlink'
@@ -28,7 +34,7 @@ class tdf148198(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild('contenttree')
- xHyperlinks = xContentTree.getChild('7')
+ xHyperlinks = self.get_item(xContentTree, 'Hyperlinks')
self.assertEqual('Hyperlinks',
get_state_as_dict(xHyperlinks)['Text'])
xHyperlinks.executeAction('EXPAND', tuple())
@@ -45,7 +51,7 @@ class tdf148198(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild('contenttree')
- xHyperlinks = xContentTree.getChild('7')
+ xHyperlinks = self.get_item(xContentTree, 'Hyperlinks')
self.assertEqual('Hyperlinks',
get_state_as_dict(xHyperlinks)['Text'])
xHyperlinks.executeAction('EXPAND', tuple())
diff --git a/sw/qa/uitest/navigator/tdf149268.py
b/sw/qa/uitest/navigator/tdf149268.py
index 3a0943c76fed..38b42c376e96 100644
--- a/sw/qa/uitest/navigator/tdf149268.py
+++ b/sw/qa/uitest/navigator/tdf149268.py
@@ -13,6 +13,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf149268(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_tdf149268(self):
with self.ui_test.load_file(get_url_for_data_file("tdf149268.odt")):
xWriterDoc = self.xUITest.getTopFocusWindow()
@@ -27,7 +33,7 @@ class tdf149268(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
- xHyperlinks = xContentTree.getChild('7')
+ xHyperlinks = self.get_item(xContentTree, 'Hyperlinks')
self.assertEqual('Hyperlinks',
get_state_as_dict(xHyperlinks)['Text'])
xHyperlinks.executeAction("EXPAND", tuple())
diff --git a/sw/qa/uitest/navigator/tdf149916.py
b/sw/qa/uitest/navigator/tdf149916.py
index 176bdb4d0b57..cce7b8a12284 100644
--- a/sw/qa/uitest/navigator/tdf149916.py
+++ b/sw/qa/uitest/navigator/tdf149916.py
@@ -13,6 +13,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf149916(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_tdf149916(self):
with self.ui_test.load_file(get_url_for_data_file('tdf149916.odt')):
@@ -26,7 +32,7 @@ class tdf149916(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild('contenttree')
- xFields = xContentTree.getChild('12')
+ xFields = self.get_item(xContentTree, 'Fields')
self.assertEqual('Fields', get_state_as_dict(xFields)['Text'])
xFields.executeAction('EXPAND', tuple())
diff --git a/sw/qa/uitest/navigator/tdf154521.py
b/sw/qa/uitest/navigator/tdf154521.py
new file mode 100644
index 000000000000..0dca50379fab
--- /dev/null
+++ b/sw/qa/uitest/navigator/tdf154521.py
@@ -0,0 +1,90 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+from com.sun.star.view import XSelectionChangeListener
+import unohelper
+
+selectionChangedResult = 0
+
+class XSelectionChangeListenerExtended(unohelper.Base,
XSelectionChangeListener):
+ # is invoked when a text selected, e.g. by selecting a bookmark in the
Navigator
+ @classmethod
+ def selectionChanged(self, event):
+ global selectionChangedResult
+ selection = event.Source.getSelection()
+ if selection.supportsService("com.sun.star.text.TextRanges"):
+ textRange = selection.getByIndex(0)
+ if textRange.getString() == "foo":
+ selectionChangedResult = 1
+ else:
+ selectionChangedResult = -1
+
+ @classmethod
+ def disposing(self, event):
+ pass
+
+class tdf154521(UITestCase):
+
+ def test_tdf154521(self):
+ global selectionChangedResult
+ with self.ui_test.create_doc_in_start_center("writer") as xDoc:
+
+ # type "foo", and create a bookmark on it
+
+ self.xUITest.executeCommand(".uno:Escape")
+
+ # click on the bookmark name in the Navigator
+
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+ xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL":
"SwNavigatorPanel"}))
+
+ xNavigatorPanel = xWriterEdit.getChild("NavigatorPanel")
+ xToolBar = xNavigatorPanel.getChild("content5")
+ xToolBar.executeAction("CLICK", mkPropertyValues({"POS": "0"})) #
'root' button
+
+ xDoc.Text.insertString(xDoc.Text.getStart(), "foo", False)
+ self.xUITest.executeCommand(".uno:SelectAll")
+
+ with
self.ui_test.execute_dialog_through_command(".uno:InsertBookmark",
close_button="insert"):
+ pass
+
+ xWriterEdit.executeAction("FOCUS", tuple())
+
+ # add XSelectionChangeListener
+
+ xListener = XSelectionChangeListenerExtended()
+ self.assertIsNotNone(xListener)
+ xDoc.CurrentController.addSelectionChangeListener(xListener)
+
+ xContentTree = xNavigatorPanel.getChild("contenttree")
+
+ self.ui_test.wait_until_property_is_updated(xContentTree,
"SelectEntryText", "Bookmark 1")
+
self.assertEqual(get_state_as_dict(xContentTree)["SelectEntryText"], "Bookmark
1")
+
self.assertEqual(get_state_as_dict(xContentTree)["SelectionCount"], "1")
+
+ # select bookmark to trigger selectionChanged event
+
+ xContentTree.executeAction("TYPE", mkPropertyValues({"KEYCODE":
"RETURN"}))
+
+ # wait for handling the selectionChanged event
+ while selectionChangedResult == 0:
+ pass
+
+ # This was -1 (missing selection because of early broadcasting)
+ self.assertEqual(selectionChangedResult, 1)
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/navigator/tdf40427.py
b/sw/qa/uitest/navigator/tdf40427.py
index 3192dc71d2c1..f394bf37aa06 100644
--- a/sw/qa/uitest/navigator/tdf40427.py
+++ b/sw/qa/uitest/navigator/tdf40427.py
@@ -13,6 +13,12 @@ from uitest.uihelper.common import get_state_as_dict,
get_url_for_data_file
class tdf40427(UITestCase):
+ def get_item(self, xTree, name):
+ for i in xTree.getChildren():
+ xItem = xTree.getChild(i)
+ if name == get_state_as_dict(xItem)['Text']:
+ return xItem
+
def test_tdf40427(self):
with
self.ui_test.load_file(get_url_for_data_file("tdf40427_SectionPositions.odt"))
as document:
xMainWindow = self.xUITest.getTopFocusWindow()
@@ -44,7 +50,7 @@ class tdf40427(UITestCase):
xNavigatorPanel =
self.ui_test.wait_until_child_is_available('NavigatorPanel')
xContentTree = xNavigatorPanel.getChild("contenttree")
- xSections = xContentTree.getChild('6')
+ xSections = self.get_item(xContentTree, 'Sections')
self.assertEqual('Sections', get_state_as_dict(xSections)['Text'])
xSections.executeAction("EXPAND", ())
diff --git a/sw/source/uibase/utlui/content.cxx
b/sw/source/uibase/utlui/content.cxx
index b1ee76ac8bfd..355f0acab87b 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -5346,7 +5346,9 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
break;
case ContentTypeId::BOOKMARK:
{
+ m_pActiveShell->StartAction();
m_pActiveShell->GotoMark(pCnt->GetName());
+ m_pActiveShell->EndAction();
}
break;
case ContentTypeId::REGION :
commit fd5992493d6fdd8ca4392a8dd242bb96982ebce6
Author: Khaled Hosny <[email protected]>
AuthorDate: Sat Apr 1 23:34:59 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:20 2023 +0200
tdf#154549: Make combining marks inherit the script of their base
... regardless of the script of the mark itself.
Change-Id: I15a5d8cb2e1d7b7a26316689ffa11c278d1f6365
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149925
Tested-by: Jenkins
Reviewed-by: خالد حسني <[email protected]>
(cherry picked from commit b320a33c01e4b87d42c2f3828a1dfd88c386df67)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149884
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/vcl/source/gdi/scrptrun.cxx b/vcl/source/gdi/scrptrun.cxx
index fbc68ca41bf1..19cb54772b30 100644
--- a/vcl/source/gdi/scrptrun.cxx
+++ b/vcl/source/gdi/scrptrun.cxx
@@ -41,6 +41,7 @@
#include <sal/config.h>
#include <rtl/character.hxx>
+#include <unicode/uchar.h>
#include <unicode/utypes.h>
#include <unicode/uscript.h>
@@ -119,14 +120,21 @@ struct PairIndices
};
-// There are three Unicode script codes for Japanese text, but only one
-// OpenType script tag, so we want to keep them in one run as splitting is
-// pointless for the purpose of OpenType shaping.
UScriptCode getScript(UChar32 ch, UErrorCode* status)
{
+ // tdf#154549
+ // Make combining marks inherit the script of their bases, regardless of
+ // their own script.
+ if (u_getIntPropertyValue(ch, UCHAR_GENERAL_CATEGORY) ==
U_NON_SPACING_MARK)
+ return USCRIPT_INHERITED;
+
UScriptCode script = uscript_getScript(ch, status);
if (U_FAILURE(*status))
return script;
+
+ // There are three Unicode script codes for Japanese text, but only one
+ // OpenType script tag, so we want to keep them in one run as splitting is
+ // pointless for the purpose of OpenType shaping.
if (script == USCRIPT_KATAKANA || script == USCRIPT_KATAKANA_OR_HIRAGANA)
return USCRIPT_HIRAGANA;
return script;
commit 39b5fa6dab4d941818310c0aed9b7dc96e317cc4
Author: Andreas Heinisch <[email protected]>
AuthorDate: Wed Mar 29 16:53:48 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:20 2023 +0200
tdf#154445 - Export all page styles even if they are not in use
Change-Id: If0ca5ea97ad545058c6a70d223158a87bf9207ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149729
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <[email protected]>
(cherry picked from commit 8085a68be7604e7bd00004e0d9445be5e266ffbb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149735
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/sc/qa/unit/subsequent_export_test2.cxx
b/sc/qa/unit/subsequent_export_test2.cxx
index ce7ac0c43d2f..f97dc4b643d3 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -23,6 +23,8 @@
#include <dpcache.hxx>
#include <dpobject.hxx>
#include <clipparam.hxx>
+#include <scresid.hxx>
+#include <globstr.hrc>
#include <editeng/wghtitem.hxx>
#include <editeng/postitem.hxx>
@@ -147,6 +149,7 @@ public:
void testTdf121718_UseFirstPageNumberXLSX();
void testHeaderFontStyleXLSX();
void testTdf135828_Shape_Rect();
+ void testTdf154445_unused_pagestyles();
void testTdf123139XLSX();
void testTdf123353();
void testTdf140098();
@@ -276,6 +279,7 @@ public:
CPPUNIT_TEST(testTdf121718_UseFirstPageNumberXLSX);
CPPUNIT_TEST(testHeaderFontStyleXLSX);
CPPUNIT_TEST(testTdf135828_Shape_Rect);
+ CPPUNIT_TEST(testTdf154445_unused_pagestyles);
CPPUNIT_TEST(testTdf123139XLSX);
CPPUNIT_TEST(testTdf123353);
CPPUNIT_TEST(testTdf140098);
@@ -1889,6 +1893,27 @@ void ScExportTest2::testTdf135828_Shape_Rect()
CPPUNIT_ASSERT_DOUBLES_EQUAL(1988280, nHeight, 10000);
}
+void ScExportTest2::testTdf154445_unused_pagestyles()
+{
+ createScDoc("ods/tdf108188_pagestyle.ods");
+
+ // Check if the user defined page style is present
+ const OUString aTestPageStyle = "TestPageStyle";
+ ScDocument* pDoc = getScDoc();
+ CPPUNIT_ASSERT_EQUAL(aTestPageStyle, pDoc->GetPageStyle(0));
+
+ // Change page style to default so the user defined one is not used anymore
+ pDoc->SetPageStyle(0, ScResId(STR_STYLENAME_STANDARD));
+
+ // Save and reload the document to check if the unused page styles are
still present
+ saveAndReload("calc8");
+ pDoc = getScDoc();
+
+ // Without the accompanying fix in place, the unused page styles don't
exist anymore
+ ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
+ CPPUNIT_ASSERT(pStylePool->Find(aTestPageStyle, SfxStyleFamily::Page));
+}
+
void ScExportTest2::testTdf123139XLSX()
{
createScDoc("xlsx/tdf123139_applyAlignment.xlsx");
diff --git a/sc/source/filter/xml/xmlexprt.cxx
b/sc/source/filter/xml/xmlexprt.cxx
index 051c0ac251b3..9fba6fd02604 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2611,7 +2611,8 @@ void ScXMLExport::collectAutoStyles()
}
if (getExportFlags() & SvXMLExportFlags::MASTERSTYLES)
- GetPageExport()->collectAutoStyles(true);
+ // tdf#154445 - export all page styles even if they are not in use
+ GetPageExport()->collectAutoStyles(false);
mbAutoStylesCollected = true;
}
@@ -2673,7 +2674,8 @@ void ScXMLExport::ExportAutoStyles_()
void ScXMLExport::ExportMasterStyles_()
{
- GetPageExport()->exportMasterStyles( true );
+ // tdf#154445 - export all page styles even if they are not in use
+ GetPageExport()->exportMasterStyles( false );
}
void ScXMLExport::CollectInternalShape( uno::Reference< drawing::XShape >
const & xShape )
commit d4e5632304c11cc894b5bbf17be2d788aca3d448
Author: Taichi Haradaguchi <[email protected]>
AuthorDate: Tue Mar 14 18:55:18 2023 +0900
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:20 2023 +0200
fix poppler build
* Update POPPLER_VERSION in poppler-config.patch.1
Change-Id: Iba770e6a3036a091925997025d4528f1d855da5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149794
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/external/poppler/poppler-config.patch.1
b/external/poppler/poppler-config.patch.1
index 455a88e2afc4..1e61b533d31b 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -173,7 +173,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 22.09.0"
++#define PACKAGE_STRING "poppler 22.12.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -182,7 +182,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "22.09.0"
++#define PACKAGE_VERSION "22.12.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -200,7 +200,7 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "22.09.0"
++#define VERSION "22.12.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
@@ -281,7 +281,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "22.09.0"
++#define POPPLER_VERSION "22.12.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -433,9 +433,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "22.09.0"
++#define POPPLER_VERSION "22.12.0"
+#define POPPLER_VERSION_MAJOR 22
-+#define POPPLER_VERSION_MINOR 9
++#define POPPLER_VERSION_MINOR 12
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
commit ca4c3d3f7262252a6fd74eab56e0c0f3ad1d2091
Author: Taichi Haradaguchi <[email protected]>
AuthorDate: Mon Mar 27 19:17:10 2023 +0900
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:19 2023 +0200
[3.0] external/openssl: add patch for CVE-2023-0464
this issue should be fixed in release 3.0.9
Severity: Low
Security Advisary: https://www.openssl.org/news/secadv/20230322.txt
Change-Id: I8d34acd72ac8eb7e9e83b241eb1235a93111884a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149609
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git
a/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1
b/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1
new file mode 100644
index 000000000000..d96d1d76883e
--- /dev/null
+++
b/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1
@@ -0,0 +1,221 @@
+From 959c59c7a0164117e7f8366466a32bb1f8d77ff1 Mon Sep 17 00:00:00 2001
+From: Pauli <[email protected]>
+Date: Wed, 8 Mar 2023 15:28:20 +1100
+Subject: [PATCH] x509: excessive resource use verifying policy constraints
+
+A security vulnerability has been identified in all supported versions
+of OpenSSL related to the verification of X.509 certificate chains
+that include policy constraints. Attackers may be able to exploit this
+vulnerability by creating a malicious certificate chain that triggers
+exponential use of computational resources, leading to a denial-of-service
+(DoS) attack on affected systems.
+
+Fixes CVE-2023-0464
+
+Reviewed-by: Tomas Mraz <[email protected]>
+Reviewed-by: Shane Lontis <[email protected]>
+(Merged from https://github.com/openssl/openssl/pull/20568)
+---
+ crypto/x509/pcy_local.h | 8 +++++++-
+ crypto/x509/pcy_node.c | 12 +++++++++---
+ crypto/x509/pcy_tree.c | 36 ++++++++++++++++++++++++++----------
+ 3 files changed, 42 insertions(+), 14 deletions(-)
+
+diff --git a/crypto/x509/pcy_local.h b/crypto/x509/pcy_local.h
+index 18b53cc09e..cba107ca03 100644
+--- a/crypto/x509/pcy_local.h
++++ b/crypto/x509/pcy_local.h
+@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st {
+ };
+
+ struct X509_POLICY_TREE_st {
++ /* The number of nodes in the tree */
++ size_t node_count;
++ /* The maximum number of nodes in the tree */
++ size_t node_maximum;
++
+ /* This is the tree 'level' data */
+ X509_POLICY_LEVEL *levels;
+ int nlevel;
+@@ -157,7 +162,8 @@ X509_POLICY_NODE
*ossl_policy_tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
+ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
+ X509_POLICY_DATA *data,
+ X509_POLICY_NODE *parent,
+- X509_POLICY_TREE *tree);
++ X509_POLICY_TREE *tree,
++ int extra_data);
+ void ossl_policy_node_free(X509_POLICY_NODE *node);
+ int ossl_policy_node_match(const X509_POLICY_LEVEL *lvl,
+ const X509_POLICY_NODE *node, const ASN1_OBJECT
*oid);
+diff --git a/crypto/x509/pcy_node.c b/crypto/x509/pcy_node.c
+index 9d9a7ea179..450f95a655 100644
+--- a/crypto/x509/pcy_node.c
++++ b/crypto/x509/pcy_node.c
+@@ -59,10 +59,15 @@ X509_POLICY_NODE *ossl_policy_level_find_node(const
X509_POLICY_LEVEL *level,
+ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
+ X509_POLICY_DATA *data,
+ X509_POLICY_NODE *parent,
+- X509_POLICY_TREE *tree)
++ X509_POLICY_TREE *tree,
++ int extra_data)
+ {
+ X509_POLICY_NODE *node;
+
++ /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */
++ if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum)
++ return NULL;
++
+ node = OPENSSL_zalloc(sizeof(*node));
+ if (node == NULL) {
+ ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
+@@ -70,7 +75,7 @@ X509_POLICY_NODE
*ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
+ }
+ node->data = data;
+ node->parent = parent;
+- if (level) {
++ if (level != NULL) {
+ if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) {
+ if (level->anyPolicy)
+ goto node_error;
+@@ -90,7 +95,7 @@ X509_POLICY_NODE
*ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
+ }
+ }
+
+- if (tree) {
++ if (extra_data) {
+ if (tree->extra_data == NULL)
+ tree->extra_data = sk_X509_POLICY_DATA_new_null();
+ if (tree->extra_data == NULL){
+@@ -103,6 +108,7 @@ X509_POLICY_NODE
*ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
+ }
+ }
+
++ tree->node_count++;
+ if (parent)
+ parent->nchild++;
+
+diff --git a/crypto/x509/pcy_tree.c b/crypto/x509/pcy_tree.c
+index fa45da5117..f953a05a41 100644
+--- a/crypto/x509/pcy_tree.c
++++ b/crypto/x509/pcy_tree.c
+@@ -14,6 +14,17 @@
+
+ #include "pcy_local.h"
+
++/*
++ * If the maximum number of nodes in the policy tree isn't defined, set it to
++ * a generous default of 1000 nodes.
++ *
++ * Defining this to be zero means unlimited policy tree growth which opens the
++ * door on CVE-2023-0464.
++ */
++#ifndef OPENSSL_POLICY_TREE_NODES_MAX
++# define OPENSSL_POLICY_TREE_NODES_MAX 1000
++#endif
++
+ static void expected_print(BIO *channel,
+ X509_POLICY_LEVEL *lev, X509_POLICY_NODE *node,
+ int indent)
+@@ -163,6 +174,9 @@ static int tree_init(X509_POLICY_TREE **ptree,
STACK_OF(X509) *certs,
+ return X509_PCY_TREE_INTERNAL;
+ }
+
++ /* Limit the growth of the tree to mitigate CVE-2023-0464 */
++ tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX;
++
+ /*
+ * http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3.
+ *
+@@ -180,7 +194,7 @@ static int tree_init(X509_POLICY_TREE **ptree,
STACK_OF(X509) *certs,
+ if ((data = ossl_policy_data_new(NULL,
+ OBJ_nid2obj(NID_any_policy), 0)) == NULL)
+ goto bad_tree;
+- if (ossl_policy_level_add_node(level, data, NULL, tree) == NULL) {
++ if (ossl_policy_level_add_node(level, data, NULL, tree, 1) == NULL) {
+ ossl_policy_data_free(data);
+ goto bad_tree;
+ }
+@@ -239,7 +253,8 @@ static int tree_init(X509_POLICY_TREE **ptree,
STACK_OF(X509) *certs,
+ * Return value: 1 on success, 0 otherwise
+ */
+ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
+- X509_POLICY_DATA *data)
++ X509_POLICY_DATA *data,
++ X509_POLICY_TREE *tree)
+ {
+ X509_POLICY_LEVEL *last = curr - 1;
+ int i, matched = 0;
+@@ -249,13 +264,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL
*curr,
+ X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i);
+
+ if (ossl_policy_node_match(last, node, data->valid_policy)) {
+- if (ossl_policy_level_add_node(curr, data, node, NULL) == NULL)
++ if (ossl_policy_level_add_node(curr, data, node, tree, 0) == NULL)
+ return 0;
+ matched = 1;
+ }
+ }
+ if (!matched && last->anyPolicy) {
+- if (ossl_policy_level_add_node(curr, data, last->anyPolicy, NULL) ==
NULL)
++ if (ossl_policy_level_add_node(curr, data, last->anyPolicy, tree, 0)
== NULL)
+ return 0;
+ }
+ return 1;
+@@ -268,7 +283,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL
*curr,
+ * Return value: 1 on success, 0 otherwise.
+ */
+ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
+- const X509_POLICY_CACHE *cache)
++ const X509_POLICY_CACHE *cache,
++ X509_POLICY_TREE *tree)
+ {
+ int i;
+
+@@ -276,7 +292,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
+ X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i);
+
+ /* Look for matching nodes in previous level */
+- if (!tree_link_matching_nodes(curr, data))
++ if (!tree_link_matching_nodes(curr, data, tree))
+ return 0;
+ }
+ return 1;
+@@ -307,7 +323,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
+ /* Curr may not have anyPolicy */
+ data->qualifier_set = cache->anyPolicy->qualifier_set;
+ data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
+- if (ossl_policy_level_add_node(curr, data, node, tree) == NULL) {
++ if (ossl_policy_level_add_node(curr, data, node, tree, 1) == NULL) {
+ ossl_policy_data_free(data);
+ return 0;
+ }
+@@ -370,7 +386,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr,
+ /* Finally add link to anyPolicy */
+ if (last->anyPolicy &&
+ ossl_policy_level_add_node(curr, cache->anyPolicy,
+- last->anyPolicy, NULL) == NULL)
++ last->anyPolicy, tree, 0) == NULL)
+ return 0;
+ return 1;
+ }
+@@ -553,7 +569,7 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree,
+ extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS
+ | POLICY_DATA_FLAG_EXTRA_NODE;
+ node = ossl_policy_level_add_node(NULL, extra, anyPolicy->parent,
+- tree);
++ tree, 1);
+ }
+ if (!tree->user_policies) {
+ tree->user_policies = sk_X509_POLICY_NODE_new_null();
+@@ -580,7 +596,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree)
+
+ for (i = 1; i < tree->nlevel; i++, curr++) {
+ cache = ossl_policy_cache_set(curr->cert);
+- if (!tree_link_nodes(curr, cache))
++ if (!tree_link_nodes(curr, cache, tree))
+ return X509_PCY_TREE_INTERNAL;
+
+ if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY)
+--
+2.34.1
+
diff --git a/external/openssl/UnpackedTarball_openssl.mk
b/external/openssl/UnpackedTarball_openssl.mk
index 58e3a93352e1..99d3797dd81b 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,openssl))
$(eval $(call
gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl))
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
+
external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1
\
external/openssl/openssl-no-multilib.patch.0 \
external/openssl/configurable-z-option.patch.0 \
external/openssl/openssl-no-ipc-cmd.patch.0 \
commit 479c62ed697216462c0891c5050ac5dec1440cfb
Author: Balazs Varga <[email protected]>
AuthorDate: Sat Mar 25 18:57:08 2023 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:19 2023 +0200
Related: tdf#154005 sc ods fileopen: fix dropdown form control size
Fixing the crashtesting assert/crash after the original change.
Also a little clean-up.
Change-Id: I35453fbc55b3d5d4064179e84755334c2d3a01ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149583
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
Reviewed-by: Balazs Varga <[email protected]>
(cherry picked from commit 69cc8bdd5f9109804d912b52d5ee1040d6e1868f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149597
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f8558cc21070..97b47ee94d00 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2035,7 +2035,8 @@ public:
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW
nEndRow, SCTAB nTab) const;
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow,
SCTAB nTab) const;
SCROW CountVisibleRows(SCROW nStartRow, SCROW
nEndRow, SCTAB nTab) const;
- SCCOL CountVisibleCols(SCROW nStartCol, SCROW
nEndCol, SCTAB nTab) const;
+ SCROW CountHiddenRows(SCROW nStartRow, SCROW
nEndRow, SCTAB nTab) const;
+ SCCOL CountHiddenCols(SCROW nStartCol, SCROW
nEndCol, SCTAB nTab) const;
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW*
pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
bool HasFilteredRows(SCROW nStartRow, SCROW
nEndRow, SCTAB nTab) const;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index f81e3925964e..851248a99c19 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -964,9 +964,11 @@ public:
SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
+ SCROW CountHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
tools::Long GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool
bHiddenAsZero = true) const;
SCCOL CountVisibleCols(SCCOL nStartCol, SCCOL nEndCol) const;
+ SCCOL CountHiddenCols(SCCOL nStartCol, SCCOL nEndCol) const;
SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e31e8f385592..79ce684d87be 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4571,12 +4571,20 @@ SCROW ScDocument::CountVisibleRows(SCROW nStartRow,
SCROW nEndRow, SCTAB nTab) c
return maTabs[nTab]->CountVisibleRows(nStartRow, nEndRow);
}
-SCCOL ScDocument::CountVisibleCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab)
const
+SCROW ScDocument::CountHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
const
{
if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) ||
!maTabs[nTab])
return 0;
- return maTabs[nTab]->CountVisibleCols(nStartCol, nEndCol);
+ return maTabs[nTab]->CountHiddenRows(nStartRow, nEndRow);
+}
+
+SCCOL ScDocument::CountHiddenCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab)
const
+{
+ if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) ||
!maTabs[nTab])
+ return 0;
+
+ return maTabs[nTab]->CountHiddenCols(nStartCol, nEndCol);
}
bool ScDocument::RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW*
pLastRow) const
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index e6203697a4e7..5627c8b889ec 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -708,11 +708,8 @@ void lcl_SetLogicRectFromAnchor(SdrObject* pObj, const
ScDrawObjData& rAnchor, c
// tdf#154005: Handle hidden row/col: remove hidden row/cols size from the
ScDrawObjData shape size in case of forms
if (pObj->GetObjIdentifier() == SdrObjKind::UNO && pObj->GetObjInventor()
== SdrInventor::FmForm)
{
- nHiddenRows = ((rAnchor.maEnd.Row() - rAnchor.maStart.Row()) + 1) -
- (pDoc->CountVisibleRows(rAnchor.maStart.Row(),
rAnchor.maEnd.Row(), rAnchor.maStart.Tab()));
-
- nHiddenCols = ((rAnchor.maEnd.Col() - rAnchor.maStart.Col()) + 1) -
- (pDoc->CountVisibleCols(rAnchor.maStart.Col(),
rAnchor.maEnd.Col(), rAnchor.maStart.Tab()));
+ nHiddenRows = pDoc->CountHiddenRows(rAnchor.maStart.Row(),
rAnchor.maEnd.Row(), rAnchor.maStart.Tab());
+ nHiddenCols = pDoc->CountHiddenCols(rAnchor.maStart.Col(),
rAnchor.maEnd.Col(), rAnchor.maStart.Tab());
}
// In case of a vertical mirrored custom shape, LibreOffice uses
internally an additional 180deg
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index ad136f53bb4b..40f59f9b0151 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -769,6 +769,27 @@ SCROW ScTable::CountVisibleRows(SCROW nStartRow, SCROW
nEndRow) const
return nCount;
}
+SCROW ScTable::CountHiddenRows(SCROW nStartRow, SCROW nEndRow) const
+{
+ SCROW nCount = 0;
+ SCROW nRow = nStartRow;
+ ScFlatBoolRowSegments::RangeData aData;
+ while (nRow <= nEndRow)
+ {
+ if (!mpHiddenRows->getRangeData(nRow, aData))
+ break;
+
+ if (aData.mnRow2 > nEndRow)
+ aData.mnRow2 = nEndRow;
+
+ if (aData.mbValue)
+ nCount += aData.mnRow2 - nRow + 1;
+
+ nRow = aData.mnRow2 + 1;
+ }
+ return nCount;
+}
+
tools::Long ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool
bHiddenAsZero) const
{
tools::Long nHeight = 0;
@@ -814,6 +835,27 @@ SCCOL ScTable::CountVisibleCols(SCCOL nStartCol, SCCOL
nEndCol) const
return nCount;
}
+SCCOL ScTable::CountHiddenCols(SCCOL nStartCol, SCCOL nEndCol) const
+{
+ SCCOL nCount = 0;
+ SCCOL nCol = nStartCol;
+ ScFlatBoolColSegments::RangeData aData;
+ while (nCol <= nEndCol)
+ {
+ if (!mpHiddenCols->getRangeData(nCol, aData))
+ break;
+
+ if (aData.mnCol2 > nEndCol)
+ aData.mnCol2 = nEndCol;
+
+ if (aData.mbValue)
+ nCount += aData.mnCol2 - nCol + 1;
+
+ nCol = aData.mnCol2 + 1;
+ }
+ return nCount;
+}
+
SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol) const
{
if (bCol)
commit d9661af8748a665fa553597855223196105906e7
Author: Stephan Bergmann <[email protected]>
AuthorDate: Wed Mar 29 09:30:10 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:19 2023 +0200
Sync flatpak-manifest.in with Flathub
...including
<https://github.com/flathub/org.libreoffice.LibreOffice/commit/85022d587be454efd482bcb9baf657d570cc7d06>
"Update GVFS, Kerberos5, Apache Ant and OpenJDK Flathub Extension"
Change-Id: I6b03adb5872958578b7b2e4bfe3e26bea8882213
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149679
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <[email protected]>
(cherry picked from commit cfe339efd5f306452bc78ae4121867dc9b07b95a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149613
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index b712cd4bb912..a0d41feeb60b 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -4,7 +4,7 @@
"runtime-version": "22.08",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
- "org.freedesktop.Sdk.Extension.openjdk11"
+ "org.freedesktop.Sdk.Extension.openjdk17"
],
"command": "libreoffice",
"modules": [
@@ -12,7 +12,7 @@
"name": "openjdk",
"buildsystem": "simple",
"build-commands": [
- "/usr/lib/sdk/openjdk11/install.sh"
+ "/usr/lib/sdk/openjdk17/install.sh"
]
},
{
@@ -27,8 +27,8 @@
"sources": [
{
"type": "archive",
- "url":
"https://gitlab.gnome.org/GNOME/gvfs/-/archive/2a3a35adc4e1b7a3195033b072917abbb97a9f4e/gvfs-2a3a35adc4e1b7a3195033b072917abbb97a9f4e.tar.gz",
- "sha256":
"1e1bbe249be35b7b864a2dad707188e69b3cef1cd66a24df6e83b24a4c329c44"
+ "url":
"https://gitlab.gnome.org/GNOME/gvfs/-/archive/1.50.4/gvfs-1.50.4.tar.gz",
+ "sha256":
"c67bba49c5b1dbe0b8b8f53b45eab545f6a6ce36fcdf3c11ac92464732b60ea5"
}
]
},
@@ -48,8 +48,8 @@
"sources": [
{
"type": "archive",
- "url":
"https://kerberos.org/dist/krb5/1.16/krb5-1.16.2.tar.gz",
- "sha256":
"9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027"
+ "url":
"https://kerberos.org/dist/krb5/1.20/krb5-1.20.1.tar.gz",
+ "sha256":
"704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851"
}
]
},
@@ -64,8 +64,8 @@
},
{
"type": "archive",
- "url":
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.xz",
- "sha256":
"cebb705dbbe26a41d359b8be08ec066caba4e8686670070ce44bbf2b57ae113f",
+ "url":
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.13-bin.tar.xz",
+ "sha512":
"26e56bf670c22c8093fe51ec952fa51e813b1ab4200cb09fcd68fa291c5f6f626d7c6a42b4d3358b38111466e249d4bc6089b8c4093383759d6f8a08d39bc32d",
"dest": "ant"
},
{
commit 4fcee68c6d06e3bfcc28353b7e589b4b62a18d59
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Mar 27 23:23:14 2023 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:19 2023 +0200
tdf#154115 use correct column for search
Change-Id: Iaa390e63d269221b7273fe15362cfbdf20f235da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit 1d2ad8e8823a8633534580d589270945f01f1ca1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149694
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/cui/uiconfig/ui/optionsdialog.ui b/cui/uiconfig/ui/optionsdialog.ui
index 85acd3198c52..00dde183987f 100644
--- a/cui/uiconfig/ui/optionsdialog.ui
+++ b/cui/uiconfig/ui/optionsdialog.ui
@@ -151,7 +151,7 @@
<property name="vexpand">True</property>
<property name="model">liststore1</property>
<property name="headers_visible">False</property>
- <property name="search_column">1</property>
+ <property name="search_column">0</property>
<property name="enable_tree_lines">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library
List-selection1"/>
commit ef4dd9863997b57c5c02fc50b1220eddd7eb1de2
Author: Eike Rathke <[email protected]>
AuthorDate: Tue Mar 28 22:24:22 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:18 2023 +0200
Resolves: tdf#154433 Correct {uk-UA} quotation mark characters
Change-Id: Id5c251ee632d2da134ffbbb352844152f12c1f77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149654
Reviewed-by: Eike Rathke <[email protected]>
Tested-by: Jenkins
(cherry picked from commit 2836aaeccee092d2e809839c5d6cc7656aa2e77b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149611
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/i18npool/source/localedata/data/uk_UA.xml
b/i18npool/source/localedata/data/uk_UA.xml
index f3642004dd8e..5912691c9501 100644
--- a/i18npool/source/localedata/data/uk_UA.xml
+++ b/i18npool/source/localedata/data/uk_UA.xml
@@ -42,10 +42,10 @@
<LongDateYearSeparator> р.</LongDateYearSeparator>
</Separators>
<Markers>
- <QuotationStart>‘</QuotationStart>
- <QuotationEnd>’</QuotationEnd>
- <DoubleQuotationStart>“</DoubleQuotationStart>
- <DoubleQuotationEnd>”</DoubleQuotationEnd>
+ <QuotationStart>„</QuotationStart>
+ <QuotationEnd>“</QuotationEnd>
+ <DoubleQuotationStart>«</DoubleQuotationStart>
+ <DoubleQuotationEnd>»</DoubleQuotationEnd>
</Markers>
<TimeAM>AM</TimeAM>
<TimePM>PM</TimePM>
commit e0378c06b3fd477bb8ced1bd666f359e68b397c6
Author: Michael Stahl <[email protected]>
AuthorDate: Fri Mar 24 20:29:06 2023 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:18 2023 +0200
tdf#152234 vcl: PDF/UA export: StructElem<->Annot for form controls
veraPDF complains:
Specification: ISO 14289-1:2014, Clause: 7.18.4, Test number: 1
A Widget annotation shall be nested within a Form tag per
ISO 32000-1:2008, 14.8.4.5, Table 340.
This is a little simpler than for Link and Screen annotations, because
the form control StructElem and Annot are exported at the same time
from VclMetafileProcessor2D::processControlPrimitive2D().
So PDFExtOutDevData can just make up the mapping on playback.
Change-Id: Idacb84a3e414f45a2598ccb33b252205cb2bcde9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149556
Tested-by: Jenkins
Reviewed-by: Michael Stahl <[email protected]>
(cherry picked from commit d9031bd83ffe718a80da9ecbdbeb485e35fbabee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149603
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index e46088bca912..ece9fa3ac6df 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -525,6 +525,8 @@ struct PDFWidget : public PDFAnnotation
std::vector<sal_Int32> m_aSelectedEntries;
typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
+ sal_Int32 m_nStructParent = -1;
+
PDFWidget()
: m_eType( PDFWriter::PushButton ),
m_nTextStyle( DrawTextFlags::NONE ),
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 5dfcc5b19d6e..21f340fc2107 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -97,6 +97,10 @@ struct GlobalSyncData
sal_Int32 GetMappedId();
sal_Int32 GetMappedStructId( sal_Int32 );
+ /** the way this appears to work: (only) everything that increments mCurId
+ at recording time must put an item into mParaIds at playback time,
+ so that the mCurId becomes the eventual index into mParaIds.
+ */
sal_Int32 mCurId;
std::vector< sal_Int32 > mParaIds;
std::vector< sal_Int32 > mStructIdMap;
@@ -410,7 +414,14 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter,
sal_uInt32& rCurGDIMtfAc
std::shared_ptr< PDFWriter::AnyWidget > pControl(
mControls.front() );
SAL_WARN_IF( !pControl, "vcl", "PageSyncData::PlaySyncPageAct:
invalid widget!" );
if ( pControl )
- rWriter.CreateControl( *pControl );
+ {
+ sal_Int32 const n = rWriter.CreateControl(*pControl);
+ // resolve AnnotIds structural attribute
+ ::std::vector<sal_Int32> const annotIds{
sal_Int32(mpGlobalData->mParaIds.size()) };
+ rWriter.SetStructureAnnotIds(annotIds);
+ rWriter.SetLinkPropertyID(n,
sal_Int32(mpGlobalData->mParaIds.size()));
+ mpGlobalData->mParaIds.push_back(n);
+ }
mControls.pop_front();
}
break;
@@ -849,6 +860,7 @@ void PDFExtOutDevData::CreateControl( const
PDFWriter::AnyWidget& rControlType )
std::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() );
mpPageSyncData->mControls.push_back( pClone );
+ mpGlobalSyncData->mCurId++;
}
void PDFExtOutDevData::BeginGroup()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx
b/vcl/source/gdi/pdfwriter_impl.cxx
index 8cf4b34b6519..3ce03d88f734 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2247,8 +2247,16 @@ sal_Int32 PDFWriterImpl::emitStructure(
PDFStructureElement& rEle )
auto const it(m_aLinkPropertyMap.find(id));
assert(it != m_aLinkPropertyMap.end());
- assert(0 <= it->second && o3tl::make_unsigned(it->second) <
m_aScreens.size());
- AppendAnnotKid(rEle, m_aScreens[it->second]);
+ if (rEle.m_eType == PDFWriter::Form)
+ {
+ assert(0 <= it->second && o3tl::make_unsigned(it->second) <
m_aWidgets.size());
+ AppendAnnotKid(rEle, m_aWidgets[it->second]);
+ }
+ else
+ {
+ assert(0 <= it->second && o3tl::make_unsigned(it->second) <
m_aScreens.size());
+ AppendAnnotKid(rEle, m_aScreens[it->second]);
+ }
}
}
if( ! rEle.m_aKids.empty() )
@@ -4649,6 +4657,13 @@ bool PDFWriterImpl::emitWidgetAnnotations()
iRectMargin = 1;
}
+ if (0 < rWidget.m_nStructParent)
+ {
+ aLine.append("/StructParent ");
+ aLine.append(rWidget.m_nStructParent);
+ aLine.append("\n");
+ }
+
aLine.append("/Rect[" );
appendFixedInt( rWidget.m_aRect.Left()-iRectMargin, aLine );
aLine.append( ' ' );
commit 777d60b21877169ed230dc03a52a28d8fe02ea4a
Author: Michael Stahl <[email protected]>
AuthorDate: Fri Mar 24 18:45:53 2023 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:18 2023 +0200
tdf#152234 drawinglayer,svx: PDF/UA export: add Alt text to form controls
Specification: ISO 14289-1:2014, Clause: 7.18.1, Test number: 3
A form field whose hidden flag is not set and whose rectangle is not
outside the crop-box shall have a TU key present or all its Widget annotations
shall have alternative descriptions (in the form of an Alt entry in the
enclosing structure elements)
Form controls are weird because they have an SdrObject with the usual
name/title/description plus a property "HelpText" on the control itself
which is already exported as "/TU" on the /Annot unless it's empty.
Exporting the SdrObject properties via ObjectInfoPrimitive2D doesn't
work as tragically that is only created for form controls when painting
to the screen while PDF export takes a detour that needs special
handling.
Change-Id: Id96f7dd13f190ab439c099cd1f4acb70c1c9fdc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149554
Tested-by: Jenkins
Reviewed-by: Michael Stahl <[email protected]>
(cherry picked from commit 002a6fee2fbd07c3f0cd1f1ddba39c691130727e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149602
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index c776319e86f5..765a21afacfb 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <utility>
+#include <rtl/ustrbuf.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/awt/PosSize.hpp>
@@ -241,22 +242,23 @@ namespace drawinglayer::primitive2d
rContainer.push_back(xReference);
}
- ControlPrimitive2D::ControlPrimitive2D(
- basegfx::B2DHomMatrix aTransform,
- uno::Reference< awt::XControlModel > xControlModel)
- : maTransform(std::move(aTransform)),
- mxControlModel(std::move(xControlModel))
- {
- }
-
ControlPrimitive2D::ControlPrimitive2D(
basegfx::B2DHomMatrix aTransform,
uno::Reference< awt::XControlModel > xControlModel,
- uno::Reference< awt::XControl > xXControl)
+ uno::Reference<awt::XControl> xXControl,
+ ::std::u16string_view const rTitle,
+ ::std::u16string_view const rDescription)
: maTransform(std::move(aTransform)),
mxControlModel(std::move(xControlModel)),
mxXControl(std::move(xXControl))
{
+ ::rtl::OUStringBuffer buf(rTitle);
+ if (!rTitle.empty() && !rDescription.empty())
+ {
+ buf.append(" - ");
+ }
+ buf.append(rDescription);
+ m_AltText = buf.makeStringAndClear();
}
const uno::Reference< awt::XControl >&
ControlPrimitive2D::getXControl() const
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index fd60fc2c2808..c18fc7edb30f 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1145,8 +1145,6 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
if (bPDFExport)
{
// PDF export. Emulate data handling from UnoControlPDFExportContact
- // I have now moved describePDFControl to toolkit, thus i can
implement the PDF
- // form control support now as follows
std::unique_ptr<vcl::PDFWriter::AnyWidget> pPDFControl(
::toolkitform::describePDFControl(rXControl, *mpPDFExtOutDevData));
@@ -1167,6 +1165,11 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
pPDFControl->TextFont.SetFontSize(aFontSize);
mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::Form);
+ OUString const& rAltText(rControlPrimitive.GetAltText());
+ if (!rAltText.isEmpty())
+ {
+ mpPDFExtOutDevData->SetAlternateText(rAltText);
+ }
mpPDFExtOutDevData->CreateControl(*pPDFControl);
mpPDFExtOutDevData->EndStructureElement();
diff --git a/include/drawinglayer/primitive2d/controlprimitive2d.hxx
b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
index e3d5a5c0948d..e33c26886cd9 100644
--- a/include/drawinglayer/primitive2d/controlprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
@@ -55,6 +55,9 @@ private:
/// the last used scaling, used from getDecomposition for buffering
basegfx::B2DVector maLastViewScaling;
+ /// yet another special snowflake way to generate PDF Alt text
+ OUString m_AltText;
+
/** used from getXControl() to create a local awt::XControl which is
remembered in mxXControl
and from thereon always used and returned by getXControl()
*/
@@ -71,17 +74,14 @@ private:
const geometry::ViewInformation2D& rViewInformation)
const override;
public:
- /// constructor
- ControlPrimitive2D(basegfx::B2DHomMatrix aTransform,
- css::uno::Reference<css::awt::XControlModel>
xControlModel);
-
- /** constructor with an additional XControl as parameter to allow to hand
it over at incarnation time
+ /** constructor with an optional XControl as parameter to allow to hand it
over at incarnation time
if it exists. This will avoid to create a 2nd one on demand in
createXControl()
and thus double the XControls.
*/
ControlPrimitive2D(basegfx::B2DHomMatrix aTransform,
css::uno::Reference<css::awt::XControlModel>
xControlModel,
- css::uno::Reference<css::awt::XControl> xXControl);
+ css::uno::Reference<css::awt::XControl> xXControl,
+ ::std::u16string_view rTitle, ::std::u16string_view
rDescription);
/// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
@@ -96,6 +96,8 @@ public:
*/
const css::uno::Reference<css::awt::XControl>& getXControl() const;
+ OUString const& GetAltText() const { return m_AltText; }
+
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index f99b24372ba7..cc14ae06ad5e 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -111,7 +111,10 @@ namespace sdr::contact {
const drawinglayer::primitive2d::Primitive2DReference xRetval(
new drawinglayer::primitive2d::ControlPrimitive2D(
aTransform,
- xControlModel));
+ xControlModel,
+ nullptr,
+ GetSdrObject().GetTitle(),
+ GetSdrObject().GetDescription()));
rVisitor.visit(xRetval);
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index c3233c6d6d23..20217a1985d8 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1569,7 +1569,9 @@ namespace sdr::contact {
// create a primitive and hand over the existing xControl. This will
// allow the primitive to not need to create another one on demand.
rContainer.push_back( new
::drawinglayer::primitive2d::ControlPrimitive2D(
- m_aTransformation, xControlModel, rControl.getControl() ) );
+ m_aTransformation, xControlModel, rControl.getControl(),
+ m_pVOCImpl->getViewContact().GetSdrObject().GetTitle(),
+ m_pVOCImpl->getViewContact().GetSdrObject().GetDescription()) );
}
sal_uInt32 LazyControlCreationPrimitive2D::getPrimitive2DID() const
commit 143728ba0e64e839d088623ef6f3dab33bf7e67b
Author: László Németh <[email protected]>
AuthorDate: Mon Mar 27 17:59:15 2023 +0200
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:18 2023 +0200
tdf#153628 sw: fix locked spell checking in spelling dialog
Which resulted incomplete spell checking finished before
checking the document.
Regression from commit b484e5d9e0d22b794c2d1c73741191836158a4ad
"use more SwPosition::Assign".
Follow-up to commit 2780b026f912a103aea3f8dc19319b998d19a43a
"tdf#152738 sw: fix lost SwPosition in spelling dialog" and
commit 221d76260096b9e6b4c4479b1b89c95af8b05774 "simplify assignment".
Change-Id: Ib66903596847016ddaf68da42813dd3a839adb59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149633
Tested-by: Jenkins
Reviewed-by: László Németh <[email protected]>
(cherry picked from commit 4fa0664acfd13111d96801bfd643d10ec838bd35)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149610
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 7898af3b540d..021e100efdc7 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -652,8 +652,10 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
aRet <<= aResult;
//put the cursor to the current error
const linguistic2::SingleProofreadingError
&rError = aResult.aErrors[0];
- pSttPos->Assign(*pNd->GetTextNode(),
aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos );
- pEndPos->Assign(*pNd->GetTextNode(),
aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength
).mnPos );
+ pSttPos->Assign(nCurrNd,
pSttPos->GetContentIndex());
+ pEndPos->Assign(nCurrNd,
pEndPos->GetContentIndex());
+
pSpellArgs->pStartPos->Assign(*pNd->GetTextNode(),
aConversionMap.ConvertToModelPosition( rError.nErrorStart ).mnPos );
+
pSpellArgs->pEndPos->Assign(*pNd->GetTextNode(),
aConversionMap.ConvertToModelPosition( rError.nErrorStart + rError.nErrorLength
).mnPos );
nCurrNd = nEndNd;
}
}
commit 012ddca61f0e4962853e7cc412555c2d671bae12
Author: Jim Raykowski <[email protected]>
AuthorDate: Sat Mar 25 17:52:24 2023 -0800
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:17 2023 +0200
tdf#126632 tdf#152908 Resize the notebook bar on context change
For other than gtk vcl backend the tabbed compact toolbar tabs do not
repaint correctly when the 'Table' tab is active and the cursor is move
outside of the table. This patch adds a Resize after the context is set
to make the tabs always show as expected.
Change-Id: Iedf8a6eea52c3c55e9c1266b7aa79bc0f34deb22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149593
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <[email protected]>
(cherry picked from commit e0daa98a802cc1f84ceb0f306f5d15fecabd62c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149599
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index b2f86b3cd9a5..8cf999814820 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2312,6 +2312,11 @@ void NotebookbarTabControlBase::SetContext(
vcl::EnumContext::Context eContext )
if (!bHandled)
bLastContextWasSupported = false;
eLastContext = eContext;
+
+ // tdf#152908 Tabbed compact toolbar does not repaint itself when tabs
getting removed
+ // For unknown reason this is needed by the tabbed compact toolbar for
other than gtk
+ // vcl backends.
+ Resize();
}
void NotebookbarTabControlBase::dispose()
commit 9430b770917fc05ae3295d2b25a6e1eee2ce62d0
Author: Jim Raykowski <[email protected]>
AuthorDate: Thu Mar 23 12:50:49 2023 -0800
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:17 2023 +0200
tdf#154296 Fix customize notebook bar regression
caused by commit e79741488cc740f49ebd4426c40b45e7139ff663
Change-Id: I04fe66124af831c73834b7f695458e1667198ddb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149470
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <[email protected]>
(cherry picked from commit 48b7cf3182cc8fb0b728860f9cbb489390074101)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149600
Tested-by: Adolfo Jayme Barrientos <[email protected]>
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx
b/cui/source/customize/SvxNotebookbarConfigPage.cxx
index 91ce6352ddca..319cfb9ece5e 100644
--- a/cui/source/customize/SvxNotebookbarConfigPage.cxx
+++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx
@@ -240,7 +240,7 @@ void
SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId
if (xImage.is())
rTreeView.set_image(rIter, xImage, -1);
rTreeView.set_text(rIter, aName, 0);
- rTreeView.set_id(rIter, sUIItemCommand);
+ rTreeView.set_id(rIter, sUIItemId);
}
}
@@ -435,6 +435,7 @@ void SvxNotebookbarConfigPage::SelectElement()
aEntries = std::move(aTempEntries);
+
static_cast<SvxNotebookbarEntriesListBox*>(m_xContentsListBox.get())->GetTooltipMap().clear();
weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
rTreeView.bulk_insert_for_each(
aEntries.size(), [this, &rTreeView, &aEntries](weld::TreeIter& rIter,
int nIdx) {
@@ -451,6 +452,13 @@ void SvxNotebookbarConfigPage::SelectElement()
}
InsertEntryIntoNotebookbarTabUI(aEntries[nIdx].sClassId,
aEntries[nIdx].sDisplayName,
aEntries[nIdx].sActionName,
rTreeView, rIter);
+ if (aEntries[nIdx].sClassId != u"GtkSeparatorMenuItem"
+ && aEntries[nIdx].sClassId != u"GtkSeparator")
+ {
+
static_cast<SvxNotebookbarEntriesListBox*>(m_xContentsListBox.get())
+ ->GetTooltipMap()[aEntries[nIdx].sDisplayName]
+ = aEntries[nIdx].sActionName;
+ }
});
aEntries.clear();
@@ -543,16 +551,16 @@ IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl,
const KeyEvent&, rKeyEvent,
IMPL_LINK(SvxNotebookbarEntriesListBox, QueryTooltip, const weld::TreeIter&,
rIter, OUString)
{
- OUString sCommand = m_xControl->get_id(rIter);
- if (sCommand.isEmpty())
+ const OUString& rsCommand = m_aTooltipMap[m_xControl->get_id(rIter)];
+ if (rsCommand.isEmpty())
return OUString();
OUString
aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame()));
- auto aProperties =
vcl::CommandInfoProvider::GetCommandProperties(sCommand, aModuleName);
- OUString sTooltipLabel =
vcl::CommandInfoProvider::GetTooltipForCommand(sCommand, aProperties,
+ auto aProperties =
vcl::CommandInfoProvider::GetCommandProperties(rsCommand, aModuleName);
+ OUString sTooltipLabel =
vcl::CommandInfoProvider::GetTooltipForCommand(rsCommand, aProperties,
m_pPage->GetFrame());
return CuiResId(RID_CUISTR_COMMANDLABEL) + ": "
+ m_xControl->get_text(rIter).replaceFirst("~", "") + "\n"
- + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + sCommand + "\n"
+ + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + rsCommand + "\n"
+ CuiResId(RID_CUISTR_COMMANDTIP) + ": " +
sTooltipLabel.replaceFirst("~", "");
}
diff --git a/cui/source/inc/SvxNotebookbarConfigPage.hxx
b/cui/source/inc/SvxNotebookbarConfigPage.hxx
index 2f239161dfb6..672d2e8299e4 100644
--- a/cui/source/inc/SvxNotebookbarConfigPage.hxx
+++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx
@@ -74,6 +74,9 @@ public:
class SvxNotebookbarEntriesListBox final : public SvxMenuEntriesListBox
{
+ typedef std::unordered_map<OUString, OUString> TooltipMap;
+ TooltipMap m_aTooltipMap;
+
void ChangedVisibility(int nRow);
DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void);
DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
@@ -82,6 +85,8 @@ class SvxNotebookbarEntriesListBox final : public
SvxMenuEntriesListBox
public:
SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl,
SvxConfigPage* pPg);
virtual ~SvxNotebookbarEntriesListBox() override;
+
+ TooltipMap& GetTooltipMap() { return m_aTooltipMap; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 80cbba707cbc3d531ef2d5fc2953d23ed076a7b6
Author: Taichi Haradaguchi <[email protected]>
AuthorDate: Wed Mar 15 23:22:33 2023 +0900
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:17 2023 +0200
libjpeg-turbo: upgrade to release 2.1.5.1
Fixes a serious regression that 2.1.5 had.[1]
[1] "Release 2.1.5.1 · libjpeg-turbo/libjpeg-turbo"
<https://github.com/libjpeg-turbo/libjpeg-turbo/releases/tag/2.1.5.1>
Change-Id: I0586d735e17789482e0e8e667aafd2b5613a1232
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149308
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/download.lst b/download.lst
index 7d0e4ccb45dc..abc8f39f132b 100644
--- a/download.lst
+++ b/download.lst
@@ -333,8 +333,8 @@ JFREEREPORT_SAC_TARBALL :=
39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
# three static lines
# so that git cherry-pick
# will not run into conflicts
-LIBJPEG_TURBO_SHA256SUM :=
bc12bc9dce55300c6bf4342bc233bcc26bd38bf289eedf147360d731c668ddaf
-LIBJPEG_TURBO_TARBALL := libjpeg-turbo-2.1.5.tar.gz
+LIBJPEG_TURBO_SHA256SUM :=
2fdc3feb6e9deb17adec9bafa3321419aa19f8f4e5dea7bf8486844ca22207bf
+LIBJPEG_TURBO_TARBALL := libjpeg-turbo-2.1.5.1.tar.gz
# three static lines
# so that git cherry-pick
# will not run into conflicts
diff --git a/external/libjpeg-turbo/README b/external/libjpeg-turbo/README
index 46eff7cb7487..66ab7ad9660d 100644
--- a/external/libjpeg-turbo/README
+++ b/external/libjpeg-turbo/README
@@ -3,4 +3,4 @@ External library for reading/writing jpegs
This is only used by the jpeg import filter that is provided
for use by VCL see [[vcl/source/filter/jpeg]]
-From [http://www.libjpeg-turbo.org/].
+From [https://www.libjpeg-turbo.org/].
diff --git a/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk
b/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk
index 0b6b3044d1b2..ace14fd8fc5d 100644
--- a/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk
+++ b/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk
@@ -37,8 +37,10 @@ endif
endif
$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
+ UnpackedTarball/libjpeg-turbo/jaricom \
UnpackedTarball/libjpeg-turbo/jcapimin \
UnpackedTarball/libjpeg-turbo/jcapistd \
+ UnpackedTarball/libjpeg-turbo/jcarith \
UnpackedTarball/libjpeg-turbo/jccoefct \
UnpackedTarball/libjpeg-turbo/jccolor \
UnpackedTarball/libjpeg-turbo/jcdctmgr \
@@ -56,6 +58,7 @@ $(eval $(call
gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
UnpackedTarball/libjpeg-turbo/jctrans \
UnpackedTarball/libjpeg-turbo/jdapimin \
UnpackedTarball/libjpeg-turbo/jdapistd \
+ UnpackedTarball/libjpeg-turbo/jdarith \
UnpackedTarball/libjpeg-turbo/jdatadst \
UnpackedTarball/libjpeg-turbo/jdatasrc \
UnpackedTarball/libjpeg-turbo/jdcoefct \
@@ -80,14 +83,11 @@ $(eval $(call
gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\
UnpackedTarball/libjpeg-turbo/jidctfst \
UnpackedTarball/libjpeg-turbo/jidctint \
UnpackedTarball/libjpeg-turbo/jidctred \
+ UnpackedTarball/libjpeg-turbo/jmemmgr \
+ UnpackedTarball/libjpeg-turbo/jmemnobs \
UnpackedTarball/libjpeg-turbo/jquant1 \
UnpackedTarball/libjpeg-turbo/jquant2 \
UnpackedTarball/libjpeg-turbo/jutils \
- UnpackedTarball/libjpeg-turbo/jmemmgr \
- UnpackedTarball/libjpeg-turbo/jmemnobs \
- UnpackedTarball/libjpeg-turbo/jaricom \
- UnpackedTarball/libjpeg-turbo/jcarith \
- UnpackedTarball/libjpeg-turbo/jdarith \
))
ifneq ($(NASM),)
diff --git a/external/libjpeg-turbo/jconfig.h b/external/libjpeg-turbo/jconfig.h
index 65151c1422ad..3855ccec9cfd 100644
--- a/external/libjpeg-turbo/jconfig.h
+++ b/external/libjpeg-turbo/jconfig.h
@@ -4,10 +4,10 @@
#define JPEG_LIB_VERSION 62
/* libjpeg-turbo version */
-#define LIBJPEG_TURBO_VERSION 2.1.4
+#define LIBJPEG_TURBO_VERSION 2.1.5.1
/* libjpeg-turbo version in integer form */
-#define LIBJPEG_TURBO_VERSION_NUMBER 2001004
+#define LIBJPEG_TURBO_VERSION_NUMBER 2001005
/* Support arithmetic encoding */
#define C_ARITH_CODING_SUPPORTED 1
diff --git a/external/libjpeg-turbo/jconfigint.h
b/external/libjpeg-turbo/jconfigint.h
index 6cd960a03368..b7644cbac90e 100644
--- a/external/libjpeg-turbo/jconfigint.h
+++ b/external/libjpeg-turbo/jconfigint.h
@@ -1,7 +1,7 @@
#include <sal/types.h>
/* libjpeg-turbo build number */
-#define BUILD "20230228"
+#define BUILD "20230315"
/* Compiler's inline keyword */
#undef inline
@@ -19,7 +19,7 @@
#define PACKAGE_NAME "libjpeg-turbo"
/* Version number of package */
-#define VERSION "2.1.5"
+#define VERSION "2.1.5.1"
/* The size of `size_t', as computed by sizeof. */
/* #undef SIZEOF_SIZE_T */
diff --git a/external/libjpeg-turbo/jversion.h
b/external/libjpeg-turbo/jversion.h
index 63db95b99b55..ea6de648d926 100644
--- a/external/libjpeg-turbo/jversion.h
+++ b/external/libjpeg-turbo/jversion.h
@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
* libjpeg-turbo Modifications:
- * Copyright (C) 2010, 2012-2022, D. R. Commander.
+ * Copyright (C) 2010, 2012-2023, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -37,7 +37,7 @@
*/
#define JCOPYRIGHT \
- "Copyright (C) 2009-2022 D. R. Commander\n" \
+ "Copyright (C) 2009-2023 D. R. Commander\n" \
"Copyright (C) 2015, 2020 Google, Inc.\n" \
"Copyright (C) 2019-2020 Arm Limited\n" \
"Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
@@ -51,4 +51,4 @@
"Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding"
#define JCOPYRIGHT_SHORT \
- "Copyright (C) 1991-2022 The libjpeg-turbo Project and many others"
+ "Copyright (C) 1991-2023 The libjpeg-turbo Project and many others"
commit 4a73f6f0940957ff80723ccff274cd71fe9da997
Author: Caolán McNamara <[email protected]>
AuthorDate: Thu Mar 23 16:18:22 2023 +0000
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:16 2023 +0200
cid#1524497 Uninitialized pointer field
Change-Id: Ic3f347b9a588bda459411f917be47cbfa442d3e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149459
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit bba53ddf3634bda503398ebd466484f85fa2d994)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149446
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 8ce59993f26c..4308c8db246d 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -146,6 +146,9 @@ sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent)
: SfxDialogController(pParent, "modules/swriter/ui/titlepage.ui",
"DLG_TITLEPAGE")
+ , mpTitleDesc(nullptr)
+ , mpIndexDesc(nullptr)
+ , mpNormalDesc(nullptr)
,
m_xUseExistingPagesRB(m_xBuilder->weld_radio_button("RB_USE_EXISTING_PAGES"))
, m_xPageCountNF(m_xBuilder->weld_spin_button("NF_PAGE_COUNT"))
, m_xDocumentStartRB(m_xBuilder->weld_radio_button("RB_DOCUMENT_START"))
commit 64b8559d974b268056da33578d144b848e78cc07
Author: Caolán McNamara <[email protected]>
AuthorDate: Thu Mar 23 10:47:32 2023 +0000
Commit: Andras Timar <[email protected]>
CommitDate: Mon Apr 3 00:53:16 2023 +0200
Resolves: tdf#154322 if entries are disabled while menu is active, update it
Change-Id: Id5cad5f2f4ac21db8675de16f1bc0ceeff39fe6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149427
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 992195e05778..5d3242e84683 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -147,32 +147,36 @@ namespace svxform
}
std::unique_ptr<weld::Builder>
xBuilder(Application::CreateBuilder(m_xItemList.get(),
"svx/ui/formdatamenu.ui"));
- std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu"));
+ m_xMenu = xBuilder->weld_menu("menu");
+ m_aRemovedMenuEntries.clear();
if (DGTInstance == m_eGroup)
- xMenu->remove("additem");
+ m_aRemovedMenuEntries.insert("additem");
else
{
- xMenu->remove("addelement");
- xMenu->remove("addattribute");
+ m_aRemovedMenuEntries.insert("addelement");
+ m_aRemovedMenuEntries.insert("addattribute");
if (DGTSubmission == m_eGroup)
{
- xMenu->set_label("additem",
SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
- xMenu->set_label("edit",
SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
- xMenu->set_label("delete",
SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
+ m_xMenu->set_label("additem",
SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
+ m_xMenu->set_label("edit",
SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
+ m_xMenu->set_label("delete",
SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
}
else
{
- xMenu->set_label("additem",
SvxResId(RID_STR_DATANAV_ADD_BINDING));
- xMenu->set_label("edit",
SvxResId(RID_STR_DATANAV_EDIT_BINDING));
- xMenu->set_label("delete",
SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
+ m_xMenu->set_label("additem",
SvxResId(RID_STR_DATANAV_ADD_BINDING));
+ m_xMenu->set_label("edit",
SvxResId(RID_STR_DATANAV_EDIT_BINDING));
+ m_xMenu->set_label("delete",
SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
}
}
- EnableMenuItems(xMenu.get());
- OString sCommand = xMenu->popup_at_rect(m_xItemList.get(),
tools::Rectangle(aPos, Size(1,1)));
+ for (const auto& rRemove : m_aRemovedMenuEntries)
+ m_xMenu->remove(rRemove);
+ EnableMenuItems();
+ OString sCommand = m_xMenu->popup_at_rect(m_xItemList.get(),
tools::Rectangle(aPos, Size(1,1)));
if (!sCommand.isEmpty())
DoMenuAction(sCommand);
+ m_xMenu.reset();
return true;
}
@@ -242,7 +246,7 @@ namespace svxform
IMPL_LINK_NOARG(XFormsPage, ItemSelectHdl, weld::TreeView&, void)
{
- EnableMenuItems(nullptr);
+ EnableMenuItems();
PrepDnD();
}
@@ -674,7 +678,7 @@ namespace svxform
}
m_pNaviWin->DisableNotify( false );
- EnableMenuItems( nullptr );
+ EnableMenuItems();
if ( bIsDocModified )
svxform::DataNavigatorWindow::SetDocModified();
return bHandled;
@@ -1103,7 +1107,7 @@ namespace svxform
break;
}
- EnableMenuItems( nullptr );
+ EnableMenuItems();
return sRet;
}
@@ -1161,7 +1165,14 @@ namespace svxform
return DoToolBoxAction(rMenuID);
}
- void XFormsPage::EnableMenuItems(weld::Menu* pMenu)
+ void XFormsPage::SetMenuEntrySensitive(const OString& rIdent, bool
bSensitive)
+ {
+ if (m_aRemovedMenuEntries.find(rIdent) != m_aRemovedMenuEntries.end())
+ return;
+ m_xMenu->set_sensitive(rIdent, bSensitive);
+ }
+
+ void XFormsPage::EnableMenuItems()
{
bool bEnableAdd = false;
bool bEnableEdit = false;
@@ -1212,13 +1223,13 @@ namespace svxform
m_xToolBox->set_item_sensitive("edit", bEnableEdit);
m_xToolBox->set_item_sensitive("delete", bEnableRemove);
- if (pMenu)
+ if (m_xMenu)
{
- pMenu->set_sensitive("additem", bEnableAdd);
- pMenu->set_sensitive("addelement", bEnableAdd);
- pMenu->set_sensitive("addattribute", bEnableAdd);
- pMenu->set_sensitive("edit", bEnableEdit);
- pMenu->set_sensitive("delete", bEnableRemove);
+ SetMenuEntrySensitive("additem", bEnableAdd);
+ SetMenuEntrySensitive("addelement", bEnableAdd);
+ SetMenuEntrySensitive("addattribute", bEnableAdd);
... etc. - the rest is truncated