core.git: include/svx svx/source

2024-06-12 Thread Taichi Haradaguchi (via logerrit)
 include/svx/strings.hrc   |   11 +--
 svx/source/dialog/charmap.cxx |2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 1f3c82e3b0171bac89cbc7d1ec1ca89fac1c7eec
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sun Apr 28 15:35:56 2024 +0900
Commit:  <20001...@ymail.ne.jp>
CommitDate: Wed Jun 12 13:03:54 2024 +0200

Fix Unicode block names

=== Unicode block names ===
* Change "Basic Greek" to "Greek and Coptic".
* Change "Canadian..." to "Unified Canadian...".
* Change "C1 Controls and Latin-1 Supplement" to "Latin-1 Supplement"
  because "Latin-1 Supplement" is the more commonly used name.

These modified Unicode block names are based on the descriptions on the 
following pages:
https://www.unicode.org/charts/PDF/U0370.pdf
https://www.unicode.org/charts/PDF/U1400.pdf
https://www.unicode.org/charts/PDF/U18B0.pdf
https://www.unicode.org/charts/PDF/U11AB0.pdf
https://www.unicode.org/charts/
https://en.wikipedia.org/wiki/Latin-1_Supplement

=== Others ===
* Remove unused RID_SUBSETSTR_GREEK_SYMS_COPTIC.
* Change RID_SUBSETSTR_BASIC_GREEK to RID_SUBSETSTR_GREEK.

Change-Id: I91573a825a7b34349f29143ea8940da2383b260f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166790
Tested-by: Jenkins
Reviewed-by:   <20001...@ymail.ne.jp>

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index b8e69dc3dbe1..2b46e77b6b66 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1464,14 +1464,13 @@
 #define RID_SVXSTR_SAVE_MODIFIED_IMAGE  
NC_("RID_SVXSTR_SAVE_MODIFIED_IMAGE", "The image has been modified. By default 
the original image will be saved.
Do you want to save the modified version instead?")
 
 #define RID_SUBSETSTR_BASIC_LATIN   
NC_("RID_SUBSETMAP", "Basic Latin")
-#define RID_SUBSETSTR_LATIN_1_SUPPLEMENT
NC_("RID_SUBSETMAP", "C1 Controls and Latin-1 Supplement")
+#define RID_SUBSETSTR_LATIN_1_SUPPLEMENT
NC_("RID_SUBSETMAP", "Latin-1 Supplement")
 #define RID_SUBSETSTR_LATIN_EXTENDED_A  
NC_("RID_SUBSETMAP", "Latin Extended-A")
 #define RID_SUBSETSTR_LATIN_EXTENDED_B  
NC_("RID_SUBSETMAP", "Latin Extended-B")
 #define RID_SUBSETSTR_IPA_EXTENSIONS
NC_("RID_SUBSETMAP", "IPA Extensions")
 #define RID_SUBSETSTR_SPACING_MODIFIERS 
NC_("RID_SUBSETMAP", "Spacing Modifier Letters")
 #define RID_SUBSETSTR_COMB_DIACRITICAL  
NC_("RID_SUBSETMAP", "Combining Diacritical Marks")
-#define RID_SUBSETSTR_BASIC_GREEK   
NC_("RID_SUBSETMAP", "Basic Greek")
-#define RID_SUBSETSTR_GREEK_SYMS_COPTIC 
NC_("RID_SUBSETMAP", "Greek Symbols And Coptic")
+#define RID_SUBSETSTR_GREEK 
NC_("RID_SUBSETMAP", "Greek and Coptic")
 #define RID_SUBSETSTR_CYRILLIC  
NC_("RID_SUBSETMAP", "Cyrillic")
 #define RID_SUBSETSTR_ARMENIAN  
NC_("RID_SUBSETMAP", "Armenian")
 #define RID_SUBSETSTR_BASIC_HEBREW  
NC_("RID_SUBSETMAP", "Basic Hebrew")
@@ -1571,7 +1570,7 @@
 #define RID_SUBSETSTR_THAANA
NC_("RID_SUBSETMAP", "Thaana")
 #define RID_SUBSETSTR_ETHIOPIC  
NC_("RID_SUBSETMAP", "Ethiopic")
 #define RID_SUBSETSTR_CHEROKEE  
NC_("RID_SUBSETMAP", "Cherokee")
-#define RID_SUBSETSTR_CANADIAN_ABORIGINAL   
NC_("RID_SUBSETMAP", "Canadian Aboriginal Syllables")
+#define RID_SUBSETSTR_CANADIAN_ABORIGINAL   
NC_("RID_SUBSETMAP", "Unified Canadian Aboriginal Syllables")
 #define RID_SUBSETSTR_MONGOLIAN 
NC_("RID_SUBSETMAP", "Mongolian")
 #define RID_SUBSETSTR_MISC_MATH_SYMS_A  
NC_("RID_SUBSETMAP", "Miscellaneous Mathematical Symbols-A")
 #define RID_SUBSETSTR_SUPPL_ARROWS_A
NC_("RID_SUBSETMAP", "Supplemental Arrows-A")
@@ -1638,7 +1637,7 @@
 #define RID_SUBSETSTR_MAHJONG_TILES 
NC_("RID_SUBSETMAP", "Mahjong Tiles")
 #define RID_SUBSETSTR_DOMINO_TILES  
NC_("RID_SUBSETMAP", "Domino Tiles")
 #define RID_SUBSETSTR_SAMARITAN 
NC_("RID_SUBSETMAP", "Samaritan")
-#define RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED
NC_("RID_SUBSETMAP", "Canadian Aboriginal Syllabics Extended")
+#define RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED
NC_("RID_SUBSETMAP", "Unified Canadian Aboriginal Syllabics Extended")
 #define RID_SUBSETSTR_TAI_THAM  
NC_("RID_SUBSETMAP", "Tai Tham")
 #define RID_SUBSETSTR_VEDIC_EXTENSIONS  
NC_("RID_SUBSETMAP", "Vedic Extensions")
 #define RID_SUBSETSTR_LISU   

core.git: include/svx sd/source svx/source

2024-06-11 Thread Tomaž Vajngerl (via logerrit)
 include/svx/annotation/Annotation.hxx   |   15 +++
 include/svx/annotation/AnnotationObject.hxx |2 ++
 include/svx/annotation/ObjectAnnotationData.hxx |8 +++-
 include/svx/svdpage.hxx |1 +
 sd/source/core/annotations/Annotation.cxx   |9 +++--
 svx/source/annotation/Annotation.cxx|1 +
 6 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit 46c261603fc60ad30e80cbf6903b573ac98a66ee
Author: Tomaž Vajngerl 
AuthorDate: Mon Jun 10 13:41:51 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 11 14:44:37 2024 +0200

annot: document new annotation classes and methods

Change-Id: I71d1055a30e0e8eedcd8fa71b47e74e90f1aac93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168595
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/annotation/Annotation.hxx 
b/include/svx/annotation/Annotation.hxx
index 8ea57af4d88f..436827b13fc6 100644
--- a/include/svx/annotation/Annotation.hxx
+++ b/include/svx/annotation/Annotation.hxx
@@ -30,6 +30,7 @@ namespace sdr::annotation
 {
 class Annotation;
 
+/** Type of the annotation / comment change. */
 enum class CommentNotificationType
 {
 Add,
@@ -37,10 +38,14 @@ enum class CommentNotificationType
 Remove
 };
 
+/** LOKit notify for a view */
 SVXCORE_DLLPUBLIC void LOKCommentNotify(CommentNotificationType nType,
 const SfxViewShell* pViewShell, 
Annotation& rAnnotation);
+
+/** LOKit notify for all views */
 SVXCORE_DLLPUBLIC void LOKCommentNotifyAll(CommentNotificationType nType, 
Annotation& rAnnotation);
 
+/** Type of the annotation (that is supported) */
 enum class AnnotationType
 {
 None,
@@ -53,6 +58,7 @@ enum class AnnotationType
 FreeText,
 };
 
+/** Annotation data that is used at annotation creation */
 struct CreationInfo
 {
 AnnotationType meType = AnnotationType::None;
@@ -69,6 +75,7 @@ struct CreationInfo
 Color maColor = COL_TRANSPARENT;
 };
 
+/** Data of an annotation */
 struct SVXCORE_DLLPUBLIC AnnotationData
 {
 css::geometry::RealPoint2D m_Position;
@@ -82,6 +89,11 @@ struct SVXCORE_DLLPUBLIC AnnotationData
 void set(Annotation& rAnnotation);
 };
 
+/** Annotation object, responsible for handling of the annotation.
+ *
+ * Implements the XAnnotation UNO API, handles undo/redo and notifications ()
+ *
+ **/
 class SVXCORE_DLLPUBLIC Annotation
 : public ::comphelper::WeakComponentImplHelper,
   public ::cppu::PropertySetMixin
@@ -121,6 +133,7 @@ public:
 
comphelper::WeakComponentImplHelper::release();
 }
 
+// Changes without triggering notification broadcast
 css::geometry::RealPoint2D GetPosition() const { return m_Position; }
 void SetPosition(const css::geometry::RealPoint2D& rValue) { m_Position = 
rValue; }
 
@@ -152,12 +165,14 @@ public:
 SdrPage const* getPage() const { return mpPage; }
 SdrPage* getPage() { return mpPage; }
 
+// Unique ID of the annotation
 sal_uInt32 GetId() const { return m_nId; }
 
 CreationInfo const& getCreationInfo() { return maCreationInfo; }
 void setCreationInfo(CreationInfo const& rCreationInfo) { maCreationInfo = 
rCreationInfo; }
 };
 
+/** Vector of annotations */
 typedef std::vector> AnnotationVector;
 
 } // namespace sdr::annotation
diff --git a/include/svx/annotation/AnnotationObject.hxx 
b/include/svx/annotation/AnnotationObject.hxx
index d46f4e7c3150..e372fec1f56a 100644
--- a/include/svx/annotation/AnnotationObject.hxx
+++ b/include/svx/annotation/AnnotationObject.hxx
@@ -16,12 +16,14 @@
 
 namespace sdr::annotation
 {
+/** Annotation data that contains the annotation unique ID and author's ID */
 struct SVXCORE_DLLPUBLIC AnnotationViewData
 {
 sal_Int32 nIndex = -1;
 sal_uInt16 nAuthorIndex = 0;
 };
 
+/** Annotation (sdr) object, which represents an annotation inside the 
document */
 class SVXCORE_DLLPUBLIC AnnotationObject final : public SdrRectObj
 {
 private:
diff --git a/include/svx/annotation/ObjectAnnotationData.hxx 
b/include/svx/annotation/ObjectAnnotationData.hxx
index 50a2f80c80ac..4530df2fb61c 100644
--- a/include/svx/annotation/ObjectAnnotationData.hxx
+++ b/include/svx/annotation/ObjectAnnotationData.hxx
@@ -15,14 +15,20 @@
 
 namespace sdr::annotation
 {
-/** Contains the annotation data for a SdrObject */
+/** Contains the annotation data specific for a SdrObject (which represents an 
annotation) */
 class ObjectAnnotationData
 {
 public:
+/// Does the (sdr) object represent an annotation
 bool mbIsAnnotation : 1 = false;
+
+/// The annotation
 rtl::Reference mxAnnotation;
+
+/// Object handling the pop-up window
 std::unique_ptr mpAnnotationPopup;
 
+/// Open popup for the annotation
 void openPopup()
 {
 if (mbIsAnnotation && mpAnnotationPopup)
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 2347a877fd7a..d6e68943e0ac 100644
--- 

core.git: include/svx

2024-06-11 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdpage.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5a3f8809fe489d4e9bf21f1d68ae3be5ad71349e
Author: Tomaž Vajngerl 
AuthorDate: Fri Jun 7 13:55:45 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 11 12:49:26 2024 +0200

annot: change include to forward declaration

Change-Id: Ibf35554b707254fa5f901e3137adb28ba46a98ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168515
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index eb1f04dc10ae..2347a877fd7a 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -41,6 +40,7 @@
 namespace model { class Theme; }
 namespace reportdesign { class OSection; }
 namespace sdr::contact { class ViewContact; }
+namespace sdr::annotation { class Annotation; }
 class SdrPage;
 class SdrModel;
 class SfxItemPool;


core.git: include/svx svx/source

2024-06-10 Thread Miklos Vajna (via logerrit)
 include/svx/svdograf.hxx   |   14 ++---
 svx/source/svdraw/svdograf.cxx |  104 -
 2 files changed, 59 insertions(+), 59 deletions(-)

New commits:
commit fd7418c1f75e855a19078c6288a024b1b465f614
Author: Miklos Vajna 
AuthorDate: Mon Jun 10 08:41:56 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 10 09:54:14 2024 +0200

svx: prefix members of SdrGrafObj

See tdf#94879 for motivation.

Change-Id: Icc587c31582fb5fdfbdfe375005b96ea219bf4a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168597
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index ec2c94ab3f45..88296f4a2629 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -79,14 +79,14 @@ private:
 SAL_DLLPRIVATE virtual std::unique_ptr 
CreateObjectSpecificProperties() override;
 
 SAL_DLLPRIVATE void ImpSetAttrToGrafInfo(); // Copy values from the pool
-GraphicAttr aGrafInfo;
+GraphicAttr m_aGrafInfo;
 
-OUString aFileName; // If it's a Link, the filename can be found in here
-OUString aFilterName;
+OUString m_aFileName; // If it's a Link, the filename can be found in here
+OUString m_aFilterName;
 std::unique_ptr mpGraphicObject; // In order to speed up 
output of bitmaps, especially rotated ones
 std::unique_ptr mpReplacementGraphicObject;
-SdrGraphicLink* pGraphicLink; // And here a pointer for linked graphics
-bool bMirrored:1; // True: the graphic is horizontal, which means it's 
mirrored along the y-axis
+SdrGraphicLink* m_pGraphicLink; // And here a pointer for linked graphics
+bool m_bMirrored:1; // True: the graphic is horizontal, which means it's 
mirrored along the y-axis
 
 // Flag for allowing text animation. Default is true.
 bool mbGrafAnimationAllowed:1;
@@ -157,7 +157,7 @@ public:
 voidReleaseGraphicLink();
 bool IsLinkedGraphic() const;
 
-const OUString& GetFileName() const { return aFileName;}
+const OUString& GetFileName() const { return m_aFileName;}
 
 voidStartAnimation();
 
@@ -192,7 +192,7 @@ public:
 
SAL_DLLPRIVATE  virtual voidNotify( SfxBroadcaster& rBC, const 
SfxHint& rHint ) override;
 
-bool IsMirrored() const { return bMirrored;}
+bool IsMirrored() const { return m_bMirrored;}
 SAL_DLLPRIVATE void SetMirrored( bool _bMirrored );
 
 virtual bool shouldKeepAspectRatio() const override { return true; }
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 1e09eccab766..a0c97cc3dde9 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -86,7 +86,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj)
 
 if( pLinkManager && rValue.hasValue() )
 {
-sfx2::LinkManager::GetDisplayNames( this, nullptr, 
, nullptr,  );
+sfx2::LinkManager::GetDisplayNames( this, nullptr, 
_aFileName, nullptr, _aFilterName );
 
 Graphic aGraphic;
 if (pLinkManager->GetGraphicFromAny(rMimeType, rValue, aGraphic, 
nullptr))
@@ -106,7 +106,7 @@ void SdrGraphicLink::Closed()
 {
 // close connection; set pLink of the object to NULL, as link instance is 
just about getting destructed.
 rGrafObj.ForceSwapIn();
-rGrafObj.pGraphicLink=nullptr;
+rGrafObj.m_pGraphicLink=nullptr;
 rGrafObj.ReleaseGraphicLink();
 SvBaseLink::Closed();
 }
@@ -181,8 +181,8 @@ void SdrGrafObj::onGraphicChanged()
 SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel)
 :   SdrRectObj(rSdrModel)
 ,mpGraphicObject(new GraphicObject)
-,pGraphicLink(nullptr)
-,bMirrored(false)
+,m_pGraphicLink(nullptr)
+,m_bMirrored(false)
 ,mbIsSignatureLine(false)
 ,mbIsSignatureLineShowSignDate(true)
 ,mbIsSignatureLineCanAddComment(false)
@@ -205,7 +205,7 @@ SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel)
 SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel, SdrGrafObj const & rSource)
 :   SdrRectObj(rSdrModel, rSource)
 ,mpGraphicObject(new GraphicObject)
-,pGraphicLink(nullptr)
+,m_pGraphicLink(nullptr)
 {
 onGraphicChanged();
 
@@ -220,8 +220,8 @@ SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel, SdrGrafObj 
const & rSource)
 // #i25616#
 mbSupportTextIndentingOnLineWidthChange = false;
 
-aFileName = rSource.aFileName;
-bMirrored = rSource.bMirrored;
+m_aFileName = rSource.m_aFileName;
+m_bMirrored = rSource.m_bMirrored;
 
 mbIsSignatureLine = rSource.mbIsSignatureLine;
 maSignatureLineId = rSource.maSignatureLineId;
@@ -250,7 +250,7 @@ SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel, SdrGrafObj 
const & rSource)
 
 if( rSource.IsLinkedGraphic() )
 {
-SetGraphicLink( aFileName );
+SetGraphicLink( m_aFileName );
 }
 
 ImpSetAttrToGrafInfo();
@@ -262,8 +262,8 @@ SdrGrafObj::SdrGrafObj(
 const tools::Rectangle& rRect)
 :   SdrRectObj(rSdrModel, rRect)
 

core.git: include/svx sd/inc sd/source svx/source

2024-06-05 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdpage.hxx   |   10 
 sd/inc/sdpage.hxx |5 +++-
 sd/source/core/sdpage2.cxx|   51 +++---
 svx/source/svdraw/svdpage.cxx |   30 
 4 files changed, 73 insertions(+), 23 deletions(-)

New commits:
commit e467cb52d68692e936eb07c2c1faa45f03dd1f82
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 5 17:33:08 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 5 17:26:09 2024 +0200

annot: add {add,remove}Annotation that don't notify

Add addAnnotationNoNotify method, that doesn't broadcast that an
annotation was added, and change addAnnotation to call the method
and in addition call the broadcast bits. Previously all this had
happened in the addAnnotation without the choice to not broadcast.

Change removeAnnotation in a similar way.

Change-Id: Ie15a386a8b8d4493d5b41fcbcb55924a693b46d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168429
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 0747c4625773..eb1f04dc10ae 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -555,11 +555,13 @@ public:
 
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 
-virtual rtl::Reference createAnnotation() { 
assert(false); return nullptr; }
-virtual void addAnnotation(rtl::Reference 
const& /*xAnnotation*/, int /*nIndex*/) { assert(false); }
-virtual void removeAnnotation(rtl::Reference 
const& /*xAnnotation*/) { assert(false); }
+virtual rtl::Reference createAnnotation();
+virtual void addAnnotation(rtl::Reference 
const& xAnnotation, int nIndex = -1);
+virtual void 
addAnnotationNoNotify(rtl::Reference const& 
xAnnotation, int nIndex = -1);
+virtual void removeAnnotation(rtl::Reference 
const& xAnnotation);
+virtual void 
removeAnnotationNoNotify(rtl::Reference const& 
xAnnotation);
 
-std::vector> const& 
getAnnotations() const { return maAnnotations; }
+std::vector> const& 
getAnnotations() const;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 5c393082ad40..b0cb6f105c46 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -365,8 +365,11 @@ public:
 bool IsPrecious() const { return mbIsPrecious; }
 
 rtl::Reference createAnnotation() override;
-void addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex) override;
+void addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex = -1) override;
+void addAnnotationNoNotify(rtl::Reference 
const& xAnnotation, int nIndex = -1) override;
+
 void removeAnnotation(rtl::Reference const& 
xAnnotation) override;
+void removeAnnotationNoNotify(rtl::Reference 
const& xAnnotation) override;
 
 bool Equals(const SdPage&) const;
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 359339c7ff11..915ed33e75a6 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -556,7 +556,17 @@ rtl::Reference 
SdPage::createAnnotation()
 return sd::createAnnotation(this);
 }
 
-void SdPage::addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex )
+void SdPage::addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex)
+{
+addAnnotationNoNotify(xAnnotation, nIndex);
+
+NotifyDocumentEvent(
+static_cast(getSdrModelFromSdrPage()),
+u"OnAnnotationInserted"_ustr,
+
uno::Reference(static_cast(xAnnotation.get()),
 UNO_QUERY));
+}
+
+void SdPage::addAnnotationNoNotify(rtl::Reference 
const& xAnnotation, int nIndex)
 {
 if ((nIndex == -1) || (nIndex > int(maAnnotations.size(
 {
@@ -564,44 +574,49 @@ void 
SdPage::addAnnotation(rtl::Reference const& xA
 }
 else
 {
-maAnnotations.insert( maAnnotations.begin() + nIndex, xAnnotation );
+maAnnotations.insert(maAnnotations.begin() + nIndex, xAnnotation);
 }
 
-if( getSdrModelFromSdrPage().IsUndoEnabled() )
+SdrModel& rModel = getSdrModelFromSdrPage();
+
+if (rModel.IsUndoEnabled())
 {
 rtl::Reference 
xUnconstAnnotation(xAnnotation);
 std::unique_ptr pAction = 
CreateUndoInsertOrRemoveAnnotation(xUnconstAnnotation, true);
 if (pAction)
-getSdrModelFromSdrPage().AddUndo( std::move(pAction) );
+rModel.AddUndo(std::move(pAction));
 }
 
 SetChanged();
-getSdrModelFromSdrPage().SetChanged();
-NotifyDocumentEvent(
-static_cast< SdDrawDocument& >(getSdrModelFromSdrPage()),
-u"OnAnnotationInserted"_ustr,
-
Reference(static_cast(xAnnotation.get()), 
UNO_QUERY));
 }
 
 void SdPage::removeAnnotation(rtl::Reference 
const& xAnnotation)
 {
-if( getSdrModelFromSdrPage().IsUndoEnabled() )
+removeAnnotationNoNotify(xAnnotation);
+
+NotifyDocumentEvent(
+

core.git: include/svx svl/source svx/source

2024-06-05 Thread Caolán McNamara (via logerrit)
 include/svx/xflboxy.hxx   |8 
 svl/source/items/poolitem.cxx |4 ++--
 svx/source/xoutdev/xattr2.cxx |   10 --
 3 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 367ba88092fbc0ba06a7f77157cd012ff0fe3caf
Author: Caolán McNamara 
AuthorDate: Tue Jun 4 09:48:57 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 5 16:56:55 2024 +0200

Related: tdf#153008 bump XFillBmpPosOffsetXItem to sal_Int32

and XFillBmpPosOffsetYItem. To avoid sal_uInt16 overflows on large input
values.

Lets use sal_Int32 instead of sal_uInt32 given the amount of existing
casting to sal_Int32 of XFillBmpPosOffset[X|Y]Item::GetValue()

Change-Id: I8329c11b75c9ad01011e10130257963737ffe553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168398
Reviewed-by: Caolán McNamara 
Reviewed-by: Attila Szűcs 
Tested-by: Jenkins

diff --git a/include/svx/xflboxy.hxx b/include/svx/xflboxy.hxx
index 54d354b52268..acc8fb7fdea7 100644
--- a/include/svx/xflboxy.hxx
+++ b/include/svx/xflboxy.hxx
@@ -23,10 +23,10 @@
 #include 
 #include 
 
-class SVXCORE_DLLPUBLIC XFillBmpPosOffsetXItem final : public SfxUInt16Item
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetXItem final : public SfxInt32Item
 {
 public:
-XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX = 0 );
+XFillBmpPosOffsetXItem( sal_Int32 nOffPosX = 0 );
 
 SVX_DLLPRIVATE virtual XFillBmpPosOffsetXItem* Clone( SfxItemPool* pPool = 
nullptr ) const override;
 
@@ -36,10 +36,10 @@ public:
  OUString , const 
IntlWrapper& ) const override;
 };
 
-class SVXCORE_DLLPUBLIC XFillBmpPosOffsetYItem final : public SfxUInt16Item
+class SVXCORE_DLLPUBLIC XFillBmpPosOffsetYItem final : public SfxInt32Item
 {
 public:
-XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY = 0 );
+XFillBmpPosOffsetYItem( sal_Int32 nOffPosY = 0 );
 
 SVX_DLLPRIVATE virtual XFillBmpPosOffsetYItem* Clone( SfxItemPool* pPool = 
nullptr ) const override;
 
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index de207ef9db25..bd4b62cb1419 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -161,8 +161,8 @@
 //class Svx3DShadeModeItem : public SfxUInt16Item
 //class SdrEdgeLineDeltaCountItem: public SfxUInt16Item
 //class SvxViewLayoutItem: public SfxUInt16Item
-//class XFillBmpPosOffsetXItem : public SfxUInt16Item
-//class XFillBmpPosOffsetYItem : public SfxUInt16Item
+//class XFillBmpPosOffsetXItem : public SfxInt32Item
+//class XFillBmpPosOffsetYItem : public SfxInt32Item
 //class XFillBmpTileOffsetXItem : public SfxUInt16Item
 //class XFillBmpTileOffsetYItem : public SfxUInt16Item
 //class XFillTransparenceItem: public SfxUInt16Item
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index ad1b3b2959e5..7e82a1f0b950 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -631,9 +631,8 @@ void XFillBmpStretchItem::dumpAsXml(xmlTextWriterPtr 
pWriter) const
 (void)xmlTextWriterEndElement(pWriter);
 }
 
-
-XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX ) :
-SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX )
+XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem(sal_Int32 nOffPosX)
+: SfxInt32Item(XATTR_FILLBMP_POSOFFSETX, nOffPosX)
 {
 }
 
@@ -654,9 +653,8 @@ bool XFillBmpPosOffsetXItem::GetPresentation
 return true;
 }
 
-
-XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY ) :
-SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY )
+XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem(sal_Int32 nOffPosY)
+: SfxInt32Item(XATTR_FILLBMP_POSOFFSETY, nOffPosY)
 {
 }
 


core.git: include/svx svx/source

2024-06-05 Thread Tomaž Vajngerl (via logerrit)
 include/svx/annotation/ObjectAnnotationData.hxx |   25 ++
 include/svx/svdobj.hxx  |9 +++
 svx/source/svdraw/svdobj.cxx|   58 +++-
 3 files changed, 71 insertions(+), 21 deletions(-)

New commits:
commit 4cd2737d829e8a3413ad3d60a17dded4dcc8938c
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 5 17:23:22 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 5 15:00:54 2024 +0200

annot: prepare SdrObject to represent an annotation

Change-Id: Iabcc2166ea20cbeac6d2ada7120700a4e8b19303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168428
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/include/svx/annotation/ObjectAnnotationData.hxx 
b/include/svx/annotation/ObjectAnnotationData.hxx
new file mode 100644
index ..bdba8ab5a5b9
--- /dev/null
+++ b/include/svx/annotation/ObjectAnnotationData.hxx
@@ -0,0 +1,25 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+
+namespace sdr::annotation
+{
+/** Contains the annotation data for a SdrObject */
+class ObjectAnnotationData
+{
+public:
+bool mbIsAnnotation : 1 = false;
+rtl::Reference mxAnnotation;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 4e03abf18da3..1dd8dd52eb59 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -87,7 +87,7 @@ namespace basegfx
 namespace sdr { class ObjectUser; }
 namespace sdr::properties { class BaseProperties; }
 namespace sdr::contact { class ViewContact; }
-
+namespace sdr::annotation { class ObjectAnnotationData; }
 namespace com::sun::star::drawing { class XShape; }
 namespace svx::diagram { class IDiagramHelper; }
 
@@ -359,6 +359,11 @@ public:
 virtual void SetDecorative(bool isDecorative);
 virtual bool IsDecorative() const;
 
+// Object representing an annotation
+bool isAnnotationObject() const;
+void setAsAnnotationObject(bool bSetAnnotation);
+std::unique_ptr& 
getAnnotationData();
+
 // for group objects
 bool IsGroupObject() const;
 virtual SdrObjList* GetSubList() const;
@@ -895,6 +900,8 @@ protected:
 // #i25616#
 boolmbSupportTextIndentingOnLineWidthChange : 1;
 
+std::unique_ptr mpAnnotationData;
+
 virtual ~SdrObject() override;
 
 virtual std::unique_ptr 
CreateObjectSpecificProperties() = 0;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b5cd832c096b..9da8c5662f12 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -336,16 +337,17 @@ void impRemoveIncarnatedSdrObjectToSdrModel(SdrObject& 
rSdrObject, SdrModel& rSd
 #endif
 
 SdrObject::SdrObject(SdrModel& rSdrModel)
-:   mpFillGeometryDefiningShape(nullptr)
-,mrSdrModelFromSdrObject(rSdrModel)
-,m_pUserCall(nullptr)
-,mpImpl(new Impl)
-,mpParentOfSdrObject(nullptr)
-,m_nOrdNum(0)
-,mnNavigationPosition(SAL_MAX_UINT32)
-,mnLayerID(0)
-,mpSvxShape( nullptr )
-,mbDoNotInsertIntoPageAutomatically(false)
+: mpFillGeometryDefiningShape(nullptr)
+, mrSdrModelFromSdrObject(rSdrModel)
+, m_pUserCall(nullptr)
+, mpAnnotationData(new sdr::annotation::ObjectAnnotationData)
+, mpImpl(new Impl)
+, mpParentOfSdrObject(nullptr)
+, m_nOrdNum(0)
+, mnNavigationPosition(SAL_MAX_UINT32)
+, mnLayerID(0)
+, mpSvxShape( nullptr )
+, mbDoNotInsertIntoPageAutomatically(false)
 {
 m_bVirtObj =false;
 m_bSnapRectDirty   =true;
@@ -374,16 +376,17 @@ SdrObject::SdrObject(SdrModel& rSdrModel)
 }
 
 SdrObject::SdrObject(SdrModel& rSdrModel, SdrObject const & rSource)
-:   mpFillGeometryDefiningShape(nullptr)
-,mrSdrModelFromSdrObject(rSdrModel)
-,m_pUserCall(nullptr)
-,mpImpl(new Impl)
-,mpParentOfSdrObject(nullptr)
-,m_nOrdNum(0)
-,mnNavigationPosition(SAL_MAX_UINT32)
-,mnLayerID(0)
-,mpSvxShape( nullptr )
-,mbDoNotInsertIntoPageAutomatically(false)
+: mpFillGeometryDefiningShape(nullptr)
+, mrSdrModelFromSdrObject(rSdrModel)
+, m_pUserCall(nullptr)
+, mpAnnotationData(new sdr::annotation::ObjectAnnotationData)
+, mpImpl(new Impl)
+, mpParentOfSdrObject(nullptr)
+, m_nOrdNum(0)
+, mnNavigationPosition(SAL_MAX_UINT32)
+, mnLayerID(0)
+, mpSvxShape( nullptr )
+, mbDoNotInsertIntoPageAutomatically(false)
 {
 m_bVirtObj =false;
 m_bSnapRectDirty   =true;
@@ -889,6 +892,21 @@ bool SdrObject::IsDecorative() const
 

core.git: include/svx svx/source

2024-06-03 Thread Miklos Vajna (via logerrit)
 include/svx/svdundo.hxx   |6 +++---
 svx/source/svdraw/svdundo.cxx |   28 ++--
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 61f5006c18b3194f6aaa03e260425dc878cfff79
Author: Miklos Vajna 
AuthorDate: Mon Jun 3 09:32:38 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jun 3 12:24:08 2024 +0200

svx: prefix members of SdrUndoGeoObj

See tdf#94879 for motivation.

Change-Id: Ic34b5e1c7a1b73d688cc4dfc87c03417fe8e987b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168357
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index e1b778064e6d..bc15932fd81c 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -211,10 +211,10 @@ public:
 
 class SVXCORE_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj
 {
-std::unique_ptr pUndoGeo;
-std::unique_ptr pRedoGeo;
+std::unique_ptr m_pUndoGeo;
+std::unique_ptr m_pRedoGeo;
 // If we have a group object:
-std::unique_ptr pUndoGroup;
+std::unique_ptr m_pUndoGroup;
 /// If we have a table object, should its layout change?
 bool mbSkipChangeLayout;
 
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index c7bb38d81ada..7d98d21b7cb4 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -564,21 +564,21 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj)
 // this is a group object!
 // If this were 3D scene, we'd only add an Undo for the scene itself
 // (which we do elsewhere).
-pUndoGroup.reset(new SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
+m_pUndoGroup.reset(new 
SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
 for (const rtl::Reference& pObj : *pOL)
-pUndoGroup->AddAction(std::make_unique(*pObj));
+m_pUndoGroup->AddAction(std::make_unique(*pObj));
 }
 else
 {
-pUndoGeo = mxObj->GetGeoData();
+m_pUndoGeo = mxObj->GetGeoData();
 }
 }
 
 SdrUndoGeoObj::~SdrUndoGeoObj()
 {
-pUndoGeo.reset();
-pRedoGeo.reset();
-pUndoGroup.reset();
+m_pUndoGeo.reset();
+m_pRedoGeo.reset();
+m_pUndoGroup.reset();
 }
 
 void SdrUndoGeoObj::Undo()
@@ -586,21 +586,21 @@ void SdrUndoGeoObj::Undo()
 // Trigger PageChangeCall
 ImpShowPageOfThisObject();
 
-if(pUndoGroup)
+if(m_pUndoGroup)
 {
-pUndoGroup->Undo();
+m_pUndoGroup->Undo();
 
 // only repaint, no objectchange
 mxObj->ActionChanged();
 }
 else
 {
-pRedoGeo = mxObj->GetGeoData();
+m_pRedoGeo = mxObj->GetGeoData();
 
 auto pTableObj = dynamic_cast(mxObj.get());
 if (pTableObj && mbSkipChangeLayout)
 pTableObj->SetSkipChangeLayout(true);
-mxObj->SetGeoData(*pUndoGeo);
+mxObj->SetGeoData(*m_pUndoGeo);
 if (pTableObj && mbSkipChangeLayout)
 pTableObj->SetSkipChangeLayout(false);
 }
@@ -608,17 +608,17 @@ void SdrUndoGeoObj::Undo()
 
 void SdrUndoGeoObj::Redo()
 {
-if(pUndoGroup)
+if(m_pUndoGroup)
 {
-pUndoGroup->Redo();
+m_pUndoGroup->Redo();
 
 // only repaint, no objectchange
 mxObj->ActionChanged();
 }
 else
 {
-pUndoGeo = mxObj->GetGeoData();
-mxObj->SetGeoData(*pRedoGeo);
+m_pUndoGeo = mxObj->GetGeoData();
+mxObj->SetGeoData(*m_pRedoGeo);
 }
 
 // Trigger PageChangeCall


core.git: include/svx svx/source

2024-06-02 Thread Xisco Fauli (via logerrit)
 include/svx/svdmrkv.hxx|2 +-
 svx/source/svdraw/svdedtv1.cxx |9 +++--
 svx/source/svdraw/svdmrkv.cxx  |   25 +++--
 3 files changed, 23 insertions(+), 13 deletions(-)

New commits:
commit cb982975c16e380f88282f03d07f8cfb8421ed77
Author: Xisco Fauli 
AuthorDate: Fri May 31 13:47:04 2024 +0200
Commit: Xisco Fauli 
CommitDate: Sun Jun 2 20:45:56 2024 +0200

svx: use SAL_RET_MAYBENULL in GetSfxViewShell()

Change-Id: I05e66544c08a1ed55a5571f6061b23346235224e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168293
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins

diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 4cffc9c3de88..b4958bb3f7fd 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -438,7 +438,7 @@ public:
 const Point& GetRef2() const { return maRef2; }
 SAL_DLLPRIVATE void SetRef2(const Point& rPt);
 /// Get access to the view shell owning this draw view, if any.
-virtual SfxViewShell* GetSfxViewShell() const;
+SAL_RET_MAYBENULL virtual SfxViewShell* GetSfxViewShell() const;
 };
 
 
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index cff6238b8005..bf1cc6f9a638 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1035,8 +1035,13 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, 
bool bOnlyHardAttr) con
 }
 
 if (!sPayload.isEmpty())
-
GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
-OUStringToOString(sPayload, 
RTL_TEXTENCODING_ASCII_US));
+{
+if (SfxViewShell* pViewShell = GetSfxViewShell())
+{
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+OUStringToOString(sPayload, 
RTL_TEXTENCODING_ASCII_US));
+}
+}
 }
 
 nWhich = aIter.NextWhich();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 1b44fb021edf..d79a899de4c8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -257,12 +257,15 @@ void SdrMarkView::modelHasChangedLOKit()
 const vcl::Window* pWin = pOut ? pOut->GetOwnerWindow() : nullptr;
 if (pWin && pWin->IsChart())
 {
-const vcl::Window* pViewShellWindow = 
GetSfxViewShell()->GetEditWindowForActiveOLEObj();
-if (pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin))
+if (SfxViewShell* pViewShell = GetSfxViewShell())
 {
-Point aOffsetPx = 
pWin->GetOffsetPixelFrom(*pViewShellWindow);
-Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
-aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY());
+const vcl::Window* pViewShellWindow = 
pViewShell->GetEditWindowForActiveOLEObj();
+if (pViewShellWindow && 
pViewShellWindow->IsAncestorOf(*pWin))
+{
+Point aOffsetPx = 
pWin->GetOffsetPixelFrom(*pViewShellWindow);
+Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
+aSelection.Move(aLogicOffset.getX(), 
aLogicOffset.getY());
+}
 }
 }
 }
@@ -881,7 +884,8 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 }
 
 // hide the text selection too
-pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, 
""_ostr);
+if (pViewShell)
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""_ostr);
 }
 
 {
@@ -1022,7 +1026,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 + "]");
 
 // polygon approximating the pie segment or 
donut segment
-if (pO->GetObjIdentifier() == 
SdrObjKind::PathFill)
+if (pViewShell && pO->GetObjIdentifier() == 
SdrObjKind::PathFill)
 {
 const basegfx::B2DPolyPolygon 
aPolyPolygon(pO->TakeXorPoly());
 if (aPolyPolygon.count() == 1)
@@ -1199,7 +1203,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 {
 sSelectionText = "EMPTY"_ostr;
 sSelectionTextView = "EMPTY"_ostr;
-if (!pOtherShell)
+if (!pOtherShell && pViewShell)
 pViewShell->NotifyOtherViews(LOK_CALLBACK_TEXT_VIEW_SELECTION, 
"selection"_ostr, OString());
 }
 
@@ -1214,9 +1218,10 @@ void 
SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & 

core.git: include/svx reportdesign/source sd/source svx/source

2024-05-29 Thread Xisco Fauli (via logerrit)
 include/svx/svdmrkv.hxx   |1 
 reportdesign/source/ui/report/ViewsWindow.cxx |4 +-
 sd/source/ui/view/sdview2.cxx |4 +-
 sd/source/ui/view/sdview3.cxx |2 -
 svx/source/engine3d/view3d.cxx|6 ++--
 svx/source/svdraw/svddrgmt.cxx|8 ++---
 svx/source/svdraw/svdedtv.cxx |6 ++--
 svx/source/svdraw/svdedtv1.cxx|   36 +-
 svx/source/svdraw/svdedtv2.cxx|   32 +++
 svx/source/svdraw/svdglev.cxx |8 ++---
 svx/source/svdraw/svdmrkv.cxx |   34 
 svx/source/svdraw/svdmrkv1.cxx|   26 +-
 svx/source/svdraw/svdpoev.cxx |   18 ++---
 svx/source/svdraw/svdxcgv.cxx |4 +-
 14 files changed, 94 insertions(+), 95 deletions(-)

New commits:
commit 4c5485ef6826b5b2483df869056aac4499aff229
Author: Xisco Fauli 
AuthorDate: Wed May 29 12:37:42 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed May 29 15:50:27 2024 +0200

svx: GetSdrMarkByIndex -> GetMarkedObjectList().GetMark

In order to reduce number of calls to GetMarkedObjectList() later on

Change-Id: Iec0ad9ed33329719116e39232f86d92dbd6e0da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168211
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index edcc0678b676..8838005e3d21 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -261,7 +261,6 @@ public:
 // returns SAL_MAX_SIZE if not found
 size_t TryToFindMarkedObject(const SdrObject* pObj) const { return 
GetMarkedObjectList().FindObject(pObj); }
 SdrPageView* GetSdrPageViewOfMarkedByIndex(size_t nNum) const { return 
GetMarkedObjectList().GetMark(nNum)->GetPageView(); }
-SdrMark* GetSdrMarkByIndex(size_t nNum) const { return 
GetMarkedObjectList().GetMark(nNum); }
 SdrObject* GetMarkedObjectByIndex(size_t nNum) const { return 
GetMarkedObjectList().GetMark(nNum)->GetMarkedSdrObj(); }
 size_t GetMarkedObjectCount() const { return 
GetMarkedObjectList().GetMarkCount(); }
 void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); }
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index 44c3c4285e38..c04a01b2d53e 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -631,7 +631,7 @@ void OViewsWindow::collectRectangles(TRectangleMap& 
_rSortRectangles)
 const size_t nCount = rView.GetMarkedObjectCount();
 for (size_t i=0; i < nCount; ++i)
 {
-const SdrMark* pM = rView.GetSdrMarkByIndex(i);
+const SdrMark* pM = rView.GetMarkedObjectList().GetMark(i);
 SdrObject* pObj = pM->GetMarkedSdrObj();
 tools::Rectangle aObjRect(pObj->GetSnapRect());
 
_rSortRectangles.emplace(aObjRect,TRectangleMap::mapped_type(pObj,));
@@ -1027,7 +1027,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* 
_pHdl,const OSectionVi
 const size_t nCount = rView.GetMarkedObjectCount();
 for (size_t i=0; i < nCount; ++i)
 {
-const SdrMark* pM = rView.GetSdrMarkByIndex(i);
+const SdrMark* pM = rView.GetMarkedObjectList().GetMark(i);
 SdrObject* pObj = pM->GetMarkedSdrObj();
 if 
(::std::find(m_aBegDragTempList.begin(),m_aBegDragTempList.end(),pObj) == 
m_aBegDragTempList.end())
 {
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 9703c7c3f022..2ce09acf8b32 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -453,7 +453,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, 
DropTargetHelper& rTarge
 
 if (GetMarkedObjectCount() == 1)
 {
-SdrMark* pMark = GetSdrMarkByIndex(0);
+SdrMark* pMark = GetMarkedObjectList().GetMark(0);
 SdrObject* pObj = pMark->GetMarkedSdrObj();
 aRect.Union( pObj->GetLogicRect() );
 }
@@ -634,7 +634,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
 
 if( GetMarkedObjectCount() == 1 )
 {
-SdrMark* pMark = GetSdrMarkByIndex(0);
+SdrMark* pMark = GetMarkedObjectList().GetMark(0);
 SdrObject* pObj = pMark->GetMarkedSdrObj();
 aRect.Union( pObj->GetLogicRect() );
 }
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index a40edc2baed1..6df4d8161548 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -405,7 +405,7 @@ bool View::InsertData( const TransferableDataHelper& 

core.git: include/svx svx/source

2024-05-27 Thread Miklos Vajna (via logerrit)
 include/svx/fmview.hxx |   10 ++--
 svx/source/form/fmview.cxx |  106 ++---
 2 files changed, 58 insertions(+), 58 deletions(-)

New commits:
commit 2ef33247b7a3c07dde18d3cd6fd989fcb8ea4ddc
Author: Miklos Vajna 
AuthorDate: Mon May 27 08:11:33 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 27 10:45:40 2024 +0200

svx: prefix members of FmFormView

See tdf#94879 for motivation.

Change-Id: I142e2259e150fd0247193dcb941fb2fe37018486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168083
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index a1a08de5e56b..e601047eff00 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -53,8 +53,8 @@ namespace com::sun::star::form {
 
 class SVXCORE_DLLPUBLIC FmFormView : public E3dView
 {
-rtl::Reference pImpl;
-FmFormShell*pFormShell;
+rtl::Reference m_pImpl;
+FmFormShell*m_pFormShell;
 
 void Init();
 
@@ -128,11 +128,11 @@ public:
 
 SVX_DLLPRIVATE void ChangeDesignMode(bool bDesign);
 
-SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl.get(); }
-SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; }
+SVX_DLLPRIVATE FmXFormView* GetImpl() const { return m_pImpl.get(); }
+SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return m_pFormShell; }
 
 struct FormShellAccess { friend class FmFormShell; private: 
FormShellAccess() { } };
- void SetFormShell( FmFormShell* pShell, FormShellAccess ) { pFormShell = 
pShell; }
+ void SetFormShell( FmFormShell* pShell, FormShellAccess ) { m_pFormShell 
= pShell; }
 
 struct ImplAccess { friend class FmXFormView; private: ImplAccess() { } };
 void SetMoveOutside( bool _bMoveOutside, ImplAccess ) { 
E3dView::SetMoveOutside( _bMoveOutside ); }
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 2a07073d66b9..a26895653833 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -72,8 +72,8 @@ FmFormView::FmFormView(
 
 void FmFormView::Init()
 {
-pFormShell = nullptr;
-pImpl = new FmXFormView(this);
+m_pFormShell = nullptr;
+m_pImpl = new FmXFormView(this);
 
 // set model
 SdrModel* pModel = ();
@@ -114,10 +114,10 @@ void FmFormView::Init()
 
 FmFormView::~FmFormView()
 {
-if (pFormShell)
-suppress_fun_call_w_exception(pFormShell->SetView(nullptr));
+if (m_pFormShell)
+suppress_fun_call_w_exception(m_pFormShell->SetView(nullptr));
 
-pImpl->notifyViewDying();
+m_pImpl->notifyViewDying();
 }
 
 FmFormPage* FmFormView::GetCurPage()
@@ -131,23 +131,23 @@ void FmFormView::MarkListHasChanged()
 {
 E3dView::MarkListHasChanged();
 
-if ( !(pFormShell && IsDesignMode()) )
+if ( !(m_pFormShell && IsDesignMode()) )
 return;
 
 FmFormObj* pObj = getMarkedGrid();
-if ( pImpl->m_pMarkedGrid && pImpl->m_pMarkedGrid != pObj )
+if ( m_pImpl->m_pMarkedGrid && m_pImpl->m_pMarkedGrid != pObj )
 {
-pImpl->m_pMarkedGrid = nullptr;
-if ( pImpl->m_xWindow.is() )
+m_pImpl->m_pMarkedGrid = nullptr;
+if ( m_pImpl->m_xWindow.is() )
 {
-pImpl->m_xWindow->removeFocusListener(pImpl);
-pImpl->m_xWindow = nullptr;
+m_pImpl->m_xWindow->removeFocusListener(m_pImpl);
+m_pImpl->m_xWindow = nullptr;
 }
 SetMoveOutside(false);
 //OLMRefreshAllIAOManagers();
 }
 
-pFormShell->GetImpl()->SetSelectionDelayed_Lock();
+m_pFormShell->GetImpl()->SetSelectionDelayed_Lock();
 }
 
 namespace
@@ -179,7 +179,7 @@ void FmFormView::AddDeviceToPaintView(OutputDevice& 
rNewDev, vcl::Window* pWindo
 // #i39269# / 2004-12-20 / frank.schoenh...@sun.com
 const SdrPageWindow* pPageWindow = findPageWindow( this,  );
 if ( pPageWindow )
-pImpl->addWindow( *pPageWindow );
+m_pImpl->addWindow( *pPageWindow );
 }
 
 
@@ -187,7 +187,7 @@ void FmFormView::DeleteDeviceFromPaintView(OutputDevice& 
rNewDev)
 {
 const SdrPageWindow* pPageWindow = findPageWindow( this,  );
 if ( pPageWindow )
-pImpl->removeWindow( pPageWindow->GetControlContainer() );
+m_pImpl->removeWindow( pPageWindow->GetControlContainer() );
 
 E3dView::DeleteDeviceFromPaintView(rNewDev);
 }
@@ -211,10 +211,10 @@ void FmFormView::ChangeDesignMode(bool bDesign)
 DeactivateControls( GetSdrPageView() );
 
 // --- 2. simulate a deactivation (the shell will handle some things there 
...?)
-if ( pFormShell && pFormShell->GetImpl() )
-pFormShell->GetImpl()->viewDeactivated_Lock(*this);
+if ( m_pFormShell && m_pFormShell->GetImpl() )
+m_pFormShell->GetImpl()->viewDeactivated_Lock(*this);
 else
-pImpl->Deactivate();
+m_pImpl->Deactivate();
 
 // --- 3. activate all controls, if we're switching to alive mode
 if ( 

core.git: include/svx svx/source

2024-05-26 Thread Caolán McNamara (via logerrit)
 include/svx/gridctrl.hxx   |   15 -
 svx/source/fmcomp/gridctrl.cxx |  112 +++--
 2 files changed, 100 insertions(+), 27 deletions(-)

New commits:
commit f0960e05c2f540c99062867236419c2a70c1160b
Author: Caolán McNamara 
AuthorDate: Sun May 19 20:29:26 2024 +0100
Commit: Caolán McNamara 
CommitDate: Sun May 26 20:21:10 2024 +0200

Resolves: tdf#155364 resize buttons and change widget font sizes on zoom

Change-Id: Ied951e6c96881bd56a40ae01077cd7f76f9b7853
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168071
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 27d7f25c7cf2..09c2a609a483 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -161,6 +161,7 @@ enum class DbGridControlNavigationBarState
 
 class FmXGridSourcePropListener;
 class DisposeListenerGridBridge;
+class DbGridControl;
 
 // NavigationBar
 class NavigationBar final : public InterimItemWindow
@@ -195,21 +196,26 @@ class NavigationBar final : public InterimItemWindow
 std::shared_ptr m_xPrevRepeater;
 std::shared_ptr m_xNextRepeater;
 
+Size m_aLastAllocSize;
+
 sal_Int32m_nCurrentPos;
 
 bool m_bPositioning; // protect PositionDataSource 
against recursion
 
 public:
-NavigationBar(vcl::Window* pParent);
+NavigationBar(DbGridControl* pParent);
 virtual ~NavigationBar() override;
 virtual void dispose() override;
 
+DECL_LINK(SizeAllocHdl, const Size&, void);
+
 // Status methods for Controls
 void InvalidateAll(sal_Int32 nCurrentPos, bool bAll = false);
 void InvalidateState(DbGridControlNavigationBarState nWhich) 
{SetState(nWhich);}
 void SetState(DbGridControlNavigationBarState nWhich);
 bool GetState(DbGridControlNavigationBarState nWhich) const;
-sal_uInt16 ArrangeControls();
+void SetPointFontAndZoom(const vcl::Font& rFont, const Fraction& rZoom);
+sal_uInt16 GetPreferredWidth() const;
 
 private:
 
@@ -278,6 +284,8 @@ private:
 osl::Mutex  m_aDestructionSafety;
 osl::Mutex  m_aAdjustSafety;
 
+Idlem_aRearrangeIdle;
+
 css::util::Date
 m_aNullDate;// NullDate of the Numberformatter;
 
@@ -552,6 +560,8 @@ public:
 css::accessibility::XAccessible >
 CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
 
+void RearrangeAtIdle();
+
 protected:
 void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool 
bUpdateCursor);
 bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
@@ -588,6 +598,7 @@ protected:
 protected:
 void ImplInitWindow( const InitWindowFacet _eInitWhat );
 DECL_DLLPRIVATE_LINK(OnDelete, void*, void);
+DECL_DLLPRIVATE_LINK(RearrangeHdl, Timer*, void);
 
 DECL_DLLPRIVATE_LINK(OnAsyncAdjust, void*, void);
 // if the param is != NULL, AdjustRows will be called, else 
AdjustDataSource
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index e6e3f8b40bc2..faedec67aa66 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -302,7 +303,7 @@ void NavigationBar::PositionDataSource(sal_Int32 nRecord)
 m_bPositioning = false;
 }
 
-NavigationBar::NavigationBar(vcl::Window* pParent)
+NavigationBar::NavigationBar(DbGridControl* pParent)
 : InterimItemWindow(pParent, u"svx/ui/navigationbar.ui"_ustr, 
u"NavigationBar"_ustr)
 , m_xRecordText(m_xBuilder->weld_label(u"recordtext"_ustr))
 , m_xAbsolute(new 
NavigationBar::AbsolutePos(m_xBuilder->weld_entry(u"entry-noframe"_ustr), this))
@@ -318,13 +319,6 @@ NavigationBar::NavigationBar(vcl::Window* pParent)
 , m_nCurrentPos(-1)
 , m_bPositioning(false)
 {
-vcl::Font 
aApplFont(Application::GetSettings().GetStyleSettings().GetToolFont());
-m_xAbsolute->set_font(aApplFont);
-aApplFont.SetTransparent(true);
-m_xRecordText->set_font(aApplFont);
-m_xRecordOf->set_font(aApplFont);
-m_xRecordCount->set_font(aApplFont);
-
 m_xFirstBtn->set_help_id(HID_GRID_TRAVEL_FIRST);
 m_xPrevBtn->set_help_id(HID_GRID_TRAVEL_PREV);
 m_xNextBtn->set_help_id(HID_GRID_TRAVEL_NEXT);
@@ -342,9 +336,18 @@ NavigationBar::NavigationBar(vcl::Window* pParent)
 m_xRecordOf->set_label(SvxResId(RID_STR_REC_FROM_TEXT));
 m_xRecordCount->set_label(OUString('?'));
 
-auto nReserveWidth = m_xRecordCount->get_approximate_digit_width() * 
nReserveNumDigits;
-m_xAbsolute->GetWidget()->set_size_request(nReserveWidth, -1);
-m_xRecordCount->set_size_request(nReserveWidth, -1);
+vcl::Font 
aApplFont(Application::GetSettings().GetStyleSettings().GetToolFont());
+SetPointFontAndZoom(aApplFont, Fraction(1, 1));
+
+

core.git: include/svx svx/source

2024-05-21 Thread Miklos Vajna (via logerrit)
 include/svx/svdundo.hxx   |2 +-
 svx/source/svdraw/svdundo.cxx |   10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f2ba39c5e7ae28a832e707667a0a61736f65ebda
Author: Miklos Vajna 
AuthorDate: Tue May 21 08:32:27 2024 +0200
Commit: Miklos Vajna 
CommitDate: Tue May 21 13:05:42 2024 +0200

svx: prefix members of SdrUndoDelPage

See tdf#94879 for motivation.

Change-Id: I6ef4ca1df66f22e4fb6a13a7b39ca0152484fd6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167883
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 5af5c584eda1..e1b778064e6d 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -594,7 +594,7 @@ class SVXCORE_DLLPUBLIC SdrUndoDelPage final : public 
SdrUndoPageList
 {
 // When deleting a MasterPage, we remember all relations of the
 // Character Page with the MasterPage in this UndoGroup.
-std::unique_ptr pUndoGroup;
+std::unique_ptr m_pUndoGroup;
 std::unique_ptr mpFillBitmapItem;
 bool mbHasFillBitmap;
 
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 1b52ee945957..bec090c6339c 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1408,12 +1408,12 @@ SdrUndoDelPage::SdrUndoDelPage(SdrPage& rNewPg)
 
 if(mxPage.get() == )
 {
-if(!pUndoGroup)
+if(!m_pUndoGroup)
 {
-pUndoGroup.reset( new SdrUndoGroup(m_rMod) );
+m_pUndoGroup.reset( new SdrUndoGroup(m_rMod) );
 }
 
-
pUndoGroup->AddAction(m_rMod.GetSdrUndoFactory().CreateUndoPageRemoveMasterPage(*pDrawPage));
+
m_pUndoGroup->AddAction(m_rMod.GetSdrUndoFactory().CreateUndoPageRemoveMasterPage(*pDrawPage));
 }
 }
 }
@@ -1428,10 +1428,10 @@ void SdrUndoDelPage::Undo()
 if (bool(mpFillBitmapItem))
 restoreFillBitmap();
 ImpInsertPage(nPageNum);
-if (pUndoGroup!=nullptr)
+if (m_pUndoGroup!=nullptr)
 {
 // recover master page relationships
-pUndoGroup->Undo();
+m_pUndoGroup->Undo();
 }
 }
 


core.git: include/svx sd/source svx/sdi svx/source svx/uiconfig sw/inc sw/sdi sw/source

2024-05-16 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/nbdtmg.hxx   |3 
 include/svx/numvset.hxx  |7 ++
 include/svx/svxids.hrc   |7 +-
 sd/source/ui/func/fuolbull.cxx   |2 
 svx/sdi/svx.sdi  |   18 +
 svx/source/dialog/svxbmpnumvalueset.cxx  |   26 +++-
 svx/source/sidebar/nbdtmg.cxx|   24 +++
 svx/source/tbxctrls/bulletsnumbering.cxx |  100 +--
 svx/uiconfig/ui/numberingwindow.ui   |   69 +
 sw/inc/doc.hxx   |1 
 sw/inc/editsh.hxx|1 
 sw/sdi/_textsh.sdi   |5 +
 sw/source/core/doc/docnum.cxx|   20 ++
 sw/source/core/edit/ednumber.cxx |5 +
 sw/source/uibase/shells/textsh1.cxx  |   10 +++
 sw/source/uibase/shells/txtnum.cxx   |   18 -
 16 files changed, 300 insertions(+), 16 deletions(-)

New commits:
commit c8a5dc46d11f2ef1e3a66d633730d9a700ced24a
Author: Samuel Mehrbrodt 
AuthorDate: Mon May 6 09:20:58 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu May 16 09:17:09 2024 +0200

tdf#161056 Show bullets used in document in bullets dropdown

Change-Id: I40cfc39501006146f7c6c04a1f3c7cf877c6f1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167186
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 894304e4c37d..8979b736e40c 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -145,7 +145,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
 };
 
 
-class BulletsTypeMgr final : public NBOTypeMgrBase
+class SVX_DLLPUBLIC BulletsTypeMgr final : public NBOTypeMgrBase
 {
 friend class OutlineTypeMgr;
 friend class NumberingTypeMgr;
@@ -161,6 +161,7 @@ class BulletsTypeMgr final : public NBOTypeMgrBase
 virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 
mLevel,sal_uInt16 nFromIndex=0) override;
 virtual void ReplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, 
sal_uInt16 mLevel) override;
 virtual void ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, 
sal_uInt16 mLevel, bool isDefault=false,bool isResetSize=false) override;
+void ApplyCustomRule(SvxNumRule& aNum, std::u16string_view sBullet, 
std::u16string_view sFont, sal_uInt16 mLevel,bool isResetSize=false);
 virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) 
override;
 virtual bool IsCustomized(sal_uInt16 nIndex) override;
 static BulletsTypeMgr& GetInstance();
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index 059d6b7bc558..d3b6e71a69e1 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -40,6 +40,7 @@ namespace com::sun::star {
 
 enum class NumberingPageType
 {
+DOCBULLET,
 BULLET,
 SINGLENUM,
 OUTLINE,
@@ -55,6 +56,9 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
 css::uno::Reference xFormatter;
 css::lang::Locale aLocale;
 
+// Pair of bullet chars (first), and their respective font (second)
+std::vector> maCustomBullets;
+
 css::uno::Sequence<
 css::uno::Sequence<
 css::beans::PropertyValue> > aNumSettings;
@@ -82,6 +86,9 @@ public:
 css::uno::Reference const & 
xFormatter,
 const css::lang::Locale& rLocale);
 
+std::vector> GetCustomBullets() { return 
maCustomBullets; }
+void SetCustomBullets(std::vector> 
aCustomBullets);
+
 virtual FactoryFunction GetUITestFactory() const override;
 
 };
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index b4e1a91d386a..68d02d4a86fc 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -185,6 +185,7 @@ class XFillGradientItem;
 #define FN_BUL_NUM_RULE_INDEX   TypedWhichId(FN_EDIT + 120) // 
achieving num rule index
 #define FN_NUM_NUM_RULE_INDEX   TypedWhichId(FN_EDIT + 121)
 #define FN_OUTLINE_RULE_INDEX   TypedWhichId(FN_EDIT + 122)
+#define FN_BUL_GET_DOC_BULLETS  TypedWhichId(FN_EDIT + 123)
 
 #define FN_INSERT   (SID_SW_START +  300) // 20300
 #define FN_DELETE_BOOKMARK  TypedWhichId(FN_INSERT + 1)
@@ -1058,8 +1059,12 @@ class XFillGradientItem;
 #define SID_CHAR_DLG_FOR_PARAGRAPH  ( SID_SVX_START + 1210 
)
 #define SID_SET_DOCUMENT_LANGUAGE   
TypedWhichId( SID_SVX_START + 1211 )
 
+#define SID_ATTR_BULLET_CHAR
TypedWhichId(SID_SVX_START + 1212)
+#define SID_ATTR_BULLET_FONT
TypedWhichId(SID_SVX_START + 1213)
+#define SID_ATTR_BULLET_INDEX   
TypedWhichId(SID_SVX_START + 1214)
+
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1211 
+ 1 )
+#define SID_SVX_FIRSTFREE   ( SID_SVX_START + 1214 
+ 1 )
 
 
 // Overflow check for slot IDs
diff 

core.git: include/svx svx/source

2024-05-13 Thread Miklos Vajna (via logerrit)
 include/svx/svdundo.hxx   |   10 +++
 svx/source/svdraw/svdundo.cxx |   56 +-
 2 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit 74bd51629eed7eb34aef9acbb93c110525f8ef7d
Author: Miklos Vajna 
AuthorDate: Mon May 13 08:33:27 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 13 10:32:50 2024 +0200

svx: prefix members of SdrUndoAttrObj

See tdf#94879 for motivation.

Change-Id: Icecf1b75055c9f487d35ae72589ccb6197cfeaff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167566
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 824f36f06efc..5af5c584eda1 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -155,17 +155,17 @@ class SVXCORE_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
 // FIXME: Or should we better remember the StyleSheetNames?
 rtl::Reference< SfxStyleSheet > mxUndoStyleSheet;
 rtl::Reference< SfxStyleSheet > mxRedoStyleSheet;
-bool bStyleSheet;
-bool bHaveToTakeRedoSet;
+bool m_bStyleSheet;
+bool m_bHaveToTakeRedoSet;
 
 // When assigning TextItems to a drawing object with text:
-std::optional pTextUndo;
+std::optional m_pTextUndo;
 // #i8508#
 // The text rescue mechanism needs also to be implemented for redo actions.
-std::optional pTextRedo;
+std::optional m_pTextRedo;
 
 // If we have a group object:
-std::unique_ptr pUndoGroup;
+std::unique_ptr m_pUndoGroup;
 
 protected:
 // Helper to ensure StyleSheet is in pool (provided by SdrModel from 
SdrObject)
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 18b248ba5960..1b52ee945957 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -250,9 +250,9 @@ void 
SdrUndoAttrObj::ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rSt
 
 SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool 
bSaveText)
 : SdrUndoObj(rNewObj)
-, bHaveToTakeRedoSet(true)
+, m_bHaveToTakeRedoSet(true)
 {
-bStyleSheet = bStyleSheet1;
+m_bStyleSheet = bStyleSheet1;
 
 SdrObjList* pOL = rNewObj.GetSubList();
 bool bIsGroup(pOL!=nullptr && pOL->GetObjCount());
@@ -261,11 +261,11 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool 
bStyleSheet1, bool bSave
 if(bIsGroup)
 {
 // it's a group object!
-pUndoGroup.reset(new SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
+m_pUndoGroup.reset(new 
SdrUndoGroup(mxObj->getSdrModelFromSdrObject()));
 
 for (const rtl::Reference& pObj : *pOL)
 {
-pUndoGroup->AddAction(
+m_pUndoGroup->AddAction(
 std::make_unique(*pObj, bStyleSheet1));
 }
 }
@@ -275,14 +275,14 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool 
bStyleSheet1, bool bSave
 
 moUndoSet.emplace( mxObj->GetMergedItemSet() );
 
-if(bStyleSheet)
+if(m_bStyleSheet)
 mxUndoStyleSheet = mxObj->GetStyleSheet();
 
 if(bSaveText)
 {
 auto p = mxObj->GetOutlinerParaObject();
 if(p)
-pTextUndo = *p;
+m_pTextUndo = *p;
 }
 }
 
@@ -290,9 +290,9 @@ SdrUndoAttrObj::~SdrUndoAttrObj()
 {
 moUndoSet.reset();
 moRedoSet.reset();
-pUndoGroup.reset();
-pTextUndo.reset();
-pTextRedo.reset();
+m_pUndoGroup.reset();
+m_pTextUndo.reset();
+m_pTextRedo.reset();
 }
 
 void SdrUndoAttrObj::Undo()
@@ -303,27 +303,27 @@ void SdrUndoAttrObj::Undo()
 // Trigger PageChangeCall
 ImpShowPageOfThisObject();
 
-if(!pUndoGroup || bIs3DScene)
+if(!m_pUndoGroup || bIs3DScene)
 {
-if(bHaveToTakeRedoSet)
+if(m_bHaveToTakeRedoSet)
 {
-bHaveToTakeRedoSet = false;
+m_bHaveToTakeRedoSet = false;
 
 moRedoSet.emplace( mxObj->GetMergedItemSet() );
 
-if(bStyleSheet)
+if(m_bStyleSheet)
 mxRedoStyleSheet = mxObj->GetStyleSheet();
 
-if(pTextUndo)
+if(m_pTextUndo)
 {
 // #i8508#
 auto p = mxObj->GetOutlinerParaObject();
 if(p)
-pTextRedo = *p;
+m_pTextRedo = *p;
 }
 }
 
-if(bStyleSheet)
+if(m_bStyleSheet)
 {
 mxRedoStyleSheet = mxObj->GetStyleSheet();
 SfxStyleSheet* pSheet = mxUndoStyleSheet.get();
@@ -392,15 +392,15 @@ void SdrUndoAttrObj::Undo()
 
 mxObj->GetProperties().BroadcastItemChange(aItemChange);
 
-if(pTextUndo)
+if(m_pTextUndo)
 {
-mxObj->SetOutlinerParaObject(*pTextUndo);
+mxObj->SetOutlinerParaObject(*m_pTextUndo);
 }
 }
 
-if(pUndoGroup)
+if(m_pUndoGroup)
 {
-pUndoGroup->Undo();
+m_pUndoGroup->Undo();
 }
 }
 
@@ 

core.git: include/svx svx/inc svx/qa svx/source

2024-05-11 Thread Noel Grandin (via logerrit)
 include/svx/ClassificationField.hxx|   
 2 
 include/svx/hdft.hxx   |   
 8 
 include/svx/svxdlg.hxx |   
 2 
 svx/inc/sdr/primitive2d/primitivefactory2d.hxx |   
 4 
 svx/qa/unit/XTableImportExportTest.cxx |   
 8 
 svx/qa/unit/classicshapes.cxx  |   
 6 
 svx/qa/unit/core.cxx   |   
11 
 svx/qa/unit/customshapes.cxx   |   
51 +-
 svx/qa/unit/gallery/test_gallery.cxx   |   
 8 
 svx/qa/unit/gluepointTest.cxx  |   
 4 
 svx/qa/unit/sdr.cxx|   
42 -
 svx/qa/unit/svdraw.cxx |  
154 +++---
 svx/qa/unit/svdraw/test_SdrTextObject.cxx  |   
 2 
 svx/qa/unit/table.cxx  |   
40 -
 svx/qa/unit/unodraw.cxx|   
53 +-
 svx/qa/unit/xml.cxx|   
 4 
 svx/qa/unit/xoutdev.cxx|   
14 
 svx/source/accessibility/AccessibleControlShape.cxx|   
 6 
 svx/source/accessibility/AccessibleGraphicShape.cxx|   
 4 
 svx/source/accessibility/AccessibleOLEShape.cxx|   
 4 
 svx/source/accessibility/AccessibleShape.cxx   |   
22 
 svx/source/accessibility/AccessibleTextHelper.cxx  |   
26 -
 svx/source/accessibility/DescriptionGenerator.cxx  |   
 2 
 svx/source/accessibility/GraphCtlAccessibleContext.cxx |   
10 
 svx/source/accessibility/SvxShapeTypes.cxx |   
62 +-
 svx/source/accessibility/charmapacc.cxx|   
 2 
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx  |   
 4 
 svx/source/accessibility/svxrectctaccessiblecontext.cxx|   
 2 
 svx/source/core/graphichelper.cxx  |   
18 
 svx/source/customshapes/EnhancedCustomShape2d.cxx  |   
16 
 svx/source/customshapes/EnhancedCustomShape3d.cxx  |   
60 +-
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx  |   
 6 
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx|   
 4 
 svx/source/diagram/IDiagramHelper.cxx  |   
 2 
 svx/source/dialog/ClassificationCommon.cxx |   
 4 
 svx/source/dialog/ClassificationDialog.cxx |   
44 -
 svx/source/dialog/FileExportedDialog.cxx   |   
 7 
 svx/source/dialog/GenericCheckDialog.cxx   |   
15 
 svx/source/dialog/SafeModeDialog.cxx   |   
48 -
 svx/source/dialog/SafeModeUI.cxx   |   
 4 
 svx/source/dialog/ThemeColorEditDialog.cxx |   
32 -
 svx/source/dialog/ThemeDialog.cxx  |   
 6 
 svx/source/dialog/_bmpmask.cxx |   
56 +-
 svx/source/dialog/_contdlg.cxx |   
98 ++--
 svx/source/dialog/charmap.cxx  |   
 8 
 svx/source/dialog/compressgraphicdialog.cxx|   
54 +-
 svx/source/dialog/contwnd.cxx  |   
 4 
 svx/source/dialog/ctredlin.cxx |   
66 +-
 svx/source/dialog/cuicharmap.cxx   |   
42 -
 svx/source/dialog/dialcontrol.cxx  |   
 2 
 svx/source/dialog/dlgctl3d.cxx |   
 2 
 svx/source/dialog/dlgctrl.cxx  |   
16 
 svx/source/dialog/docrecovery.cxx  |   
36 -
 svx/source/dialog/fontwork.cxx |   
50 +-
 svx/source/dialog/gotodlg.cxx  |   
 8 
 svx/source/dialog/hdft.cxx |   
60 +-
 svx/source/dialog/imapdlg.cxx  |  
142 ++---
 svx/source/dialog/imapwnd.cxx  |   
50 +-
 

core.git: include/svx svx/source sw/source

2024-05-10 Thread Michael Stahl (via logerrit)
 include/svx/svdobj.hxx   |8 
 include/svx/svdovirt.hxx |4 
 svx/source/svdraw/svdobj.cxx |   10 ++
 svx/source/svdraw/svdovirt.cxx   |   20 
 sw/source/core/draw/dcontact.cxx |5 +++--
 5 files changed, 41 insertions(+), 6 deletions(-)

New commits:
commit 9fb9bd54a82ee20f5916aa68e428e0fb67f02ed6
Author: Michael Stahl 
AuthorDate: Wed May 8 14:20:26 2024 +0200
Commit: Michael Stahl 
CommitDate: Fri May 10 10:08:20 2024 +0200

tdf#156484 svx,sw: fix visibility of shapes in header/footer

Similar to commit ae132145ff42a95dc24fb124847c04af4b8c8dab, also forward
IsVisible() and IsPrintable() from SdrVirtObj to its real object;
evidently the properties aren't copied when creating SdrVirtObj but
there is no reason for that to have these properties independent.

This triggers an assert in VOCOfDrawVirtObj::createPrimitive2DSequence()
because that is called during layout from getObjectRange(); the assert
was added in commit ae3ec0d53a22ae5d2b7fb244a6056d0627b71873 and
intended for painting, but this isn't painting, and it's not easily
possible to detect if the function is called during painting, so remove
the assert.

Change-Id: Id2a04a5d07f43b86eb9c524b30ba74ecaf6a95c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167350
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 2951d41e8904..4e03abf18da3 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -732,10 +732,10 @@ public:
 bool IsMoveProtect() const { return m_bMovProt;}
 void SetResizeProtect(bool bProt);
 bool IsResizeProtect() const { return m_bSizProt;}
-void SetPrintable(bool bPrn);
-bool IsPrintable() const { return !m_bNoPrint;}
-void SetVisible(bool bVisible);
-bool IsVisible() const { return mbVisible;}
+virtual void SetPrintable(bool isPrintable);
+virtual bool IsPrintable() const;
+virtual void SetVisible(bool isVisible);
+virtual bool IsVisible() const;
 void SetMarkProtect(bool bProt);
 bool IsMarkProtect() const { return m_bMarkProt;}
 virtual bool IsSdrTextObj() const { return false; }
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index 17c869313067..ca5f6858ecaa 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -61,6 +61,10 @@ public:
 const SdrObject& GetReferencedObj() const;
 virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
 
+virtual void SetPrintable(bool isPrintable) override;
+virtual bool IsPrintable() const override;
+virtual void SetVisible(bool isVisible) override;
+virtual bool IsVisible() const override;
 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
 virtual SdrInventor GetObjInventor() const override;
 virtual SdrObjKind GetObjIdentifier() const override;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index ccc79daed1dd..43bc417163cf 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2665,6 +2665,11 @@ void SdrObject::SetResizeProtect(bool bProt)
 }
 }
 
+bool SdrObject::IsPrintable() const
+{
+return !m_bNoPrint;
+}
+
 void SdrObject::SetPrintable(bool bPrn)
 {
 if( bPrn == m_bNoPrint )
@@ -2679,6 +2684,11 @@ void SdrObject::SetPrintable(bool bPrn)
 }
 }
 
+bool SdrObject::IsVisible() const
+{
+return mbVisible;
+}
+
 void SdrObject::SetVisible(bool bVisible)
 {
 if( bVisible != mbVisible )
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index b1fe6f5cb9bb..2e1641d3864e 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -97,6 +97,26 @@ void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
 m_aAnchor=rAnchorPos;
 }
 
+bool SdrVirtObj::IsPrintable() const
+{
+return mxRefObj->IsPrintable();
+}
+
+void SdrVirtObj::SetPrintable(bool const isPrintable)
+{
+mxRefObj->SetPrintable(isPrintable);
+}
+
+bool SdrVirtObj::IsVisible() const
+{
+return mxRefObj->IsVisible();
+}
+
+void SdrVirtObj::SetVisible(bool const isVisible)
+{
+mxRefObj->SetVisible(isVisible);
+}
+
 void SdrVirtObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
 mxRefObj->TakeObjInfo(rInfo);
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 9ccd019181ea..138470ee11f9 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2220,8 +2220,9 @@ namespace sdr::contact
 
 void VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& 
rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& 
rVisitor) const
 {
-// tdf#91260 have already checked top-level one is on the right 
page
-assert(isPrimitiveVisible(rDisplayInfo));
+// this may be called for painting 

core.git: include/svx include/vcl svx/source

2024-05-07 Thread Oliver Specht (via logerrit)
 include/svx/sidebar/AreaPropertyPanelBase.hxx |3 ++-
 include/vcl/EnumContext.hxx   |2 ++
 svx/source/sidebar/area/AreaPropertyPanel.cxx |   11 +++
 svx/source/sidebar/area/AreaPropertyPanel.hxx |2 ++
 4 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 5e5e5832df6ed11bc664ef33ae833d2501b516c4
Author: Oliver Specht 
AuthorDate: Thu May 2 08:39:14 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Tue May 7 19:13:20 2024 +0200

Sidebar: Direct update of FillStyle

FillStyle is directly updated to prevent deferred resize
when additional controls are created.

Change-Id: I48ed987971cf6c711af31d552e8d64fa9982a416
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165993
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 92e2d2c39289..eca8220a0812 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -102,7 +102,6 @@ public:
 
 private:
 void Initialize();
-virtual void HandleContextChange(const vcl::EnumContext& rContext) 
override;
 
 protected:
 const css::uno::Reference&  mxFrame;
@@ -177,6 +176,8 @@ protected:
 
 // MCGR: Preserve ColorStops until we have a UI to edit these
 basegfx::BColorStops createColorStops();
+
+virtual void HandleContextChange(const vcl::EnumContext& rContext) 
override;
 };
 
 } // end of namespace svx::sidebar
diff --git a/include/vcl/EnumContext.hxx b/include/vcl/EnumContext.hxx
index f852fea96068..790d938bd6e9 100644
--- a/include/vcl/EnumContext.hxx
+++ b/include/vcl/EnumContext.hxx
@@ -129,6 +129,8 @@ public:
 sal_Int32 GetCombinedContext_DI() const;
 
 Application GetApplication() const;
+Context GetContext() const {return meContext;}
+
 SAL_DLLPRIVATE Application GetApplication_DI() const;
 
 bool operator == (const EnumContext& rOther) const;
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx 
b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 951028d61f32..1a5c02909c02 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -154,6 +154,17 @@ void AreaPropertyPanel::setFillStyleAndBitmap(const 
XFillStyleItem* pStyleItem,
 : std::initializer_list{  });
 }
 
+void AreaPropertyPanel::HandleContextChange(const vcl::EnumContext& rContext)
+{
+AreaPropertyPanelBase::HandleContextChange(rContext);
+if (rContext.GetContext() != vcl::EnumContext::Context::Default)
+{
+std::unique_ptr pFillState;
+SfxItemState eState = mpBindings->QueryState( SID_ATTR_FILL_STYLE, 
pFillState );
+NotifyItemUpdate(SID_ATTR_FILL_STYLE, eState, pFillState.get());
+}
+}
+
 } // end of namespace svx::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx 
b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index 6c398e6ac077..dc5b9d0194d2 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -83,6 +83,8 @@ private:
 ::sfx2::sidebar::ControllerItem maFillUseSlideBackgroundController;
 
 SfxBindings* mpBindings;
+virtual void HandleContextChange(const vcl::EnumContext& rContext) 
override;
+
 };
 
 


core.git: include/svx reportdesign/source svx/source

2024-05-06 Thread Miklos Vajna (via logerrit)
 include/svx/svdundo.hxx  |2 +-
 reportdesign/source/core/sdr/UndoActions.cxx |   12 ++--
 reportdesign/source/ui/misc/RptUndo.cxx  |2 +-
 svx/source/form/fmundo.cxx   |8 
 svx/source/svdraw/svdundo.cxx|   24 
 5 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 9683305264568d77a1d912f4b0d2e063455feeae
Author: Miklos Vajna 
AuthorDate: Mon May 6 08:19:53 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 6 10:00:58 2024 +0200

svx: prefix members of SdrUndoAction

See tdf#94879 for motivation.

Change-Id: Ieca2f1d0a8b781a908e3b4bd7fd7698305248a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167181
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 80c7ae4560b3..824f36f06efc 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -60,7 +60,7 @@ namespace svx { namespace diagram {
 class SVXCORE_DLLPUBLIC SdrUndoAction : public SfxUndoAction
 {
 protected:
-SdrModel& rMod;
+SdrModel& m_rMod;
 ViewShellId m_nViewShellId;
 
 protected:
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx 
b/reportdesign/source/core/sdr/UndoActions.cxx
index 5aaa412cf1ff..e078ffa2c931 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -113,7 +113,7 @@ OUndoContainerAction::~OUndoContainerAction()
 if ( !xChild.is() || xChild->getParent().is() )
 return;
 
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 rEnv.RemoveElement( m_xOwnElement );
 
 // -> dispose it
@@ -141,7 +141,7 @@ void OUndoContainerAction::implReInsert( )
 
 void OUndoContainerAction::implReRemove( )
 {
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 try
 {
 OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
@@ -234,7 +234,7 @@ OUndoGroupSectionAction::OUndoGroupSectionAction(
 
 void OUndoGroupSectionAction::implReInsert( )
 {
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 try
 {
 OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
@@ -251,7 +251,7 @@ void OUndoGroupSectionAction::implReInsert( )
 
 void OUndoGroupSectionAction::implReRemove( )
 {
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 try
 {
 OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
@@ -278,7 +278,7 @@ OUndoReportSectionAction::OUndoReportSectionAction(
 
 void OUndoReportSectionAction::implReInsert( )
 {
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 try
 {
 OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
@@ -301,7 +301,7 @@ void OUndoReportSectionAction::implReInsert( )
 
 void OUndoReportSectionAction::implReRemove( )
 {
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 try
 {
 OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx 
b/reportdesign/source/ui/misc/RptUndo.cxx
index 7a835237722a..bff3c4518b1a 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -125,7 +125,7 @@ OSectionUndo::~OSectionUndo()
 if ( m_bInserted )
 return;
 
-OXUndoEnvironment& rEnv = static_cast< OReportModel& >( rMod 
).GetUndoEnv();
+OXUndoEnvironment& rEnv = static_cast< OReportModel& >( m_rMod 
).GetUndoEnv();
 for (uno::Reference& xShape : m_aControls)
 {
 rEnv.RemoveElement(xShape);
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 9bbe99a81d6e..956d4a06e43e 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -964,7 +964,7 @@ FmUndoPropertyAction::FmUndoPropertyAction(FmFormModel& 
rNewMod, const PropertyC
 
 void FmUndoPropertyAction::Undo()
 {
-FmXUndoEnvironment& rEnv = static_cast(rMod).GetUndoEnv();
+FmXUndoEnvironment& rEnv = static_cast(m_rMod).GetUndoEnv();
 
 if (!xObj.is() || rEnv.IsLocked())
 return;
@@ -984,7 +984,7 @@ void FmUndoPropertyAction::Undo()
 
 void FmUndoPropertyAction::Redo()
 {
-FmXUndoEnvironment& rEnv = static_cast(rMod).GetUndoEnv();
+FmXUndoEnvironment& rEnv = static_cast(m_rMod).GetUndoEnv();
 
 if (!xObj.is() || rEnv.IsLocked())
 return;
@@ 

core.git: include/svx sd/inc sd/source

2024-05-03 Thread Michael Weghorn (via logerrit)
 include/svx/svdpage.hxx|4 ++--
 sd/inc/Annotation.hxx  |2 +-
 sd/inc/sdpage.hxx  |2 +-
 sd/source/core/annotations/Annotation.cxx  |5 +++--
 sd/source/core/sdpage2.cxx |7 +++
 sd/source/filter/pdf/sdpdffilter.cxx   |3 +--
 sd/source/ui/annotations/annotationmanager.cxx |3 +--
 sd/source/ui/unoidl/unopage.cxx|4 +---
 8 files changed, 13 insertions(+), 17 deletions(-)

New commits:
commit b7ba358d48c1419142f88b8121b848113969eaaf
Author: Michael Weghorn 
AuthorDate: Thu May 2 17:12:55 2024 +0200
Commit: Michael Weghorn 
CommitDate: Fri May 3 08:11:53 2024 +0200

sd, svx: Return new annotation instead of using out param

Let `SdrPage::createAnnotation` et al. return the newly
created annotation rather than using an out parameter,
which makes this more straightforward.

Change-Id: Iee0561859756522ef33680c2cc9b492541a31d5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167019
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index c8c7eecddd5c..0747c4625773 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -40,7 +41,6 @@
 namespace model { class Theme; }
 namespace reportdesign { class OSection; }
 namespace sdr::contact { class ViewContact; }
-namespace sdr::annotation { class Annotation; }
 class SdrPage;
 class SdrModel;
 class SfxItemPool;
@@ -555,7 +555,7 @@ public:
 
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 
-virtual void createAnnotation(rtl::Reference& 
/*xAnnotation*/) { assert(false); }
+virtual rtl::Reference createAnnotation() { 
assert(false); return nullptr; }
 virtual void addAnnotation(rtl::Reference 
const& /*xAnnotation*/, int /*nIndex*/) { assert(false); }
 virtual void removeAnnotation(rtl::Reference 
const& /*xAnnotation*/) { assert(false); }
 
diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index f19584525865..00a0b2a22af8 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -46,7 +46,7 @@ class SfxViewShell;
 namespace sd
 {
 
-void createAnnotation(rtl::Reference& 
xAnnotation, SdPage* pPage);
+rtl::Reference createAnnotation(SdPage* pPage);
 
 std::unique_ptr 
CreateUndoInsertOrRemoveAnnotation(rtl::Reference& 
xAnnotation, bool bInsert);
 
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index efaf3fa876bf..5c393082ad40 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -364,7 +364,7 @@ public:
 */
 bool IsPrecious() const { return mbIsPrecious; }
 
-void createAnnotation(rtl::Reference& 
xAnnotation) override;
+rtl::Reference createAnnotation() override;
 void addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex) override;
 void removeAnnotation(rtl::Reference const& 
xAnnotation) override;
 
diff --git a/sd/source/core/annotations/Annotation.cxx 
b/sd/source/core/annotations/Annotation.cxx
index 8c3e76d6a95f..1d1786ff460c 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -61,10 +61,11 @@ protected:
 
 }
 
-void createAnnotation(rtl::Reference& 
xAnnotation, SdPage* pPage )
+rtl::Reference createAnnotation(SdPage* pPage )
 {
-xAnnotation.set(new Annotation(comphelper::getProcessComponentContext(), 
pPage));
+rtl::Reference xAnnotation(new 
Annotation(comphelper::getProcessComponentContext(), pPage));
 pPage->addAnnotation(xAnnotation, -1);
+return xAnnotation;
 }
 
 Annotation::Annotation(const uno::Reference& context, 
SdPage* pPage)
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 74d3dd94334f..e6dbc1f2a560 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -379,8 +379,7 @@ void SdPage::lateInit(const SdPage& rSrcPage)
 // annotations
 for (auto const& rSourceAnnotation : rSrcPage.maAnnotations)
 {
-rtl::Reference aNewAnnotation;
-createAnnotation(aNewAnnotation);
+rtl::Reference aNewAnnotation = 
createAnnotation();
 aNewAnnotation->setPosition(rSourceAnnotation->getPosition());
 aNewAnnotation->setSize(rSourceAnnotation->getSize());
 aNewAnnotation->setAuthor(rSourceAnnotation->getAuthor());
@@ -552,9 +551,9 @@ bool SdPage::Equals(const SdPage& rOtherPage) const
 return true;
  }
 
-void SdPage::createAnnotation(rtl::Reference& 
xAnnotation)
+rtl::Reference SdPage::createAnnotation()
 {
-sd::createAnnotation(xAnnotation, this);
+return sd::createAnnotation(this);
 }
 
 void SdPage::addAnnotation(rtl::Reference const& 
xAnnotation, int nIndex )
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx 
b/sd/source/filter/pdf/sdpdffilter.cxx
index 70ebf0634b95..89ff0dd134db 100644
--- 

core.git: include/svx

2024-04-29 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdetc.hxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit e82c9633e4f9bc4590bd6cd8d2a82a974ddaf00f
Author: Tomaž Vajngerl 
AuthorDate: Sun Apr 28 09:31:46 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Apr 30 04:55:09 2024 +0200

svx: use o3tl::convert instead of 847 (mm100) when we want 24pt

Change-Id: I1d1c4a0e12c0443e7021c8aedcd386814a1647be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166823
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index f0c28ae2f8fc..5f80ead04e4a 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 /**
@@ -67,11 +68,8 @@ namespace SdrEngineDefaults
 // Default FontColor is COL_AUTO
 inline Color GetFontColor() { return COL_AUTO; }
 
-// Default FontHeight is 847. The font height uses logical units 
(MapUnit/MapFraction
-// see below for further details). The default setting 847/100mm 
corresponds to about
-// 24 Point. If e.g. one would use Twips (SetMapUnit(MapUnit::MapTwip)) 
(20 Twip = 1 Point)
-// instead, one would need to set the font height to 480, in order to get 
a 24 Point height.
-inline size_t GetFontHeight() { return 847; }
+// Default font height
+inline size_t GetFontHeight() { return o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100); }
 
 // The MapMode is needed for the global Outliner.
 // Incidentally, every newly instantiated SdrModel is assigned this 
MapMode by default.


core.git: include/svx svx/source

2024-04-29 Thread Miklos Vajna (via logerrit)
 include/svx/svdlayer.hxx   |4 ++--
 svx/source/svdraw/svdlayer.cxx |   30 +++---
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 5a61b590ae51ccf28e501bb943f1cf4a3e9835a1
Author: Miklos Vajna 
AuthorDate: Mon Apr 29 08:15:16 2024 +0200
Commit: Miklos Vajna 
CommitDate: Mon Apr 29 10:10:37 2024 +0200

svx: prefix members of SdrLayerAdmin

See tdf#94879 for motivation.

Change-Id: I8ea80a3f2121c5c29168aa185e6278d924874c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166815
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx
index d2d9f7e7c164..8201478a2fd8 100644
--- a/include/svx/svdlayer.hxx
+++ b/include/svx/svdlayer.hxx
@@ -105,8 +105,8 @@ friend class SdrModel;
 friend class SdrPage;
 
 std::vector> maLayers;
-SdrLayerAdmin* pParent; // The page's admin knows the doc's admin
-SdrModel* pModel; // For broadcasting
+SdrLayerAdmin* m_pParent; // The page's admin knows the doc's admin
+SdrModel* m_pModel; // For broadcasting
 OUString maControlLayerName;
 // Find a LayerID which is not in use yet. If all have been used up,
 // we return 0.
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 200dccd2f520..c48ff9641e55 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -99,15 +99,15 @@ bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const
 }
 
 SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
-pParent(pNewParent),
-pModel(nullptr),
+m_pParent(pNewParent),
+m_pModel(nullptr),
 maControlLayerName("controls")
 {
 }
 
 SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin):
-pParent(nullptr),
-pModel(nullptr),
+m_pParent(nullptr),
+m_pModel(nullptr),
 maControlLayerName("controls")
 {
 *this = rSrcLayerAdmin;
@@ -127,7 +127,7 @@ SdrLayerAdmin& SdrLayerAdmin::operator=(const 
SdrLayerAdmin& rSrcLayerAdmin)
 if (this != )
 {
 maLayers.clear();
-pParent=rSrcLayerAdmin.pParent;
+m_pParent=rSrcLayerAdmin.m_pParent;
 sal_uInt16 i;
 sal_uInt16 nCount=rSrcLayerAdmin.GetLayerCount();
 for (i=0; iBroadcast(aHint);
-pModel->SetChanged();
+m_pModel->Broadcast(aHint);
+m_pModel->SetChanged();
 }
 }
 
 void SdrLayerAdmin::InsertLayer(std::unique_ptr pLayer, sal_uInt16 
nPos)
 {
-pLayer->SetModel(pModel);
+pLayer->SetModel(m_pModel);
 if(nPos==0x)
 maLayers.push_back(std::move(pLayer));
 else
@@ -180,7 +180,7 @@ SdrLayer* SdrLayerAdmin::NewLayer(const OUString& rName, 
sal_uInt16 nPos)
 {
 SdrLayerID nID=GetUniqueLayerID();
 SdrLayer* pLay=new SdrLayer(nID,rName);
-pLay->SetModel(pModel);
+pLay->SetModel(m_pModel);
 if(nPos==0x)
 maLayers.push_back(std::unique_ptr(pLay));
 else
@@ -220,9 +220,9 @@ const SdrLayer* SdrLayerAdmin::GetLayer(const OUString& 
rName) const
 i++;
 }
 
-if(!pLay && pParent)
+if(!pLay && m_pParent)
 {
-pLay = pParent->GetLayer(rName);
+pLay = m_pParent->GetLayer(rName);
 }
 
 return pLay;
@@ -256,7 +256,7 @@ SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
 aSet.Set(GetLayer(j)->GetID());
 }
 sal_uInt8 i;
-if (pParent != nullptr)
+if (m_pParent != nullptr)
 {
 i = 254;
 while (i && aSet.IsSet(SdrLayerID(i)))


core.git: include/svx svx/source

2024-04-25 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/nbdtmg.hxx|1 -
 svx/source/sidebar/nbdtmg.cxx |   11 ++-
 2 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit a600cb4865f2b4bce872a000c2614cf6478b1ee0
Author: Samuel Mehrbrodt 
AuthorDate: Thu Apr 25 09:06:57 2024 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Apr 25 13:47:04 2024 +0200

Remove unused fields

Unused since f944648e0f5d52605a267ed50bba4bfc035aecc6

Change-Id: Id5f5a77df8afdf15d99989b86bb04179d86ae92b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166614
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 81ef80223496..894304e4c37d 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -72,7 +72,6 @@ class  SVX_DLLPUBLIC BulletsSettings
 {
 public:
 vcl::Font   aFont;
-OUStringsDescription;
 sal_UCS4cBulletChar;
 boolbIsCustomized;
 BulletsSettings() : cBulletChar(0), bIsCustomized(false)  {}
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index ced78fe6bc61..26e26c8a3152 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -341,16 +341,9 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, 
sal_uInt16 nIndex, sal_uInt1
 }
 }
 
-OUString BulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/)
+OUString BulletsTypeMgr::GetDescription(sal_uInt16 /*nIndex*/, bool 
/*isDefault*/)
 {
-OUString sRet;
-
-if ( nIndex >= DEFAULT_BULLET_TYPES )
-return sRet;
-else
-sRet = pActualBullets[nIndex]->sDescription;
-
-return sRet;
+return OUString();
 }
 
 bool BulletsTypeMgr::IsCustomized(sal_uInt16 nIndex)


core.git: include/svx sd/inc sd/source svx/Library_svxcore.mk svx/source

2024-04-24 Thread Tomaž Vajngerl (via logerrit)
 include/svx/annotation/Annotation.hxx |   57 ++
 sd/inc/Annotation.hxx |   18 ++---
 sd/source/core/annotations/Annotation.cxx |8 +---
 svx/Library_svxcore.mk|1 
 svx/source/annotation/Annotation.cxx  |   18 +
 5 files changed, 82 insertions(+), 20 deletions(-)

New commits:
commit a938ed2be520426ce7949c4fd30a6e7e31d7c279
Author: Tomaž Vajngerl 
AuthorDate: Thu Apr 18 14:54:52 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Apr 25 07:17:51 2024 +0200

annot: added Annotation impl. to svx, moved some thing from sd

This is an attempt to move the sd::Annotation to the common code
in the svx module. This will need to be done in multiple steps so
the first one is to introduce sdr::annotation::Annotation class in
svx module, which is derived by sd::Annotation. Non-problematic
functionality and members are also moved to the svx Annotation.

Change-Id: Id20466b3780514ab63a9df8923b879098870ebb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166492
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/annotation/Annotation.hxx 
b/include/svx/annotation/Annotation.hxx
new file mode 100644
index ..13881a58d070
--- /dev/null
+++ b/include/svx/annotation/Annotation.hxx
@@ -0,0 +1,57 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace sdr::annotation
+{
+class SVXCORE_DLLPUBLIC Annotation
+{
+private:
+static sal_uInt32 m_nLastId;
+static sal_uInt32 nextID() { return m_nLastId++; }
+
+protected:
+SdrPage* mpSdrPage;
+sal_uInt32 m_nId;
+
+css::geometry::RealPoint2D m_Position;
+css::geometry::RealSize2D m_Size;
+OUString m_Author;
+OUString m_Initials;
+css::util::DateTime m_DateTime;
+bool m_bIsFreeText = false;
+
+public:
+Annotation(SdrPage* pPage)
+: mpSdrPage(pPage)
+, m_nId(nextID())
+{
+}
+
+SdrModel* GetModel()
+{
+return mpSdrPage != nullptr ? >getSdrModelFromSdrPage() : 
nullptr;
+}
+
+sal_uInt32 GetId() const { return m_nId; }
+};
+
+//typedef std::vector> AnnotationVector;
+
+} // namespace sdr::annotation
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index 965cbded3719..558271dbc04e 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "sdpage.hxx"
 #include "textapi.hxx"
@@ -67,19 +68,16 @@ struct SD_DLLPUBLIC CustomAnnotationMarker
 };
 
 class SAL_DLLPUBLIC_RTTI Annotation final :
-   public 
::comphelper::WeakComponentImplHelper,
-   public ::cppu::PropertySetMixin
+public sdr::annotation::Annotation,
+public 
::comphelper::WeakComponentImplHelper,
+ public ::cppu::PropertySetMixin
 {
 public:
 explicit Annotation( const 
css::uno::Reference& context, SdPage* pPage );
 Annotation(const Annotation&) = delete;
 Annotation& operator=(const Annotation&) = delete;
 
-static sal_uInt32 m_nLastId;
-
 SdPage* GetPage() const { return mpPage; }
-SdrModel* GetModel() { return (mpPage != nullptr) ? 
>getSdrModelFromSdrPage() : nullptr; }
-sal_uInt32 GetId() const { return m_nId; }
 
 // XInterface:
 virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) 
override;
@@ -141,17 +139,9 @@ private:
 
 void createChangeUndoImpl(std::unique_lock& g);
 
-sal_uInt32 m_nId;
 SdPage* mpPage;
-css::geometry::RealPoint2D m_Position;
-css::geometry::RealSize2D m_Size;
-OUString m_Author;
-OUString m_Initials;
-css::util::DateTime m_DateTime;
 rtl::Reference m_TextRange;
-
 std::unique_ptr m_pCustomAnnotationMarker;
-bool m_bIsFreeText;
 };
 
 }
diff --git a/sd/source/core/annotations/Annotation.cxx 
b/sd/source/core/annotations/Annotation.cxx
index fee7312bcca2..b3938002b87c 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -115,14 +115,10 @@ void createAnnotation(rtl::Reference& 
xAnnotation, SdPage* pPage )
 pPage->addAnnotation(xAnnotation, -1);
 }
 
-sal_uInt32 Annotation::m_nLastId = 1;
-
 Annotation::Annotation(const uno::Reference& context, 
SdPage* pPage)
-: ::cppu::PropertySetMixin(context, 
IMPLEMENTS_PROPERTY_SET,
-uno::Sequence())
-, m_nId(m_nLastId++)
+: sdr::annotation::Annotation(pPage)
+, 

core.git: include/svx svx/source

2024-04-20 Thread Taichi Haradaguchi (via logerrit)
 include/svx/strings.hrc   |2 +-
 svx/source/dialog/charmap.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3bfd7ae3d414cae3bb4e582c2a2562d7b08887cb
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Thu Apr 18 19:59:41 2024 +0900
Commit: Eike Rathke 
CommitDate: Sat Apr 20 21:23:44 2024 +0200

Fix Unicode block name

See https://unicode.org/charts/PDF/U0080.pdf

Change-Id: I6bc3117abb486cc2cc38870ed91185c62eaa9361
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166243
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index f26dbe3bd558..13f896f04eeb 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1464,7 +1464,7 @@
 #define RID_SVXSTR_SAVE_MODIFIED_IMAGE  
NC_("RID_SVXSTR_SAVE_MODIFIED_IMAGE", "The image has been modified. By default 
the original image will be saved.
Do you want to save the modified version instead?")
 
 #define RID_SUBSETSTR_BASIC_LATIN   
NC_("RID_SUBSETMAP", "Basic Latin")
-#define RID_SUBSETSTR_LATIN_1   
NC_("RID_SUBSETMAP", "Latin-1")
+#define RID_SUBSETSTR_LATIN_1_SUPPLEMENT
NC_("RID_SUBSETMAP", "C1 Controls and Latin-1 Supplement")
 #define RID_SUBSETSTR_LATIN_EXTENDED_A  
NC_("RID_SUBSETMAP", "Latin Extended-A")
 #define RID_SUBSETSTR_LATIN_EXTENDED_B  
NC_("RID_SUBSETMAP", "Latin Extended-B")
 #define RID_SUBSETSTR_IPA_EXTENSIONS
NC_("RID_SUBSETMAP", "IPA Extensions")
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index dcb1205584d7..9b87fe3666a7 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -952,7 +952,7 @@ void SubsetMap::InitList()
 aAllSubsets.emplace_back( 0x, 0x007F, 
SvxResId(RID_SUBSETSTR_BASIC_LATIN) );
 break;
 case UBLOCK_LATIN_1_SUPPLEMENT:
-aAllSubsets.emplace_back( 0x0080, 0x00FF, 
SvxResId(RID_SUBSETSTR_LATIN_1) );
+aAllSubsets.emplace_back( 0x0080, 0x00FF, 
SvxResId(RID_SUBSETSTR_LATIN_1_SUPPLEMENT) );
 break;
 case UBLOCK_LATIN_EXTENDED_A:
 aAllSubsets.emplace_back( 0x0100, 0x017F, 
SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_A) );


core.git: include/svx svx/source

2024-04-02 Thread Miklos Vajna (via logerrit)
 include/svx/xtable.hxx|4 ++--
 svx/source/xoutdev/xtable.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a44e066c9e587dc87fd2563f3e9454e9e92dcde7
Author: Miklos Vajna 
AuthorDate: Tue Apr 2 08:16:27 2024 +0200
Commit: Miklos Vajna 
CommitDate: Tue Apr 2 10:28:27 2024 +0200

svx: prefix members of XLineEndEntry

See tdf#94879 for motivation.

Change-Id: I901e231f8112dea28bdccfb79b17470f1436c0db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165665
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index ca2c0518b876..43ea9820d5a1 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -56,7 +56,7 @@ public:
 class SVXCORE_DLLPUBLIC XLineEndEntry final : public XPropertyEntry
 {
 private:
-basegfx::B2DPolyPolygon aB2DPolyPolygon;
+basegfx::B2DPolyPolygon m_aB2DPolyPolygon;
 
 public:
 XLineEndEntry(basegfx::B2DPolyPolygon aB2DPolyPolygon, const OUString& 
rName);
@@ -64,7 +64,7 @@ public:
 
 const basegfx::B2DPolyPolygon& GetLineEnd() const
 {
-return aB2DPolyPolygon;
+return m_aB2DPolyPolygon;
 }
 };
 
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 715d2ff3d083..e640c18b64e9 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -38,13 +38,13 @@ XColorEntry::XColorEntry(const Color& rColor, const 
OUString& rName)
 
 XLineEndEntry::XLineEndEntry(basegfx::B2DPolyPolygon _aB2DPolyPolygon, const 
OUString& rName)
 :   XPropertyEntry(rName),
-aB2DPolyPolygon(std::move(_aB2DPolyPolygon))
+m_aB2DPolyPolygon(std::move(_aB2DPolyPolygon))
 {
 }
 
 XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther)
 :   XPropertyEntry(rOther),
-aB2DPolyPolygon(rOther.aB2DPolyPolygon)
+m_aB2DPolyPolygon(rOther.m_aB2DPolyPolygon)
 {
 }
 


core.git: include/svx svx/source

2024-03-25 Thread Miklos Vajna (via logerrit)
 include/svx/xtable.hxx|4 ++--
 svx/source/xoutdev/xtable.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4a7bd4798f3f79c813e940504463c0af7bf9e985
Author: Miklos Vajna 
AuthorDate: Mon Mar 25 08:37:27 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 25 10:28:10 2024 +0100

svx: prefix members of XHatchEntry

See tdf#94879 for motivation.

Change-Id: I1edd4bf9c3b7369898f500f9eb5c483be133ed67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165267
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index 15775d01ef2a..ca2c0518b876 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -86,7 +86,7 @@ public:
 class SVXCORE_DLLPUBLIC XHatchEntry final : public XPropertyEntry
 {
 private:
-XHatch  aHatch;
+XHatch  m_aHatch;
 
 public:
 XHatchEntry(const XHatch& rHatch, const OUString& rName);
@@ -94,7 +94,7 @@ public:
 
 const XHatch& GetHatch() const
 {
-return aHatch;
+return m_aHatch;
 }
 };
 
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index fea229ec74dc..715d2ff3d083 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -62,13 +62,13 @@ m_aDash(rOther.m_aDash)
 
 XHatchEntry::XHatchEntry(const XHatch& rHatch, const OUString& rName)
 :   XPropertyEntry(rName),
-aHatch(rHatch)
+m_aHatch(rHatch)
 {
 }
 
 XHatchEntry::XHatchEntry(const XHatchEntry& rOther)
 :   XPropertyEntry(rOther),
-aHatch(rOther.aHatch)
+m_aHatch(rOther.m_aHatch)
 {
 }
 


core.git: include/svx svx/source

2024-03-18 Thread Miklos Vajna (via logerrit)
 include/svx/svdlayer.hxx   |8 
 svx/source/svdraw/svdlayer.cxx |   10 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 0f1194bff86f2b34df624c0a67b211ab98bcf729
Author: Miklos Vajna 
AuthorDate: Mon Mar 18 08:26:57 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 18 12:42:55 2024 +0100

svx: prefix members of SdrLayer

See tdf#94879 for motivation.

Change-Id: I35c1b90b472a27b34a3ca31cd81cd1fa65b24843
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164963
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx
index de453a6bf8c2..88cfabddb9c0 100644
--- a/include/svx/svdlayer.hxx
+++ b/include/svx/svdlayer.hxx
@@ -62,11 +62,11 @@ class SVXCORE_DLLPUBLIC SdrLayer
 OUString maName;
 OUString maTitle;
 OUString maDescription;
-SdrModel*  pModel; // For broadcasting
+SdrModel*  m_pModel; // For broadcasting
 bool mbVisibleODF; // corresponds to ODF draw:display
 bool mbPrintableODF; // corresponds to ODF draw:display
 bool mbLockedODF; // corresponds to ODF draw:protected
-SdrLayerID nID;
+SdrLayerID m_nID;
 
 SdrLayer(SdrLayerID nNewID, OUString aNewName);
 
@@ -91,8 +91,8 @@ public:
 void SetLockedODF(bool bLockedODF) { mbLockedODF = bLockedODF; }
 bool IsLockedODF() const { return mbLockedODF; }
 
-SdrLayerIDGetID() const   { return nID; }
-void  SetModel(SdrModel* pNewModel)   { 
pModel=pNewModel; }
+SdrLayerIDGetID() const   { return m_nID; }
+void  SetModel(SdrModel* pNewModel)   { 
m_pModel=pNewModel; }
 };
 
 #define SDRLAYER_MAXCOUNT 255
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index 74d5222f92b1..200dccd2f520 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -69,7 +69,7 @@ void SdrLayerIDSet::PutValue( const css::uno::Any & rAny )
 }
 
 SdrLayer::SdrLayer(SdrLayerID nNewID, OUString aNewName) :
-maName(std::move(aNewName)), pModel(nullptr), nID(nNewID)
+maName(std::move(aNewName)), m_pModel(nullptr), m_nID(nNewID)
 {
 // ODF default values
 mbVisibleODF = true;
@@ -84,17 +84,17 @@ void SdrLayer::SetName(const OUString& rNewName)
 
 maName = rNewName;
 
-if (pModel)
+if (m_pModel)
 {
 SdrHint aHint(SdrHintKind::LayerChange);
-pModel->Broadcast(aHint);
-pModel->SetChanged();
+m_pModel->Broadcast(aHint);
+m_pModel->SetChanged();
 }
 }
 
 bool SdrLayer::operator==(const SdrLayer& rCmpLayer) const
 {
-return (nID == rCmpLayer.nID
+return (m_nID == rCmpLayer.m_nID
 && maName == rCmpLayer.maName);
 }
 


core.git: include/svx svx/inc svx/Library_svxcore.mk svx/source svx/uiconfig

2024-03-11 Thread Oliver Specht (via logerrit)
 include/svx/galctrl.hxx|   10 
 svx/Library_svxcore.mk |1 
 svx/inc/GalleryControl.hxx |4 
 svx/inc/galbrws2.hxx   |  185 
 svx/source/gallery2/GalleryControl.cxx |8 
 svx/source/gallery2/galbrws1.cxx   | 1318 -
 svx/source/gallery2/galbrws1.hxx   |   91 --
 svx/source/gallery2/galbrws2.cxx   | 1243 ---
 svx/source/gallery2/galctrl.cxx|   10 
 svx/source/inc/galbrws1.hxx|  250 ++
 svx/uiconfig/ui/sidebargallery.ui  |   27 
 11 files changed, 1594 insertions(+), 1553 deletions(-)

New commits:
commit 09c6204b6309321aa25c542f918fde9f5f3f7fe2
Author: Oliver Specht 
AuthorDate: Thu Feb 29 17:15:23 2024 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Mar 11 14:39:18 2024 +0100

tdf#81880 Search the Gallery

Adds a search field to the gallery to search for icons titles.
Wildcards '*' and '?' are supported

Change-Id: I7a8ed2addef3031b77c21889cf72b964ca26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164167
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx
index 61fd62927a2d..4e35d5aaae3d 100644
--- a/include/svx/galctrl.hxx
+++ b/include/svx/galctrl.hxx
@@ -28,7 +28,7 @@
 
 class GalleryDragDrop;
 class GalleryTheme;
-class GalleryBrowser2;
+class GalleryBrowser1;
 class INetURLObject;
 
 class GalleryPreview final : public weld::CustomWidgetController
@@ -39,7 +39,7 @@ private:
 std::unique_ptr mxScrolledWindow;
 GraphicObject aGraphicObj;
 tools::Rectangle aPreviewRect;
-GalleryBrowser2* mpParent;
+GalleryBrowser1* mpParent;
 GalleryTheme* mpTheme;
 
 bool ImplGetGraphicCenterRect( const Graphic& rGraphic, 
tools::Rectangle& rResultRect ) const;
@@ -53,7 +53,7 @@ private:
 
 public:
 
-GalleryPreview(GalleryBrowser2* pParent, 
std::unique_ptr xScrolledWindow);
+GalleryPreview(GalleryBrowser1* pParent, 
std::unique_ptr xScrolledWindow);
 void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; }
 virtual ~GalleryPreview() override;
 
@@ -90,7 +90,7 @@ class GalleryIconView final : public ValueSet
 private:
 std::unique_ptr mxDragDropTargetHelper;
 
-GalleryBrowser2*mpParent;
+GalleryBrowser1*mpParent;
 GalleryTheme*   mpTheme;
 
 // ValueSet
@@ -105,7 +105,7 @@ private:
 
 public:
 
-GalleryIconView(GalleryBrowser2* pParent, 
std::unique_ptr xScrolledWindow);
+GalleryIconView(GalleryBrowser1* pParent, 
std::unique_ptr xScrolledWindow);
 void SetTheme(GalleryTheme* pTheme) { mpTheme = pTheme; }
 virtual ~GalleryIconView() override;
 
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 2363f5023bfd..40fad5ea6b4f 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -195,7 +195,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
 svx/source/form/xfm_addcondition \
 svx/source/gallery2/codec \
 svx/source/gallery2/galbrws1 \
-svx/source/gallery2/galbrws2 \
 svx/source/gallery2/galctrl \
 svx/source/gallery2/galexpl \
 svx/source/gallery2/galini \
diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index d5835fb5759b..3b33c034a5b2 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -27,7 +27,7 @@ class SfxBindings;
 
 class Gallery;
 class GalleryBrowser1;
-class GalleryBrowser2;
+//class GalleryBrowser2;
 class FmFormModel;
 class Splitter;
 
@@ -42,7 +42,7 @@ public:
 private:
 Gallery* mpGallery;
 std::unique_ptr mxBrowser1;
-std::unique_ptr mxBrowser2;
+//std::unique_ptr mxBrowser2;
 };
 
 } // end of namespace svx::sidebar
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
deleted file mode 100644
index d5ca8a50a041..
--- a/svx/inc/galbrws2.hxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_INC_GALBRWS2_HXX
-#define INCLUDED_SVX_INC_GALBRWS2_HXX
-
-#include 
-#include 
-#include 

core.git: include/svx svx/source

2024-03-11 Thread Miklos Vajna (via logerrit)
 include/svx/xhatch.hxx   |   26 +-
 svx/source/xoutdev/xattr.cxx |   16 
 2 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit da6a23840d44c40da3989e7c2372b2b6d9ae95b5
Author: Miklos Vajna 
AuthorDate: Mon Mar 11 08:41:15 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 11 14:03:30 2024 +0100

svx: prefix members of XHatch

See tdf#94879 for motivation.

Change-Id: I65f69d6fb334b0d376a304cd1bc1437fd116c9a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164643
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
index 1553141e5950..dc56f20a8107 100644
--- a/include/svx/xhatch.hxx
+++ b/include/svx/xhatch.hxx
@@ -31,27 +31,27 @@
 
 class SVXCORE_DLLPUBLIC XHatch final
 {
-css::drawing::HatchStyle eStyle;
-Color   aColor;
-tools::Long nDistance;
-Degree10nAngle;
+css::drawing::HatchStyle m_eStyle;
+Color   m_aColor;
+tools::Long m_nDistance;
+Degree10m_nAngle;
 
 public:
-XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), 
nDistance(0), nAngle(0) {}
+XHatch() : m_eStyle(css::drawing::HatchStyle_SINGLE), 
m_nDistance(0), m_nAngle(0) {}
 XHatch(const Color& rCol, css::drawing::HatchStyle eStyle 
= css::drawing::HatchStyle_SINGLE,
tools::Long nDistance = 20, Degree10 nAngle = 
0_deg10);
 
 bool operator==(const XHatch& rHatch) const;
 
-voidSetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle 
= eNewStyle; }
-voidSetColor(const Color& rColor) { aColor = rColor; }
-voidSetDistance(tools::Long nNewDistance) { nDistance = 
nNewDistance; }
-voidSetAngle(Degree10 nNewAngle) { nAngle = nNewAngle; }
+voidSetHatchStyle(css::drawing::HatchStyle eNewStyle) { 
m_eStyle = eNewStyle; }
+voidSetColor(const Color& rColor) { m_aColor = rColor; }
+voidSetDistance(tools::Long nNewDistance) { m_nDistance = 
nNewDistance; }
+voidSetAngle(Degree10 nNewAngle) { m_nAngle = nNewAngle; }
 
-css::drawing::HatchStyle GetHatchStyle() const { return eStyle; }
-const Color&GetColor() const { return aColor; }
-tools::Long GetDistance() const { return nDistance; }
-Degree10GetAngle() const { return nAngle; }
+css::drawing::HatchStyle GetHatchStyle() const { return m_eStyle; }
+const Color&GetColor() const { return m_aColor; }
+tools::Long GetDistance() const { return m_nDistance; }
+Degree10GetAngle() const { return m_nAngle; }
 };
 
 #endif
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 5db227e9fca7..22f8f62bbeaa 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2649,19 +2649,19 @@ boost::property_tree::ptree 
XFillFloatTransparenceItem::dumpAsJSON() const
 
 XHatch::XHatch(const Color& rCol, css::drawing::HatchStyle eTheStyle, 
tools::Long nTheDistance,
Degree10 nTheAngle) :
-eStyle(eTheStyle),
-aColor(rCol),
-nDistance(nTheDistance),
-nAngle(nTheAngle)
+m_eStyle(eTheStyle),
+m_aColor(rCol),
+m_nDistance(nTheDistance),
+m_nAngle(nTheAngle)
 {
 }
 
 bool XHatch::operator==(const XHatch& rHatch) const
 {
-return ( eStyle == rHatch.eStyle&&
- aColor == rHatch.aColor&&
- nDistance  == rHatch.nDistance &&
- nAngle == rHatch.nAngle );
+return ( m_eStyle == rHatch.m_eStyle&&
+ m_aColor == rHatch.m_aColor&&
+ m_nDistance  == rHatch.m_nDistance &&
+ m_nAngle == rHatch.m_nAngle );
 }
 
 


core.git: include/svx sd/inc sd/source svx/source sw/qa sw/source

2024-03-09 Thread Jim Raykowski (via logerrit)
 include/svx/fontworkgallery.hxx |5 -
 sd/inc/strings.hrc  |1 +
 sd/source/ui/dlg/sdtreelb.cxx   |   27 +--
 svx/source/tbxctrls/fontworkgallery.cxx |   24 ++--
 svx/source/toolbars/fontworkbar.cxx |2 +-
 sw/qa/extras/accessibility/dialogs.cxx  |2 +-
 sw/source/uibase/uiview/viewdraw.cxx|2 +-
 7 files changed, 55 insertions(+), 8 deletions(-)

New commits:
commit 1fd359790ed4a27902248d92ee343a4aeaf63c8e
Author: Jim Raykowski 
AuthorDate: Fri Jun 2 08:08:18 2023 -0800
Commit: Jim Raykowski 
CommitDate: Sun Mar 10 02:43:41 2024 +0100

tdf#90242 Navigator: Improve custom shape naming

This patch makes the Draw/Impress Navigator display the name retrieved
by SdrCustomShapeGeometryItem::GetPropertyValueByName("Type") for
custom shape objects when the custom shape is unnamed and the Navigator
is set to show all objects. For Writer and Calc, this patch makes
inserted fontwork custom shape objects be automatically named 'Fontwork
N'.

Change-Id: Ice34461fe7a4b26d01b2d93e871a956dc55392f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152568
Tested-by: Jenkins
Reviewed-by: Stéphane Guillou 
Reviewed-by: Jim Raykowski 

diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index 8e5eceb8f033..21c418584570 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -60,6 +60,8 @@ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FontWorkGalleryDialog 
final : public wel
 std::unique_ptr maCtlFavorites;
 std::unique_ptr mxOKButton;
 
+css::uno::Reference mxFrame;
+
 voidinitFavorites(sal_uInt16 nThemeId);
 voidinsertSelectedFontwork();
 voidfillFavorites(sal_uInt16 nThemeId);
@@ -69,7 +71,8 @@ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC FontWorkGalleryDialog 
final : public wel
 DECL_DLLPRIVATE_LINK(QueryTooltipHandler, const weld::TreeIter&, OUString);
 
 public:
-FontWorkGalleryDialog(weld::Window* pParent, SdrView& rView);
+FontWorkGalleryDialog(weld::Window* pParent, SdrView& rView,
+  css::uno::Reference xFrame);
 virtual ~FontWorkGalleryDialog() override;
 
 // SJ: if the SdrObject** is set, the SdrObject is not inserted into the 
page when executing the dialog
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 5056a8030966..2522768a6a7b 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -245,6 +245,7 @@
 #define STR_GRAPHICS_STYLE_FAMILY   
NC_("STR_GRAPHICS_STYLE_FAMILY", "Drawing Styles")
 #define STR_PRESENTATIONS_STYLE_FAMILY  
NC_("STR_PRESENTATIONS_STYLE_FAMILY", "Presentation Styles")
 #define STR_CELL_STYLE_FAMILY   
NC_("STR_CELL_STYLE_FAMILY", "Cell Styles")
+#define STR_NAVIGATOR_CUSTOMSHAPE   
NC_("STR_NAVIGATOR_CUSTOMSHAPE", "Custom Shape")
 #define STR_NAVIGATOR_SHAPE_BASE_NAME   
NC_("STR_NAVIGATOR_SHAPE_BASE_NAME", "Shape %1")
 #define STR_SET_BACKGROUND_PICTURE  
NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image" )
 #define STR_RESET_LAYOUT
NC_("STR_RESET_LAYOUT", "Reset Slide Layout")
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 63c26bc5635c..5bed03fa24db 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -58,6 +58,11 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 using namespace com::sun::star;
 
 namespace {
@@ -918,7 +923,25 @@ OUString SdPageObjsTLV::GetObjectName(
 && aRet.isEmpty()
 && pObject!=nullptr)
 {
-aRet = SdResId(STR_NAVIGATOR_SHAPE_BASE_NAME) + " (" + 
pObject->TakeObjNameSingul() +")";
+OUString sObjName;
+if (pObject->GetObjIdentifier() == SdrObjKind::CustomShape)
+{
+// taken from SdrObjCustomShape::GetCustomShapeName
+OUString 
aEngine(pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_ENGINE).GetValue());
+if (aEngine.isEmpty() || aEngine == 
"com.sun.star.drawing.EnhancedCustomShapeEngine")
+{
+OUString sShapeType;
+const SdrCustomShapeGeometryItem& rGeometryItem
+= pObject->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY);
+const uno::Any* pAny = 
rGeometryItem.GetPropertyValueByName("Type");
+if (pAny && (*pAny >>= sShapeType))
+sObjName = SdResId(STR_NAVIGATOR_CUSTOMSHAPE) + u": " + 
sShapeType;
+}
+}
+else
+sObjName = pObject->TakeObjNameSingul();
+
+aRet = SdResId(STR_NAVIGATOR_SHAPE_BASE_NAME) + " (" + sObjName +")";
 aRet = aRet.replaceFirst("%1", OUString::number(pObject->GetOrdNum() + 
1));
 }
 
@@ -1223,7 +1246,7 @@ void 

core.git: include/svx sd/qa sd/source

2024-03-07 Thread Sarper Akdemir (via logerrit)
 include/svx/sdrmasterpagedescriptor.hxx  |3 +-
 include/svx/sdrpageuser.hxx  |3 +-
 include/svx/svdpage.hxx  |1 
 sd/qa/unit/export-tests-ooxml4.cxx   |   45 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |   38 ++
 5 files changed, 82 insertions(+), 8 deletions(-)

New commits:
commit 6c25216e461b624f556a1b2830ab0911d5df7daf
Author: Sarper Akdemir 
AuthorDate: Wed Mar 6 13:48:14 2024 +0300
Commit: Sarper Akdemir 
CommitDate: Thu Mar 7 15:07:27 2024 +0100

tdf#159931: pptx export: export each used slide layout for a master

attempts to fix the slideLayout reference related regression
from Idb6b88ebe87a83818d8eb27a1fa087652a002c0c.

To correctly export the all used slideLayout instances for a
given master, iterate through sdr::PageUsers of that master
and figure out all used layouts.

Change-Id: I0f58befac1ba4d5ec01aeedbb5f611c83683dcf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164468
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Reviewed-by: Sarper Akdemir 

diff --git a/include/svx/sdrmasterpagedescriptor.hxx 
b/include/svx/sdrmasterpagedescriptor.hxx
index d7eac22a1b5c..9be1e663bcff 100644
--- a/include/svx/sdrmasterpagedescriptor.hxx
+++ b/include/svx/sdrmasterpagedescriptor.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 class SdrPageProperties;
@@ -30,7 +31,7 @@ namespace sdr::contact { class ViewContact; }
 
 namespace sdr
 {
-class MasterPageDescriptor final : public sdr::PageUser
+class SVXCORE_DLLPUBLIC MasterPageDescriptor final : public sdr::PageUser
 {
 private:
 SdrPage&maOwnerPage;
diff --git a/include/svx/sdrpageuser.hxx b/include/svx/sdrpageuser.hxx
index 8c31a2936c7e..5557b2729777 100644
--- a/include/svx/sdrpageuser.hxx
+++ b/include/svx/sdrpageuser.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SVX_SDRPAGEUSER_HXX
 
 #include 
+#include 
 
 class SdrPage;
 
@@ -30,7 +31,7 @@ class SdrPage;
 
 namespace sdr
 {
-class PageUser
+class SVXCORE_DLLPUBLIC PageUser
 {
 public:
 // this method is called from the destructor of the referenced page.
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index c70a2f1f4a2d..cb1e7f9f0b20 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -405,6 +405,7 @@ private:
 public:
 void AddPageUser(sdr::PageUser& rNewUser);
 void RemovePageUser(sdr::PageUser& rOldUser);
+const sdr::PageUserVector& GetPageUsers() const { return maPageUsers; };
 
 // SdrModel access on SdrPage level
 SdrModel& getSdrModelFromSdrPage() const { return mrSdrModelFromSdrPage; }
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx 
b/sd/qa/unit/export-tests-ooxml4.cxx
index 9ebb88208cc1..4c1e2ad1bccd 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -1095,6 +1095,51 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, 
testTdf157740_slideMasters)
 assertXPath(pXmlDocContent, 
"/p:sldMaster/p:sldLayoutIdLst/p:sldLayoutId"_ostr, 1);
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf159931_slideLayouts)
+{
+createSdImpressDoc("odp/repeatBitmapMode.odp");
+save("Impress Office Open XML");
+
+xmlDocUniquePtr pXmlDocRels1 = 
parseExport("ppt/slides/_rels/slide1.xml.rels");
+xmlDocUniquePtr pXmlDocRels2 = 
parseExport("ppt/slides/_rels/slide2.xml.rels");
+
+assertXPath(
+pXmlDocRels1,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr);
+
+// the relative target e.g. "../slideLayouts/slideLayout2.xml"
+OUString sRelativeLayoutPath1 = getXPathContent(
+pXmlDocRels1,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr);
+
+assertXPath(
+pXmlDocRels2,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr);
+
+// the relative target e.g. "../slideLayouts/slideLayout1.xml"
+OUString sRelativeLayoutPath2 = getXPathContent(
+pXmlDocRels2,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr);
+
+uno::Reference xNameAccess
+= 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+  maTempFile.GetURL());
+
+// Check that the referenced slideLayout files exist
+// Without the accompanying fix in place, this test would have failed with:
+// equality assertion failed
+// - Expected: 1
+// - Actual  : 0
+// i.e. the referenced slideLayout file was missing on export.
+

core.git: include/svx svx/source

2024-03-04 Thread Miklos Vajna (via logerrit)
 include/svx/xtable.hxx|4 ++--
 svx/source/xoutdev/xtable.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 3372d5c37e07a9862fadc0041587e30759ad0379
Author: Miklos Vajna 
AuthorDate: Mon Mar 4 08:23:53 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Mar 4 18:49:47 2024 +0100

svx: prefix members of XGradientEntry

See tdf#94879 for motivation.

Change-Id: Ib00e0ea61ad421eb1d02d973ab8dc8c79b006a64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164326
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index 273cc918210e..15775d01ef2a 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -101,7 +101,7 @@ public:
 class SVXCORE_DLLPUBLIC XGradientEntry final : public XPropertyEntry
 {
 private:
-basegfx::BGradient  aGradient;
+basegfx::BGradient  m_aGradient;
 
 public:
 XGradientEntry(const basegfx::BGradient& rGradient, const OUString& rName);
@@ -109,7 +109,7 @@ public:
 
 const basegfx::BGradient& GetGradient() const
 {
-return aGradient;
+return m_aGradient;
 }
 };
 
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 26316acf9ad8..fea229ec74dc 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -74,13 +74,13 @@ XHatchEntry::XHatchEntry(const XHatchEntry& rOther)
 
 XGradientEntry::XGradientEntry(const basegfx::BGradient& rGradient, const 
OUString& rName)
 :   XPropertyEntry(rName),
-aGradient(rGradient)
+m_aGradient(rGradient)
 {
 }
 
 XGradientEntry::XGradientEntry(const XGradientEntry& rOther)
 :   XPropertyEntry(rOther),
-aGradient(rOther.aGradient)
+m_aGradient(rOther.m_aGradient)
 {
 }
 


core.git: include/svx officecfg/registry sd/uiconfig

2024-03-01 Thread Olivier Hallot (via logerrit)
 include/svx/strings.hrc  |2 +-
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |2 +-
 sd/uiconfig/sdraw/menubar/menubar.xml|1 +
 sd/uiconfig/sdraw/popupmenu/curve.xml|1 +
 sd/uiconfig/simpress/menubar/menubar.xml |1 +
 sd/uiconfig/simpress/popupmenu/curve.xml |1 +
 6 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 716c1c3c973f2b171efb8eca31498a29364b4548
Author: Olivier Hallot 
AuthorDate: Sun Jan 14 12:07:12 2024 -0300
Commit: Olivier Hallot 
CommitDate: Fri Mar 1 11:49:46 2024 +0100

tdf#94535 Change "Fontwork" to "Text along Path"

+ Applied to Draw and Impress format menu
+ Applied to Curve context menu
+ Connected to tdf#118336 Help page.

Change-Id: Ibb5d2edf7f5baccf49852b62008aed1c89409f45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162047
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 3813f9dfceca..f26dbe3bd558 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1801,7 +1801,7 @@
 #define RID_SVXSTR_PAGEDIR_LTR_VERT 
NC_("RID_SVXSTR_PAGEDIR_LTR_VERT", "Left-to-right (vertical)")
 #define RID_SVXSTR_PAGEDIR_LTR_BTT_VERT 
NC_("RID_SVXSTR_PAGEDIR_LTR_BTT_VERT", "Bottom-to-top, left-to-right 
(vertical)")
 
-#define RID_SVXSTR_FONTWORK 
NC_("RID_SVXSTR_FONTWORK", "Fontwork")
+#define RID_SVXSTR_FONTWORK 
NC_("RID_SVXSTR_FONTWORK", "Text along Path...")
 
 #define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY 
NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:")
 #define RID_SVXSTR_SIGNATURELINE_DATE   
NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1")
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 6da4532d2687..5b438e01ffe1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3934,7 +3934,7 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  F~ontwork
+  Text along Path
 
 
   1
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml 
b/sd/uiconfig/sdraw/menubar/menubar.xml
index b1058bbda973..1865877146e3 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -428,6 +428,7 @@
   
   
   
+  
   
   
   
diff --git a/sd/uiconfig/sdraw/popupmenu/curve.xml 
b/sd/uiconfig/sdraw/popupmenu/curve.xml
index ee57366df1c8..535a9182505f 100644
--- a/sd/uiconfig/sdraw/popupmenu/curve.xml
+++ b/sd/uiconfig/sdraw/popupmenu/curve.xml
@@ -54,6 +54,7 @@
   
   
   
+  
   
   
   
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml 
b/sd/uiconfig/simpress/menubar/menubar.xml
index 1ee7c7011cd5..55480466b9dd 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -461,6 +461,7 @@
 
   
   
+  
   
   
   
diff --git a/sd/uiconfig/simpress/popupmenu/curve.xml 
b/sd/uiconfig/simpress/popupmenu/curve.xml
index 3c5db45de302..3d0057f74e61 100644
--- a/sd/uiconfig/simpress/popupmenu/curve.xml
+++ b/sd/uiconfig/simpress/popupmenu/curve.xml
@@ -20,6 +20,7 @@
   
   
   
+  
   
   
 


core.git: include/svx sd/source svx/source

2024-02-29 Thread Armin Le Grand (allotropia) (via logerrit)
 include/svx/sdr/contact/viewcontact.hxx   |5 +
 include/svx/sdr/contact/viewobjectcontact.hxx |5 +
 include/svx/svdedxv.hxx   |   14 +++-
 sd/source/ui/view/sdview.cxx  |6 +
 svx/source/sdr/contact/viewcontact.cxx|   23 ++
 svx/source/sdr/contact/viewobjectcontact.cxx  |   11 +++
 svx/source/svdraw/svdedxv.cxx |   87 ++
 svx/source/unodraw/unoshtxt.cxx   |8 ++
 8 files changed, 157 insertions(+), 2 deletions(-)

New commits:
commit e3fdafaabc198054255fa7c5c34b6beed6915b3b
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Feb 29 16:08:29 2024 +0100
Commit: Armin Le Grand 
CommitDate: Thu Feb 29 23:23:04 2024 +0100

IASS: Update edited Text in other Views

This was not working for multiple Windows for
a document, and also not supported for SlideShow
until now.

If you edit a Text on a Slide (Object, PresObj,
...) that text is not yet set at the Model until
the TextEdit ends. In that situation those changes
are now propagated to other views visualizing that
object. This is done with slight slowdown to not
do it all the time while typing, (currently 350ms,
grepped from other places in the office).

It will be shown in a running open SlideShow (and
evtl. trigger an effect at the Object as Preview).
This will allow to get a good preview for how it
looks in the SlideShow.

This is also done for further EditViews opened
for that Document. This was not done before. It
is fine-tuned to do this only for the Views besides
the EditView with the running TextEdit to not
cause slowdowns in that active view - the TextEdit
is already running on the Overlay to have no
problems with speed, this needs to be preserved.

I had to fix a multi-view error in the a11y stack
that implied that only one view exists and thus
has to have an Outliner - that is wrong for
multiple views, only one will have one.

Change-Id: I781d32a8fcb8732ee8fcfbae72c02d1f99b6cd06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164160
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/include/svx/sdr/contact/viewcontact.hxx 
b/include/svx/sdr/contact/viewcontact.hxx
index 7b6d0f3ab2c1..00b7f6253eae 100644
--- a/include/svx/sdr/contact/viewcontact.hxx
+++ b/include/svx/sdr/contact/viewcontact.hxx
@@ -27,6 +27,7 @@
 class SdrLayerIDSet;
 class SdrPage;
 class SdrObject;
+class SdrPageView;
 
 namespace sdr::contact
 {
@@ -122,6 +123,10 @@ public:
 // React on changes of the object of this ViewContact
 virtual void ActionChanged();
 
+// IASS: helpers for IASS invalidates
+void ActionChangedIfDifferentPageView(SdrPageView& rSdrPageView);
+bool hasMultipleViewObjectContacts() const;
+
 // access to the local primitive. This will ensure that the primitive is
 // current in comparing the local one with a fresh created incarnation
 void getViewIndependentPrimitive2DContainer(
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx 
b/include/svx/sdr/contact/viewobjectcontact.hxx
index 12195a0faa34..8f903d93e04b 100644
--- a/include/svx/sdr/contact/viewobjectcontact.hxx
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -24,6 +24,8 @@
 #include 
 #include 
 
+class SdrPageView;
+
 namespace vcl { class Region; }
 
 namespace sdr::animation {
@@ -101,6 +103,9 @@ public:
 // React on changes of the object of this ViewContact
 virtual void ActionChanged();
 
+// IASS: helper for IASS invalidates
+void ActionChangedIfDifferentPageView(SdrPageView& rSdrPageView);
+
 // LazyInvalidate handling
 void triggerLazyInvalidate();
 
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 8ad7f048b682..6c6a37f108a7 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -76,8 +76,15 @@ class SVXCORE_DLLPUBLIC SdrObjEditView : public 
SdrGlueEditView, public EditView
 virtual void EditViewCursorRect(const tools::Rectangle& rRect, int 
nExtTextInputWidth) override;
 
 // The OverlayObjects used for visualizing active TextEdit (currently
-// using TextEditOverlayObject, but not limited to it
+// using TextEditOverlayObject, but not limited to it)
 sdr::overlay::OverlayObjectList maTEOverlayGroup;
+Timer   maTextEditUpdateTimer;
+
+// IASS: allow reaction to active TextEdit changes
+DECL_DLLPRIVATE_LINK(ImpModifyHdl, LinkParamNone*, void);
+
+// IASS: timer-based reaction on TextEdit changes
+DECL_DLLPRIVATE_LINK(TextEditUpdate, Timer*, void);
 
 protected:
 // TextEdit
@@ -104,10 +111,15 @@ protected:
 bool mbTextEditNewObj : 1;  // current edited object was just recreated
 bool mbQuickTextEditMode : 1;   // persistent(->CrtV). Default=TRUE
 bool mbMacroDown : 1;
+bool mbInteractiveSlideShow : 1; // IASS
 
 

core.git: include/svx svx/source xmloff/source

2024-02-28 Thread Julien Nabet (via logerrit)
 include/svx/svx3ditems.hxx   |4 +-
 include/svx/unoshprp.hxx |4 +-
 svx/source/engine3d/float3d.cxx  |   27 ---
 svx/source/engine3d/svx3ditems.cxx   |6 ++--
 svx/source/sdr/primitive3d/sdrattributecreator3d.cxx |   15 ++
 xmloff/source/draw/sdpropls.cxx  |   11 ---
 6 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 458f4c9b489d92947c4122e7c450f65f90aa4efe
Author: Julien Nabet 
AuthorDate: Tue Feb 27 08:16:00 2024 +0100
Commit: Julien Nabet 
CommitDate: Wed Feb 28 10:55:45 2024 +0100

tdf#159874: Inspection of 3D object in Dev Tools crashes LO (take 2)

To not trigger tdf#159911 (FILEOPEN: 3D object is displayed as black/white)
Let's initialize Svx3DTextureKindItem to 2 which corresponds to COLOR in 
TextureKind2.idl
(see 
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/TextureKind2.idl?r=5687eba4)

but now to avoid the crash, we must replace all uses of TextureKind by 
TextureKind2
Anyway, TextureKind has been deprecated since 2000
(see 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f9e6d84feb36ab3072dafbab0ba4ae46d264f9b
"#80594# added a new TextureKind2 enum because of missing value in 
TextureKind")

+ use css::drawing::TextureKind2_LUMINANCE + 
css::drawing::TextureKind2_COLOR instead of wrong numbers

Change-Id: I969bd9ba1c6752111a6e6f5cd2c6c608568e43e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163998
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 7cb5eae6e399..c749b7eab112 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -119,9 +119,9 @@ inline SfxUInt16Item 
makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
 
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public 
SfxUInt16Item {
 public:
-Svx3DTextureKindItem(sal_uInt16 nVal = 3);
+Svx3DTextureKindItem(sal_uInt16 nVal = 2);
 
-// use drawing::TextureKind
+// use drawing::TextureKind2
 SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 
nMemberId = 0 ) const override;
 SVX_DLLPRIVATE virtual  bool PutValue( const css::uno::Any& rVal, 
sal_uInt8 nMemberId ) override;
 SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = 
nullptr) const override;
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 53561015804b..0bf49b7a3e8c 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -55,7 +55,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -529,7 +529,7 @@
 { UNO_NAME_3D_NORMALS_KIND ,SDRATTR_3DOBJ_NORMALS_KIND 
   , ::cppu::UnoType::get(), 0, 0}, \
 { UNO_NAME_3D_SHADOW_3D,SDRATTR_3DOBJ_SHADOW_3D
   , cppu::UnoType::get(), 0, 0}, \
 { UNO_NAME_3D_TEXTURE_FILTER   ,SDRATTR_3DOBJ_TEXTURE_FILTER   
   , cppu::UnoType::get(), 0, 0}, \
-{ UNO_NAME_3D_TEXTURE_KIND ,SDRATTR_3DOBJ_TEXTURE_KIND 
   , ::cppu::UnoType::get(), 0, 0}, \
+{ UNO_NAME_3D_TEXTURE_KIND ,SDRATTR_3DOBJ_TEXTURE_KIND 
   , ::cppu::UnoType::get(), 0, 0}, \
 { UNO_NAME_3D_TEXTURE_MODE ,SDRATTR_3DOBJ_TEXTURE_MODE 
   , ::cppu::UnoType::get(), 0, 0}, \
 { UNO_NAME_3D_TEXTURE_PROJ_X   ,SDRATTR_3DOBJ_TEXTURE_PROJ_X   
   , ::cppu::UnoType::get(), 0, 0}, \
 { UNO_NAME_3D_TEXTURE_PROJ_Y   ,SDRATTR_3DOBJ_TEXTURE_PROJ_Y   
   , ::cppu::UnoType::get(), 0, 0}, \
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 035ca293faa6..aa27d5319a3c 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -50,6 +50,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -1349,12 +1350,13 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
 if( eState != SfxItemState::DONTCARE )
 {
 sal_uInt16 nValue = 
rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue();
+drawing::TextureKind2 objTextKind = 
static_cast(nValue);
 
-if( ( !m_xBtnTexLuminance->get_active() && nValue == 1 ) ||
-( !m_xBtnTexColor->get_active() && nValue == 3 ) )
+if( ( !m_xBtnTexLuminance->get_active() && objTextKind == 
css::drawing::TextureKind2_LUMINANCE ) ||
+( !m_xBtnTexColor->get_active() && objTextKind == 
css::drawing::TextureKind2_COLOR ) )
 {
-m_xBtnTexLuminance->set_active( nValue == 1 );
-m_xBtnTexColor->set_active( nValue == 3 );
+m_xBtnTexLuminance->set_active( objTextKind == 
css::drawing::TextureKind2_LUMINANCE );
+m_xBtnTexColor->set_active( objTextKind == 

core.git: include/svx

2024-02-26 Thread Julien Nabet (via logerrit)
 include/svx/svx3ditems.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 87109270ce08a1f50bb1b791ff6c5a0abc8db891
Author: Julien Nabet 
AuthorDate: Mon Feb 26 17:13:19 2024 +0100
Commit: Julien Nabet 
CommitDate: Mon Feb 26 21:55:10 2024 +0100

Revert "tdf#159874: Inspection of 3D object in Development Tools crashes 
LibreOffice"

This reverts commit ff197bf1a9a8a6cd73fe0e1cc03c4424d9e1dc2e.

Reason for revert: generates regression, see tdf#159911 (FILEOPEN: 3D 
object is displayed as black/white)

Change-Id: I17d3d30efaf63d0f1598a1a94a2e5f0fac78119f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163849
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index a7da4b1e861f..7cb5eae6e399 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -119,7 +119,7 @@ inline SfxUInt16Item 
makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
 
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public 
SfxUInt16Item {
 public:
-Svx3DTextureKindItem(sal_uInt16 nVal = 0);
+Svx3DTextureKindItem(sal_uInt16 nVal = 3);
 
 // use drawing::TextureKind
 SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 
nMemberId = 0 ) const override;


core.git: include/svx svx/source sw/source

2024-02-26 Thread Justin Luth (via logerrit)
 include/svx/sidebar/ValueSetWithTextControl.hxx  |1 -
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |   11 ---
 sw/source/uibase/sidebar/PageSizeControl.cxx |1 -
 3 files changed, 13 deletions(-)

New commits:
commit 7c3cdc88337959ddbb9799c4cee57901e94719f3
Author: Justin Luth 
AuthorDate: Mon Feb 26 11:09:59 2024 -0500
Commit: Justin Luth 
CommitDate: Mon Feb 26 18:55:51 2024 +0100

tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal"

...height

This reverts my 24.2 commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2
(as well as my initial attempt to fix it in 24.8).

Change-Id: I70c3668393a13992f9ce489e86b07860218445b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163954
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx 
b/include/svx/sidebar/ValueSetWithTextControl.hxx
index 407e9606757f..ac397f9fdab6 100644
--- a/include/svx/sidebar/ValueSetWithTextControl.hxx
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -40,7 +40,6 @@ public:
 
 SVX_DLLPRIVATE virtual void SetDrawingArea(weld::DrawingArea* 
pDrawingArea) override;
 
-void SetOptimalDrawingAreaHeight();
 void AddItem(const OUString& rItemText, const OUString& rItemText2);
 
 SVX_DLLPRIVATE virtual void UserDraw(const UserDrawEvent& rUDEvt) override;
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx 
b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index d55740315c99..cddd7b0aa801 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -42,17 +42,6 @@ void 
ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 SetColCount();
 }
 
-void ValueSetWithTextControl::SetOptimalDrawingAreaHeight()
-{
-const vcl::Font 
aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
-double fRowHeight = aFont.GetFontSize().Height() * 9 / 4.0; // see 
UserDraw()
-// It still looks too small. Probably the height specified should be the 
leading point size?
-fRowHeight *= 1.2; // add 20% leading
-const Size aSize(GetOutputSizePixel().Width(), fRowHeight * 
maItems.size());
-GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height());
-SetOutputSizePixel(aSize);
-}
-
 void ValueSetWithTextControl::AddItem(
 const OUString& rItemText,
 const OUString& rItemText2 )
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx 
b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 2591ffd99718..37ed1835e972 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -168,7 +168,6 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, 
weld::Widget* pParent)
 }
 mxSizeValueSet->SetNoSelection();
 mxSizeValueSet->SetSelectHdl( LINK(this, PageSizeControl, ImplSizeHdl ) );
-mxSizeValueSet->SetOptimalDrawingAreaHeight();
 mxSizeValueSet->Show();
 mxSizeValueSet->Resize();
 


core.git: include/svx svx/source

2024-02-26 Thread Miklos Vajna (via logerrit)
 include/svx/xflhtit.hxx  |4 +-
 svx/source/xoutdev/xattr.cxx |   60 +--
 2 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit d3b548fdd01d73778c8ae2512e9db024e47c52d2
Author: Miklos Vajna 
AuthorDate: Mon Feb 26 08:25:46 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 26 09:31:49 2024 +0100

svx: prefix members of XFillHatchItem

See tdf#94879 for motivation.

Change-Id: I4e2251aa5488c76a270e01f48ed4ccc12fc56332
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163930
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx
index 9eb8805415aa..92ce362fc0fa 100644
--- a/include/svx/xflhtit.hxx
+++ b/include/svx/xflhtit.hxx
@@ -31,7 +31,7 @@ class SdrModel;
 
 class SVXCORE_DLLPUBLIC XFillHatchItem final : public NameOrIndex
 {
-XHatch  aHatch;
+XHatch  m_aHatch;
 
 public:
 static SfxPoolItem* CreateDefault();
@@ -52,7 +52,7 @@ public:
 virtual boolHasMetrics() const override;
 virtual voidScaleMetrics(tools::Long nMul, tools::Long nDiv) 
override;
 
-const XHatch&   GetHatchValue() const { return aHatch;} // 
GetValue -> GetHatchValue
+const XHatch&   GetHatchValue() const { return m_aHatch;} // 
GetValue -> GetHatchValue
 
 static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 
);
 std::unique_ptr checkForUniqueItem( SdrModel* pModel ) 
const;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index b1747eea65ba..5db227e9fca7 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2670,19 +2670,19 @@ SfxPoolItem* XFillHatchItem::CreateDefault() { return 
new XFillHatchItem; }
 XFillHatchItem::XFillHatchItem(const OUString& rName,
  const XHatch& rTheHatch) :
 NameOrIndex(XATTR_FILLHATCH, rName),
-aHatch(rTheHatch)
+m_aHatch(rTheHatch)
 {
 }
 
 XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) :
 NameOrIndex(rItem),
-aHatch(rItem.aHatch)
+m_aHatch(rItem.m_aHatch)
 {
 }
 
 XFillHatchItem::XFillHatchItem(const XHatch& rTheHatch)
 :   NameOrIndex( XATTR_FILLHATCH, -1 ),
-aHatch(rTheHatch)
+m_aHatch(rTheHatch)
 {
 }
 
@@ -2694,7 +2694,7 @@ XFillHatchItem* XFillHatchItem::Clone(SfxItemPool* 
/*pPool*/) const
 bool XFillHatchItem::operator==(const SfxPoolItem& rItem) const
 {
 return ( NameOrIndex::operator==(rItem) &&
- aHatch == static_cast(rItem).aHatch );
+ m_aHatch == static_cast(rItem).m_aHatch );
 }
 
 bool XFillHatchItem::GetPresentation
@@ -2716,7 +2716,7 @@ bool XFillHatchItem::HasMetrics() const
 
 void XFillHatchItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
 {
-aHatch.SetDistance( BigInt::Scale( aHatch.GetDistance(), nMul, nDiv ) );
+m_aHatch.SetDistance( BigInt::Scale( m_aHatch.GetDistance(), nMul, nDiv ) 
);
 }
 
 bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) 
const
@@ -2729,10 +2729,10 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, 
sal_uInt8 nMemberId ) cons
 {
 css::drawing::Hatch aUnoHatch;
 
-aUnoHatch.Style = aHatch.GetHatchStyle();
-aUnoHatch.Color = sal_Int32(aHatch.GetColor());
-aUnoHatch.Distance = aHatch.GetDistance();
-aUnoHatch.Angle = aHatch.GetAngle().get();
+aUnoHatch.Style = m_aHatch.GetHatchStyle();
+aUnoHatch.Color = sal_Int32(m_aHatch.GetColor());
+aUnoHatch.Distance = m_aHatch.GetDistance();
+aUnoHatch.Angle = m_aHatch.GetAngle().get();
 
 uno::Sequence< beans::PropertyValue > aPropSeq{
 comphelper::makePropertyValue("Name", 
SvxUnogetApiNameForItem(Which(), GetName())),
@@ -2746,10 +2746,10 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, 
sal_uInt8 nMemberId ) cons
 {
 css::drawing::Hatch aUnoHatch;
 
-aUnoHatch.Style = aHatch.GetHatchStyle();
-aUnoHatch.Color = sal_Int32(aHatch.GetColor());
-aUnoHatch.Distance = aHatch.GetDistance();
-aUnoHatch.Angle = aHatch.GetAngle().get();
+aUnoHatch.Style = m_aHatch.GetHatchStyle();
+aUnoHatch.Color = sal_Int32(m_aHatch.GetColor());
+aUnoHatch.Distance = m_aHatch.GetDistance();
+aUnoHatch.Angle = m_aHatch.GetAngle().get();
 rVal <<= aUnoHatch;
 break;
 }
@@ -2761,13 +2761,13 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, 
sal_uInt8 nMemberId ) cons
 }
 
 case MID_HATCH_STYLE:
-rVal <<= aHatch.GetHatchStyle(); break;
+rVal <<= m_aHatch.GetHatchStyle(); break;
 case MID_HATCH_COLOR:
-rVal <<= aHatch.GetColor(); break;
+rVal <<= m_aHatch.GetColor(); break;
 case 

core.git: include/svx svx/source svx/uiconfig

2024-02-25 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/strings.hrc  |1 -
 svx/source/tbxctrls/bulletsnumbering.cxx |2 --
 svx/uiconfig/ui/numberingwindow.ui   |3 ++-
 3 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit fe4cd0cebdbf9412e26f8182e79f97bb844d94af
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 22 14:09:12 2024 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 26 07:41:02 2024 +0100

Set button label directly in ui file

Change-Id: If9e22982f4f7c276d19167ff365e1b4e290e3de7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163748
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index c43bf8203981..eb8e06f0c4c7 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1108,7 +1108,6 @@
 #define RID_SVXSTR_DEFAULT  
NC_("RID_SVXSTR_DEFAULT", "Default")
 #define RID_SVXSTR_FRAME
NC_("RID_SVXSTR_FRAME", "Borders")
 #define RID_SVXSTR_FRAME_STYLE  
NC_("RID_SVXSTR_FRAME_STYLE", "Border Style")
-#define RID_SVXSTR_CUSTOMIZE
NC_("RID_SVXSTR_CUSTOMIZE", "Customize...")
 #define RID_SVXSTR_BY_AUTHOR
NC_("RID_SVXSTR_BY_AUTHOR", "By author")
 #define RID_SVXSTR_PAGES
NC_("RID_SVXSTR_PAGES", "Pages")
 #define RID_SVXSTR_CLEARFORM
NC_("RID_SVXSTR_CLEARFORM", "Clear formatting")
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx 
b/svx/source/tbxctrls/bulletsnumbering.cxx
index e1a55a112346..e7ccc6238800 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -107,7 +107,6 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& 
rController,
 mxValueSet->SetOutputSizePixel(aSize);
 
mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFieldColor());
 
-OUString aMoreItemText = SvxResId( RID_SVXSTR_CUSTOMIZE );
 if ( mePageType == NumberingPageType::BULLET )
 AddStatusListener( ".uno:CurrentBulletListType" );
 else if ( mePageType == NumberingPageType::SINGLENUM )
@@ -117,7 +116,6 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& 
rController,
 
 auto xImage = 
vcl::CommandInfoProvider::GetXGraphicForCommand(".uno:OutlineBullet", 
mrController.getFrameInterface());
 mxMoreButton->set_image(xImage);
-mxMoreButton->set_label(aMoreItemText);
 mxMoreButton->connect_clicked(LINK(this, NumberingPopup, 
VSButtonClickSetHdl));
 
 mxValueSet->SetSelectHdl(LINK(this, NumberingPopup, VSSelectValueSetHdl));
diff --git a/svx/uiconfig/ui/numberingwindow.ui 
b/svx/uiconfig/ui/numberingwindow.ui
index e303830fc01e..db44aeee4d8c 100644
--- a/svx/uiconfig/ui/numberingwindow.ui
+++ b/svx/uiconfig/ui/numberingwindow.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -51,6 +51,7 @@
 
 
   
+Customize...
 True
 True
 True


core.git: include/svx

2024-02-25 Thread Julien Nabet (via logerrit)
 include/svx/svx3ditems.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff197bf1a9a8a6cd73fe0e1cc03c4424d9e1dc2e
Author: Julien Nabet 
AuthorDate: Sun Feb 25 11:18:14 2024 +0100
Commit: Julien Nabet 
CommitDate: Sun Feb 25 13:34:04 2024 +0100

tdf#159874: Inspection of 3D object in Development Tools crashes LibreOffice

See bt:
https://bugs.documentfoundation.org/attachment.cgi?id=192752

2 remarks here:
- there are TextureKind.idl and TextureKind2.idl but first one is indicated 
as deprecated since 2000!
(see 4f9e6d84feb36ab3072dafbab0ba4ae46d264f9b #80594# added a new 
TextureKind2 enum because of missing value in TextureKind)
=> should we only use TextureKind2.idl now?

- in svx/source/sdr/primitive3d/sdrattributecreator3d.cxx, we can read this 
comment:
// TextureKind: 1 == Base3DTextureLuminance, 2 == Base3DTextureIntensity, 3 
== Base3DTextureColor
See 
https://opengrok.libreoffice.org/xref/core/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx?r=05416682#88
but TextureKind2.idl defines LUMINANCE, INTENSITY and COLOR with no number,
so I expect they take by default values 0, 1 and 2
See 
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/TextureKind2.idl?r=5687eba4

BTW, same pb with this line:
// TextureMode: 1 == Base3DTextureReplace, 2 == Base3DTextureModulate, 3 == 
Base3DTextureBlend
TextureMode.idl just indicates: REPLACE, MODULATE and BLEND

=> should we change comments and related code?

Change-Id: Ia514890c131ab9f6fb239c7451335503c9b0e3cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163903
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 7cb5eae6e399..a7da4b1e861f 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -119,7 +119,7 @@ inline SfxUInt16Item 
makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
 
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public 
SfxUInt16Item {
 public:
-Svx3DTextureKindItem(sal_uInt16 nVal = 3);
+Svx3DTextureKindItem(sal_uInt16 nVal = 0);
 
 // use drawing::TextureKind
 SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 
nMemberId = 0 ) const override;


core.git: include/svx svx/source

2024-02-19 Thread Miklos Vajna (via logerrit)
 include/svx/xflgrit.hxx  |4 ++--
 svx/source/xoutdev/xattr.cxx |   16 
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit e3c0aeec8385cba90b4fb21d2c9032efa61a8e82
Author: Miklos Vajna 
AuthorDate: Mon Feb 19 08:00:48 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 19 09:11:25 2024 +0100

svx: prefix members of XFillGradientItem

See tdf#94879 for motivation.

Change-Id: I3d951d553d524cedc876330a70e6fe94edba0173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163579
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xflgrit.hxx b/include/svx/xflgrit.hxx
index c8594753e5c0..97c0b072352c 100644
--- a/include/svx/xflgrit.hxx
+++ b/include/svx/xflgrit.hxx
@@ -30,7 +30,7 @@ class SdrModel;
 
 class SVXCORE_DLLPUBLIC XFillGradientItem : public NameOrIndex
 {
-basegfx::BGradient   aGradient;
+basegfx::BGradient   m_aGradient;
 
 public:
 static SfxPoolItem* CreateDefault();
@@ -50,7 +50,7 @@ public:
   MapUnit ePresMetric,
   OUString , const IntlWrapper& ) const 
override;
 const basegfx::BGradient&GetGradientValue() const; // GetValue -> 
GetGradientValue
-voidSetGradientValue(const basegfx::BGradient& rNew) { 
aGradient = rNew; Detach(); } // SetValue -> SetGradientValue
+voidSetGradientValue(const basegfx::BGradient& rNew) { 
m_aGradient = rNew; Detach(); } // SetValue -> SetGradientValue
 
 static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 
);
 std::unique_ptr checkForUniqueItem( SdrModel* pModel ) 
const;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index c4dd3d292b00..b1747eea65ba 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2212,26 +2212,26 @@ SfxPoolItem* XFillGradientItem::CreateDefault() { 
return new XFillGradientItem;
 XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
const basegfx::BGradient& rTheGradient) :
 NameOrIndex(XATTR_FILLGRADIENT, nIndex),
-aGradient(rTheGradient)
+m_aGradient(rTheGradient)
 {
 }
 
 XFillGradientItem::XFillGradientItem(const OUString& rName,
const basegfx::BGradient& rTheGradient, 
TypedWhichId nWhich)
 : NameOrIndex(nWhich, rName)
-, aGradient(rTheGradient)
+, m_aGradient(rTheGradient)
 {
 }
 
 XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) :
 NameOrIndex(rItem),
-aGradient(rItem.aGradient)
+m_aGradient(rItem.m_aGradient)
 {
 }
 
 XFillGradientItem::XFillGradientItem( const basegfx::BGradient& rTheGradient )
 :   NameOrIndex( XATTR_FILLGRADIENT, -1 ),
-aGradient(rTheGradient)
+m_aGradient(rTheGradient)
 {
 }
 
@@ -2243,16 +2243,16 @@ XFillGradientItem* 
XFillGradientItem::Clone(SfxItemPool* /*pPool*/) const
 bool XFillGradientItem::operator==(const SfxPoolItem& rItem) const
 {
 return ( NameOrIndex::operator==(rItem) &&
- aGradient == static_cast(rItem).aGradient );
+ m_aGradient == static_cast(rItem).m_aGradient );
 }
 
 const basegfx::BGradient& XFillGradientItem::GetGradientValue() const // 
GetValue -> GetGradientValue
 {
 if (!IsIndex())
-return aGradient;
+return m_aGradient;
 // ToDo: This should fail. We never called this code with a table so this 
should always
 // have failed. Thus, I'm thinking that XFillGradientItem can't be an 
Index.
-return aGradient;
+return m_aGradient;
 }
 
 bool XFillGradientItem::GetPresentation
@@ -2485,7 +2485,7 @@ std::unique_ptr 
XFillGradientItem::checkForUniqueItem( SdrMod
 
 // if the given name is not valid, replace it!
 if( aUniqueName != GetName() )
-return std::make_unique( aUniqueName, 
aGradient, TypedWhichId(Which()) );
+return std::make_unique( aUniqueName, 
m_aGradient, TypedWhichId(Which()) );
 }
 
 return nullptr;


core.git: include/svx svx/source

2024-02-12 Thread Miklos Vajna (via logerrit)
 include/svx/svdhlpln.hxx   |   16 
 svx/source/svdraw/svdhlpln.cxx |6 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 207501b8385818a5d413b9f4001e0d24aaa4f2a9
Author: Miklos Vajna 
AuthorDate: Mon Feb 12 08:17:14 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 12 10:34:34 2024 +0100

svx: prefix members of SdrHelpLineList

See tdf#94879 for motivation.

Change-Id: I172aad9fe63589a6a6bbbce77173a6fe24291ae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163235
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx
index 0eed874adf3a..218f36e46bf8 100644
--- a/include/svx/svdhlpln.hxx
+++ b/include/svx/svdhlpln.hxx
@@ -59,7 +59,7 @@ public:
 #define SDRHELPLINE_NOTFOUND 0x
 
 class SVXCORE_DLLPUBLIC SdrHelpLineList {
-std::vector> aList;
+std::vector> m_aList;
 
 public:
 SdrHelpLineList() {}
@@ -67,21 +67,21 @@ public:
 SdrHelpLineList&   operator=(const SdrHelpLineList& rSrcList);
 bool operator==(const SdrHelpLineList& rCmp) const;
 bool operator!=(const SdrHelpLineList& rCmp) const { 
return !operator==(rCmp); }
-sal_uInt16 GetCount() const{ 
return sal_uInt16(aList.size()); }
-void   Insert(const SdrHelpLine& rHL)  
{ aList.emplace_back(new SdrHelpLine(rHL)); }
+sal_uInt16 GetCount() const{ 
return sal_uInt16(m_aList.size()); }
+void   Insert(const SdrHelpLine& rHL)  
{ m_aList.emplace_back(new SdrHelpLine(rHL)); }
 void   Insert(const SdrHelpLine& rHL, sal_uInt16 nPos)
 {
 if(nPos==0x)
-aList.emplace_back(new SdrHelpLine(rHL));
+m_aList.emplace_back(new SdrHelpLine(rHL));
 else
-aList.emplace(aList.begin() + nPos, new SdrHelpLine(rHL));
+m_aList.emplace(m_aList.begin() + nPos, new SdrHelpLine(rHL));
 }
 void   Delete(sal_uInt16 nPos)
 {
-aList.erase(aList.begin() + nPos);
+m_aList.erase(m_aList.begin() + nPos);
 }
-SdrHelpLine&   operator[](sal_uInt16 nPos) 
{ return *aList[nPos]; }
-const SdrHelpLine& operator[](sal_uInt16 nPos) const   
{ return *aList[nPos]; }
+SdrHelpLine&   operator[](sal_uInt16 nPos) 
{ return *m_aList[nPos]; }
+const SdrHelpLine& operator[](sal_uInt16 nPos) const   
{ return *m_aList[nPos]; }
 sal_uInt16 HitTest(const Point& rPnt, sal_uInt16 nTolLog, 
const OutputDevice& rOut) const;
 };
 
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index c42aefd4e816..58d0eb10c400 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -73,7 +73,7 @@ tools::Rectangle SdrHelpLine::GetBoundRect(const 
OutputDevice& rOut) const
 
 SdrHelpLineList& SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList)
 {
-aList.clear();
+m_aList.clear();
 sal_uInt16 nCount=rSrcList.GetCount();
 for (sal_uInt16 i=0; i0;) {
 i--;
-if (aList[i]->IsHit(rPnt,nTolLog,rOut)) return i;
+if (m_aList[i]->IsHit(rPnt,nTolLog,rOut)) return i;
 }
 return SDRHELPLINE_NOTFOUND;
 }


core.git: include/svx svx/source

2024-02-05 Thread Miklos Vajna (via logerrit)
 include/svx/xtable.hxx|4 ++--
 svx/source/xoutdev/xtable.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4259b451c26eec782eb15c7603f6fbb06fc3787e
Author: Miklos Vajna 
AuthorDate: Mon Feb 5 08:09:53 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 5 11:50:50 2024 +0100

svx: prefix members of XDashEntry

See tdf#94879 for motivation.

Change-Id: I9506823a9d9f3b11496ff6211943b72a81a77165
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162981
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index eb015497a9e4..273cc918210e 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -71,7 +71,7 @@ public:
 class SVXCORE_DLLPUBLIC XDashEntry final : public XPropertyEntry
 {
 private:
-XDash   aDash;
+XDash   m_aDash;
 
 public:
 XDashEntry(const XDash& rDash, const OUString& rName);
@@ -79,7 +79,7 @@ public:
 
 const XDash& GetDash() const
 {
-return aDash;
+return m_aDash;
 }
 };
 
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 87850e6f25b8..26316acf9ad8 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -50,13 +50,13 @@ XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther)
 
 XDashEntry::XDashEntry(const XDash& rDash, const OUString& rName)
 :   XPropertyEntry(rName),
-aDash(rDash)
+m_aDash(rDash)
 {
 }
 
 XDashEntry::XDashEntry(const XDashEntry& rOther)
 :   XPropertyEntry(rOther),
-aDash(rOther.aDash)
+m_aDash(rOther.m_aDash)
 {
 }
 


core.git: include/svx svx/source

2024-01-31 Thread Tomaž Vajngerl (via logerrit)
 include/svx/tbcontrl.hxx |   65 ---
 svx/source/tbxctrls/tbcontrl.cxx |  168 +--
 2 files changed, 42 insertions(+), 191 deletions(-)

New commits:
commit 8cccfc82a3038bc28864ae9e94418a141b4aa545
Author: Tomaž Vajngerl 
AuthorDate: Tue Jan 30 22:59:11 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jan 31 09:03:39 2024 +0100

Revert "store last five MRU currencies in the currency drop-down"

This reverts commit dc6b93011cc5435f367666e43e354c6ab97bbc90.

Change-Id: Ia56cb2e906303d6d59061df3e21954306bee2298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162754
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 11d41ee4ddde..9fffced835cb 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -249,73 +249,11 @@ public:
 /** Popup controller for currency combo widget **/
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxCurrencyToolBoxControl final : 
public svt::PopupWindowController
 {
-public:
-/**
-* Struct containing currency data
-* an instance corresponds to a line in the combo
-**/
-struct SvxCurrencyData {
-/** position of the currency in 
SvxCurrencyToolBoxControl::CurrencySymbols vector **/
-sal_uInt16 m_currencyIdx;
-
-/**
-* False if the instance corresponds to a line of the combo that shows 
only the ISO code
-* True otherwise
-**/
-bool m_onlyIsoCode;
-OUString m_label;
-
-/** Constant for invalid currency **/
-static const sal_uInt16 InvalidCurrency;
-
-/**
-* Constructor
-*
-* @param currencyIdx Position of the currency in 
SvxCurrencyToolBoxControl::CurrencySymbols vector
-* @param onlyIsoCode False if the instance corresponds to a line of 
the combo that shows
-* only the ISO code True otherwise
-**/
-SvxCurrencyData(
-sal_uInt16 currencyIdx = InvalidCurrency,
-bool onlyIsoCode = false
-);
-
-/** Needed by std::find **/
-bool operator == (const SvxCurrencyData& other) const;
-};
-
-/** vector of combo box currencies **/
-typedef std::vector SvxCurrencyVect_t;
-
 private:
 OUString m_aFormatString;
 LanguageType m_eLanguage;
 sal_uInt32   m_nFormatKey;
 
-/** Currencies in the combo **/
-SvxCurrencyVect_t  m_currencies;
-
-
-/** Most recently used currencies **/
-SvxCurrencyVect_t  m_mru_currencies;
-
-/** Adds a currency to the most recently used list **/
-void addMruCurrency(sal_Int16 currencyPosition);
-
-/**
-* Inner static method that polialtes the currency list and the most 
recently used
-* currency list.
-* The method is static for backward compatibility: it is used by the two
-* homonymous public methods, one of which is static while the other is 
instance
-*
-* @param bFlag used by SvxNumberFormatShell::GetCurrencySymbols
-* @param p_mru_currencies output: most recently used currencies
-* @param pCurrencies output: most recently used currencies
-* @see SvxNumberFormatShell::GetCurrencySymbols
-**/
-static void inner_GetCurrencySymbols( bool bFlag, SvxCurrencyVect_t 
_mru_currencies,
-SvxCurrencyVect_t );
-
 public:
 /**
 * Static method used by SvxNumberFormatShell::GetCurrencySymbols
@@ -328,9 +266,6 @@ public:
 static void GetCurrencySymbols( std::vector& rList, bool bFlag,
 std::vector& rCurrencyList );
 
-/** Instance method used by SvxCurrencyList_Impl constructor **/
-const SvxCurrencyVect_t& GetCurrencySymbols();
-
 explicit SvxCurrencyToolBoxControl( const 
css::uno::Reference& rContext );
 virtual ~SvxCurrencyToolBoxControl() override;
 
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 9a3669aac56a..192bf6c6fdd5 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -112,10 +112,6 @@
 
 #define COMBO_WIDTH_IN_CHARS18
 
-#define MAX_MRU_CURRENCIES  5
-
-#define INVALID_CURRENCYsal_uInt16(-2)
-
 // namespaces
 using namespace ::editeng;
 using namespace ::com::sun::star;
@@ -3915,13 +3911,15 @@ namespace
 , m_rSelectedFormat(rSelectedFormat)
 , m_eSelectedLanguage(eSelectedLanguage)
 {
+std::vector< OUString > aList;
+std::vector< sal_uInt16 > aCurrencyList;
 const NfCurrencyTable& rCurrencyTable = 
SvNumberFormatter::GetTheCurrencyTable();
 sal_uInt16 nLen = rCurrencyTable.size();
 
 SvNumberFormatter aFormatter( m_xControl->getContext(), 
LANGUAGE_SYSTEM );
 m_eFormatLanguage = aFormatter.GetLanguage();
 
-const SvxCurrencyToolBoxControl::SvxCurrencyVect_t  = 

core.git: include/svx

2024-01-29 Thread Miklos Vajna (via logerrit)
 include/svx/view3d.hxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f3dfd7c0c980d7538830c9f8c65b36a12a25d93a
Author: Miklos Vajna 
AuthorDate: Mon Jan 29 08:08:02 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 29 09:46:03 2024 +0100

svx: prefix members of E3dView

See tdf#94879 for motivation.

Change-Id: I6da24e603eef63420fcf9d64f1d7322116878965
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162679
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx
index fc7b818f795a..3662f6e32c42 100644
--- a/include/svx/view3d.hxx
+++ b/include/svx/view3d.hxx
@@ -40,8 +40,8 @@ class Impl3DMirrorConstructOverlay;
 
 class SVXCORE_DLLPUBLIC E3dView : public SdrView
 {
-E3dDefaultAttributesa3DDefaultAttr;
-MouseEvent  aMouseEvent;// The 
parameters of the last Events (Mouse, Keyboard)
+E3dDefaultAttributesm_a3DDefaultAttr;
+MouseEvent  m_aMouseEvent;// The 
parameters of the last Events (Mouse, Keyboard)
 
 // Migrate selections
 std::unique_ptr mpMirrorOverlay;
@@ -69,13 +69,13 @@ public:
 virtual void DrawMarkedObj(OutputDevice& rOut) const override;
 
 // Access to the default attributes.
-E3dDefaultAttributes& Get3DDefaultAttributes() { return a3DDefaultAttr; }
+E3dDefaultAttributes& Get3DDefaultAttributes() { return m_a3DDefaultAttr; }
 virtual bool BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* 
pHdl, short nMinMov = -3, SdrDragMethod* pForcedMeth = nullptr) override;
 virtual void CheckPossibilities() override;
 
 // Get/Set Event
-void SetMouseEvent(const MouseEvent& rNew) { aMouseEvent = rNew; }
-const MouseEvent& GetMouseEvent() const { return aMouseEvent; }
+void SetMouseEvent(const MouseEvent& rNew) { m_aMouseEvent = rNew; }
+const MouseEvent& GetMouseEvent() const { return m_aMouseEvent; }
 
 // Override getting the model, as we need to supply a Scene together with 
individual 3D Objects.
 virtual std::unique_ptr CreateMarkedObjModel() const override;


core.git: include/svx

2024-01-24 Thread Caolán McNamara (via logerrit)
 include/svx/DocumentColorHelper.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ebd97f4b8c598f8982446aac06fbb45341d8c2cf
Author: Caolán McNamara 
AuthorDate: Wed Jan 24 10:02:47 2024 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 24 12:56:28 2024 +0100

make these inlines non-static

Change-Id: Icf0f79b7673df1e147a57e796faf82dfd0e01b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162500
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/DocumentColorHelper.hxx 
b/include/svx/DocumentColorHelper.hxx
index 4e12733391a5..83884adcfa51 100644
--- a/include/svx/DocumentColorHelper.hxx
+++ b/include/svx/DocumentColorHelper.hxx
@@ -19,9 +19,9 @@ namespace svx
 {
 namespace DocumentColorHelper
 {
-static inline Color getColorFromItem(const SvxColorItem* pItem) { return 
pItem->GetValue(); }
+inline Color getColorFromItem(const SvxColorItem* pItem) { return 
pItem->GetValue(); }
 
-static inline Color getColorFromItem(const SvxBrushItem* pItem) { return 
pItem->GetColor(); }
+inline Color getColorFromItem(const SvxBrushItem* pItem) { return 
pItem->GetColor(); }
 
 template 
 void queryColors(const sal_uInt16 nAttrib, const SfxItemPool* pPool, 
std::set& rOutput)


core.git: include/svx sc/qa sw/qa

2024-01-22 Thread Andreas Heinisch (via logerrit)
 include/svx/flagsdef.hxx|5 +--
 sc/qa/uitest/csv_dialog/tdf88359.py |2 -
 sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py |   20 ++--
 3 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 58cfe9ccff7b6aa8ada18234ee73809700c39e02
Author: Andreas Heinisch 
AuthorDate: Fri Jan 19 13:02:37 2024 +0100
Commit: Andreas Heinisch 
CommitDate: Mon Jan 22 20:13:59 2024 +0100

tdf#38231 - Change default example date value to 1999-12-01

Change default example date value from 1999-12-31 to 1999-12-01. Otherwise, 
certain date formats cannot be distiguished in the preview window, e.g., D MM 
(1 Dec / 01 Dec 99 vs. 31 Dec / 31 Dec).

Change-Id: Iebd78de8d5ef8615c4f2bf400357745e7acfb857
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162308
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index 3fbb70ca6b5e..e5b292ae 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -84,8 +84,9 @@ const o3tl::enumarray 
fSvxNumValConst = {
 -1234.56789012345678,   // SvxNumValCategory::Standard
 -0.1295,// SvxNumValCategory::Percent
 -1234.0,// SvxNumValCategory::Currency
-36525.5678935185,   // SvxNumValCategory::Date
-36525.5678935185,   // SvxNumValCategory::Time
+// tdf#38231 - change default example date value to 1999-12-01
+36495.5678935185,   // SvxNumValCategory::Date
+36495.5678935185,   // SvxNumValCategory::Time
 12345.67889,// SvxNumValCategory::Scientific
 123.456,// SvxNumValCategory::Fraction
 1.0,// SvxNumValCategory::Boolean
diff --git a/sc/qa/uitest/csv_dialog/tdf88359.py 
b/sc/qa/uitest/csv_dialog/tdf88359.py
index 19fa8b91928e..075e891d1e15 100644
--- a/sc/qa/uitest/csv_dialog/tdf88359.py
+++ b/sc/qa/uitest/csv_dialog/tdf88359.py
@@ -34,7 +34,7 @@ class Tdf88359(UITestCase):
 # Without the fix in place, this test would have failed with
 # AssertionError: 'Date' != 'Text'
 self.assertEqual("Date", 
get_state_as_dict(xliststore1)["SelectEntryText"])
-self.assertEqual("1999-12-31T13:37:46", 
get_state_as_dict(xliststore2)["SelectEntryText"])
+self.assertEqual("1999-12-01T13:37:46", 
get_state_as_dict(xliststore2)["SelectEntryText"])
 self.assertEqual("-MM-DD\"T\"HH:MM:SS", 
get_state_as_dict(xformatted)["Text"])
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py 
b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
index 0c556b6c2b65..0f8e9f1d305e 100644
--- a/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
+++ b/sw/qa/uitest/writer_tests5/DateFormFieldPropertiesDialog.py
@@ -24,17 +24,17 @@ class dateFormFieldDialog(UITestCase):
 
 # check whether we have the right format selected
 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/31/99")
+
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/01/99")
 
 # select a new format
 itemsList.getChild("11").executeAction("SELECT", tuple());
-
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
 # open the dialog again
 with 
self.ui_test.execute_dialog_through_command(".uno:ControlProperties") as 
xDialog:
 itemsList = xDialog.getChild("date_formats_treeview")
-
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-31")
+
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12-01")
 
 
 def test_date_field_with_custom_format(self):
@@ -55,7 +55,7 @@ class dateFormFieldDialog(UITestCase):
 # SelectEntryText doesn't match the sample string, so all this
 # is rather fragile depending on actual locale data.
 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"21")
-
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "1999. 
december 31., péntek[System]")
+
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "1999. 
december 1., szerda[System]")
 
 
 def test_date_reformat(self):
@@ -70,11 +70,11 @@ class dateFormFieldDialog(UITestCase):
 
 # check whether we have the right format selected
 self.assertEqual(get_state_as_dict(itemsList)["Children"], 
"20")
-
self.assertEqual(get_state_as_dict(itemsList)["SelectEntryText"], "12/31/99")

core.git: include/svx svx/source

2024-01-22 Thread Miklos Vajna (via logerrit)
 include/svx/xdash.hxx|   36 ++--
 svx/source/xoutdev/xattr.cxx |   24 
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 1a4e52c0d985138d483af288c547f8cea6c96667
Author: Miklos Vajna 
AuthorDate: Mon Jan 22 08:09:36 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 22 09:13:38 2024 +0100

svx: prefix members of XDash

See tdf#94879 for motivation.

Change-Id: I78a3b52001cc61728fe568623acf13b86f43c449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162361
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xdash.hxx b/include/svx/xdash.hxx
index eef7d2f7fb2d..6b6771a9fa35 100644
--- a/include/svx/xdash.hxx
+++ b/include/svx/xdash.hxx
@@ -30,12 +30,12 @@
 
 class SVXCORE_DLLPUBLIC XDash final
 {
-css::drawing::DashStyle  eDash;
-sal_uInt16   nDots;
-sal_uInt16   nDashes;
-double   nDotLen;
-double   nDashLen;
-double   nDistance;
+css::drawing::DashStyle  m_eDash;
+sal_uInt16   m_nDots;
+sal_uInt16   m_nDashes;
+double   m_nDotLen;
+double   m_nDashLen;
+double   m_nDistance;
 
 public:
   XDash(css::drawing::DashStyle eDash = css::drawing::DashStyle_RECT,
@@ -44,19 +44,19 @@ public:
 
 bool operator==(const XDash& rDash) const;
 
-void SetDashStyle(css::drawing::DashStyle eNewStyle) { eDash = eNewStyle; }
-void SetDots(sal_uInt16 nNewDots){ nDots = nNewDots; }
-void SetDotLen(double nNewDotLen){ nDotLen = 
nNewDotLen; }
-void SetDashes(sal_uInt16 nNewDashes){ nDashes = 
nNewDashes; }
-void SetDashLen(double nNewDashLen)  { nDashLen = 
nNewDashLen; }
-void SetDistance(double nNewDistance){ nDistance = 
nNewDistance; }
+void SetDashStyle(css::drawing::DashStyle eNewStyle) { m_eDash = 
eNewStyle; }
+void SetDots(sal_uInt16 nNewDots){ m_nDots = nNewDots; 
}
+void SetDotLen(double nNewDotLen){ m_nDotLen = 
nNewDotLen; }
+void SetDashes(sal_uInt16 nNewDashes){ m_nDashes = 
nNewDashes; }
+void SetDashLen(double nNewDashLen)  { m_nDashLen = 
nNewDashLen; }
+void SetDistance(double nNewDistance){ m_nDistance = 
nNewDistance; }
 
-css::drawing::DashStyle  GetDashStyle() const{ return eDash; }
-sal_uInt16   GetDots() const { return nDots; }
-double   GetDotLen() const   { return nDotLen; }
-sal_uInt16   GetDashes() const   { return nDashes; }
-double   GetDashLen() const  { return nDashLen; }
-double   GetDistance() const { return nDistance; }
+css::drawing::DashStyle  GetDashStyle() const{ return m_eDash; }
+sal_uInt16   GetDots() const { return m_nDots; }
+double   GetDotLen() const   { return m_nDotLen; }
+sal_uInt16   GetDashes() const   { return m_nDashes; }
+double   GetDashLen() const  { return m_nDashLen; }
+double   GetDistance() const { return m_nDistance; 
}
 
 // XDash is translated into an array of doubles which describe the lengths 
of the
 // dashes, dots and empty passages. It returns the complete length of the 
full DashDot
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index e712be7632f2..68b40d539cd0 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -487,23 +487,23 @@ sal_uInt16 XLineStyleItem::GetValueCount() const
 
 XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, double 
nTheDotLen,
  sal_uInt16 nTheDashes, double nTheDashLen, double nTheDistance) :
-eDash(eTheDash),
-nDots(nTheDots),
-nDashes(nTheDashes),
-nDotLen(nTheDotLen),
-nDashLen(nTheDashLen),
-nDistance(nTheDistance)
+m_eDash(eTheDash),
+m_nDots(nTheDots),
+m_nDashes(nTheDashes),
+m_nDotLen(nTheDotLen),
+m_nDashLen(nTheDashLen),
+m_nDistance(nTheDistance)
 {
 }
 
 bool XDash::operator==(const XDash& rDash) const
 {
-return ( eDash  == rDash.eDash  &&
- nDots  == rDash.nDots  &&
- nDotLen== rDash.nDotLen&&
- nDashes== rDash.nDashes&&
- nDashLen   == rDash.nDashLen   &&
- nDistance  == rDash.nDistance );
+return ( m_eDash  == rDash.m_eDash  &&
+ m_nDots  == rDash.m_nDots  &&
+ m_nDotLen== rDash.m_nDotLen&&
+ m_nDashes== rDash.m_nDashes&&
+ m_nDashLen   == 

core.git: include/svx sc/qa svx/source

2024-01-19 Thread Caolán McNamara (via logerrit)
 include/svx/svdpagv.hxx   |   10 --
 sc/qa/unit/tiledrendering/data/invalidate-on-save.ods |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx  |   30 ++
 svx/source/svdraw/svdpagv.cxx |   17 +++---
 svx/source/svdraw/svdpntv.cxx |   15 ++---
 5 files changed, 53 insertions(+), 19 deletions(-)

New commits:
commit 7ed159d9fc75de09fb581f6f338ba5ec0bb3292e
Author: Caolán McNamara 
AuthorDate: Thu Jan 18 09:31:17 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 19 12:59:41 2024 +0100

cool#7769 Reduce unnecessary invalidations on calc save

https://github.com/CollaboraOnline/online/issues/7769

Reduce unnecessary invalidations. Don't invalidate windows
if layer visibility didn't really change.

Change-Id: Ic2abd78d60aea2e8676c8e56608cf51e941f5918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162242
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index 777ca7d9b1b2..58354a3d8d50 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -102,7 +102,8 @@ public:
 private:
 void ImpInvalidateHelpLineArea(sal_uInt16 nNum) const;
 
-void SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa);
+// return true if changed, false if unchanged
+bool SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa);
 bool IsLayer(const OUString& rName, const SdrLayerIDSet& rBS) const;
 
 /// Let's see if the current Group (pCurrentGroup) is still inserted
@@ -182,10 +183,13 @@ public:
 tools::Rectangle& MarkBound() { return aMarkBound; }
 tools::Rectangle& MarkSnap() { return aMarkSnap; }
 
-void SetLayerVisible(const OUString& rName, bool bShow) {
-SetLayer(rName, aLayerVisi, bShow);
+bool SetLayerVisible(const OUString& rName, bool bShow) {
+const bool bChanged = SetLayer(rName, aLayerVisi, bShow);
+if (!bChanged)
+return false;
 if(!bShow) AdjHdl();
 InvalidateAllWin();
+return true;
 }
 bool IsLayerVisible(const OUString& rName) const { return IsLayer(rName, 
aLayerVisi); }
 
diff --git a/sc/qa/unit/tiledrendering/data/invalidate-on-save.ods 
b/sc/qa/unit/tiledrendering/data/invalidate-on-save.ods
new file mode 100644
index ..efe2c225a410
Binary files /dev/null and 
b/sc/qa/unit/tiledrendering/data/invalidate-on-save.ods differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 5c51046de950..44c15e18e1da 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -3324,6 +3324,36 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testInvalidateForSplitPanes)
 CPPUNIT_ASSERT_MESSAGE("The cell visible in the bottom left pane should be 
redrawn", bFoundBottomLeftPane);
 }
 
+// Saving shouldn't trigger an invalidation
+CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testNoInvalidateOnSave)
+{
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+
+loadFromFile(u"invalidate-on-save.ods");
+
+// .uno:Save modifies the original file, make a copy first
+saveAndReload("calc8");
+ScModelObj* pModelObj = 
comphelper::getFromUnoTunnel(mxComponent);
+CPPUNIT_ASSERT(pModelObj);
+
pModelObj->initializeForTiledRendering(uno::Sequence());
+
+ScTabViewShell* pView = 
dynamic_cast(SfxViewShell::Current());
+CPPUNIT_ASSERT(pView);
+
+Scheduler::ProcessEventsToIdle();
+
+// track invalidations
+ViewCallback aView;
+
+uno::Sequence aArgs;
+dispatchCommand(mxComponent, ".uno:Save", aArgs);
+
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT(!aView.m_bInvalidateTiles);
+}
+
 CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testStatusBarLocale)
 {
 // Given 2 views, the second's locale is set to German:
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 86210865e72c..4e5d7a47286c 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -557,15 +557,22 @@ void SdrPageView::AdjHdl()
 GetView().AdjustMarkHdl();
 }
 
-void SdrPageView::SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa)
+// return true if changed, false if unchanged
+bool SdrPageView::SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa)
 {
-if(!GetPage())
-return;
+if (!GetPage())
+return false;
 
 SdrLayerID nID = GetPage()->GetLayerAdmin().GetLayerID(rName);
 
-if(SDRLAYER_NOTFOUND != nID)
-rBS.Set(nID, bJa);
+if (SDRLAYER_NOTFOUND == nID)
+return false;
+
+if (rBS.IsSet(nID) == bJa)
+return false;
+
+rBS.Set(nID, bJa);
+return true;
 }
 
 bool SdrPageView::IsLayer(const OUString& rName, const SdrLayerIDSet& rBS) 
const
diff --git 

core.git: include/svx sc/source sw/source

2024-01-16 Thread Szymon Kłos (via logerrit)
 include/svx/DocumentColorHelper.hxx |   43 
 sc/source/core/data/document10.cxx  |   19 ---
 sw/source/core/doc/docfmt.cxx   |   20 +---
 3 files changed, 54 insertions(+), 28 deletions(-)

New commits:
commit b804dc3c61ab595d3971e1b1a0e9a09ea498a7e4
Author: Szymon Kłos 
AuthorDate: Mon Jan 15 09:49:18 2024 +0100
Commit: Szymon Kłos 
CommitDate: Tue Jan 16 12:23:49 2024 +0100

Use correct type when getting document colors

After commit 0460be8848b0ce02c07183e41dd7137ac3b94164
Send document colors with lok callback

There was issue detected by CI:
/sc/source/core/data/document10.cxx:198:46: runtime error: downcast of 
address 0x610efa40 which does not point to an object of type 'const 
SvxColorItem'
  0x610efa40: note: object is of type 'SvxBrushItem'
   00 00 00 00  b0 79 19 48 ce 7f 00 00  01 00 00 00 94 00 be be  4c 17 00 
00 a0 be be be  cc cc ff 00
^~~
vptr for 'SvxBrushItem'
  #0 0x7fce1fbed369 in ScDocument::GetDocColors() 
/sc/source/core/data/document10.cxx:198:46

Change-Id: I41f28b6bb54d7720d58c16d75b9d116a53f106cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162077
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/svx/DocumentColorHelper.hxx 
b/include/svx/DocumentColorHelper.hxx
new file mode 100644
index ..4e12733391a5
--- /dev/null
+++ b/include/svx/DocumentColorHelper.hxx
@@ -0,0 +1,43 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+
+namespace svx
+{
+namespace DocumentColorHelper
+{
+static inline Color getColorFromItem(const SvxColorItem* pItem) { return 
pItem->GetValue(); }
+
+static inline Color getColorFromItem(const SvxBrushItem* pItem) { return 
pItem->GetColor(); }
+
+template 
+void queryColors(const sal_uInt16 nAttrib, const SfxItemPool* pPool, 
std::set& rOutput)
+{
+ItemSurrogates aSurrogates;
+pPool->GetItemSurrogates(aSurrogates, nAttrib);
+for (const SfxPoolItem* pItem : aSurrogates)
+{
+auto pColorItem = static_cast(pItem);
+Color aColor(getColorFromItem(pColorItem));
+if (COL_AUTO != aColor)
+rOutput.insert(aColor);
+}
+}
+}
+
+} // end of namespace svx
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 61c75b5e2cc5..a2d1ae67b919 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -22,7 +22,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -188,19 +188,10 @@ std::set ScDocument::GetDocColors()
 {
 std::set aDocColors;
 ScDocumentPool *pPool = GetPool();
-const sal_uInt16 pAttribs[] = {ATTR_BACKGROUND, ATTR_FONT_COLOR};
-for (sal_uInt16 nAttrib : pAttribs)
-{
-ItemSurrogates aSurrogates;
-pPool->GetItemSurrogates(aSurrogates, nAttrib);
-for (const SfxPoolItem* pItem : aSurrogates)
-{
-const SvxColorItem *pColorItem = static_cast(pItem);
-Color aColor( pColorItem->GetValue() );
-if (COL_AUTO != aColor)
-aDocColors.insert(aColor);
-}
-}
+
+svx::DocumentColorHelper::queryColors(ATTR_BACKGROUND, 
pPool, aDocColors);
+svx::DocumentColorHelper::queryColors(ATTR_FONT_COLOR, 
pPool, aDocColors);
+
 return aDocColors;
 }
 
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index dc0f72031b3a..139f1fd205b6 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -25,10 +25,10 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2038,19 +2038,11 @@ std::set SwDoc::GetDocColors()
 {
 std::set aDocColors;
 SwAttrPool& rPool = GetAttrPool();
-const sal_uInt16 pAttribs[] = {RES_CHRATR_COLOR, RES_CHRATR_HIGHLIGHT, 
RES_BACKGROUND};
-for (sal_uInt16 nAttrib : pAttribs)
-{
-ItemSurrogates aSurrogates;
-rPool.GetItemSurrogates(aSurrogates, nAttrib);
-for (const SfxPoolItem* pItem : aSurrogates)
-{
-auto pColorItem = static_cast(pItem);
-Color aColor( pColorItem->GetValue() );
-if (COL_AUTO != aColor)
-aDocColors.insert(aColor);
-}
-}
+
+svx::DocumentColorHelper::queryColors(RES_CHRATR_COLOR, 
, aDocColors);
+svx::DocumentColorHelper::queryColors(RES_CHRATR_HIGHLIGHT, 
, aDocColors);
+

core.git: include/svx svx/source

2024-01-15 Thread Miklos Vajna (via logerrit)
 include/svx/deflt3d.hxx |   68 
 svx/source/engine3d/deflt3d.cxx |   30 -
 2 files changed, 49 insertions(+), 49 deletions(-)

New commits:
commit b6f7ad722ec668e9c9324f82044e768af2cdf766
Author: Miklos Vajna 
AuthorDate: Mon Jan 15 08:10:06 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 15 09:34:25 2024 +0100

svx: prefix members of E3dDefaultAttributes

See tdf#94879 for motivation.

Change-Id: Icfa7f881de446095067c0f3a4a601cfd5da3228c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162073
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/deflt3d.hxx b/include/svx/deflt3d.hxx
index f3312afd5fd8..573378b46414 100644
--- a/include/svx/deflt3d.hxx
+++ b/include/svx/deflt3d.hxx
@@ -35,27 +35,27 @@ class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) 
E3dDefaultAttributes
 {
 private:
 // Cube object
-basegfx::B3DPoint   aDefaultCubePos;
-basegfx::B3DVector  aDefaultCubeSize;
-boolbDefaultCubePosIsCenter;
+basegfx::B3DPoint   m_aDefaultCubePos;
+basegfx::B3DVector  m_aDefaultCubeSize;
+boolm_bDefaultCubePosIsCenter;
 
 // Sphere object
-basegfx::B3DPoint   aDefaultSphereCenter;
-basegfx::B3DVector  aDefaultSphereSize;
+basegfx::B3DPoint   m_aDefaultSphereCenter;
+basegfx::B3DVector  m_aDefaultSphereSize;
 
 // Lathe object
-boolbDefaultLatheSmoothed;
-boolbDefaultLatheSmoothFrontBack;
-boolbDefaultLatheCharacterMode;
-boolbDefaultLatheCloseFront;
-boolbDefaultLatheCloseBack;
+boolm_bDefaultLatheSmoothed;
+boolm_bDefaultLatheSmoothFrontBack;
+boolm_bDefaultLatheCharacterMode;
+boolm_bDefaultLatheCloseFront;
+boolm_bDefaultLatheCloseBack;
 
 // Extrude object
-boolbDefaultExtrudeSmoothed;
-boolbDefaultExtrudeSmoothFrontBack;
-boolbDefaultExtrudeCharacterMode;
-boolbDefaultExtrudeCloseFront;
-boolbDefaultExtrudeCloseBack;
+boolm_bDefaultExtrudeSmoothed;
+boolm_bDefaultExtrudeSmoothFrontBack;
+boolm_bDefaultExtrudeCharacterMode;
+boolm_bDefaultExtrudeCloseFront;
+boolm_bDefaultExtrudeCloseBack;
 
 public:
 // Constructor
@@ -65,31 +65,31 @@ public:
 void Reset();
 
 // Cube object
-const basegfx::B3DPoint& GetDefaultCubePos() const { return 
aDefaultCubePos; }
-const basegfx::B3DVector& GetDefaultCubeSize() const { return 
aDefaultCubeSize; }
-bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
+const basegfx::B3DPoint& GetDefaultCubePos() const { return 
m_aDefaultCubePos; }
+const basegfx::B3DVector& GetDefaultCubeSize() const { return 
m_aDefaultCubeSize; }
+bool GetDefaultCubePosIsCenter() const { return m_bDefaultCubePosIsCenter; 
}
 
 // Sphere object
-const basegfx::B3DPoint& GetDefaultSphereCenter() const { return 
aDefaultSphereCenter; }
-const basegfx::B3DVector& GetDefaultSphereSize() const { return 
aDefaultSphereSize; }
+const basegfx::B3DPoint& GetDefaultSphereCenter() const { return 
m_aDefaultSphereCenter; }
+const basegfx::B3DVector& GetDefaultSphereSize() const { return 
m_aDefaultSphereSize; }
 
 // Lathe object
-bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
-bool GetDefaultLatheSmoothFrontBack() const { return 
bDefaultLatheSmoothFrontBack; }
-bool GetDefaultLatheCharacterMode() const { return 
bDefaultLatheCharacterMode; }
-void SetDefaultLatheCharacterMode(const bool bNew) { 
bDefaultLatheCharacterMode = bNew; }
-bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
-bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
+bool GetDefaultLatheSmoothed() const { return m_bDefaultLatheSmoothed; }
+bool GetDefaultLatheSmoothFrontBack() const { return 
m_bDefaultLatheSmoothFrontBack; }
+bool GetDefaultLatheCharacterMode() const { return 
m_bDefaultLatheCharacterMode; }
+void SetDefaultLatheCharacterMode(const bool bNew) { 
m_bDefaultLatheCharacterMode = bNew; }
+bool GetDefaultLatheCloseFront() const { return m_bDefaultLatheCloseFront; 
}
+bool GetDefaultLatheCloseBack() const { return m_bDefaultLatheCloseBack; }
 
 // Extrude object
-bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
-bool GetDefaultExtrudeSmoothFrontBack() const { return 
bDefaultExtrudeSmoothFrontBack; }
-bool GetDefaultExtrudeCharacterMode() const { return 
bDefaultExtrudeCharacterMode; }
-void SetDefaultExtrudeCharacterMode(const bool bNew) { 

core.git: include/svx sc/source sd/source svx/source sw/source

2024-01-12 Thread Szymon Kłos (via logerrit)
 include/svx/PaletteManager.hxx |4 ++
 include/svx/theme/IThemeColorChanger.hxx   |2 -
 include/svx/theme/ThemeColorChangerCommon.hxx  |5 ++-
 include/svx/theme/ThemeColorPaletteManager.hxx |3 +-
 sc/source/ui/view/tabvwshc.cxx |4 ++
 sd/source/ui/view/ViewShellBase.cxx|4 ++
 svx/source/tbxctrls/PaletteManager.cxx |   36 -
 svx/source/theme/ThemeColorChangerCommon.cxx   |   16 +--
 svx/source/theme/ThemeColorPaletteManager.cxx  |9 --
 sw/source/uibase/uiview/view.cxx   |4 ++
 10 files changed, 70 insertions(+), 17 deletions(-)

New commits:
commit 39b5a39bdc6d7fc86db5be6058b9f9251f070739
Author: Szymon Kłos 
AuthorDate: Mon Jan 8 18:46:13 2024 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 12 13:58:22 2024 +0100

Send document colors with lok callback

First step for publishing any palette for LOK.
Let's start with Document colors (colors used in the
document) which can be extracted similar to theme
colors from SfxViewShell.

Modify generateJSON function so it appends palette into
existing ptree/JSON.

In the next step we can make it more generic so it will
be able to send any palette managed by PaletteManager.

Change-Id: Ibb56690af6dfd59ee232e88b28e7a3d312d0e16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161798
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 0460be8848b0ce02c07183e41dd7137ac3b94164)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161941
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 81f30ea7de76..90fa00de59fe 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::uno { class XComponentContext; }
 namespace svx { class ToolboxButtonColorUpdaterBase; }
@@ -86,6 +87,9 @@ public:
 bool GetLumModOff(sal_uInt16 nThemeIndex, sal_uInt16 nEffect, sal_Int16& 
rLumMod, sal_Int16& rLumOff);
 
 static void DispatchColorCommand(const OUString& aCommand, const 
NamedColor& rColor);
+
+/// Appends node for Document Colors into the ptree
+static void generateJSON(boost::property_tree::ptree& aTree, const 
std::set& rColors);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/theme/IThemeColorChanger.hxx 
b/include/svx/theme/IThemeColorChanger.hxx
index 0b3b88d60afa..035494f12324 100644
--- a/include/svx/theme/IThemeColorChanger.hxx
+++ b/include/svx/theme/IThemeColorChanger.hxx
@@ -22,7 +22,7 @@ public:
 void apply(std::shared_ptr const& pColorSet)
 {
 doApply(pColorSet);
-svx::theme::notifyLOK(pColorSet);
+svx::theme::notifyLOK(pColorSet, std::set());
 }
 
 private:
diff --git a/include/svx/theme/ThemeColorChangerCommon.hxx 
b/include/svx/theme/ThemeColorChangerCommon.hxx
index 3a585236fbf8..9fa3f4376ddc 100644
--- a/include/svx/theme/ThemeColorChangerCommon.hxx
+++ b/include/svx/theme/ThemeColorChangerCommon.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include 
 #include 
 #include 
 #include 
@@ -22,7 +23,9 @@ namespace theme
 SVXCORE_DLLPUBLIC void updateSdrObject(model::ColorSet const& rColorSet, 
SdrObject* pObject,
SdrView* pView, SfxUndoManager* 
pUndoManager = nullptr);
 
-SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr const& 
pColorSet);
+/// Sends to the LOK updated palettes
+SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr const& 
pColorSet,
+ const std::set& rDocumentColors);
 }
 
 } // end svx namespace
diff --git a/include/svx/theme/ThemeColorPaletteManager.hxx 
b/include/svx/theme/ThemeColorPaletteManager.hxx
index 7bb8526a2409..8531021bbc84 100644
--- a/include/svx/theme/ThemeColorPaletteManager.hxx
+++ b/include/svx/theme/ThemeColorPaletteManager.hxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace model
 {
@@ -60,7 +61,7 @@ class SVXCORE_DLLPUBLIC ThemeColorPaletteManager final
 public:
 ThemeColorPaletteManager(std::shared_ptr const& 
pColorSet);
 ThemePaletteCollection generate();
-OString generateJSON();
+void generateJSON(boost::property_tree::ptree& aTree);
 };
 
 } // end svx namespace
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 1012f1ceb249..b0c3aa54343c 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -483,7 +483,9 @@ void ScTabViewShell::afterCallbackRegistered()
 SfxObjectShell* pDocShell = GetObjectShell();
 if (pDocShell)
 {
-svx::theme::notifyLOK(pDocShell->GetThemeColors());
+std::shared_ptr pThemeColors = 
pDocShell->GetThemeColors();
+std::set aDocumentColors = pDocShell->GetDocColors();
+

core.git: include/svx sc/source sd/inc sd/source svx/source sw/source

2024-01-11 Thread Szymon Kłos (via logerrit)
 include/svx/theme/IThemeColorChanger.hxx  |   10 ++-
 include/svx/theme/ThemeColorChangerCommon.hxx |2 +
 sc/source/ui/inc/ThemeColorChanger.hxx|2 -
 sc/source/ui/theme/ThemeColorChanger.cxx  |4 +-
 sc/source/ui/view/tabvwshc.cxx|7 +
 sd/inc/theme/ThemeColorChanger.hxx|2 -
 sd/source/core/ThemeColorChanger.cxx  |4 +-
 sd/source/ui/inc/ViewShellBase.hxx|2 +
 sd/source/ui/view/ViewShellBase.cxx   |   13 +
 sd/source/ui/view/drviews2.cxx|8 -
 svx/source/theme/ThemeColorChangerCommon.cxx  |   36 ++
 sw/source/core/inc/ThemeColorChanger.hxx  |2 -
 sw/source/core/model/ThemeColorChanger.cxx|4 +-
 sw/source/uibase/shells/basesh.cxx|7 -
 sw/source/uibase/uiview/view.cxx  |5 +--
 15 files changed, 70 insertions(+), 38 deletions(-)

New commits:
commit 13e055808461f92be68f7691392b23159ac9a1ba
Author: Szymon Kłos 
AuthorDate: Sun Jan 7 18:31:22 2024 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 12 08:04:34 2024 +0100

sc: announce theme colors with lok callback

As it is done already for Writer. Unfortunately cannot
move the code from afterCallbackRegistered to base class
in sfx2 as it is not linked to svx which is needed to
generate JSON. So at least share generation and sending
part in ThemeColorChangerCommon.

Signed-off-by: Szymon Kłos 
Change-Id: Icbf681230bd4c49698c47d852a0862620d93bcec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161771
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161927
Tested-by: Jenkins

diff --git a/include/svx/theme/IThemeColorChanger.hxx 
b/include/svx/theme/IThemeColorChanger.hxx
index d9273238c712..0b3b88d60afa 100644
--- a/include/svx/theme/IThemeColorChanger.hxx
+++ b/include/svx/theme/IThemeColorChanger.hxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include "ThemeColorChangerCommon.hxx"
 
 namespace svx
 {
@@ -18,7 +19,14 @@ class SVXCORE_DLLPUBLIC IThemeColorChanger
 {
 public:
 virtual ~IThemeColorChanger() = default;
-virtual void apply(std::shared_ptr const& pColorSet) = 0;
+void apply(std::shared_ptr const& pColorSet)
+{
+doApply(pColorSet);
+svx::theme::notifyLOK(pColorSet);
+}
+
+private:
+virtual void doApply(std::shared_ptr const& pColorSet) = 
0;
 };
 
 } // end svx namespace
diff --git a/include/svx/theme/ThemeColorChangerCommon.hxx 
b/include/svx/theme/ThemeColorChangerCommon.hxx
index febc34ae3873..3a585236fbf8 100644
--- a/include/svx/theme/ThemeColorChangerCommon.hxx
+++ b/include/svx/theme/ThemeColorChangerCommon.hxx
@@ -21,6 +21,8 @@ namespace theme
 {
 SVXCORE_DLLPUBLIC void updateSdrObject(model::ColorSet const& rColorSet, 
SdrObject* pObject,
SdrView* pView, SfxUndoManager* 
pUndoManager = nullptr);
+
+SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr const& 
pColorSet);
 }
 
 } // end svx namespace
diff --git a/sc/source/ui/inc/ThemeColorChanger.hxx 
b/sc/source/ui/inc/ThemeColorChanger.hxx
index 57ca91cdb83c..f85401385888 100644
--- a/sc/source/ui/inc/ThemeColorChanger.hxx
+++ b/sc/source/ui/inc/ThemeColorChanger.hxx
@@ -24,7 +24,7 @@ public:
 ThemeColorChanger(ScDocShell& rDocShell);
 virtual ~ThemeColorChanger() override;
 
-void apply(std::shared_ptr const& pColorSet) override;
+void doApply(std::shared_ptr const& pColorSet) override;
 };
 
 } // end sc namespace
diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx 
b/sc/source/ui/theme/ThemeColorChanger.cxx
index c9b88652dcc3..2ba881544372 100644
--- a/sc/source/ui/theme/ThemeColorChanger.cxx
+++ b/sc/source/ui/theme/ThemeColorChanger.cxx
@@ -19,7 +19,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -311,7 +311,7 @@ void changeThemeColorInTheDocModel(ScDocShell& rDocShell,
 
 } // end anonymous ns
 
-void ThemeColorChanger::apply(std::shared_ptr const& 
pColorSet)
+void ThemeColorChanger::doApply(std::shared_ptr const& 
pColorSet)
 {
 // Can't change to an empty color set
 if (!pColorSet)
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 0c214a02eb67..eeb554454eab 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -477,6 +478,12 @@ void ScTabViewShell::afterCallbackRegistered()
 pInputWindow->NotifyLOKClient();
 }
 }
+
+SfxObjectShell* pDocShell = GetObjectShell();
+if (pDocShell)
+{
+svx::theme::notifyLOK(pDocShell->GetThemeColors());
+}
 }
 
 void ScTabViewShell::NotifyCursor(SfxViewShell* pOtherShell) const
diff --git a/sd/inc/theme/ThemeColorChanger.hxx 
b/sd/inc/theme/ThemeColorChanger.hxx
index 

core.git: include/svx

2024-01-08 Thread Caolán McNamara (via logerrit)
 include/svx/svdpntv.hxx |   72 ++--
 1 file changed, 64 insertions(+), 8 deletions(-)

New commits:
commit 70c4e1f88d1df5331a1d11c0d82a3e65186a2ac1
Author: Caolán McNamara 
AuthorDate: Mon Jan 8 10:15:39 2024 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 8 18:32:26 2024 +0100

Related: cool#7951 only invalidate Window if the setting really changed

cut down on some of these invalidations when the setting didn't change
and we don't need the expensive invalidation

Change-Id: Id84a79636fcd7f21c7a8dbe86218b75d32b26487
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161784
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index bce1bd8bb881..8665262f0508 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -399,14 +399,70 @@ public:
 bool IsHlplFront() const { return mbHlplFront  ; }
 
 const Color& GetGridColor() const { return maGridColor;}
-void SetPageVisible(bool bOn = true) { mbPageVisible=bOn; 
InvalidateAllWin(); }
-void SetPageShadowVisible(bool bOn) { mbPageShadowVisible=bOn; 
InvalidateAllWin(); }
-void SetPageBorderVisible(bool bOn = true) { mbPageBorderVisible=bOn; 
InvalidateAllWin(); }
-void SetBordVisible(bool bOn = true) { mbBordVisible=bOn; 
InvalidateAllWin(); }
-void SetGridVisible(bool bOn) { mbGridVisible=bOn; InvalidateAllWin(); }
-void SetGridFront(bool bOn) { mbGridFront  =bOn; InvalidateAllWin(); }
-void SetHlplVisible(bool bOn = true) { mbHlplVisible=bOn; 
InvalidateAllWin(); }
-void SetHlplFront(bool bOn) { mbHlplFront  =bOn; InvalidateAllWin(); }
+void SetPageVisible(bool bOn = true)
+{
+if (mbPageVisible != bOn)
+{
+mbPageVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetPageShadowVisible(bool bOn)
+{
+if (mbPageShadowVisible != bOn)
+{
+mbPageShadowVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetPageBorderVisible(bool bOn = true)
+{
+if (mbPageBorderVisible != bOn)
+{
+mbPageBorderVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetBordVisible(bool bOn = true)
+{
+if (mbBordVisible != bOn)
+{
+mbBordVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetGridVisible(bool bOn)
+{
+if (mbGridVisible != bOn)
+{
+mbGridVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetGridFront(bool bOn)
+{
+if (mbGridFront != bOn)
+{
+mbGridFront = bOn;
+InvalidateAllWin();
+}
+}
+void SetHlplVisible(bool bOn = true)
+{
+if (mbHlplVisible != bOn)
+{
+mbHlplVisible = bOn;
+InvalidateAllWin();
+}
+}
+void SetHlplFront(bool bOn)
+{
+if (mbHlplFront != bOn)
+{
+mbHlplFront = bOn;
+InvalidateAllWin();
+}
+}
 void SetGlueVisible(bool bOn = true) { if (mbGlueVisible!=bOn) { 
mbGlueVisible=bOn; if (!mbGlueVisible2 && !mbGlueVisible3 && !mbGlueVisible4) 
GlueInvalidate(); } }
 
 bool IsPreviewRenderer() const { return mbPreviewRenderer; }


core.git: include/svx svx/source

2024-01-08 Thread Miklos Vajna (via logerrit)
 include/svx/svdhlpln.hxx   |   18 +-
 svx/source/svdraw/svdhlpln.cxx |   16 
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit b2fe01ef6154aab63c33706be2739ce2540212c2
Author: Miklos Vajna 
AuthorDate: Mon Jan 8 08:27:31 2024 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 8 17:56:39 2024 +0100

svx: prefix members of SdrHelpLine

See tdf#94879 for motivation.

Change-Id: I340040c28aaf64ad79c0d0433686a40b38e351c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161781
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx
index aa850773c4e2..0eed874adf3a 100644
--- a/include/svx/svdhlpln.hxx
+++ b/include/svx/svdhlpln.hxx
@@ -36,19 +36,19 @@ enum class SdrHelpLineKind { Point, Vertical, Horizontal };
 #define SDRHELPLINE_POINT_PIXELSIZE 15 /* actual size = PIXELSIZE*2+1 */
 
 class SdrHelpLine {
-PointaPos; // X or Y may be unimportant, depending on the 
value of eKind
-SdrHelpLineKind  eKind;
+Pointm_aPos; // X or Y may be unimportant, depending on the 
value of eKind
+SdrHelpLineKind  m_eKind;
 
 public:
-explicit SdrHelpLine(SdrHelpLineKind eNewKind=SdrHelpLineKind::Point): 
eKind(eNewKind) {}
-SdrHelpLine(SdrHelpLineKind eNewKind, const Point& rNewPos): 
aPos(rNewPos), eKind(eNewKind) {}
-bool operator==(const SdrHelpLine& rCmp) const { return aPos==rCmp.aPos && 
eKind==rCmp.eKind; }
+explicit SdrHelpLine(SdrHelpLineKind eNewKind=SdrHelpLineKind::Point): 
m_eKind(eNewKind) {}
+SdrHelpLine(SdrHelpLineKind eNewKind, const Point& rNewPos): 
m_aPos(rNewPos), m_eKind(eNewKind) {}
+bool operator==(const SdrHelpLine& rCmp) const { return 
m_aPos==rCmp.m_aPos && m_eKind==rCmp.m_eKind; }
 bool operator!=(const SdrHelpLine& rCmp) const { return !operator==(rCmp); 
}
 
-voidSetKind(SdrHelpLineKind eNewKind) { eKind=eNewKind; }
-SdrHelpLineKind GetKind() const   { return eKind; }
-voidSetPos(const Point& rPnt) { aPos=rPnt; }
-const Point&GetPos() const{ return aPos; }
+voidSetKind(SdrHelpLineKind eNewKind) { m_eKind=eNewKind; }
+SdrHelpLineKind GetKind() const   { return m_eKind; }
+voidSetPos(const Point& rPnt) { m_aPos=rPnt; }
+const Point&GetPos() const{ return m_aPos; }
 
 PointerStyleGetPointer() const;
 boolIsHit(const Point& rPnt, sal_uInt16 nTolLog, const 
OutputDevice& rOut) const;
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index 0d515191ed34..c42aefd4e816 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -26,7 +26,7 @@
 
 PointerStyle SdrHelpLine::GetPointer() const
 {
-switch (eKind) {
+switch (m_eKind) {
 case SdrHelpLineKind::Vertical  : return PointerStyle::ESize;
 case SdrHelpLineKind::Horizontal: return PointerStyle::SSize;
 default: return PointerStyle::Move;
@@ -36,16 +36,16 @@ PointerStyle SdrHelpLine::GetPointer() const
 bool SdrHelpLine::IsHit(const Point& rPnt, sal_uInt16 nTolLog, const 
OutputDevice& rOut) const
 {
 Size a1Pix(rOut.PixelToLogic(Size(1,1)));
-bool bXHit=rPnt.X()>=aPos.X()-nTolLog && 
rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width();
-bool bYHit=rPnt.Y()>=aPos.Y()-nTolLog && 
rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height();
-switch (eKind) {
+bool bXHit=rPnt.X()>=m_aPos.X()-nTolLog && 
rPnt.X()<=m_aPos.X()+nTolLog+a1Pix.Width();
+bool bYHit=rPnt.Y()>=m_aPos.Y()-nTolLog && 
rPnt.Y()<=m_aPos.Y()+nTolLog+a1Pix.Height();
+switch (m_eKind) {
 case SdrHelpLineKind::Vertical  : return bXHit;
 case SdrHelpLineKind::Horizontal: return bYHit;
 case SdrHelpLineKind::Point: {
 if (bXHit || bYHit) {
 Size 
aRad(rOut.PixelToLogic(Size(SDRHELPLINE_POINT_PIXELSIZE,SDRHELPLINE_POINT_PIXELSIZE)));
-return rPnt.X()>=aPos.X()-aRad.Width() && 
rPnt.X()<=aPos.X()+aRad.Width()+a1Pix.Width() &&
-   rPnt.Y()>=aPos.Y()-aRad.Height() && 
rPnt.Y()<=aPos.Y()+aRad.Height()+a1Pix.Height();
+return rPnt.X()>=m_aPos.X()-aRad.Width() && 
rPnt.X()<=m_aPos.X()+aRad.Width()+a1Pix.Width() &&
+   rPnt.Y()>=m_aPos.Y()-aRad.Height() && 
rPnt.Y()<=m_aPos.Y()+aRad.Height()+a1Pix.Height();
 }
 } break;
 } // switch
@@ -54,10 +54,10 @@ bool SdrHelpLine::IsHit(const Point& rPnt, sal_uInt16 
nTolLog, const OutputDevic
 
 tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
 {
-tools::Rectangle aRet(aPos,aPos);
+tools::Rectangle aRet(m_aPos,m_aPos);
 Point aOfs(rOut.GetMapMode().GetOrigin());
 Size aSiz(rOut.GetOutputSize());
-switch (eKind) {
+switch (m_eKind) {
 case 

core.git: include/svx svx/source

2024-01-04 Thread Heiko Tietze (via logerrit)
 include/svx/compressgraphicdialog.hxx   |1 +
 svx/source/dialog/compressgraphicdialog.cxx |   16 +++-
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 79018bac2ed73fbfaacf661ae1272086e3ddd342
Author: Heiko Tietze 
AuthorDate: Thu Jan 4 14:45:13 2024 +0100
Commit: Heiko Tietze 
CommitDate: Fri Jan 5 07:36:33 2024 +0100

Resolves tdf#158780 - Disable resolution controls initially

Change-Id: I80e620085868925643d4b7561cd7aeff2d9c930f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161620
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/svx/compressgraphicdialog.hxx 
b/include/svx/compressgraphicdialog.hxx
index 088d0b6fd45e..d46220d17a1f 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -79,6 +79,7 @@ private:
 DECL_DLLPRIVATE_LINK( OkayClickHdl, weld::Button&, void );
 
 void Update();
+void UpdateSensitivity(const bool bSensitive);
 void UpdateNewWidthMF();
 void UpdateNewHeightMF();
 void UpdateResolutionLB();
diff --git a/svx/source/dialog/compressgraphicdialog.cxx 
b/svx/source/dialog/compressgraphicdialog.cxx
index 35899bec2f5f..df1d3a8c3db6 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -108,6 +108,8 @@ void CompressGraphicsDialog::recallParameter()
 m_xQualitySlider->set_value( memp.QualityMF );
 
 m_xInterpolationCombo->set_active( memp.InterpolationCombo );
+
+UpdateSensitivity(m_xReduceResolutionCB->get_active());
 }
 
 void CompressGraphicsDialog::Initialize()
@@ -207,6 +209,14 @@ void CompressGraphicsDialog::Update()
 m_xFixedText6->set_label("??");
 }
 
+void CompressGraphicsDialog::UpdateSensitivity(const bool bSensitive)
+{
+m_xMFNewWidth->set_sensitive(bSensitive);
+m_xMFNewHeight->set_sensitive(bSensitive);
+m_xResolutionLB->set_sensitive(bSensitive);
+m_xInterpolationCombo->set_sensitive(bSensitive);
+}
+
 void CompressGraphicsDialog::UpdateNewWidthMF()
 {
 int nPixelX = static_cast( GetViewWidthInch() * m_dResolution );
@@ -353,11 +363,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, 
ToggleCompressionRB, weld::Toggleable&,
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB, 
weld::Toggleable&, void )
 {
-bool choice = m_xReduceResolutionCB->get_active();
-m_xMFNewWidth->set_sensitive(choice);
-m_xMFNewHeight->set_sensitive(choice);
-m_xResolutionLB->set_sensitive(choice);
-m_xInterpolationCombo->set_sensitive(choice);
+UpdateSensitivity(m_xReduceResolutionCB->get_active());
 Update();
 }
 


core.git: include/svx svx/source

2024-01-02 Thread Miklos Vajna (via logerrit)
 include/svx/xcolit.hxx   |4 ++--
 svx/source/xoutdev/xattr.cxx |   14 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit cdde4687ea0da4d101567a64fa0d60103f353d68
Author: Miklos Vajna 
AuthorDate: Tue Jan 2 09:05:24 2024 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jan 2 09:58:18 2024 +0100

svx: prefix members of XColorItem

See tdf#94879 for motivation.

Change-Id: I7e945c6c0d1ff13445255125732c3d3a02cda350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161534
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx
index 26941279490c..a89a1f37e97f 100644
--- a/include/svx/xcolit.hxx
+++ b/include/svx/xcolit.hxx
@@ -30,7 +30,7 @@ class XColorList;
 
 class SVXCORE_DLLPUBLIC XColorItem : public NameOrIndex
 {
-Color   aColor;
+Color   m_aColor;
 model::ComplexColor maComplexColor;
 
 public:
@@ -47,7 +47,7 @@ public:
 virtual XColorItem* Clone(SfxItemPool* pPool = nullptr) const override;
 
 const Color&GetColorValue() const;
-voidSetColorValue(const Color& rNew) { aColor = rNew; 
Detach(); }
+voidSetColorValue(const Color& rNew) { m_aColor = rNew; 
Detach(); }
 
 void setComplexColor(model::ComplexColor const& rComplexColor) { 
maComplexColor = rComplexColor; }
 const model::ComplexColor& getComplexColor() const { return 
maComplexColor; }
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 2404a59edb50..957f6d0ffb26 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -265,25 +265,25 @@ SfxPoolItem* XColorItem::CreateDefault() { return new 
XColorItem; }
 
 XColorItem::XColorItem(TypedWhichId _nWhich, sal_Int32 nIndex, 
const Color& rTheColor) :
 NameOrIndex(_nWhich, nIndex),
-aColor(rTheColor)
+m_aColor(rTheColor)
 {
 }
 
 XColorItem::XColorItem(TypedWhichId _nWhich, const OUString& 
rName, const Color& rTheColor) :
 NameOrIndex(_nWhich, rName),
-aColor(rTheColor)
+m_aColor(rTheColor)
 {
 }
 
 XColorItem::XColorItem(TypedWhichId _nWhich, const Color& 
rTheColor)
 : NameOrIndex(_nWhich, OUString())
-, aColor(rTheColor)
+, m_aColor(rTheColor)
 {
 }
 
 XColorItem::XColorItem(const XColorItem& rItem) :
 NameOrIndex(rItem),
-aColor(rItem.aColor),
+m_aColor(rItem.m_aColor),
 maComplexColor(rItem.maComplexColor)
 {
 }
@@ -296,14 +296,14 @@ XColorItem* XColorItem::Clone(SfxItemPool* /*pPool*/) 
const
 bool XColorItem::operator==(const SfxPoolItem& rItem) const
 {
 return ( NameOrIndex::operator==(rItem) &&
-static_cast(rItem).aColor == aColor ) &&
+static_cast(rItem).m_aColor == m_aColor ) &&
 static_cast(rItem).maComplexColor == 
maComplexColor;
 }
 
 const Color& XColorItem::GetColorValue() const
 {
 assert(!IsIndex());
-return aColor;
+return m_aColor;
 
 }
 
@@ -386,7 +386,7 @@ void XColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), 
BAD_CAST("XATTR_FILLCOLOR"));
 }
 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aColor"),
-
BAD_CAST(aColor.AsRGBHexString().toUtf8().getStr()));
+
BAD_CAST(m_aColor.AsRGBHexString().toUtf8().getStr()));
 
 NameOrIndex::dumpAsXml(pWriter);
 


core.git: include/svx sw/source

2023-12-20 Thread Bogdan B (via logerrit)
 include/svx/strings.hrc  |2 +-
 include/svx/svxitems.hrc |2 +-
 sw/source/core/access/AccessibilityCheck.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6c535425adae84ab5e841e0b04584481e0874edf
Author: Bogdan B 
AuthorDate: Wed Nov 29 20:46:48 2023 +0100
Commit: Heiko Tietze 
CommitDate: Wed Dec 20 09:33:37 2023 +0100

tdf#158105 Change character "background" to "highlighting color"

Change-Id: I98dcc9cf0d2e3306275a25ed83dc5692211ed442
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160037
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Hossein 

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 8dc2aa04639e..bc42cae37ea4 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1463,7 +1463,7 @@
 #define RID_SVXITEMS_AUTHOR_COMPLETE
NC_("RID_SVXITEMS_AUTHOR_COMPLETE", "Author: ")
 #define RID_SVXITEMS_DATE_COMPLETE  
NC_("RID_SVXITEMS_DATE_COMPLETE", "Date: ")
 #define RID_SVXITEMS_TEXT_COMPLETE  
NC_("RID_SVXITEMS_TEXT_COMPLETE", "Text: ")
-#define RID_SVXITEMS_BRUSH_CHAR 
NC_("RID_SVXITEMS_BRUSH_CHAR", "Character background")
+#define RID_SVXITEMS_BRUSH_CHAR 
NC_("RID_SVXITEMS_BRUSH_CHAR", "Character highlighting color")
 
 #define STR_COLORTABLE  
NC_("STR_COLORTABLE", "Color Palette")
 
diff --git a/include/svx/svxitems.hrc b/include/svx/svxitems.hrc
index af1e5aa3375b..0687ffe2842f 100644
--- a/include/svx/svxitems.hrc
+++ b/include/svx/svxitems.hrc
@@ -68,7 +68,7 @@ const std::pair RID_ATTR_NAMES[] =
 { NC_("RID_ATTR_NAMES", "Keep with next paragraph"),   SID_ATTR_PARA_KEEP 
},
 { NC_("RID_ATTR_NAMES", "Blinking"),   SID_ATTR_FLASH },
 { NC_("RID_ATTR_NAMES", "Page line-spacing")   ,   
SID_ATTR_PARA_REGISTER },
-{ NC_("RID_ATTR_NAMES", "Character background"),   SID_ATTR_BRUSH_CHAR 
},
+{ NC_("RID_ATTR_NAMES", "Character highlighting color"),   
SID_ATTR_BRUSH_CHAR },
 { NC_("RID_ATTR_NAMES", "Asian font")  ,   
SID_ATTR_CHAR_CJK_FONT },
 { NC_("RID_ATTR_NAMES", "Size of Asian font")  ,   
SID_ATTR_CHAR_CJK_FONTHEIGHT },
 { NC_("RID_ATTR_NAMES", "Language of Asian font"), 
SID_ATTR_CHAR_CJK_LANGUAGE },
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index 2e3219765e22..7e32a11d0483 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -524,7 +524,7 @@ private:
 return;
 }
 // Determine the background color
-// Try Character background (highlight)
+// Try Character background (Character highlighting color)
 Color aBackgroundColor(nCharBackColor);
 
 // If not character background color, try paragraph background color


core.git: include/svx svx/source

2023-12-18 Thread Noel Grandin (via logerrit)
 include/svx/obj3d.hxx|1 
 include/svx/svdgeodata.hxx   |   48 +++
 include/svx/svdobj.hxx   |   22 ---
 include/svx/svdotext.hxx |1 
 svx/source/svdraw/svdobj.cxx |   14 
 5 files changed, 56 insertions(+), 30 deletions(-)

New commits:
commit 44d0a0ac2ed91228d817a9e4e863eb444c5c3cc8
Author: Noel Grandin 
AuthorDate: Mon Dec 18 12:52:35 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 18 16:06:22 2023 +0100

unique_ptr->optional in SdrObjGeoData

and move it to its own header file to make the include dependencies
easier to handle

Change-Id: I9449ebd70d83be332e47e1786422697f76175e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160905
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 13ffc73c9879..54919a49c931 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/svx/svdgeodata.hxx b/include/svx/svdgeodata.hxx
new file mode 100644
index ..7f5a8b9713a4
--- /dev/null
+++ b/include/svx/svdgeodata.hxx
@@ -0,0 +1,48 @@
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+ * All geometrical data of an arbitrary object for use in undo/redo
+ */
+class SVXCORE_DLLPUBLIC SdrObjGeoData
+{
+public:
+tools::Rectangle aBoundRect;
+Point aAnchor;
+std::optional moGluePoints;
+bool bMovProt;
+bool bSizProt;
+bool bNoPrint;
+bool bClosedObj;
+bool mbVisible;
+SdrLayerID mnLayerID;
+
+public:
+SdrObjGeoData();
+virtual ~SdrObjGeoData();
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 892beb56668c..2951d41e8904 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -76,6 +76,7 @@ class Fraction;
 enum class PointerStyle;
 class Graphic;
 class SvxShape;
+class SdrObjGeoData;
 namespace basegfx
 {
 class B2DPoint;
@@ -163,27 +164,6 @@ public:
 sal_uInt16 GetId() const { return m_nIdentifier;}
 };
 
-/**
- * All geometrical data of an arbitrary object for use in undo/redo
- */
-class SVXCORE_DLLPUBLIC SdrObjGeoData
-{
-public:
-tools::Rectangle   aBoundRect;
-Point   aAnchor;
-std::unique_ptr
-pGPL;
-boolbMovProt;
-boolbSizProt;
-boolbNoPrint;
-boolbClosedObj;
-boolmbVisible;
-SdrLayerID  mnLayerID;
-
-public:
-SdrObjGeoData();
-virtual ~SdrObjGeoData();
-};
 
 /**
  * Provides information about various ZObject properties
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index d9c0908e505b..84aea85fdeff 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index f4d13219db0d..652d965e4c3e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1903,13 +1903,9 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
 
 // user-defined gluepoints
 if (m_pPlusData!=nullptr && m_pPlusData->pGluePoints!=nullptr) {
-if (rGeo.pGPL!=nullptr) {
-*rGeo.pGPL=*m_pPlusData->pGluePoints;
-} else {
-rGeo.pGPL.reset( new SdrGluePointList(*m_pPlusData->pGluePoints) );
-}
+rGeo.moGluePoints = *m_pPlusData->pGluePoints;
 } else {
-rGeo.pGPL.reset();
+rGeo.moGluePoints.reset();
 }
 }
 
@@ -1926,12 +1922,12 @@ void SdrObject::RestoreGeoData(const SdrObjGeoData& 
rGeo)
 mnLayerID = rGeo.mnLayerID;
 
 // user-defined gluepoints
-if (rGeo.pGPL!=nullptr) {
+if (rGeo.moGluePoints) {
 ImpForcePlusData();
 if (m_pPlusData->pGluePoints!=nullptr) {
-

core.git: include/svx svx/source

2023-12-18 Thread Miklos Vajna (via logerrit)
 include/svx/xtable.hxx|4 ++--
 svx/source/xoutdev/xtable.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3930366328042b0fe8d63bc8a2eb827fd7e230a6
Author: Miklos Vajna 
AuthorDate: Mon Dec 18 08:18:29 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Dec 18 12:51:41 2023 +0100

svx: prefix members of XColorEntry

See tdf#94879 for motivation.

Change-Id: I5f666424a2f9cd2206f37b4440d54452e339e3e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160891
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index e84f459511e2..eb015497a9e4 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -42,14 +42,14 @@
 class SVXCORE_DLLPUBLIC XColorEntry final : public XPropertyEntry
 {
 private:
-Color   aColor;
+Color   m_aColor;
 
 public:
 XColorEntry(const Color& rColor, const OUString& rName);
 
 const Color& GetColor() const
 {
-return aColor;
+return m_aColor;
 }
 };
 
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 9818fd1939f4..87850e6f25b8 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -32,7 +32,7 @@ using namespace com::sun::star;
 
 XColorEntry::XColorEntry(const Color& rColor, const OUString& rName)
 :   XPropertyEntry(rName),
-aColor(rColor)
+m_aColor(rColor)
 {
 }
 


core.git: include/svx svx/source

2023-12-11 Thread Miklos Vajna (via logerrit)
 include/svx/svddrag.hxx   |  116 +-
 svx/source/svdraw/svddrag.cxx |   66 +++
 2 files changed, 91 insertions(+), 91 deletions(-)

New commits:
commit 3db4228c59f8dbcf2143c24553d7c75cd0bf1e7a
Author: Miklos Vajna 
AuthorDate: Mon Dec 11 08:18:28 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Dec 11 10:10:42 2023 +0100

svx: prefix members of SdrDragStat

See tdf#94879 for motivation.

Change-Id: Ie3870e511a95c8b2862424cf538cebb0f5fce5dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160558
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
index 5a1d8d16af48..fb01f9599b1b 100644
--- a/include/svx/svddrag.hxx
+++ b/include/svx/svddrag.hxx
@@ -45,34 +45,34 @@ struct SdrDragStatUserData
 
 class SVXCORE_DLLPUBLIC SdrDragStat final
 {
-SdrHdl*  pHdl;  // The Handle for the User
-SdrView* pView;
-SdrPageView* pPageView;
+SdrHdl*  m_pHdl;  // The Handle for the User
+SdrView* m_pView;
+SdrPageView* m_pPageView;
 std::vector mvPnts; // All previous Points: [0]=Start, 
[Count()-2]=Prev
-Point aRef1; // Referencepoint: Resize fixed point, (axis of 
rotation,
-Point aRef2; // axis of reflection, ...)
-Point aPos0; // Position at the last Event
-Point aRealNow;  // Current dragging position without Snap, Ortho and 
Limit
-tools::Rectangle aActionRect;
-
-bool  bEndDragChangesAttributes;
-bool  bEndDragChangesGeoAndAttributes;
+Point m_aRef1; // Referencepoint: Resize fixed point, (axis of 
rotation,
+Point m_aRef2; // axis of reflection, ...)
+Point m_aPos0; // Position at the last Event
+Point m_aRealNow;  // Current dragging position without Snap, Ortho 
and Limit
+tools::Rectangle m_aActionRect;
+
+bool  m_bEndDragChangesAttributes;
+bool  m_bEndDragChangesGeoAndAttributes;
 /// Table row drag: table will re-layout itself later.
 bool  mbEndDragChangesLayout;
-bool  bMouseIsUp;
+bool  m_bMouseIsUp;
 
-bool  bShown;// Xor visible?
-sal_uInt16nMinMov;   // So much has to be minimally moved first
-bool  bMinMoved; // MinMove surpassed?
+bool  m_bShown;// Xor visible?
+sal_uInt16m_nMinMov;   // So much has to be minimally moved first
+bool  m_bMinMoved; // MinMove surpassed?
 
-bool  bHorFixed; // Dragging only vertical
-bool  bVerFixed; // Dragging only horizontal
-bool  bWantNoSnap; // To decide if pObj-> MovCreate () should use 
NoSnapPos or not.
+bool  m_bHorFixed; // Dragging only vertical
+bool  m_bVerFixed; // Dragging only horizontal
+bool  m_bWantNoSnap; // To decide if pObj-> MovCreate () should use 
NoSnapPos or not.
   // Therefore, NoSnapPos is written into the buffer.
-bool  bOrtho4;
-bool  bOrtho8;
+bool  m_bOrtho4;
+bool  m_bOrtho8;
 
-SdrDragMethod* pDragMethod;
+SdrDragMethod* m_pDragMethod;
 std::unique_ptr  mpUserData; // Userdata
 
 void Clear();
@@ -93,62 +93,62 @@ public:
 SdrDragStat(){ Reset(); }
 ~SdrDragStat();
 void Reset();
-SdrView* GetView() const { return pView; }
-void SetView(SdrView* pV){ pView=pV; }
-SdrPageView* GetPageView() const { return pPageView; }
-void SetPageView(SdrPageView* pPV)   { pPageView=pPV; }
+SdrView* GetView() const { return m_pView; }
+void SetView(SdrView* pV){ m_pView=pV; }
+SdrPageView* GetPageView() const { return m_pPageView; }
+void SetPageView(SdrPageView* pPV)   { m_pPageView=pPV; }
 const Point& GetPoint(sal_Int32 nNum) const  { return mvPnts[nNum]; }
 sal_Int32GetPointCount() const   { return mvPnts.size(); }
 const Point& GetStart() const{ return mvPnts[0]; }
 const Point& GetPrev() const { return 
mvPnts[GetPrevPos()]; }
-const Point& GetPos0() const { return aPos0;  }
+const Point& GetPos0() const { return m_aPos0;  }
 const Point& GetNow() const  { return mvPnts.back(); }
 void SetNow(Point const ) { mvPnts.back() = pt; }
-const Point& GetRef1() const { return aRef1;  }
-void SetRef1(const Point ){ aRef1 = pt;  }
-const Point& GetRef2() const { return aRef2;  }
-void SetRef2(const Point ){ aRef2 = pt;  }
-constSdrHdl* GetHdl() const  { return pHdl;   }
-void SetHdl(SdrHdl* pH)  { 

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  376 
 svx/source/svdraw/svdoashp.cxx  |   18 
 3 files changed, 198 insertions(+), 199 deletions(-)

New commits:
commit abdb93ce28febd7c4b4e5dad164ee8a394b499b9
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:42:09 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:51:23 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time for TextRectangles

Again the data is mechanically search/replaced.

Change-Id: I836a0c8384d08da6d8c05cfc6ef9f55c1c90fc12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153885
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index c776daff606a..b95501c288c3 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -75,8 +75,7 @@ struct mso_CustomShape
 sal_uInt32  nElements;
 std::span pCalculation;
 sal_Int32*  pDefData;
-SvxMSDffTextRectangles* pTextRect;
-sal_uInt32  nTextRect;
+std::span pTextRect;
 sal_Int32   nCoordWidth;
 sal_Int32   nCoordHeight;
 sal_Int32   nXRef;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 31085c48b9a2..a70b25292e33 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -131,7 +131,7 @@ const mso_CustomShape msoArc =
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
 std::span(mso_sptArcCalc),
 const_cast(mso_sptArcDefault),
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -148,7 +148,7 @@ const mso_CustomShape msoTextSimple =
 nullptr, 0,
 std::span(),
 nullptr,
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -165,7 +165,7 @@ const mso_CustomShape msoRectangle =
 nullptr, 0,
 std::span(),
 nullptr,
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -210,7 +210,7 @@ const mso_CustomShape msoRoundRectangle =
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
 std::span(mso_sptRoundRectangleCalc),
 const_cast(mso_sptDefault3600),
-const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
+std::span(mso_sptRoundRectangleTextRect),
 21600, 21600,
 10800, 10800,
 std::span(),
@@ -235,7 +235,7 @@ const mso_CustomShape msoRightTriangle =
 nullptr, 0,
 std::span(),
 nullptr,
-const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
+std::span(mso_sptRightTriangleTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptRightTriangleGluePoints),
@@ -264,7 +264,7 @@ const mso_CustomShape msoEllipse =
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
 std::span(),
 nullptr,
-const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
+std::span(mso_sptEllipseTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptEllipseGluePoints),
@@ -315,7 +315,7 @@ const mso_CustomShape msoParallelogram =
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
 std::span(mso_sptParallelogramCalc),
 const_cast(mso_sptDefault5400),
-const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
+std::span(mso_sptParallelogramTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptParallelogramGluePoints),
@@ -336,7 +336,7 @@ const mso_CustomShape msoDiamond =
 nullptr, 0,
 std::span(),
 nullptr,
-const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
+std::span(mso_sptDiamondTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptStandardGluePoints),
@@ -380,7 +380,7 @@ const mso_CustomShape msoTrapezoid =
 const_cast(mso_sptTrapezoidSegm), sizeof( 
mso_sptTrapezoidSegm ) >> 1,
 std::span(mso_sptTrapezoidCalc),
 const_cast(mso_sptDefault5400),
-const_cast(mso_sptTrapezoidTextRect), 
SAL_N_ELEMENTS( mso_sptTrapezoidTextRect ),
+std::span(mso_sptTrapezoidTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptTrapezoidGluePoints),
@@ -471,7 +471,7 @@ const mso_CustomShape msoOctagon =
 const_cast(mso_sptOctagonSegm), 

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  377 +++-
 svx/source/svdraw/svdoashp.cxx  |   22 
 3 files changed, 202 insertions(+), 200 deletions(-)

New commits:
commit 4a49d7a3a98ccdca52ea0a4475d05235a111ec0a
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:30:04 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:47:13 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time for Calculations.

Again the size is mostly mechanical:

In vim load into a:

:+4,+4s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/
:+4,+4s/nullptr, 0/o3tl::span()

and run
:%g/^const mso_C.*=/@a
(But has had some fixups after conversion from o3tl to std)

Change-Id: I11cdfffdfb61678c173d3136a8e948fd0c224af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153884
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index 3191f1e5d14f..c776daff606a 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -73,8 +73,7 @@ struct mso_CustomShape
 std::span   pVertices;
 sal_uInt16* pElements;
 sal_uInt32  nElements;
-SvxMSDffCalculationData*pCalculation;
-sal_uInt32  nCalculation;
+std::span pCalculation;
 sal_Int32*  pDefData;
 SvxMSDffTextRectangles* pTextRect;
 sal_uInt32  nTextRect;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index ad87e34d5da3..31085c48b9a2 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include 
 
 #include 
@@ -130,7 +129,7 @@ const mso_CustomShape msoArc =
 {
 std::span(mso_sptArcVert),
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
-const_cast(mso_sptArcCalc), SAL_N_ELEMENTS( 
mso_sptArcCalc ),
+std::span(mso_sptArcCalc),
 const_cast(mso_sptArcDefault),
 nullptr, 0,
 21600, 21600,
@@ -147,7 +146,7 @@ const mso_CustomShape msoTextSimple =
 {
 std::span(mso_sptTextSimpleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 nullptr, 0,
 21600, 21600,
@@ -164,7 +163,7 @@ const mso_CustomShape msoRectangle =
 {
 std::span(mso_sptRectangleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 nullptr, 0,
 21600, 21600,
@@ -209,7 +208,7 @@ const mso_CustomShape msoRoundRectangle =
 {
 std::span(mso_sptRoundRectangleVert),
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
-const_cast(mso_sptRoundRectangleCalc), 
SAL_N_ELEMENTS( mso_sptRoundRectangleCalc ),
+std::span(mso_sptRoundRectangleCalc),
 const_cast(mso_sptDefault3600),
 const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
 21600, 21600,
@@ -234,7 +233,7 @@ const mso_CustomShape msoRightTriangle =
 {
 std::span(mso_sptRightTriangleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
 21600, 21600,
@@ -263,7 +262,7 @@ const mso_CustomShape msoEllipse =
 {
 std::span(mso_sptEllipseVert),
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
 21600, 21600,
@@ -314,7 +313,7 @@ const mso_CustomShape msoParallelogram =
 {
 std::span(mso_sptParallelogramVert),
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
-const_cast(mso_sptParallelogramCalc), 
SAL_N_ELEMENTS( mso_sptParallelogramCalc ),
+std::span(mso_sptParallelogramCalc),
 const_cast(mso_sptDefault5400),
 const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
 21600, 21600,
@@ -335,7 +334,7 @@ const mso_CustomShape msoDiamond =
 {
 std::span(mso_sptDiamondVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
 21600, 21600,
@@ -379,7 +378,7 @@ const mso_CustomShape msoTrapezoid =
 {
 std::span(mso_sptTrapezoidVert),
 const_cast(mso_sptTrapezoidSegm), sizeof( 
mso_sptTrapezoidSegm ) >> 1,
-const_cast(mso_sptTrapezoidCalc), 
SAL_N_ELEMENTS( 

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  379 
 svx/source/svdraw/svdoashp.cxx  |   10 
 3 files changed, 196 insertions(+), 196 deletions(-)

New commits:
commit 82f30ac55a90a0f0915d4016c760c5c38db087f1
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:05:03 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:46:06 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time the GluePoints.

Again the size is mostly mechanical:

In vim into the A register:
:+9,+9s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/
:+9,+9s/nullptr, 0/o3tl::span()

and then:
:%g/^const mso_C.*=/@a

for the tables.
(But has had some fixups since switching from o3tl to std)

Change-Id: I966275caf38a6af469d334a0161053159e726f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153883
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index db8fe5a5944f..3191f1e5d14f 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -82,8 +82,7 @@ struct mso_CustomShape
 sal_Int32   nCoordHeight;
 sal_Int32   nXRef;
 sal_Int32   nYRef;
-SvxMSDffVertPair*   pGluePoints;
-sal_uInt32  nGluePoints;
+std::span   pGluePoints;
 SvxMSDffHandle* pHandles;
 sal_uInt32  nHandles;
 };
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 2fa97e30b32d..ad87e34d5da3 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+
 #include 
 
 #include 
@@ -134,7 +135,7 @@ const mso_CustomShape msoArc =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 const_cast(mso_sptArcHandle), SAL_N_ELEMENTS( 
mso_sptArcHandle )// handles
 };
 
@@ -151,7 +152,7 @@ const mso_CustomShape msoTextSimple =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 nullptr, 0 // handles
 };
 
@@ -168,7 +169,7 @@ const mso_CustomShape msoRectangle =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 nullptr, 0 // handles
 };
 
@@ -213,7 +214,7 @@ const mso_CustomShape msoRoundRectangle =
 const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
 21600, 21600,
 10800, 10800,
-nullptr, 0,
+std::span(),
 const_cast(mso_sptRoundRectangleHandle), SAL_N_ELEMENTS( 
mso_sptRoundRectangleHandle )  // handles
 };
 
@@ -238,7 +239,7 @@ const mso_CustomShape msoRightTriangle =
 const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptRightTriangleGluePoints), 
SAL_N_ELEMENTS( mso_sptRightTriangleGluePoints ),
+std::span(mso_sptRightTriangleGluePoints),
 nullptr, 0 // handles
 };
 
@@ -267,7 +268,7 @@ const mso_CustomShape msoEllipse =
 const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptEllipseGluePoints), SAL_N_ELEMENTS( 
mso_sptEllipseGluePoints ),
+std::span(mso_sptEllipseGluePoints),
 nullptr, 0 // handles
 };
 
@@ -318,7 +319,7 @@ const mso_CustomShape msoParallelogram =
 const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptParallelogramGluePoints), 
SAL_N_ELEMENTS( mso_sptParallelogramGluePoints ),
+std::span(mso_sptParallelogramGluePoints),
 const_cast(mso_sptParallelogramHandle), SAL_N_ELEMENTS( 
mso_sptParallelogramHandle )// handles
 };
 
@@ -339,7 +340,7 @@ const mso_CustomShape msoDiamond =
 const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptStandardGluePoints), SAL_N_ELEMENTS( 
mso_sptStandardGluePoints ),
+std::span(mso_sptStandardGluePoints),
 nullptr, 0 // handles
 };
 
@@ -383,7 +384,7 @@ const mso_CustomShape msoTrapezoid =
 const_cast(mso_sptTrapezoidTextRect), 
SAL_N_ELEMENTS( mso_sptTrapezoidTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptTrapezoidGluePoints), SAL_N_ELEMENTS( 

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  377 
 svx/source/svdraw/svdoashp.cxx  |   10 
 3 files changed, 195 insertions(+), 195 deletions(-)

New commits:
commit 9924561a094f1b3b2b78700bd1f1638d9608f881
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 13:16:42 2023 +0100
Commit: Hossein 
CommitDate: Fri Dec 8 17:13:53 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

EnhancedCustomShapeGeometry has a set of predefined shapes
defined with classic arrays and each is used in a structure
initialisation like:

 const mso_CustomShape msoArc =
 {
-const_cast(mso_sptArcVert), SAL_N_ELEMENTS( 
mso_sptArcVert ),

by using a span we can turn that into:
+std::span(mso_sptArcVert),

There's potential to get rid of some numbered loops later as well.

The patch is large mostly because of mechanical replacement
Loading EnhancedCustomShapeGeometry.cxx into vim then:

into register A put:
:+2,+2s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/

and do:
:%g/^const mso_C.*=/@a

(since fixed up to std:: )
Change-Id: Ia670b6aa7cc9f662650de2af76ee271a4469f1f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153882
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index a52dc4820b6e..db8fe5a5944f 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -70,8 +70,7 @@ struct SvxMSDffHandle
 };
 struct mso_CustomShape
 {
-SvxMSDffVertPair*   pVertices;
-sal_uInt32  nVertices;
+std::span   pVertices;
 sal_uInt16* pElements;
 sal_uInt32  nElements;
 SvxMSDffCalculationData*pCalculation;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 8e9ee89fb716..2fa97e30b32d 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -126,7 +127,7 @@ const SvxMSDffHandle mso_sptArcHandle[] =
 };
 const mso_CustomShape msoArc =
 {
-const_cast(mso_sptArcVert), SAL_N_ELEMENTS( 
mso_sptArcVert ),
+std::span(mso_sptArcVert),
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
 const_cast(mso_sptArcCalc), SAL_N_ELEMENTS( 
mso_sptArcCalc ),
 const_cast(mso_sptArcDefault),
@@ -143,7 +144,7 @@ const SvxMSDffVertPair mso_sptTextSimpleVert[] =
 };
 const mso_CustomShape msoTextSimple =
 {
-const_cast(mso_sptTextSimpleVert), SAL_N_ELEMENTS( 
mso_sptTextSimpleVert ),
+std::span(mso_sptTextSimpleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -160,7 +161,7 @@ const SvxMSDffVertPair mso_sptRectangleVert[] =
 };
 const mso_CustomShape msoRectangle =
 {
-const_cast(mso_sptRectangleVert), SAL_N_ELEMENTS( 
mso_sptRectangleVert ),
+std::span(mso_sptRectangleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -205,7 +206,7 @@ const SvxMSDffHandle mso_sptRoundRectangleHandle[] =
 };
 const mso_CustomShape msoRoundRectangle =
 {
-const_cast(mso_sptRoundRectangleVert), SAL_N_ELEMENTS( 
mso_sptRoundRectangleVert ),
+std::span(mso_sptRoundRectangleVert),
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
 const_cast(mso_sptRoundRectangleCalc), 
SAL_N_ELEMENTS( mso_sptRoundRectangleCalc ),
 const_cast(mso_sptDefault3600),
@@ -230,7 +231,7 @@ const SvxMSDffVertPair mso_sptRightTriangleGluePoints[] =
 };
 const mso_CustomShape msoRightTriangle =
 {
-const_cast(mso_sptRightTriangleVert), SAL_N_ELEMENTS( 
mso_sptRightTriangleVert ),
+std::span(mso_sptRightTriangleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -259,7 +260,7 @@ const SvxMSDffVertPair mso_sptEllipseGluePoints[] =
 };
 const mso_CustomShape msoEllipse =
 {
-const_cast(mso_sptEllipseVert), SAL_N_ELEMENTS( 
mso_sptEllipseVert ),
+std::span(mso_sptEllipseVert),
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
 nullptr, 0,
 nullptr,
@@ -310,7 +311,7 @@ const SvxMSDffHandle mso_sptParallelogramHandle[] =
 };
 const mso_CustomShape msoParallelogram =
 {
-const_cast(mso_sptParallelogramVert), SAL_N_ELEMENTS( 
mso_sptParallelogramVert ),
+std::span(mso_sptParallelogramVert),
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
 const_cast(mso_sptParallelogramCalc), 
SAL_N_ELEMENTS( mso_sptParallelogramCalc ),
 const_cast(mso_sptDefault5400),
@@ -331,7 +332,7 @@ const SvxMSDffTextRectangles 

core.git: include/svx officecfg/registry sd/source svx/source

2023-12-07 Thread Gabor Kelemen (via logerrit)
 include/svx/optgrid.hxx |6 -
 officecfg/registry/schema/org/openoffice/Office/Draw.xcs|   44 
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |   44 
 sd/source/ui/app/optsitem.cxx   |   31 ++--
 sd/source/ui/inc/optsitem.hxx   |4 -
 svx/source/dialog/optgrid.cxx   |6 -
 6 files changed, 9 insertions(+), 126 deletions(-)

New commits:
commit 83cc8ef8f8a459ca7a793acb220f4496b6e6af1a
Author: Gabor Kelemen 
AuthorDate: Fri Dec 1 00:22:30 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Dec 7 16:53:24 2023 +0100

[API CHANGE] Drop unused SnapGrid/[X,Y]Axis config groups

from Impress/Draw

last mention of them was removed in 2006 by:
commit deef3fdfd9148ce1987b35a224998d63bb6b9d56

removing a commented out caller
that was already commented out by "initial import" time

Change-Id: I50fefe42a92c752727dfbf3b9d7c645492d034da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160190
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index ed71e62cdb53..7cdcdf8399f3 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -36,8 +36,6 @@ protected:
 sal_uInt32  nFldDivisionX;
 sal_uInt32  nFldDrawY;
 sal_uInt32  nFldDivisionY;
-sal_uInt32  nFldSnapX;
-sal_uInt32  nFldSnapY;
 boolbUseGridsnap:1;
 boolbSynchronize:1;
 boolbGridVisible:1;
@@ -50,8 +48,6 @@ public:
 voidSetFieldDivisionX(sal_uInt32 nSet){nFldDivisionX  = nSet;}
 voidSetFieldDrawY   ( sal_uInt32 nSet){nFldDrawY  = nSet;}
 voidSetFieldDivisionY(sal_uInt32 nSet){nFldDivisionY  = nSet;}
-voidSetFieldSnapX(sal_uInt32 nSet){nFldSnapX  = nSet;}
-voidSetFieldSnapY   ( sal_uInt32 nSet){nFldSnapY  = nSet;}
 voidSetUseGridSnap( bool bSet ) {bUseGridsnap   = bSet;}
 voidSetSynchronize( bool bSet ) {bSynchronize   = bSet;}
 voidSetGridVisible( bool bSet ) {bGridVisible   = bSet;}
@@ -61,8 +57,6 @@ public:
 sal_uInt32  GetFieldDivisionX() const {  return nFldDivisionX;}
 sal_uInt32  GetFieldDrawY   ( ) const {  return nFldDrawY;}
 sal_uInt32  GetFieldDivisionY() const {  return nFldDivisionY;}
-sal_uInt32  GetFieldSnapX() const {  return nFldSnapX;}
-sal_uInt32  GetFieldSnapY   ( ) const {  return nFldSnapY;}
 boolGetUseGridSnap( ) const {  return bUseGridsnap; }
 boolGetSynchronize( ) const {  return bSynchronize; }
 boolGetGridVisible( ) const {  return bGridVisible; }
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index 069479636c8b..7fdbf9f05801 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -690,50 +690,6 @@
   
   true
 
-
-  
-  
-  
-Defines the horizontal distance between adjacent points of 
the snap grid.
-X axis
-  
-  
-
-  [UNIT=1/100 mm]
-  
-
-1000
-  
-  
-
-  [UNIT=1/100 mm]
-  
-
-1270
-  
-
-
-  
-  
-  
-Defines the vertical distance between adjacent points of the 
snap grid.
-Y axis
-  
-  
-
-  [UNIT=1/100 mm]
-  
-
-1000
-  
-  
-
-  [UNIT=1/100 mm]
-  
-
-1270
-  
-
   
 
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index bf65b1b9e411..876780d1bd09 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -927,50 +927,6 @@
   
   true
 
-
-  
-  
-  
-Defines the horizontal distance between adjacent points of 
the snap grid.
-X axis
-  
-  
-
-  Defines the horizontal distance between adjacent points of 
the snap grid in 1/100 mm, used when the metric system is selected.
-  
-
-100
-  
-  
-
-  Defines the horizontal distance between adjacent points of 
the snap grid in 1/100 mm, used when the non-metric system is selected.
-  
-
-1270
-  
-
-
-  

[Libreoffice-commits] core.git: include/svx svx/source

2023-12-04 Thread Miklos Vajna (via logerrit)
 include/svx/svdpage.hxx   |8 
 svx/source/svdraw/svdpage.cxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit beb0b57a638a2577d89ab5bdee6351008c5127ca
Author: Miklos Vajna 
AuthorDate: Mon Dec 4 08:19:31 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Dec 4 10:43:26 2023 +0100

svx: prefix members of SdrPageGridFrameList

See tdf#94879 for motivation.

Change-Id: Ieb5630a9aaa1d5ae51915e0fe6892e43e9c2e629
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160292
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 7dd18e743184..c70a2f1f4a2d 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -302,18 +302,18 @@ public:
 
 class SVXCORE_DLLPUBLIC SdrPageGridFrameList final
 {
-std::vector aList;
+std::vector m_aList;
 
 SdrPageGridFrameList(const SdrPageGridFrameList& rSrcList) = delete;
 void   operator=(const SdrPageGridFrameList& rSrcList) = delete;
-SdrPageGridFrame* GetObject(sal_uInt16 i) const { return aList[i]; }
+SdrPageGridFrame* GetObject(sal_uInt16 i) const { return m_aList[i]; }
 
 public:
 SdrPageGridFrameList(){}
 ~SdrPageGridFrameList(){ 
Clear(); }
 void   Clear();
-sal_uInt16 GetCount() const{ 
return sal_uInt16(aList.size()); }
-void   Insert(const SdrPageGridFrame& rGF) { aList.push_back(new 
SdrPageGridFrame(rGF)); }
+sal_uInt16 GetCount() const{ 
return sal_uInt16(m_aList.size()); }
+void   Insert(const SdrPageGridFrame& rGF) { m_aList.push_back(new 
SdrPageGridFrame(rGF)); }
 SdrPageGridFrame&   operator[](sal_uInt16 nPos){ 
return *GetObject(nPos); }
 const SdrPageGridFrame& operator[](sal_uInt16 nPos) const  { 
return *GetObject(nPos); }
 };
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 9b5965a5843a..adc8555bf13d 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1099,7 +1099,7 @@ void SdrPageGridFrameList::Clear()
 for (sal_uInt16 i=0; i

[Libreoffice-commits] core.git: include/svx sd/source svx/source

2023-11-29 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx   |2 +
 sd/source/ui/dlg/tpoption.cxx |   31 +---
 svx/source/dialog/optgrid.cxx |   65 +++---
 3 files changed, 71 insertions(+), 27 deletions(-)

New commits:
commit 2bf8231ab5709f0d7577d6da53f50bc7f0b65079
Author: Balazs Varga 
AuthorDate: Tue Nov 28 11:57:29 2023 +0100
Commit: Balazs Varga 
CommitDate: Wed Nov 29 09:45:57 2023 +0100

tdf#158244 - UI: Part 45 - Unify lockdown behavior of Options dialog

for Draw - Grid Page.

Use the right grid settings associated with the application.
follow-up of fbecf8009af8abdd218fbb3bd26087e8b805d06b

Change-Id: I30b3c7ad80348a9cc89b6ea206a8ad9387276593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160020
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index b8e1f5604286..ed71e62cdb53 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -152,6 +152,8 @@ protected:
 std::unique_ptr m_xMtrFldBezAngle;
 std::unique_ptr m_xMtrFldBezAngleImg;
 
+bool IsDrawMode() const { return m_Emode == DRAW_MODE; }
+
 DECL_LINK(ClickRotateHdl_Impl, weld::Toggleable&, void);
 private:
 DECL_DLLPRIVATE_LINK(ChangeDrawHdl_Impl, weld::MetricSpinButton&, void);
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 8c5416c9cb09..812d39ffd8aa 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -83,51 +83,62 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
 
-bool bReadOnly = 
officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
+bool bDrawMode = SvxGridTabPage::IsDrawMode();
+bool bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::SnapLine::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
 m_xCbxSnapHelplines->set_active( 
aOptsItem.GetOptionsSnap().IsSnapHelplines() );
 m_xCbxSnapHelplines->set_sensitive(!bReadOnly);
 m_xCbxSnapHelplinesImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::PageMargin::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
 m_xCbxSnapBorder->set_active( aOptsItem.GetOptionsSnap().IsSnapBorder() );
 m_xCbxSnapBorder->set_sensitive(!bReadOnly);
 m_xCbxSnapBorderImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectFrame::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
 m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
 m_xCbxSnapFrame->set_sensitive(!bReadOnly);
 m_xCbxSnapFrameImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::ObjectPoint::isReadOnly() :
+officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
 m_xCbxSnapPoints->set_active( aOptsItem.GetOptionsSnap().IsSnapPoints() );
 m_xCbxSnapPoints->set_sensitive(!bReadOnly);
 m_xCbxSnapPointsImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::CreatingMoving::isReadOnly() :
+
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
 m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
 m_xCbxOrtho->set_sensitive(!bReadOnly);
 m_xCbxOrthoImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::ExtendEdges::isReadOnly() :
+officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
 m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
 m_xCbxBigOrtho->set_sensitive(!bReadOnly);
 m_xCbxBigOrthoImg->set_visible(bReadOnly);
 
-bReadOnly = 
officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Position::Rotating::isReadOnly() :
+officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
 m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
 m_xCbxRotate->set_sensitive(!bReadOnly);
 m_xCbxRotateImg->set_visible(bReadOnly);
 
-bReadOnly = officecfg::Office::Impress::Snap::Object::Range::isReadOnly();
+bReadOnly = bDrawMode ? 
officecfg::Office::Draw::Snap::Object::Range::isReadOnly() :
+

[Libreoffice-commits] core.git: include/svx sd/source svx/source svx/uiconfig

2023-11-24 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx|   19 
 sd/source/ui/dlg/tpoption.cxx  |   38 +
 svx/source/dialog/optgrid.cxx  |  125 +++
 svx/uiconfig/ui/optgridpage.ui |  162 +
 4 files changed, 313 insertions(+), 31 deletions(-)

New commits:
commit fbecf8009af8abdd218fbb3bd26087e8b805d06b
Author: Balazs Varga 
AuthorDate: Thu Nov 23 12:20:37 2023 +0100
Commit: Balazs Varga 
CommitDate: Fri Nov 24 15:16:43 2023 +0100

tdf#158239 - UI: Part 41 - Unify lockdown behavior of Options dialog

for Impress - Grid Page.

Change-Id: I0864a0a47a890c34154e775a1f960fdff09de81c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159868
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index c033d001871c..b8e1f5604286 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -104,8 +104,16 @@ public:
 virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
 private:
+enum ModuleMode
+{
+WRITER_MODE = 0,
+CALC_MODE = 1,
+IMPRESS_MODE = 2,
+DRAW_MODE = 3,
+HTML_MODE = 4
+};
 boolbAttrModified;
-boolm_bHTMLMode;
+ModuleMode  m_Emode;
 
 std::unique_ptr m_xCbxUseGridsnap;
 std::unique_ptr m_xCbxUseGridsnapImg;
@@ -125,15 +133,24 @@ protected:
 //these controls are used in draw and impress
 std::unique_ptr m_xSnapFrames;
 std::unique_ptr m_xCbxSnapHelplines;
+std::unique_ptr m_xCbxSnapHelplinesImg;
 std::unique_ptr m_xCbxSnapBorder;
+std::unique_ptr m_xCbxSnapBorderImg;
 std::unique_ptr m_xCbxSnapFrame;
+std::unique_ptr m_xCbxSnapFrameImg;
 std::unique_ptr m_xCbxSnapPoints;
+std::unique_ptr m_xCbxSnapPointsImg;
 std::unique_ptr m_xMtrFldSnapArea;
+std::unique_ptr m_xMtrFldSnapAreaImg;
 std::unique_ptr m_xCbxOrtho;
+std::unique_ptr m_xCbxOrthoImg;
 std::unique_ptr m_xCbxBigOrtho;
+std::unique_ptr m_xCbxBigOrthoImg;
 std::unique_ptr m_xCbxRotate;
+std::unique_ptr m_xCbxRotateImg;
 std::unique_ptr m_xMtrFldAngle;
 std::unique_ptr m_xMtrFldBezAngle;
+std::unique_ptr m_xMtrFldBezAngleImg;
 
 DECL_LINK(ClickRotateHdl_Impl, weld::Toggleable&, void);
 private:
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index fabf76255bd7..300b5caedd71 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -82,16 +82,54 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
 
 SdOptionsSnapItem aOptsItem( rAttrs->Get( ATTR_OPTIONS_SNAP ) );
 
+bool bReadOnly = 
officecfg::Office::Impress::Snap::Object::SnapLine::isReadOnly();
 m_xCbxSnapHelplines->set_active( 
aOptsItem.GetOptionsSnap().IsSnapHelplines() );
+m_xCbxSnapHelplines->set_sensitive(!bReadOnly);
+m_xCbxSnapHelplinesImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::PageMargin::isReadOnly();
 m_xCbxSnapBorder->set_active( aOptsItem.GetOptionsSnap().IsSnapBorder() );
+m_xCbxSnapBorder->set_sensitive(!bReadOnly);
+m_xCbxSnapBorderImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectFrame::isReadOnly();
 m_xCbxSnapFrame->set_active( aOptsItem.GetOptionsSnap().IsSnapFrame() );
+m_xCbxSnapFrame->set_sensitive(!bReadOnly);
+m_xCbxSnapFrameImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Object::ObjectPoint::isReadOnly();
 m_xCbxSnapPoints->set_active( aOptsItem.GetOptionsSnap().IsSnapPoints() );
+m_xCbxSnapPoints->set_sensitive(!bReadOnly);
+m_xCbxSnapPointsImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::CreatingMoving::isReadOnly();
 m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
+m_xCbxOrtho->set_sensitive(!bReadOnly);
+m_xCbxOrthoImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::ExtendEdges::isReadOnly();
 m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
+m_xCbxBigOrtho->set_sensitive(!bReadOnly);
+m_xCbxBigOrthoImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::Rotating::isReadOnly();
 m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
+m_xCbxRotate->set_sensitive(!bReadOnly);
+m_xCbxRotateImg->set_visible(bReadOnly);
+
+bReadOnly = officecfg::Office::Impress::Snap::Object::Range::isReadOnly();
 m_xMtrFldSnapArea->set_value(aOptsItem.GetOptionsSnap().GetSnapArea(), 
FieldUnit::PIXEL);
+m_xMtrFldSnapArea->set_sensitive(!bReadOnly);
+m_xMtrFldSnapAreaImg->set_visible(bReadOnly);
+
+bReadOnly = 
officecfg::Office::Impress::Snap::Position::RotatingValue::isReadOnly();
 

[Libreoffice-commits] core.git: include/svx svx/source

2023-11-22 Thread AmosAidoo (via logerrit)
 include/svx/charmap.hxx |3 
 include/svx/searchcharmap.hxx   |2 
 svx/source/dialog/charmap.cxx   |   13 ++-
 svx/source/dialog/searchcharmap.cxx |  152 +---
 4 files changed, 20 insertions(+), 150 deletions(-)

New commits:
commit 94d2d9a59450fa4bccd0a3a450d8b273271d2ff2
Author: AmosAidoo 
AuthorDate: Tue Nov 21 03:17:12 2023 +0100
Commit: Andreas Heinisch 
CommitDate: Wed Nov 22 21:49:57 2023 +0100

tdf#154088 Merge code snippets for character retrieval and string 
construction

The DrawChars_Impl method has been unified since the duplicates were 
identical
and only differed in how they retrieved characters from a separate source. 
Each
class now has its own implentation of GetCharFromIndex as a solution.

Change-Id: Ic2d10a46a91ea8dee2c94b620e6745bf77ae9eab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159773
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 8057eae3c1bd..1c440b6ee2c1 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -66,6 +66,7 @@ public:
 
 voidSelectCharacter( sal_UCS4 cNew );
 virtual sal_UCS4GetSelectCharacter() const;
+virtual sal_UCS4GetCharFromIndex(int index) const;
 voidcreateContextMenu(const Point& rPosition);
 
 voidSetDoubleClickHdl( const Link& rLink 
) { aDoubleClkHdl = rLink; }
@@ -148,7 +149,7 @@ protected:
 
 protected:
 virtual bool KeyInput(const KeyEvent&) override;
-virtual voidDrawChars_Impl(vcl::RenderContext& rRenderContext, 
int n1, int n2);
+voidDrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, 
int n2);
 voidInitSettings(vcl::RenderContext& rRenderContext);
 // abstraction layers are: Unicode<->MapIndex<->Pixel
 Point   MapIndexToPixel( int) const;
diff --git a/include/svx/searchcharmap.hxx b/include/svx/searchcharmap.hxx
index d05f3ea82728..b07d58a4c8ad 100644
--- a/include/svx/searchcharmap.hxx
+++ b/include/svx/searchcharmap.hxx
@@ -44,6 +44,7 @@ public:
 
 voidSelectCharacter( const Subset* sub);
 virtual sal_UCS4GetSelectCharacter() const override;
+virtual sal_UCS4GetCharFromIndex(int index) const 
override;
 
 virtual svx::SvxShowCharSetItem*ImplGetItem( int _nPos ) override;
 virtual int LastInView() const override;
@@ -59,7 +60,6 @@ private:
 //to uniquely identify each appended element
 std::unordered_map m_aItemList;
 private:
-virtual void DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, 
int n2) override;
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
 virtual bool KeyInput(const KeyEvent& rKEvt) override;
 };
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index be2d991977b5..dcb1205584d7 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -534,12 +534,17 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1,
 tools::Rectangle aBoundRect;
 for (i = n1; i <= n2; ++i)
 {
+sal_UCS4 charValue = GetCharFromIndex(i);
+
+if (charValue == 0)
+continue;
+
+OUString aCharStr(, 1);
+
 Point pix = MapIndexToPixel(i);
 int x = pix.X();
 int y = pix.Y();
 
-sal_UCS4 nChar = mxFontCharMap->GetCharFromIndex(i);
-OUString aCharStr(, 1);
 int nTextWidth = rRenderContext.GetTextWidth(aCharStr);
 int tx = x + (nX - nTextWidth + 1) / 2;
 int ty = y + (nY - nTextHeight + 1) / 2;
@@ -672,6 +677,10 @@ sal_UCS4 SvxShowCharSet::GetSelectCharacter() const
 return getSelectedChar();
 }
 
+sal_UCS4 SvxShowCharSet::GetCharFromIndex(int index) const
+{
+return mxFontCharMap->GetCharFromIndex(index);
+}
 
 void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext)
 {
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index dc3ef7bcecab..2a770eac57de 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -140,6 +140,12 @@ void SvxSearchCharSet::SelectCharacter( const Subset* sub )
 Invalidate();
 }
 
+sal_UCS4 SvxSearchCharSet::GetCharFromIndex(int index) const
+{
+std::unordered_map::const_iterator got = 
m_aItemList.find(index);
+return (got != m_aItemList.end()) ? got->second : 0;
+}
+
 void SvxSearchCharSet::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
 {
 InitSettings(rRenderContext);
@@ -147,152 +153,6 @@ void SvxSearchCharSet::Paint(vcl::RenderContext& 
rRenderContext, const tools::Re
 DrawChars_Impl(rRenderContext, FirstInView(), LastInView());
 }
 
-void 

[Libreoffice-commits] core.git: include/svx svx/source

2023-11-22 Thread Noel Grandin (via logerrit)
 include/svx/framelink.hxx|1 
 svx/source/dialog/framelink.cxx  |   17 ++
 svx/source/dialog/framelinkarray.cxx |  255 ---
 3 files changed, 166 insertions(+), 107 deletions(-)

New commits:
commit d9c726beb64968e84d2150824c81dcf0a8b66ec2
Author: Noel Grandin 
AuthorDate: Wed Nov 22 08:41:26 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 22 16:59:37 2023 +0100

optimise framelinkarray lookup

We can use hashing to do an O(1) lookup instead of O(n)
linear scanning, this class is sometimes a bottleneck
in laying out large spreadsheets.

Change-Id: I4d27e8f339a8732535d832442a9d4a649da19e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159801
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx
index ceb0abe5e390..5c98c3a1a3c6 100644
--- a/include/svx/framelink.hxx
+++ b/include/svx/framelink.hxx
@@ -163,6 +163,7 @@ public:
 
 bool operator==( const Style& rOther) const;
 bool operator<( const Style& rOther) const;
+size_t hashCode() const;
 };
 
 inline bool operator>( const Style& rL, const Style& rR ) { return 
rR.operator<(rL); }
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index fbc5ee1d5533..887fc445dc0c 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 
 
 using namespace ::com::sun::star;
@@ -193,6 +194,22 @@ bool Style::operator==( const Style& rOther) const
 && Type() == rOther.Type());
 }
 
+size_t Style::hashCode() const
+{
+std::size_t seed = 0;
+o3tl::hash_combine(seed, Prim());
+o3tl::hash_combine(seed, Dist());
+o3tl::hash_combine(seed, Secn());
+o3tl::hash_combine(seed, static_cast(GetColorPrim()));
+o3tl::hash_combine(seed, static_cast(GetColorSecn()));
+o3tl::hash_combine(seed, static_cast(GetColorGap()));
+o3tl::hash_combine(seed, GetRefMode());
+o3tl::hash_combine(seed, UseGapColor());
+o3tl::hash_combine(seed, Type());
+return seed;
+}
+
+
 namespace
 {
 /**
diff --git a/svx/source/dialog/framelinkarray.cxx 
b/svx/source/dialog/framelinkarray.cxx
index 65e8c8342dfe..3431c861fcfd 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -71,6 +72,7 @@ public:
 explicit Cell(const Cell&) = default;
 
 bool operator==( const Cell& ) const;
+size_t hashCode() const;
 
 void SetStyleLeft(const Style& rStyle) { maLeft = rStyle; }
 void SetStyleRight(const Style& rStyle) { maRight = rStyle; }
@@ -226,11 +228,29 @@ bool Cell::operator==(const Cell& rOther) const
 && mnAddTop == rOther.mnAddTop
 && mnAddBottom == rOther.mnAddBottom
 && meRotMode == rOther.meRotMode
-&& mfOrientation == rOther.mfOrientation
 && mbOverlapX == rOther.mbOverlapX
 && mbOverlapY == rOther.mbOverlapY;
 }
 
+size_t Cell::hashCode() const
+{
+std::size_t seed = 0;
+o3tl::hash_combine(seed, maLeft.hashCode());
+o3tl::hash_combine(seed, maRight.hashCode());
+o3tl::hash_combine(seed, maTop.hashCode());
+o3tl::hash_combine(seed, maBottom.hashCode());
+o3tl::hash_combine(seed, maTLBR.hashCode());
+o3tl::hash_combine(seed, maBLTR.hashCode());
+o3tl::hash_combine(seed, mnAddLeft);
+o3tl::hash_combine(seed, mnAddRight);
+o3tl::hash_combine(seed, mnAddTop);
+o3tl::hash_combine(seed, mnAddBottom);
+o3tl::hash_combine(seed, meRotMode);
+o3tl::hash_combine(seed, mbOverlapX);
+o3tl::hash_combine(seed, mbOverlapY);
+return seed;
+}
+
 void Cell::MirrorSelfX()
 {
 std::swap( maLeft, maRight );
@@ -255,9 +275,29 @@ static void lclRecalcCoordVec( std::vector& 
rCoords, const std::vecto
 const Style OBJ_STYLE_NONE;
 const Cell OBJ_CELL_NONE;
 
+/** use hashing to speed up finding duplicates */
+namespace
+{
+struct RegisteredCellHash
+{
+size_t operator()(Cell* const pCell) const
+{
+return pCell->hashCode();
+}
+};
+
+struct RegisteredCellEquals
+{
+bool operator()(Cell* const pCell1, Cell* const pCell2) const
+{
+return *pCell1 == *pCell2;
+}
+};
+}
+
 struct ArrayImpl
 {
-std::unordered_set maRegisteredCells;
+std::unordered_set 
maRegisteredCells;
 CellVec maCells;
 std::vector   maWidths;
 std::vector   maHeights;
@@ -281,7 +321,7 @@ struct ArrayImpl
 sal_Int32   GetIndex( sal_Int32 nCol, sal_Int32 nRow ) const
 { return nRow * mnWidth + nCol; }
 
-const Cell* GetCell( sal_Int32 nCol, sal_Int32 nRow ) const;
+const Cell& GetCell( sal_Int32 nCol, sal_Int32 nRow ) const;
 voidPutCell( sal_Int32 nCol, sal_Int32 nRow, const Cell& );
 
 sal_Int32  

[Libreoffice-commits] core.git: include/svx include/tools oox/qa sc/source sd/qa sd/source svx/qa svx/source sw/source

2023-11-22 Thread Attila Szűcs (via logerrit)
 include/svx/compatflags.hxx |2 
 include/tools/poly.hxx  |1 
 oox/qa/unit/shape.cxx   |4 
 sc/source/ui/docshell/docsh.cxx |2 
 sd/qa/unit/export-tests-ooxml3.cxx  |2 
 sd/source/ui/docshell/docshel4.cxx  |2 
 svx/qa/unit/data/tdf148000_CurvedTextWidth.pptx |binary
 svx/qa/unit/data/tdf148000_CurvedTextWidth_Legacy.odp   |binary
 svx/qa/unit/data/tdf148000_CurvedTextWidth_New.odp  |binary
 svx/qa/unit/svdraw.cxx  |   39 ++
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |  275 +---
 svx/source/svdraw/svdmodel.cxx  |   18 -
 sw/source/uibase/app/docshini.cxx   |2 
 13 files changed, 296 insertions(+), 51 deletions(-)

New commits:
commit 3a5cc107efb843b01193230c56dc8d9c0072348a
Author: Attila Szűcs 
AuthorDate: Wed Nov 15 07:04:32 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Nov 22 11:10:08 2023 +0100

tdf#148000 impress: improve fontwork text placement.

Improved the calculation of positions of text characters for multi-line 
texts.

The previous version only fitted the text to the basic outline (curve), and 
then scale them to the appropriate text line.
This means that the text will be wider or shorter, depending on the shape 
of the curve, and which line it is on

Now it calculates a curve for each paragraph and fits text on it.
Text will be approximately the same width on each line.
Except if the text is wider as the curve. Because then it shrinks the text 
to fit on the curve. (this can only happens on inner curves)

Reused the same compat flag that was used in bug148000, now it serves
as a Powerpoint compatible mode for FontWork, so no need to create new
compat flag every time FontWork has improve.

That means that the Fontwork in old documents has remains the same

Refactored horizontal/vertical alignment, but had to keep the old hacks
as well.

Note: if there are too many lines of text, and the vertical alignment 
causes internal curves, then curves can shrink to 0 length (center point of a 
circle) or even to negative length,
These cases are impossible to display normally, so it will be glitchy
similar to how it was before this patch.
MS PowerPoint avoid these cases by not allowing vertical alignments that
would result internal (smaller) curves.

Added unittest to check legacy-odb / new-odp / pptx file.

It change the display of fontwork, so in some cases it may feel like
a regression.

Change-Id: Iac2d9bc751bbc2b6f747c33958f969cb3543fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159776
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/compatflags.hxx b/include/svx/compatflags.hxx
index f7d021f17bf7..9a64bd2bab80 100644
--- a/include/svx/compatflags.hxx
+++ b/include/svx/compatflags.hxx
@@ -11,7 +11,7 @@
 enum class SdrCompatibilityFlag
 {
 AnchoredTextOverflowLegacy, ///< for tdf#99729
-LegacySingleLineFontwork, ///< for tdf#148000
+LegacyFontwork, ///< for tdf#148000 false == Fontwork works in PowerPoint 
compat mode
 ConnectorUseSnapRect, ///< for tdf#149756
 IgnoreBreakAfterMultilineField, ///< for tdf#148966
 };
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 77653d23bda7..24705f6c9e3c 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -114,6 +114,7 @@ public:
 
 voidSetSize( sal_uInt16 nNewSize );
 sal_uInt16  GetSize() const;
+sal_uInt16  size() const { return GetSize(); } //for vector 
compability
 
 voidClear();
 
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 54ea52cce19c..d3a971cd58db 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -178,9 +178,9 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testTdf125582_TextOnCircle)
 {
 SdrObjCustomShape& rSdrCustomShape(
 
static_cast(*SdrObject::getSdrObjectFromXShape(xShape)));
-// Without the fix in place width was 3639, but should be 4824 for 
96dpi.
+// Without the fix in place width was 3639, but should be 4784 for 
96dpi.
 tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect());
-CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(4824), aBoundRect.GetWidth(), 
5);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(4784), aBoundRect.GetWidth(), 
5);
 }
 
 drawing::TextVerticalAdjust eAdjust;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index c951814ce77f..77cf975166de 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -612,7 +612,7 @@ bool ScDocShell::Load( SfxMedium& rMedium )
  

[Libreoffice-commits] core.git: include/svx svx/source

2023-11-21 Thread Balazs Varga (via logerrit)
 include/svx/optgrid.hxx   |2 +
 svx/source/dialog/optgrid.cxx |   48 +-
 2 files changed, 36 insertions(+), 14 deletions(-)

New commits:
commit b4350fd9c3f1873ead892c6baeb7f7c0fc1c7d80
Author: Balazs Varga 
AuthorDate: Tue Nov 21 15:32:11 2023 +0100
Commit: Balazs Varga 
CommitDate: Tue Nov 21 21:03:41 2023 +0100

tdf#158143 - UI: Part 35 - Unify lockdown behavior of Options dialog

for Writer/Web - Grid Page.

Change-Id: I8b3cc4f75e613691840edc6456fb8ea2c4314282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159784
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index f27a4bf78d29..c033d001871c 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SVX_OPTGRID_HXX
 
 #include 
+#include 
 #include 
 
 namespace weld { class CheckButton; }
@@ -104,6 +105,7 @@ public:
 
 private:
 boolbAttrModified;
+boolm_bHTMLMode;
 
 std::unique_ptr m_xCbxUseGridsnap;
 std::unique_ptr m_xCbxUseGridsnapImg;
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index cd73ae223961..a5607755fd3f 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -91,6 +92,7 @@ bool  SvxGridItem::GetPresentation
 SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rCoreSet)
 : SfxTabPage(pPage, pController, "svx/ui/optgridpage.ui", "OptGridPage", 
)
 , bAttrModified(false)
+, m_bHTMLMode(false)
 , m_xCbxUseGridsnap(m_xBuilder->weld_check_button("usegridsnap"))
 , m_xCbxUseGridsnapImg(m_xBuilder->weld_widget("lockusegridsnap"))
 , m_xCbxGridVisible(m_xBuilder->weld_check_button("gridvisible"))
@@ -132,6 +134,10 @@ SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, 
weld::DialogController* p
 SetFieldUnit( *m_xMtrFldDrawY, eFUnit, true );
 lcl_SetMinMax(*m_xMtrFldDrawY, nMin, nMax);
 
+if (const SfxUInt16Item* pItem = rCoreSet.GetItemIfSet(SID_HTML_MODE, 
false))
+{
+m_bHTMLMode = 0 != (pItem->GetValue() & HTMLMODE_ON);
+}
 
 m_xCbxRotate->connect_toggled(LINK(this, SvxGridTabPage, 
ClickRotateHdl_Impl));
 Link aLink = LINK(this, SvxGridTabPage, 
ChangeGridsnapHdl_Impl);
@@ -213,36 +219,50 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet )
 
 if( (pGridAttr = rSet->GetItemIfSet( SID_ATTR_GRID_OPTIONS , false )) )
 {
+bool bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::SnapToGrid::isReadOnly();
 m_xCbxUseGridsnap->set_active(pGridAttr->bUseGridsnap);
-
m_xCbxUseGridsnap->set_sensitive(!officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly());
-
m_xCbxUseGridsnapImg->set_visible(officecfg::Office::Writer::Grid::Option::SnapToGrid::isReadOnly());
+m_xCbxUseGridsnap->set_sensitive(!bReadOnly);
+m_xCbxUseGridsnapImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::Synchronize::isReadOnly();
 m_xCbxSynchronize->set_active(pGridAttr->bSynchronize);
-
m_xCbxSynchronize->set_sensitive(!officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly());
-
m_xCbxSynchronizeImg->set_visible(officecfg::Office::Writer::Grid::Option::Synchronize::isReadOnly());
+m_xCbxSynchronize->set_sensitive(!bReadOnly);
+m_xCbxSynchronizeImg->set_visible(bReadOnly);
 
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly() :
+
officecfg::Office::WriterWeb::Grid::Option::VisibleGrid::isReadOnly();
 m_xCbxGridVisible->set_active(pGridAttr->bGridVisible);
-
m_xCbxGridVisible->set_sensitive(!officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly());
-
m_xCbxGridVisibleImg->set_visible(officecfg::Office::Writer::Grid::Option::VisibleGrid::isReadOnly());
+m_xCbxGridVisible->set_sensitive(!bReadOnly);
+m_xCbxGridVisibleImg->set_visible(bReadOnly);
 
 MapUnit eUnit = rSet->GetPool()->GetMetric( SID_ATTR_GRID_OPTIONS );
 SetMetricValue( *m_xMtrFldDrawX , pGridAttr->nFldDrawX, eUnit );
 SetMetricValue( *m_xMtrFldDrawY , pGridAttr->nFldDrawY, eUnit );
 
-
m_xMtrFldDrawX->set_sensitive(!officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly());
-
m_xMtrFldDrawXImg->set_visible(officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly());
+bReadOnly = !m_bHTMLMode ? 
officecfg::Office::Writer::Grid::Resolution::XAxis::isReadOnly() :
+

[Libreoffice-commits] core.git: include/svx

2023-11-20 Thread Miklos Vajna (via logerrit)
 include/svx/svdpage.hxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit d00087882dd3a68173e315069c3f0f7f7078cce5
Author: Miklos Vajna 
AuthorDate: Mon Nov 20 08:28:38 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 20 10:25:33 2023 +0100

svx: prefix members of SdrPageGridFrame

See tdf#94879 for motivation.

Change-Id: I0542a137fa8598e97f84defbc284993c665c1fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159729
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 2a03e10cb2b1..7dd18e743184 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -292,12 +292,12 @@ private:
 /// for the snap-to-grid in Writer
 class SdrPageGridFrame
 {
-tools::Rectangle aPaper;
-tools::Rectangle aUserArea;
+tools::Rectangle m_aPaper;
+tools::Rectangle m_aUserArea;
 public:
-SdrPageGridFrame(const tools::Rectangle& rPaper, const tools::Rectangle& 
rUser): aPaper(rPaper), aUserArea(rUser) {}
-const tools::Rectangle& GetPaperRect() const  { return 
aPaper; }
-const tools::Rectangle& GetUserArea() const   { return 
aUserArea; }
+SdrPageGridFrame(const tools::Rectangle& rPaper, const tools::Rectangle& 
rUser): m_aPaper(rPaper), m_aUserArea(rUser) {}
+const tools::Rectangle& GetPaperRect() const  { return 
m_aPaper; }
+const tools::Rectangle& GetUserArea() const   { return 
m_aUserArea; }
 };
 
 class SVXCORE_DLLPUBLIC SdrPageGridFrameList final


[Libreoffice-commits] core.git: include/svx svx/source

2023-11-13 Thread Miklos Vajna (via logerrit)
 include/svx/svdpage.hxx   |2 +-
 svx/source/svdraw/svdpage.cxx |   10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 9f09ce383eef0750240a61d90341d56bffbce824
Author: Miklos Vajna 
AuthorDate: Mon Nov 13 08:11:07 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 13 09:05:27 2023 +0100

svx: prefix members of SdrPage

See tdf#94879 for motivation.

Change-Id: I9b3b1116bca80a5c587931e4c8da9ac31e1faa5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159353
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index b197e4d2eb77..2a03e10cb2b1 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -444,7 +444,7 @@ protected:
 // new MasterPageDescriptorVector
 std::unique_ptr mpMasterPageDescriptor;
 
-sal_uInt16  nPageNum;
+sal_uInt16  m_nPageNum;
 
 boolmbMaster : 1;   // flag if this is a 
MasterPage
 boolmbInserted : 1;
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index bbe169e08b66..9b5965a5843a 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1304,7 +1304,7 @@ SdrPage::SdrPage(SdrModel& rModel, bool bMasterPage)
 mnBorderRight(0),
 mnBorderLower(0),
 mpLayerAdmin(new SdrLayerAdmin(())),
-nPageNum(0),
+m_nPageNum(0),
 mbMaster(bMasterPage),
 mbInserted(false),
 mbObjectsNotPersistent(false),
@@ -1366,7 +1366,7 @@ void SdrPage::lateInit(const SdrPage& rSrcPage)
 mnBorderRight = rSrcPage.mnBorderRight;
 mnBorderLower = rSrcPage.mnBorderLower;
 mbBackgroundFullSize = rSrcPage.mbBackgroundFullSize;
-nPageNum = rSrcPage.nPageNum;
+m_nPageNum = rSrcPage.m_nPageNum;
 
 if(rSrcPage.TRG_HasMasterPage())
 {
@@ -1570,10 +1570,10 @@ bool SdrPage::IsBackgroundFullSize() const
 // #i68775# React on PageNum changes (from Model in most cases)
 void SdrPage::SetPageNum(sal_uInt16 nNew)
 {
-if(nNew != nPageNum)
+if(nNew != m_nPageNum)
 {
 // change
-nPageNum = nNew;
+m_nPageNum = nNew;
 
 // notify visualisations, also notifies e.g. buffered MasterPages
 ActionChanged();
@@ -1592,7 +1592,7 @@ sal_uInt16 SdrPage::GetPageNum() const
 if (getSdrModelFromSdrPage().IsPagNumsDirty())
 getSdrModelFromSdrPage().RecalcPageNums(false);
 }
-return nPageNum;
+return m_nPageNum;
 }
 
 void SdrPage::SetChanged()


[Libreoffice-commits] core.git: include/svx svx/source

2023-11-06 Thread Miklos Vajna (via logerrit)
 include/svx/svdoashp.hxx   |4 +-
 svx/source/svdraw/svdoashp.cxx |   72 -
 2 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit da99d57e03765e275a9640c82fe502ff244d547f
Author: Miklos Vajna 
AuthorDate: Mon Nov 6 08:04:25 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 6 10:56:49 2023 +0100

svx: prefix members of SdrObjCustomShape

See tdf#94879 for motivation.

Change-Id: I589bba671fc7ad4282d18c35666ace80fff9ed77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158969
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index ef84beeb50e2..e36cb28d4948 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -75,7 +75,7 @@ class SVXCORE_DLLPUBLIC SdrObjCustomShape : public SdrTextObj
 {
 private:
 // fObjectRotation is containing the object rotation in degrees.
-double fObjectRotation;
+double m_fObjectRotation;
 bool mbAdjustingTextFrameWidthAndHeight;
 
 protected:
@@ -138,7 +138,7 @@ public:
 void SetMirroredX( const bool bMirroredX );
 void SetMirroredY( const bool bMirroredY );
 
-double GetObjectRotation() const { return fObjectRotation;}
+double GetObjectRotation() const { return m_fObjectRotation;}
 double GetExtraTextRotation( const bool bPreRotation = false ) const;
 
 SdrObjCustomShape(SdrModel& rSdrModel);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index b455e3063d65..21998ff4e339 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -810,7 +810,7 @@ std::unique_ptr 
SdrObjCustomShape::CreateObject
 
 SdrObjCustomShape::SdrObjCustomShape(SdrModel& rSdrModel)
 :   SdrTextObj(rSdrModel)
-, fObjectRotation(0.0)
+, m_fObjectRotation(0.0)
 , mbAdjustingTextFrameWidthAndHeight(false)
 {
 m_bClosedObj = true; // custom shapes may be filled
@@ -819,13 +819,13 @@ SdrObjCustomShape::SdrObjCustomShape(SdrModel& rSdrModel)
 
 SdrObjCustomShape::SdrObjCustomShape(SdrModel& rSdrModel, SdrObjCustomShape 
const & rSource)
 :   SdrTextObj(rSdrModel, rSource)
-, fObjectRotation(0.0)
+, m_fObjectRotation(0.0)
 , mbAdjustingTextFrameWidthAndHeight(false)
 {
 m_bClosedObj = true; // custom shapes may be filled
 mbTextFrame = true;
 
-fObjectRotation = rSource.fObjectRotation;
+m_fObjectRotation = rSource.m_fObjectRotation;
 mbAdjustingTextFrameWidthAndHeight = 
rSource.mbAdjustingTextFrameWidthAndHeight;
 assert(!mbAdjustingTextFrameWidthAndHeight);
 InvalidateRenderGeometry();
@@ -1329,7 +1329,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
 
 void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
-rInfo.bResizeFreeAllowed=fObjectRotation == 0.0;
+rInfo.bResizeFreeAllowed=m_fObjectRotation == 0.0;
 rInfo.bResizePropAllowed=true;
 rInfo.bRotateFreeAllowed=true;
 rInfo.bRotate90Allowed  =true;
@@ -1572,21 +1572,21 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, 
const Fraction& rxFact, co
 if (IsMirroredX())
 {
 if (IsMirroredY())
-fObjectRotation = fAngle - 180.0;
+m_fObjectRotation = fAngle - 180.0;
 else
-fObjectRotation = -fAngle;
+m_fObjectRotation = -fAngle;
 }
 else
 {
 if (IsMirroredY())
-fObjectRotation = 180.0 - fAngle;
+m_fObjectRotation = 180.0 - fAngle;
 else
-fObjectRotation = fAngle;
+m_fObjectRotation = fAngle;
 }
-while (fObjectRotation < 0)
-fObjectRotation += 360.0;
-while (fObjectRotation >= 360.0)
-fObjectRotation -= 360.0;
+while (m_fObjectRotation < 0)
+m_fObjectRotation += 360.0;
+while (m_fObjectRotation >= 360.0)
+m_fObjectRotation -= 360.0;
 
 InvalidateRenderGeometry();
 }
@@ -1596,9 +1596,9 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, 
Degree100 nAngle, double s
 bool bMirroredX = IsMirroredX();
 bool bMirroredY = IsMirroredY();
 
-fObjectRotation = fmod( fObjectRotation, 360.0 );
-if ( fObjectRotation < 0 )
-fObjectRotation = 360 + fObjectRotation;
+m_fObjectRotation = fmod( m_fObjectRotation, 360.0 );
+if ( m_fObjectRotation < 0 )
+m_fObjectRotation = 360 + m_fObjectRotation;
 
 // the rotation angle for ashapes is stored in fObjectRotation, this 
rotation
 // has to be applied to the text object (which is internally using 
maGeo.nAngle).
@@ -1608,7 +1608,7 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, 
Degree100 nAngle, double s
 maGeo.m_nRotationAngle = 0_deg100; 
// resetting aGeo data
 maGeo.RecalcSinCos();
 
-Degree100 nW(static_cast( fObjectRotation * 100 )); 
 // applying our object rotation
+

[Libreoffice-commits] core.git: include/svx svx/source

2023-10-31 Thread Noel Grandin (via logerrit)
 include/svx/sdr/properties/defaultproperties.hxx|4 +--
 svx/source/sdr/properties/attributeproperties.cxx   |   20 +++
 svx/source/sdr/properties/captionproperties.cxx |6 ++--
 svx/source/sdr/properties/circleproperties.cxx  |6 ++--
 svx/source/sdr/properties/customshapeproperties.cxx |4 +--
 svx/source/sdr/properties/defaultproperties.cxx |   26 ++--
 svx/source/sdr/properties/e3dcompoundproperties.cxx |6 ++--
 svx/source/sdr/properties/e3dsceneproperties.cxx|   20 +++
 svx/source/sdr/properties/graphicproperties.cxx |   20 +++
 svx/source/sdr/properties/measureproperties.cxx |   12 -
 svx/source/sdr/properties/textproperties.cxx|   18 ++---
 svx/source/table/cell.cxx   |2 -
 12 files changed, 72 insertions(+), 72 deletions(-)

New commits:
commit 525a4732c74baf0c8638353d32bf4220bbb77623
Author: Noel Grandin 
AuthorDate: Tue Oct 31 12:36:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 31 18:10:13 2023 +0100

rename mxItemSet->moItemSet in DefaultProperties

because it reduces the noise in an upcoming patch

Change-Id: I67d7b719609271f626e38596416eb511fbd40b07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158714
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/sdr/properties/defaultproperties.hxx 
b/include/svx/sdr/properties/defaultproperties.hxx
index bec1fbe27320..410fa593ac92 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -38,7 +38,7 @@ namespace sdr::properties
 {
 protected:
 // the to be used ItemSet
-mutable std::optional mxItemSet;
+mutable std::optional moItemSet;
 
 // create a new object specific itemset with object specific 
ranges.
 virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) 
override;
@@ -60,7 +60,7 @@ namespace sdr::properties
 virtual void ItemSetChanged(std::span< const SfxPoolItem* const > 
aChangedItems, sal_uInt16 nDeletedWhich);
 
 // check if SfxItemSet exists
-bool HasSfxItemSet() const { return bool(mxItemSet); }
+bool HasSfxItemSet() const { return bool(moItemSet); }
 
 public:
 // basic constructor
diff --git a/svx/source/sdr/properties/attributeproperties.cxx 
b/svx/source/sdr/properties/attributeproperties.cxx
index 37bdc9cfa05a..3fc050f825f9 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -55,7 +55,7 @@ namespace sdr::properties
 {
 if(SfxItemState::SET == aIter.GetItemState())
 {
-mxItemSet->ClearItem(nWhich);
+moItemSet->ClearItem(nWhich);
 }
 
 nWhich = aIter.NextWhich();
@@ -63,7 +63,7 @@ namespace sdr::properties
 }
 
 // set new stylesheet as parent
-mxItemSet->SetParent(>GetItemSet());
+moItemSet->SetParent(>GetItemSet());
 }
 else
 {
@@ -110,7 +110,7 @@ namespace sdr::properties
 // reset parent of ItemSet
 if(HasSfxItemSet())
 {
-mxItemSet->SetParent(nullptr);
+moItemSet->SetParent(nullptr);
 }
 
 SdrObject& rObj = GetSdrObject();
@@ -272,7 +272,7 @@ namespace sdr::properties
 }
 }
 
-return *mxItemSet;
+return *moItemSet;
 }
 
 void AttributeProperties::ItemSetChanged(std::span< const SfxPoolItem* 
const > /*aChangedItems*/, sal_uInt16 /*nDeletedWhich*/)
@@ -339,11 +339,11 @@ namespace sdr::properties
 if(pResultItem)
 {
 // force ItemSet
-mxItemSet->Put(std::move(pResultItem));
+moItemSet->Put(std::move(pResultItem));
 }
 else
 {
-mxItemSet->Put(*pNewItem);
+moItemSet->Put(*pNewItem);
 }
 }
 else
@@ -351,7 +351,7 @@ namespace sdr::properties
 // clear item if ItemSet exists
 if(HasSfxItemSet())
 {
-mxItemSet->ClearItem(nWhich);
+moItemSet->ClearItem(nWhich);
 }
 }
 }
@@ -384,7 +384,7 @@ namespace sdr::properties
 GetObjectItemSet();
 
 // prepare copied, new itemset, but WITHOUT parent
-SfxItemSet aDestItemSet(*mxItemSet);
+SfxItemSet aDestItemSet(*moItemSet);
 

[Libreoffice-commits] core.git: include/svx svx/source

2023-10-31 Thread Noel Grandin (via logerrit)
 include/svx/svdoattr.hxx   |4 +---
 include/svx/svdobj.hxx |2 +-
 include/svx/svdovirt.hxx   |3 +++
 svx/source/svdraw/svdoattr.cxx |5 -
 svx/source/svdraw/svdobj.cxx   |   10 +-
 svx/source/svdraw/svdovirt.cxx |6 ++
 6 files changed, 16 insertions(+), 14 deletions(-)

New commits:
commit 5d0748b0c44649c422980a2b2f5554846c47ac9c
Author: Noel Grandin 
AuthorDate: Tue Oct 31 12:09:56 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 31 18:09:53 2023 +0100

SdrAttrObj and SdrObject are abstract

so push the CreateObjectSpecificProperties implementation down to the
concrete subclasses.

Change-Id: If2c9545aada3e9f2c2f2a0140b6d880bdfef111d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158711
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/svdoattr.hxx b/include/svx/svdoattr.hxx
index 3933caa3f3f5..26990a193b46 100644
--- a/include/svx/svdoattr.hxx
+++ b/include/svx/svdoattr.hxx
@@ -29,15 +29,13 @@ class SdrOutliner;
 class SfxItemSet;
 class SfxItemPool;
 
-//   SdrAttrObj
+//   SdrAttrObj. This is an abstract class, we only instantiate its subclasses.
 class SVXCORE_DLLPUBLIC SdrAttrObj : public SdrObject
 {
 private:
 friend classSdrOutliner;
 
 protected:
-virtual std::unique_ptr 
CreateObjectSpecificProperties() override;
-
 tools::Rectangle   maSnapRect;
 
 protected:
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 631a5973bb7b..892beb56668c 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -917,7 +917,7 @@ protected:
 
 virtual ~SdrObject() override;
 
-virtual std::unique_ptr 
CreateObjectSpecificProperties();
+virtual std::unique_ptr 
CreateObjectSpecificProperties() = 0;
 
 virtual std::unique_ptr 
CreateObjectSpecificViewContact();
 
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index 8ccddce4d263..17c869313067 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -34,6 +34,9 @@ public:
 virtual sdr::properties::BaseProperties& GetProperties() const override;
 
 protected:
+virtual std::unique_ptr
+CreateObjectSpecificProperties() override;
+
 virtual std::unique_ptr 
CreateObjectSpecificViewContact() override;
 
 rtl::Reference mxRefObj; // Referenced drawing object
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 2c1b208d314d..ae4f59baa5cf 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -29,11 +29,6 @@
 
 using namespace com::sun::star;
 
-std::unique_ptr 
SdrAttrObj::CreateObjectSpecificProperties()
-{
-return std::make_unique(*this);
-}
-
 SdrAttrObj::SdrAttrObj(SdrModel& rSdrModel)
 : SdrObject(rSdrModel)
 {
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c5741f5007c1..f4d13219db0d 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -211,11 +211,6 @@ const std::shared_ptr< svx::diagram::IDiagramHelper >& 
SdrObject::getDiagramHelp
 
 // BaseProperties section
 
-std::unique_ptr 
SdrObject::CreateObjectSpecificProperties()
-{
-return std::make_unique(*this);
-}
-
 sdr::properties::BaseProperties& SdrObject::GetProperties() const
 {
 if(!mpProperties)
@@ -3245,6 +3240,11 @@ public:
 return new EmptyObject(rTargetModel, *this);
 }
 
+virtual std::unique_ptr 
CreateObjectSpecificProperties() override
+{
+return std::make_unique(*this);
+}
+
 SdrInventor GetObjInventor() const override
 {
 return OBJECT_INVENTOR;
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 25a38804a78b..b1fe6f5cb9bb 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -18,6 +18,7 @@
  */
 
 
+#include 
 #include 
 #include 
 #include 
@@ -31,6 +32,11 @@ sdr::properties::BaseProperties& SdrVirtObj::GetProperties() 
const
 }
 
 
+std::unique_ptr 
SdrVirtObj::CreateObjectSpecificProperties()
+{
+return std::make_unique(*this);
+}
+
 // #i27224#
 std::unique_ptr 
SdrVirtObj::CreateObjectSpecificViewContact()
 {


[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig

2023-10-28 Thread Heiko Tietze (via logerrit)
 include/svx/labelitemwindow.hxx  |   11 
 include/svx/srchdlg.hxx  |2 
 svx/source/dialog/srchdlg.cxx|   40 +++--
 svx/source/form/labelitemwindow.cxx  |   24 +-
 svx/uiconfig/ui/findreplacedialog.ui |   80 +--
 svx/uiconfig/ui/labelbox.ui  |   29 ++--
 6 files changed, 135 insertions(+), 51 deletions(-)

New commits:
commit 97d3d4f371f82704dba907975e6cfdaac456fe4d
Author: Heiko Tietze 
AuthorDate: Fri Sep 15 14:23:50 2023 +0200
Commit: Heiko Tietze 
CommitDate: Sat Oct 28 11:23:12 2023 +0200

Resolves tdf#156227 - More appealing feedback for find/quickfind

ErrorMessageType removed in favor of an infobar-like label
Accessibility notification added for the quickfind bar

Change-Id: Iec2498d04152392b3e181146005bdb0c9db8ec50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156943
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/include/svx/labelitemwindow.hxx b/include/svx/labelitemwindow.hxx
index 5271482b11ad..d9aeccbb7bfd 100644
--- a/include/svx/labelitemwindow.hxx
+++ b/include/svx/labelitemwindow.hxx
@@ -12,14 +12,23 @@
 #include 
 #include 
 
+enum class LabelItemWindowType
+{
+Text,
+Info,
+};
+
 class SVXCORE_DLLPUBLIC LabelItemWindow final : public InterimItemWindow
 {
 private:
+std::unique_ptr m_xBox;
 std::unique_ptr m_xLabel;
+std::unique_ptr m_xImage;
 
 public:
 LabelItemWindow(vcl::Window* pParent, const OUString& rLabel);
-void set_label(const OUString& rLabel);
+void set_label(const OUString& rLabel,
+   const LabelItemWindowType eType = 
LabelItemWindowType::Text);
 OUString get_label() const;
 
 void SetOptimalSize();
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index f069af48c539..7223a51cd324 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -177,6 +177,8 @@ private:
 std::unique_ptr m_xSearchTmplLB;
 std::unique_ptr m_xSearchAttrText;
 std::unique_ptr m_xSearchLabel;
+std::unique_ptr m_xSearchIcon;
+std::unique_ptr m_xSearchBox;
 
 std::unique_ptr m_xReplaceFrame;
 std::unique_ptr m_xReplaceLB;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index a17711bc46fb..b5cf7bcf34fd 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -285,6 +285,8 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 , m_xSearchTmplLB(m_xBuilder->weld_combo_box("searchlist"))
 , m_xSearchAttrText(m_xBuilder->weld_label("searchdesc"))
 , m_xSearchLabel(m_xBuilder->weld_label("searchlabel"))
+, m_xSearchIcon(m_xBuilder->weld_image("searchicon"))
+, m_xSearchBox(m_xBuilder->weld_box("searchbox"))
 , m_xReplaceFrame(m_xBuilder->weld_frame("replaceframe"))
 , m_xReplaceLB(m_xBuilder->weld_combo_box("replaceterm"))
 , m_xReplaceTmplLB(m_xBuilder->weld_combo_box("replacelist"))
@@ -340,6 +342,9 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 m_xSearchTmplLB->make_sorted();
 m_xSearchAttrText->hide();
 
+m_xSearchLabel->set_font_color(Color(0x00, 0x47, 0x85));
+this->SetSearchLabel(""); // hide the message but keep the box height
+
 m_xReplaceTmplLB->make_sorted();
 m_xReplaceAttrText->hide();
 
@@ -581,14 +586,18 @@ void SvxSearchDialog::SetSearchLabel(const OUString& rStr)
 m_xSearchLabel->set_label(rStr);
 if (!rStr.isEmpty())
 {
-// hide/show to fire SHOWING state change event so search label text
-// is announced by screen reader
-m_xSearchLabel->hide();
 m_xSearchLabel->show();
+m_xSearchIcon->show();
+m_xSearchBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as 
InfobarType::INFO
+}
+else
+{
+const Size aSize = m_xSearchBox->get_preferred_size();
+m_xSearchLabel->hide();
+m_xSearchIcon->hide();
+m_xSearchBox->set_size_request(-1, aSize.Height());
+m_xSearchBox->set_background(COL_TRANSPARENT);
 }
-
-if (rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND))
-m_xSearchLB->set_entry_message_type(weld::EntryMessageType::Error);
 }
 
 void SvxSearchDialog::ApplyTransliterationFlags_Impl( TransliterationFlags 
nSettings )
@@ -2360,8 +2369,6 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
 
 static void lcl_SetSearchLabelWindow(const OUString& rStr, SfxViewFrame& 
rViewFrame)
 {
-bool bNotFound = rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
-
 css::uno::Reference< css::beans::XPropertySet > xPropSet(
 rViewFrame.GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
@@ -2380,21 +2387,8 @@ static void lcl_SetSearchLabelWindow(const OUString& 
rStr, SfxViewFrame& rViewFr
 {
 

[Libreoffice-commits] core.git: include/svx svx/source

2023-10-24 Thread Miklos Vajna (via logerrit)
 include/svx/svdsob.hxx |   16 
 svx/source/svdraw/svdlayer.cxx |8 
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit ed7d1c49c0a898772e7f81416b3414da8cc35f2e
Author: Miklos Vajna 
AuthorDate: Tue Oct 24 08:20:06 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Oct 24 09:43:10 2023 +0200

svx: prefix members of SdrLayerIDSet

See tdf#94879 for motivation.

Change-Id: Ibac67e7f8535b231f63a01b7e572595f5b91a996
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158368
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx
index 7e2b8578e01d..9d19a673641f 100644
--- a/include/svx/svdsob.hxx
+++ b/include/svx/svdsob.hxx
@@ -31,31 +31,31 @@
 class SVXCORE_DLLPUBLIC SdrLayerIDSet final
 {
 // For now, have up to 256 layers
-sal_uInt8 aData[32];
+sal_uInt8 m_aData[32];
 
 public:
 explicit SdrLayerIDSet(bool bInitVal = false)
 {
-memset(aData, bInitVal ? 0xFF : 0x00, sizeof(aData));
+memset(m_aData, bInitVal ? 0xFF : 0x00, sizeof(m_aData));
 }
 
 bool operator!=(const SdrLayerIDSet& rCmpSet) const
 {
-return (memcmp(aData, rCmpSet.aData, sizeof(aData))!=0);
+return (memcmp(m_aData, rCmpSet.m_aData, sizeof(m_aData))!=0);
 }
 
 void Set(SdrLayerID a)
 {
 const sal_Int16 nId = a.get();
 if (nId >= 0 && nId < 256)
-aData[nId / 8] |= 1 << (nId % 8);
+m_aData[nId / 8] |= 1 << (nId % 8);
 }
 
 void Clear(SdrLayerID a)
 {
 const sal_Int16 nId = a.get();
 if (nId >= 0 && nId < 256)
-aData[nId / 8] &= ~(1 << (nId % 8));
+m_aData[nId / 8] &= ~(1 << (nId % 8));
 }
 
 void Set(SdrLayerID a, bool b)
@@ -69,17 +69,17 @@ public:
 bool IsSet(SdrLayerID a) const
 {
 const sal_Int16 nId = a.get();
-return nId >= 0 && nId < 256 && (aData[nId / 8] & 1 << nId % 8) != 0;
+return nId >= 0 && nId < 256 && (m_aData[nId / 8] & 1 << nId % 8) != 0;
 }
 
 void SetAll()
 {
-memset(aData, 0xFF, sizeof(aData));
+memset(m_aData, 0xFF, sizeof(m_aData));
 }
 
 void ClearAll()
 {
-memset(aData, 0x00, sizeof(aData));
+memset(m_aData, 0x00, sizeof(m_aData));
 }
 
 bool IsEmpty() const;
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
index cb482b9fc2a9..74d5222f92b1 100644
--- a/svx/source/svdraw/svdlayer.cxx
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -27,7 +27,7 @@
 
 bool SdrLayerIDSet::IsEmpty() const
 {
-for(sal_uInt8 i : aData)
+for(sal_uInt8 i : m_aData)
 {
 if(i != 0)
 return false;
@@ -40,7 +40,7 @@ void SdrLayerIDSet::operator&=(const SdrLayerIDSet& r2ndSet)
 {
 for(sal_uInt16 i(0); i < 32; i++)
 {
-aData[i] &= r2ndSet.aData[i];
+m_aData[i] &= r2ndSet.m_aData[i];
 }
 }
 
@@ -59,12 +59,12 @@ void SdrLayerIDSet::PutValue( const css::uno::Any & rAny )
 sal_Int16 nIndex;
 for( nIndex = 0; nIndex < nCount; nIndex++ )
 {
-aData[nIndex] = static_cast(aSeq[nIndex]);
+m_aData[nIndex] = static_cast(aSeq[nIndex]);
 }
 
 for( ; nIndex < 32; nIndex++ )
 {
-aData[nIndex] = 0;
+m_aData[nIndex] = 0;
 }
 }
 


[Libreoffice-commits] core.git: include/svx svx/source

2023-10-18 Thread Noel Grandin (via logerrit)
 include/svx/svdpage.hxx   |7 ++-
 svx/source/svdraw/svdogrp.cxx |8 
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 0280a9ef0d93bb2c8ec713b6dc36b77962b57e99
Author: Noel Grandin 
AuthorDate: Wed Oct 18 09:45:56 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 12:11:14 2023 +0200

tdf#155410 shave 1% cost off SdrGroup::GetLayer

by avoiding repeated indexed lookup into the std::deque inside
SdrObjList

Change-Id: Ifcf736d0ecef1239b8a236fe1937f347a3d49e4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158104
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 97142d661296..7ab37532c046 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -225,10 +225,15 @@ public:
 
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 
+typedef std::deque> SdrObjectDeque;
+
+SdrObjectDeque::const_iterator begin() const { return maList.begin(); }
+SdrObjectDeque::const_iterator end() const { return maList.end(); }
+
 private:
 tools::RectanglemaSdrObjListOutRect;
 tools::RectanglemaSdrObjListSnapRect;
-std::deque> maList;
+SdrObjectDeque maList;
 /// This list, if it exists, defines the navigation order. If it does
 /// not exist then maList defines the navigation order.
 std::optional>> 
mxNavigationOrder;
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 6c63e258a963..8a518554827a 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -174,11 +174,11 @@ SdrObjKind SdrObjGroup::GetObjIdentifier() const
 
 SdrLayerID SdrObjGroup::GetLayer() const
 {
-bool b1st = true;
 SdrLayerID nLay = SdrObject::GetLayer();
-const size_t nObjCount(GetObjCount());
-for (size_t i=0; iGetLayer());
+bool b1st = true;
+for (const rtl::Reference& pObject : *this)
+{
+SdrLayerID nLay1(pObject->GetLayer());
 if (b1st) { nLay=nLay1; b1st = false; }
 else if (nLay1!=nLay) return SdrLayerID(0);
 }


[Libreoffice-commits] core.git: include/svx svx/source

2023-10-17 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx   |   20 ++--
 svx/source/svdraw/svdhdl.cxx |   26 +-
 2 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit a55e2ad714ff941a2aa2c725ffbc1057fbd9baf5
Author: Miklos Vajna 
AuthorDate: Mon Oct 16 20:06:02 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Oct 17 08:12:01 2023 +0200

svx: prefix members of SdrHdlList

See tdf#94879 for motivation.

Change-Id: I9e529ef12c05e333e2eeb535d2ae72e5d4c84a72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158062
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 0bcff5f2e318..4cece6895236 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -428,13 +428,13 @@ public:
 class SVXCORE_DLLPUBLIC SdrHdlList
 {
 size_t  mnFocusIndex;
-SdrMarkView*pView;
+SdrMarkView*m_pView;
 std::deque> maList;
-sal_uInt16  nHdlSize;
+sal_uInt16  m_nHdlSize;
 
-boolbRotateShear : 1;
-boolbDistortShear : 1;
-boolbMoveOutside : 1;  // move handles 
outwards (for TextEdit)
+boolm_bRotateShear : 1;
+boolm_bDistortShear : 1;
+boolm_bMoveOutside : 1;  // move handles 
outwards (for TextEdit)
 
 SVX_DLLPRIVATE SdrHdlList(const SdrHdlList&) = delete;
 SVX_DLLPRIVATE void operator=(const SdrHdlList&) = delete;
@@ -450,7 +450,7 @@ public:
 void ResetFocusHdl();
 
 // Access to View
-SdrMarkView* GetView() const { return pView;}
+SdrMarkView* GetView() const { return m_pView;}
 
 // Sorting: 1.Level first reference point handle, then normal handles, 
next Glue, then User then Plushandles
 //  2.Level PageView (Pointer)
@@ -460,13 +460,13 @@ public:
 SdrHdl*  GetHdl(size_t nNum) const { return nNum < maList.size() ? 
maList[nNum].get() : nullptr; }
 size_t   GetHdlNum(const SdrHdl* pHdl) const;
 void SetHdlSize(sal_uInt16 nSiz);
-sal_uInt16   GetHdlSize() const{ return nHdlSize; }
+sal_uInt16   GetHdlSize() const{ return 
m_nHdlSize; }
 void SetMoveOutside(bool bOn);
-bool IsMoveOutside() const { return bMoveOutside; }
+bool IsMoveOutside() const { return m_bMoveOutside; }
 void SetRotateShear(bool bOn);
-bool IsRotateShear() const { return bRotateShear; }
+bool IsRotateShear() const { return m_bRotateShear; }
 void SetDistortShear(bool bOn);
-bool IsDistortShear() const{ return bDistortShear; }
+bool IsDistortShear() const{ return m_bDistortShear; }
 
 // AddHdl takes ownership of the handle. It should be on the Heap
 // as Clear() deletes it.
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 867534e9a08f..90903acb29f8 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2174,12 +2174,12 @@ void SdrHdlList::ResetFocusHdl()
 
 SdrHdlList::SdrHdlList(SdrMarkView* pV)
 :   mnFocusIndex(SAL_MAX_SIZE),
-pView(pV)
+m_pView(pV)
 {
-nHdlSize = 3;
-bRotateShear = false;
-bMoveOutside = false;
-bDistortShear = false;
+m_nHdlSize = 3;
+m_bRotateShear = false;
+m_bMoveOutside = false;
+m_bDistortShear = false;
 }
 
 SdrHdlList::~SdrHdlList()
@@ -2189,10 +2189,10 @@ SdrHdlList::~SdrHdlList()
 
 void SdrHdlList::SetHdlSize(sal_uInt16 nSiz)
 {
-if(nHdlSize != nSiz)
+if(m_nHdlSize != nSiz)
 {
 // remember new value
-nHdlSize = nSiz;
+m_nHdlSize = nSiz;
 
 // propagate change to IAOs
 for(size_t i=0; i SdrHdlList::RemoveHdl(size_t nNum)
@@ -2248,8 +2248,8 @@ void SdrHdlList::Clear()
 {
 maList.clear();
 
-bRotateShear=false;
-bDistortShear=false;
+m_bRotateShear=false;
+m_bDistortShear=false;
 }
 
 void SdrHdlList::Sort()


[Libreoffice-commits] core.git: include/svx

2023-10-12 Thread Bogdan B (via logerrit)
 include/svx/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d97d220c912c2e45e97489e55c8d2a2b0b3516d
Author: Bogdan B 
AuthorDate: Tue Oct 10 19:11:13 2023 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Oct 12 13:32:30 2023 +0200

tdf#145832 Typo when missing object

Change-Id: Ifc26d17aaf3d280f4eaefb94c4ef8009c11c3bfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157773
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 223ee37c2cbe..b4a04c3a2c60 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -130,7 +130,7 @@
 #define STR_ObjNameSingulMEASURE
NC_("STR_ObjNameSingulMEASURE", "Dimension line")
 #define STR_ObjNamePluralMEASURE
NC_("STR_ObjNamePluralMEASURE", "Dimensioning objects")
 #define STR_ObjNamePlural   
NC_("STR_ObjNamePlural", "Drawing objects")
-#define STR_ObjNameNoObj
NC_("STR_ObjNameNoObj", "No draw object")
+#define STR_ObjNameNoObj
NC_("STR_ObjNameNoObj", "No drawing object")
 #define STR_ObjNameSingulPlural 
NC_("STR_ObjNameSingulPlural", "Draw object(s)")
 #define STR_ObjNameSingulCube3d 
NC_("STR_ObjNameSingulCube3d", "3D cube")
 #define STR_ObjNamePluralCube3d 
NC_("STR_ObjNamePluralCube3d", "3D cubes")


[Libreoffice-commits] core.git: include/svx svx/source

2023-10-10 Thread Pedro Pinto Silva (via logerrit)
 include/svx/srchdlg.hxx   |1 +
 svx/source/dialog/srchdlg.cxx |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit 564af6b066b71aa48cca9bb843668a2fb47d999c
Author: Pedro Pinto Silva 
AuthorDate: Wed Mar 22 10:07:43 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Oct 10 17:31:25 2023 +0200

jsdialog: hide help and close buttons for searchreplace dialog

Signed-off-by: Pedro Pinto Silva 
Change-Id: I0f3bc2cd6839c74dff40431f8659d7f90b285d12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149293
(cherry picked from commit c65142fd9fd9a43e1f27cb11f5b4048600b5a4c4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157720
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 9a75199ad818..f069af48c539 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -198,6 +198,7 @@ private:
 std::unique_ptr m_xWordBtn;
 
 std::unique_ptr m_xCloseBtn;
+std::unique_ptr m_xHelpBtn;
 std::unique_ptr m_xIncludeDiacritics;
 std::unique_ptr m_xIncludeKashida;
 std::unique_ptr m_xOtherOptionsExpander;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index dcb467b5475f..a17711bc46fb 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -301,6 +301,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 , m_xSearchFormattedCB(m_xBuilder->weld_check_button("searchformatted"))
 , m_xWordBtn(m_xBuilder->weld_check_button("wholewords"))
 , m_xCloseBtn(m_xBuilder->weld_button("close"))
+, m_xHelpBtn(m_xBuilder->weld_button("help"))
 , m_xIncludeDiacritics(m_xBuilder->weld_check_button("includediacritics"))
 , m_xIncludeKashida(m_xBuilder->weld_check_button("includekashida"))
 , m_xOtherOptionsExpander(m_xBuilder->weld_expander("OptionsExpander"))
@@ -327,6 +328,12 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 , m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets"))
 , m_xCalcStrFT(m_xBuilder->weld_label("entirecells"))
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+m_xCloseBtn->hide();
+m_xHelpBtn->hide();
+}
+
 m_aPresentIdle.SetTimeout(50);
 m_aPresentIdle.SetInvokeHandler(LINK(this, SvxSearchDialog, 
PresentTimeoutHdl_Impl));
 


[Libreoffice-commits] core.git: include/svx svx/source

2023-10-09 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx   |6 +++---
 svx/source/svdraw/svdhdl.cxx |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3e3dd080fe32811b4a74088d3e819f593cbebd3e
Author: Miklos Vajna 
AuthorDate: Mon Oct 9 08:05:35 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 9 09:47:18 2023 +0200

svx: prefix members of SdrHdlLine

See tdf#94879 for motivation.

Change-Id: I08a0368a6e262982419b3866defd6a181675af0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157690
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 115bf9c77896..0bcff5f2e318 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -342,11 +342,11 @@ class SdrHdlLine final : public SdrHdl
 // create marker for this kind
 virtual void CreateB2dIAObject() override;
 
-SdrHdl* pHdl1;
-SdrHdl* pHdl2;
+SdrHdl* m_pHdl1;
+SdrHdl* m_pHdl2;
 
 public:
-SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind) { 
m_eKind=eNewKind; pHdl1= pHdl2= }
+SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind) { 
m_eKind=eNewKind; m_pHdl1= m_pHdl2= }
 virtual ~SdrHdlLine() override;
 
 virtual PointerStyle GetPointer() const override;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index cecefc0d7810..deb8da05d9d5 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1447,7 +1447,7 @@ void SdrHdlLine::CreateB2dIAObject()
 
 SdrMarkView* pView = m_pHdlList->GetView();
 
-if(!(pView && !pView->areMarkHandlesHidden() && pHdl1 && pHdl2))
+if(!(pView && !pView->areMarkHandlesHidden() && m_pHdl1 && m_pHdl2))
 return;
 
 SdrPageView* pPageView = pView->GetSdrPageView();
@@ -1464,8 +1464,8 @@ void SdrHdlLine::CreateB2dIAObject()
 const rtl::Reference< sdr::overlay::OverlayManager >& xManager = 
rPageWindow.GetOverlayManager();
 if (xManager.is())
 {
-basegfx::B2DPoint aPosition1(pHdl1->GetPos().X(), 
pHdl1->GetPos().Y());
-basegfx::B2DPoint aPosition2(pHdl2->GetPos().X(), 
pHdl2->GetPos().Y());
+basegfx::B2DPoint aPosition1(m_pHdl1->GetPos().X(), 
m_pHdl1->GetPos().Y());
+basegfx::B2DPoint aPosition2(m_pHdl2->GetPos().X(), 
m_pHdl2->GetPos().Y());
 
 std::unique_ptr 
pNewOverlayObject(new
 sdr::overlay::OverlayLineStriped(


[Libreoffice-commits] core.git: include/svx svx/source

2023-10-02 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx   |   30 +++---
 svx/source/svdraw/svdhdl.cxx |   42 +-
 2 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 819fabd11f9b78bf7ecef1d2afeae1a9d8382afa
Author: Miklos Vajna 
AuthorDate: Mon Oct 2 08:25:44 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 2 10:40:23 2023 +0200

svx: prefix members of SdrHdlGradient

See tdf#94879 for motivation.

Change-Id: I1da02ee14cb3cbc0cd51ccc4f612947b789ca46a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157478
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index abd5a060f5aa..115bf9c77896 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -292,18 +292,18 @@ class SdrHdlGradient final : public SdrHdl
 {
 private:
 // pointer to used color handles
-SdrHdlColor*pColHdl1;
-SdrHdlColor*pColHdl2;
+SdrHdlColor*m_pColHdl1;
+SdrHdlColor*m_pColHdl2;
 
 // 2nd position
-Point   a2ndPos;
+Point   m_a2ndPos;
 
 // is this a gradient or a transparence
-boolbGradient : 1;
+boolm_bGradient : 1;
 
 // select which handle to move
-boolbMoveSingleHandle : 1;
-boolbMoveFirstHandle : 1;
+boolm_bMoveSingleHandle : 1;
+boolm_bMoveFirstHandle : 1;
 
 // create marker for this kind
 virtual void CreateB2dIAObject() override;
@@ -312,14 +312,14 @@ public:
 SdrHdlGradient(const Point& rRef1, const Point& rRef2, bool bGrad);
 virtual ~SdrHdlGradient() override;
 
-bool IsGradient() const { return bGradient; }
+bool IsGradient() const { return m_bGradient; }
 
 // set the associated color handles
-void SetColorHandles(SdrHdlColor* pL1, SdrHdlColor* pL2) { pColHdl1 = pL1; 
pColHdl2 = pL2; }
-SdrHdlColor* GetColorHdl1() const { return pColHdl1; }
-SdrHdlColor* GetColorHdl2() const { return pColHdl2; }
+void SetColorHandles(SdrHdlColor* pL1, SdrHdlColor* pL2) { m_pColHdl1 = 
pL1; m_pColHdl2 = pL2; }
+SdrHdlColor* GetColorHdl1() const { return m_pColHdl1; }
+SdrHdlColor* GetColorHdl2() const { return m_pColHdl2; }
 
-const Point& Get2ndPos() const { return a2ndPos; }
+const Point& Get2ndPos() const { return m_a2ndPos; }
 void Set2ndPos(const Point& rPnt);
 
 // the link called by the color handles
@@ -329,10 +329,10 @@ public:
 void FromIAOToItem(SdrObject* pObj, bool bSetItemOnObject, bool bUndo);
 
 // selection flags for interaction
-bool IsMoveSingleHandle() const { return bMoveSingleHandle; }
-void SetMoveSingleHandle(bool bNew) { bMoveSingleHandle = bNew; }
-bool IsMoveFirstHandle() const { return bMoveFirstHandle; }
-void SetMoveFirstHandle(bool bNew) { bMoveFirstHandle = bNew; }
+bool IsMoveSingleHandle() const { return m_bMoveSingleHandle; }
+void SetMoveSingleHandle(bool bNew) { m_bMoveSingleHandle = bNew; }
+bool IsMoveFirstHandle() const { return m_bMoveFirstHandle; }
+void SetMoveFirstHandle(bool bNew) { m_bMoveFirstHandle = bNew; }
 };
 
 
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 77904d411a9f..407e82eedb4e 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1253,12 +1253,12 @@ void SdrHdlColor::SetSize(const Size& rNew)
 
 SdrHdlGradient::SdrHdlGradient(const Point& rRef1, const Point& rRef2, bool 
bGrad)
 : SdrHdl(rRef1, bGrad ? SdrHdlKind::Gradient : SdrHdlKind::Transparence)
-, pColHdl1(nullptr)
-, pColHdl2(nullptr)
-, a2ndPos(rRef2)
-, bGradient(bGrad)
-, bMoveSingleHandle(false)
-, bMoveFirstHandle(false)
+, m_pColHdl1(nullptr)
+, m_pColHdl2(nullptr)
+, m_a2ndPos(rRef2)
+, m_bGradient(bGrad)
+, m_bMoveSingleHandle(false)
+, m_bMoveFirstHandle(false)
 {
 }
 
@@ -1268,10 +1268,10 @@ SdrHdlGradient::~SdrHdlGradient()
 
 void SdrHdlGradient::Set2ndPos(const Point& rPnt)
 {
-if(a2ndPos != rPnt)
+if(m_a2ndPos != rPnt)
 {
 // remember new position
-a2ndPos = rPnt;
+m_a2ndPos = rPnt;
 
 // create new display
 Touch();
@@ -1306,7 +1306,7 @@ void SdrHdlGradient::CreateB2dIAObject()
 if (xManager.is())
 {
 // striped line in between
-basegfx::B2DVector aVec(a2ndPos.X() - m_aPos.X(), a2ndPos.Y() 
- m_aPos.Y());
+basegfx::B2DVector aVec(m_a2ndPos.X() - m_aPos.X(), 
m_a2ndPos.Y() - m_aPos.Y());
 double fVecLen = aVec.getLength();
 double fLongPercentArrow = (1.0 - 0.05) * fVecLen;
 double fHalfArrowWidth = (0.05 * 0.5) * fVecLen;
@@ -1340,7 +1340,7 @@ void 

[Libreoffice-commits] core.git: include/svx svx/source

2023-09-25 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx   |   14 +++---
 svx/source/svdraw/svdhdl.cxx |   26 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit d6a1324380cc8362d509a1f29dcd2ca4ad4bee9d
Author: Miklos Vajna 
AuthorDate: Mon Sep 25 08:09:02 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 25 09:16:40 2023 +0200

svx: prefix members of SdrHdlColor

See tdf#94879 for motivation.

Change-Id: Ic987e38bb2f1a23504e27a32062df75215de6b3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157232
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 8824a65b4986..abd5a060f5aa 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -255,16 +255,16 @@ public:
 class SVXCORE_DLLPUBLIC SdrHdlColor final : public SdrHdl
 {
 // size of colr markers
-SizeaMarkerSize;
+Sizem_aMarkerSize;
 
 // color
-Color   aMarkerColor;
+Color   m_aMarkerColor;
 
 // callback link when value changed
-Link aColorChangeHdl;
+Link m_aColorChangeHdl;
 
 // use luminance values only
-boolbUseLuminance : 1;
+boolm_bUseLuminance : 1;
 
 // create marker for this kind
 SVX_DLLPRIVATE virtual void CreateB2dIAObject() override;
@@ -277,14 +277,14 @@ public:
 explicit SdrHdlColor(const Point& rRef, Color aCol, const Size& rSize, 
bool bLuminance);
 virtual ~SdrHdlColor() override;
 
-bool IsUseLuminance() const { return bUseLuminance; }
+bool IsUseLuminance() const { return m_bUseLuminance; }
 
-const Color& GetColor() const { return aMarkerColor; }
+const Color& GetColor() const { return m_aMarkerColor; }
 void SetColor(Color aNew, bool bCallLink = false);
 
 void SetSize(const Size& rNew);
 
-void SetColorChangeHdl(const Link& rLink) { 
aColorChangeHdl = rLink; }
+void SetColorChangeHdl(const Link& rLink) { 
m_aColorChangeHdl = rLink; }
 };
 
 
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 27b94f83d67a..77904d411a9f 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1112,14 +1112,14 @@ void SdrHdl::insertNewlyCreatedOverlayObjectForSdrHdl(
 
 SdrHdlColor::SdrHdlColor(const Point& rRef, Color aCol, const Size& rSize, 
bool bLum)
 :   SdrHdl(rRef, SdrHdlKind::Color),
-aMarkerSize(rSize),
-bUseLuminance(bLum)
+m_aMarkerSize(rSize),
+m_bUseLuminance(bLum)
 {
 if(IsUseLuminance())
 aCol = GetLuminance(aCol);
 
 // remember color
-aMarkerColor = aCol;
+m_aMarkerColor = aCol;
 }
 
 SdrHdlColor::~SdrHdlColor()
@@ -1153,7 +1153,7 @@ void SdrHdlColor::CreateB2dIAObject()
 const rtl::Reference< sdr::overlay::OverlayManager >& xManager = 
rPageWindow.GetOverlayManager();
 if (xManager.is())
 {
-BitmapEx aBmpCol(CreateColorDropper(aMarkerColor));
+BitmapEx aBmpCol(CreateColorDropper(m_aMarkerColor));
 basegfx::B2DPoint aPosition(m_aPos.X(), m_aPos.Y());
 std::unique_ptr 
pNewOverlayObject(new
 sdr::overlay::OverlayBitmapEx(
@@ -1177,13 +1177,13 @@ BitmapEx SdrHdlColor::CreateColorDropper(Color aCol)
 {
 // get the Bitmap
 VclPtr pWrite(VclPtr::Create());
-pWrite->SetOutputSizePixel(aMarkerSize);
+pWrite->SetOutputSizePixel(m_aMarkerSize);
 pWrite->SetBackground(aCol);
 pWrite->Erase();
 
 // draw outer border
-sal_Int32 nWidth = aMarkerSize.Width();
-sal_Int32 nHeight = aMarkerSize.Height();
+sal_Int32 nWidth = m_aMarkerSize.Width();
+sal_Int32 nHeight = m_aMarkerSize.Height();
 
 pWrite->SetLineColor(COL_LIGHTGRAY);
 pWrite->DrawLine(Point(0, 0), Point(0, nHeight - 1));
@@ -1210,7 +1210,7 @@ BitmapEx SdrHdlColor::CreateColorDropper(Color aCol)
 pWrite->DrawLine(Point(2, nHeight - 2), Point(nWidth - 2, nHeight - 2));
 pWrite->DrawLine(Point(nWidth - 2, 2), Point(nWidth - 2, nHeight - 3));
 
-return pWrite->GetBitmapEx(Point(0,0), aMarkerSize);
+return pWrite->GetBitmapEx(Point(0,0), m_aMarkerSize);
 }
 
 Color SdrHdlColor::GetLuminance(const Color& rCol)
@@ -1225,26 +1225,26 @@ void SdrHdlColor::SetColor(Color aNew, bool bCallLink)
 if(IsUseLuminance())
 aNew = GetLuminance(aNew);
 
-if(aMarkerColor != aNew)
+if(m_aMarkerColor != aNew)
 {
 // remember new color
-aMarkerColor = aNew;
+m_aMarkerColor = aNew;
 
 // create new display
 Touch();
 
 // tell about change
 if(bCallLink)
-aColorChangeHdl.Call(this);
+m_aColorChangeHdl.Call(this);
 }
 }
 
 void SdrHdlColor::SetSize(const Size& rNew)
 {
-if(rNew != aMarkerSize)
+if(rNew != m_aMarkerSize)
 {
 // 

[Libreoffice-commits] core.git: include/svx svx/source

2023-09-18 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx   |4 ++--
 svx/source/svdraw/svdhdl.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fec20d4bba32b06fa3641290deaa4e4fec98ae42
Author: Miklos Vajna 
AuthorDate: Mon Sep 18 08:11:51 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 18 10:59:34 2023 +0200

svx: prefix members of SdrHdlBezWgt

See tdf#94879 for motivation.

Change-Id: I1bacd92ad30fe3765d2eb5054018f6fd64a3835d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157005
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 78bb95e25ab2..8824a65b4986 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -359,14 +359,14 @@ class SdrHdlBezWgt final : public SdrHdl
 {
 public:
 // this is not a Copy-Ctor!!!
-SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind 
eNewKind=SdrHdlKind::BezierWeight) { m_eKind=eNewKind; pHdl1=pRefHdl1; }
+SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind 
eNewKind=SdrHdlKind::BezierWeight) { m_eKind=eNewKind; m_pHdl1=pRefHdl1; }
 virtual ~SdrHdlBezWgt() override;
 
 private:
 // create marker for this kind
 virtual void CreateB2dIAObject() override;
 
-const SdrHdl* pHdl1;
+const SdrHdl* m_pHdl1;
 };
 
 
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index d9b6514e466a..27b94f83d67a 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1522,7 +1522,7 @@ void SdrHdlBezWgt::CreateB2dIAObject()
 const rtl::Reference< sdr::overlay::OverlayManager >& xManager = 
rPageWindow.GetOverlayManager();
 if (xManager.is())
 {
-basegfx::B2DPoint aPosition1(pHdl1->GetPos().X(), 
pHdl1->GetPos().Y());
+basegfx::B2DPoint aPosition1(m_pHdl1->GetPos().X(), 
m_pHdl1->GetPos().Y());
 basegfx::B2DPoint aPosition2(m_aPos.X(), m_aPos.Y());
 
 if(!aPosition1.equal(aPosition2))


[Libreoffice-commits] core.git: include/svx svx/source

2023-09-12 Thread Julien Nabet (via logerrit)
 include/svx/svdoedge.hxx   |   12 ++--
 svx/source/svdraw/svdoedge.cxx |   38 +++---
 2 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 93c5885dad3343f3d1a55e33bf83fecd1fed8cab
Author: Julien Nabet 
AuthorDate: Tue Sep 12 22:48:12 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 13 07:14:19 2023 +0200

svx: prefix members of SaveGeoData

See tdf#94879 for motivation.

Change-Id: I9ba78fdbb7f2390f43e3315c8cdf86c56f96f478
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156863
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index 4da2219b3645..94bb89a00a3e 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -112,12 +112,12 @@ public:
 class SdrEdgeObjGeoData final : public SdrTextObjGeoData
 {
 public:
-SdrObjConnectionaCon1;  // connection status of the beginning 
of the line
-SdrObjConnectionaCon2;  // connection status of the end of the 
line
-std::optional pEdgeTrack;
-boolbEdgeTrackDirty; // true -> connector track 
needs to be recalculated
-boolbEdgeTrackUserDefined;
-SdrEdgeInfoRec  aEdgeInfo;
+SdrObjConnectionm_aCon1;  // connection status of the 
beginning of the line
+SdrObjConnectionm_aCon2;  // connection status of the end of 
the line
+std::optional m_pEdgeTrack;
+boolm_bEdgeTrackDirty; // true -> connector track 
needs to be recalculated
+boolm_bEdgeTrackUserDefined;
+SdrEdgeInfoRec  m_aEdgeInfo;
 
 public:
 SdrEdgeObjGeoData();
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 4eee430ced24..f70e1f924f6b 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2478,9 +2478,9 @@ void SdrEdgeObj::NbcSetPoint(const Point& rPnt, 
sal_uInt32 i)
 }
 
 SdrEdgeObjGeoData::SdrEdgeObjGeoData()
-: pEdgeTrack(std::in_place)
-, bEdgeTrackDirty(false)
-, bEdgeTrackUserDefined(false)
+: m_pEdgeTrack(std::in_place)
+, m_bEdgeTrackDirty(false)
+, m_bEdgeTrackUserDefined(false)
 {
 }
 
@@ -2497,38 +2497,38 @@ void SdrEdgeObj::SaveGeoData(SdrObjGeoData& rGeo) const
 {
 SdrTextObj::SaveGeoData(rGeo);
 SdrEdgeObjGeoData& rEGeo=static_cast(rGeo);
-rEGeo.aCon1  =m_aCon1;
-rEGeo.aCon2  =m_aCon2;
-*rEGeo.pEdgeTrack=*m_pEdgeTrack;
-rEGeo.bEdgeTrackDirty=m_bEdgeTrackDirty;
-rEGeo.bEdgeTrackUserDefined=m_bEdgeTrackUserDefined;
-rEGeo.aEdgeInfo  =m_aEdgeInfo;
+rEGeo.m_aCon1  =m_aCon1;
+rEGeo.m_aCon2  =m_aCon2;
+*rEGeo.m_pEdgeTrack=*m_pEdgeTrack;
+rEGeo.m_bEdgeTrackDirty=m_bEdgeTrackDirty;
+rEGeo.m_bEdgeTrackUserDefined=m_bEdgeTrackUserDefined;
+rEGeo.m_aEdgeInfo  =m_aEdgeInfo;
 }
 
 void SdrEdgeObj::RestoreGeoData(const SdrObjGeoData& rGeo)
 {
 SdrTextObj::RestoreGeoData(rGeo);
 const SdrEdgeObjGeoData& rEGeo=static_cast(rGeo);
-if (m_aCon1.m_pSdrObj!=rEGeo.aCon1.m_pSdrObj) {
+if (m_aCon1.m_pSdrObj!=rEGeo.m_aCon1.m_pSdrObj) {
 if (m_aCon1.m_pSdrObj!=nullptr) 
m_aCon1.m_pSdrObj->RemoveListener(*this);
-m_aCon1=rEGeo.aCon1;
+m_aCon1=rEGeo.m_aCon1;
 if (m_aCon1.m_pSdrObj!=nullptr) m_aCon1.m_pSdrObj->AddListener(*this);
 }
 else
-m_aCon1=rEGeo.aCon1;
+m_aCon1=rEGeo.m_aCon1;
 
-if (m_aCon2.m_pSdrObj!=rEGeo.aCon2.m_pSdrObj) {
+if (m_aCon2.m_pSdrObj!=rEGeo.m_aCon2.m_pSdrObj) {
 if (m_aCon2.m_pSdrObj!=nullptr) 
m_aCon2.m_pSdrObj->RemoveListener(*this);
-m_aCon2=rEGeo.aCon2;
+m_aCon2=rEGeo.m_aCon2;
 if (m_aCon2.m_pSdrObj!=nullptr) m_aCon2.m_pSdrObj->AddListener(*this);
 }
 else
-m_aCon2=rEGeo.aCon2;
+m_aCon2=rEGeo.m_aCon2;
 
-*m_pEdgeTrack=*rEGeo.pEdgeTrack;
-m_bEdgeTrackDirty=rEGeo.bEdgeTrackDirty;
-m_bEdgeTrackUserDefined=rEGeo.bEdgeTrackUserDefined;
-m_aEdgeInfo  =rEGeo.aEdgeInfo;
+*m_pEdgeTrack=*rEGeo.m_pEdgeTrack;
+m_bEdgeTrackDirty=rEGeo.m_bEdgeTrackDirty;
+m_bEdgeTrackUserDefined=rEGeo.m_bEdgeTrackUserDefined;
+m_aEdgeInfo  =rEGeo.m_aEdgeInfo;
 }
 
 Point SdrEdgeObj::GetTailPoint( bool bTail ) const


[Libreoffice-commits] core.git: include/svx sd/source svx/source

2023-09-11 Thread Julien Nabet (via logerrit)
 include/svx/svdoedge.hxx   |   30 ++---
 sd/source/ui/func/fupoor.cxx   |4 
 sd/source/ui/view/sdview3.cxx  |4 
 svx/source/svdraw/svdcrtv.cxx  |2 
 svx/source/svdraw/svdoedge.cxx |  208 -
 5 files changed, 124 insertions(+), 124 deletions(-)

New commits:
commit 01d7bd4f08cf05dd44b1239287451c52a965e343
Author: Julien Nabet 
AuthorDate: Mon Sep 11 23:45:58 2023 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 12 07:43:40 2023 +0200

svx: prefix members of SdrObjConnection

+ modify GetObject() into GetSdrObject()
+ modify pObj into m_pSdrObj
The goal was to be a little bit more specific since they concern a class 
and not a local function.

Change-Id: I1b3f19a16a452f22af82da22e33cd2f1522e1a7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156832
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index faa8c67b1e65..4da2219b3645 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -42,14 +42,14 @@ class SdrObjConnection final
 friend classImpEdgeHdl;
 friend classSdrCreateView;
 
-Point   aObjOfs;   // set during dragging of a node
-SdrObject*  pObj;  // referenced object
-sal_uInt16  nConId;// connector number
+Point   m_aObjOfs;   // set during dragging of a 
node
+SdrObject*  m_pSdrObj;  // referenced object
+sal_uInt16  m_nConId;// connector number
 
-boolbBestConn : 1;   // true -> the best-matching 
connector is searched for
-boolbBestVertex : 1; // true -> the best-matching 
vertex to connect is searched for
-boolbAutoVertex : 1; // autoConnector at apex nCon
-boolbAutoCorner : 1; // autoConnector at corner 
nCon
+boolm_bBestConn : 1;   // true -> the 
best-matching connector is searched for
+boolm_bBestVertex : 1; // true -> the 
best-matching vertex to connect is searched for
+boolm_bAutoVertex : 1; // autoConnector at apex 
nCon
+boolm_bAutoCorner : 1; // autoConnector at corner 
nCon
 
 public:
 SdrObjConnection() { ResetVars(); }
@@ -57,15 +57,15 @@ public:
 void ResetVars();
 bool TakeGluePoint(SdrGluePoint& rGP) const;
 
-void SetBestConnection( bool rB ) { bBestConn = rB; };
-void SetBestVertex( bool rB ) { bBestVertex = rB; };
-void SetAutoVertex( bool rB ) { bAutoVertex = rB; };
-void SetConnectorId( sal_uInt16 nId ) { nConId = nId; };
+void SetBestConnection( bool rB ) { m_bBestConn = rB; };
+void SetBestVertex( bool rB ) { m_bBestVertex = rB; };
+void SetAutoVertex( bool rB ) { m_bAutoVertex = rB; };
+void SetConnectorId( sal_uInt16 nId ) { m_nConId = nId; };
 
-bool IsBestConnection() const { return bBestConn; };
-bool IsAutoVertex() const { return bAutoVertex; };
-sal_uInt16 GetConnectorId() const { return nConId; };
-SdrObject* GetObject() const { return pObj; }
+bool IsBestConnection() const { return m_bBestConn; };
+bool IsAutoVertex() const { return m_bAutoVertex; };
+sal_uInt16 GetConnectorId() const { return m_nConId; };
+SdrObject* GetSdrObject() const { return m_pSdrObj; }
 };
 
 
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index c75959fbc243..e6fe25f7117d 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -607,14 +607,14 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
 {
 if(0 == pHdl->GetPointNum())
 {
-if(pEdgeObj->GetConnection(true).GetObject())
+if(pEdgeObj->GetConnection(true).GetSdrObject())
 {
 bIsMoveOfConnectedHandle = true;
 }
 }
 if(1 == pHdl->GetPointNum())
 {
-if(pEdgeObj->GetConnection(false).GetObject())
+if(pEdgeObj->GetConnection(false).GetSdrObject())
 {
 bIsMoveOfConnectedHandle = true;
 }
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index ac95db930629..c0fa51d1ae67 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -533,7 +533,7 @@ bool View::InsertData( const TransferableDataHelper& 
rDataHelper,
 
 // test first connection
 SdrObjConnection& 

[Libreoffice-commits] core.git: include/svx sd/source svx/source sw/source

2023-09-11 Thread Miklos Vajna (via logerrit)
 include/svx/svdhdl.hxx |   66 
 sd/source/ui/animations/motionpathtag.cxx  |4 
 sd/source/ui/annotations/annotationtag.cxx |6 
 sd/source/ui/view/viewoverlaymanager.cxx   |   14 -
 svx/source/diagram/IDiagramHelper.cxx  |2 
 svx/source/svdraw/svdhdl.cxx   |  222 ++---
 svx/source/table/tablehandles.cxx  |   10 -
 sw/source/core/draw/dview.cxx  |2 
 8 files changed, 163 insertions(+), 163 deletions(-)

New commits:
commit c8c42754ca8adf2b909261fde01fb3dbad8d50c0
Author: Miklos Vajna 
AuthorDate: Mon Sep 11 08:18:38 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 11 09:44:38 2023 +0200

svx: prefix members of SdrHdl

See tdf#94879 for motivation.

Change-Id: Icd2be0663b7b498bb06f09ced97673244e328a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156809
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 61c0100ad144..78bb95e25ab2 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -133,25 +133,25 @@ class SVXCORE_DLLPUBLIC SdrHdl
 friend classSdrHdlList;
 
 protected:
-SdrObject*  pObj;  // does handle belong to an object?
-SdrPageView*pPV;   // does handle belong to an object 
in certain pageview?
-SdrHdlList* pHdlList;  // to store the handlesize
+SdrObject*  m_pObj;  // does handle belong to an 
object?
+SdrPageView*m_pPV;   // does handle belong to an 
object in certain pageview?
+SdrHdlList* m_pHdlList;  // to store the handlesize
 // OVERLAYMANAGER
 sdr::overlay::OverlayObjectList   maOverlayGroup;
 
-Point   aPos;
+Point   m_aPos;
 
-SdrHdlKind  eKind;
+SdrHdlKind  m_eKind;
 
-Degree100   nRotationAngle; // turn handle or mousepointer
-sal_uInt32  nObjHdlNum; // required by MarkView
-sal_uInt32  nPolyNum;   // Polygonpoint
-sal_uInt32  nPPntNum;   // Point number of the polygon
-sal_uInt32  nSourceHdlNum;  // still to implement
+Degree100   m_nRotationAngle; // turn handle or 
mousepointer
+sal_uInt32  m_nObjHdlNum; // required by MarkView
+sal_uInt32  m_nPolyNum;   // Polygonpoint
+sal_uInt32  m_nPPntNum;   // Point number of the 
polygon
+sal_uInt32  m_nSourceHdlNum;  // still to implement
 
-boolbSelect : 1;// is a polygon point selected?
-boolb1PixMore : 1;  // True=handle is shown 1 
pixel larger
-boolbPlusHdl : 1;   // for Hld-Paint optimisation 
at MarkPoint/UnmarkPoint, and other ...
+boolm_bSelect : 1;// is a polygon point 
selected?
+boolm_b1PixMore : 1;  // True=handle is shown 1 
pixel larger
+boolm_bPlusHdl : 1;   // for Hld-Paint 
optimisation at MarkPoint/UnmarkPoint, and other ...
 
 boolmbMoveOutside;  // forces this handle to be 
moved outside of the selection rectangle
 
@@ -191,41 +191,41 @@ public:
 const sdr::overlay::OverlayObjectList& getOverlayObjectList() const { 
return maOverlayGroup; }
 
 void SetHdlList(SdrHdlList* pList);
-SdrHdlKind GetKind() const { return eKind; }
+SdrHdlKind GetKind() const { return m_eKind; }
 void Touch();
 
-const Point& GetPos() const { return aPos; }
+const Point& GetPos() const { return m_aPos; }
 void SetPos(const Point& rPnt);
 
-SdrPageView* GetPageView() const { return pPV; }
-void SetPageView(SdrPageView* pNewPV) { pPV=pNewPV; }
+SdrPageView* GetPageView() const { return m_pPV; }
+void SetPageView(SdrPageView* pNewPV) { m_pPV=pNewPV; }
 
-SdrObject* GetObj() const { return pObj;  }
+SdrObject* GetObj() const { return m_pObj;  }
 void SetObj(SdrObject* pNewObj);
 
-bool IsSelected() const { return bSelect; }
+bool IsSelected() const { return m_bSelect; }
 void SetSelected(bool bJa=true);
 
 void Set1PixMore(bool bJa=true);
 void SetRotationAngle(Degree100 n);
 
-bool IsCornerHdl() const { return eKind==SdrHdlKind::UpperLeft || 
eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || 
eKind==SdrHdlKind::LowerRight; }
-bool IsVertexHdl() const { return eKind==SdrHdlKind::Upper || 
eKind==SdrHdlKind::Lower || eKind==SdrHdlKind::Left  || 
eKind==SdrHdlKind::Right; }
+bool IsCornerHdl() const { return m_eKind==SdrHdlKind::UpperLeft || 
m_eKind==SdrHdlKind::UpperRight || m_eKind==SdrHdlKind::LowerLeft || 
m_eKind==SdrHdlKind::LowerRight; }
+  

[Libreoffice-commits] core.git: include/svx sd/source svx/source

2023-09-07 Thread Noel Grandin (via logerrit)
 include/svx/unopool.hxx |   13 ++---
 sd/source/ui/unoidl/unopool.cxx |2 +-
 svx/source/unodraw/unopool.cxx  |   10 ++
 3 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit 7bc010d624215b3d1830546e5c6f0a24567c54f4
Author: Noel Grandin 
AuthorDate: Thu Sep 7 08:41:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 7 13:37:23 2023 +0200

SvxUnoDrawPool does not need to implement XAggreggation

Checked on jenkins using 'make check' and

+void SAL_CALL setDelegator(css::uno::Reference 
const &) final { assert(false); }
+

Change-Id: I50283dff8832557ffaa9074532a2245210dc6d7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156633
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
index 9e86c957a27f..331a8e4ae67e 100644
--- a/include/svx/unopool.hxx
+++ b/include/svx/unopool.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -36,9 +36,9 @@ class SfxItemPool;
 The class can work in a read only mode without a model. Derivated
 classes can set a model on demand by overriding getModelPool().
 */
-class SVX_DLLPUBLIC SvxUnoDrawPool :public ::cppu::OWeakAggObject,
-public css::lang::XServiceInfo,
-public css::lang::XTypeProvider,
+typedef ::comphelper::WeakComponentImplHelper 
SvxUnoDrawPool_Base;
+
+class SVX_DLLPUBLIC SvxUnoDrawPool : public SvxUnoDrawPool_Base,
 public comphelper::PropertySetHelper
 {
 public:
@@ -60,12 +60,11 @@ public:
 virtual css::uno::Any _getPropertyDefault( const 
comphelper::PropertyMapEntry* pEntry ) override;
 
 // XInterface
-virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & 
rType ) override;
 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & 
rType ) override;
 virtual void SAL_CALL acquire() noexcept override
-{ OWeakAggObject::acquire(); }
+{ OWeakObject::acquire(); }
 virtual void SAL_CALL release() noexcept override
-{ OWeakAggObject::release(); }
+{ OWeakObject::release(); }
 
 // XTypeProvider
 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx
index 5791aa6984ed..6a4124bcfe62 100644
--- a/sd/source/ui/unoidl/unopool.cxx
+++ b/sd/source/ui/unoidl/unopool.cxx
@@ -83,7 +83,7 @@ void SdUnoDrawPool::putAny( SfxItemPool* pPool, const 
comphelper::PropertyMapEnt
 
 uno::Reference< uno::XInterface > SdUnoCreatePool( SdDrawDocument* pDrawModel )
 {
-return static_cast(new SdUnoDrawPool( pDrawModel ));
+return static_cast(new SdUnoDrawPool( pDrawModel ));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index eb897556eff9..5dc577a3e87b 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star;
 using namespace ::cppu;
 
 SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel, 
rtl::Reference const & xDefaults)
-: PropertySetHelper( xDefaults ), mpModel( pModel )
+: SvxUnoDrawPool_Base(), PropertySetHelper( xDefaults ), mpModel( pModel )
 {
 init();
 }
@@ -307,11 +307,6 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const 
comphelper::PropertyMapEntry
 // XInterface
 
 uno::Any SAL_CALL SvxUnoDrawPool::queryInterface( const uno::Type & rType )
-{
-return OWeakAggObject::queryInterface( rType );
-}
-
-uno::Any SAL_CALL SvxUnoDrawPool::queryAggregation( const uno::Type & rType )
 {
 uno::Any aAny;
 
@@ -326,7 +321,7 @@ uno::Any SAL_CALL SvxUnoDrawPool::queryAggregation( const 
uno::Type & rType )
 else if( rType == cppu::UnoType::get())
 aAny <<= uno::Reference< beans::XMultiPropertySet >(this);
 else
-aAny = OWeakAggObject::queryAggregation( rType );
+aAny = OWeakObject::queryInterface( rType );
 
 return aAny;
 }
@@ -334,7 +329,6 @@ uno::Any SAL_CALL SvxUnoDrawPool::queryAggregation( const 
uno::Type & rType )
 uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes()
 {
 static const uno::Sequence aTypes {
-cppu::UnoType::get(),
 cppu::UnoType::get(),
 cppu::UnoType::get(),
 cppu::UnoType::get(),


[Libreoffice-commits] core.git: include/svx svx/Library_svxcore.mk svx/source sw/source

2023-09-06 Thread Noel Grandin (via logerrit)
 include/svx/shapepropertynotifier.hxx|  142 ---
 include/svx/svdobj.hxx   |6 -
 include/svx/unoshape.hxx |3 
 svx/Library_svxcore.mk   |1 
 svx/source/svdraw/svdobj.cxx |   17 ---
 svx/source/unodraw/shapepropertynotifier.cxx |  142 ---
 svx/source/unodraw/unoshape.cxx  |   79 ---
 sw/source/core/draw/dcontact.cxx |3 
 sw/source/core/unocore/unodraw.cxx   |   27 -
 9 files changed, 32 insertions(+), 388 deletions(-)

New commits:
commit de42529ca9107b24b6367b40801300416d4a51a1
Author: Noel Grandin 
AuthorDate: Wed Sep 6 14:49:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 6 16:11:40 2023 +0200

replace svx::PropertyValueProvider with simpler implementation

it was not actually doing much besides managing the listener list, so
just use a regular listener list implementation.
Registering was unnecessary as well, we can use getPropertyValue() to
retrieve the current value.

Change-Id: I53ae496e07ff028b12646668b134ffcab18484aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156619
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/shapepropertynotifier.hxx 
b/include/svx/shapepropertynotifier.hxx
deleted file mode 100644
index c34f536408f2..
--- a/include/svx/shapepropertynotifier.hxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_SHAPEPROPERTYNOTIFIER_HXX
-#define INCLUDED_SVX_SHAPEPROPERTYNOTIFIER_HXX
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
-namespace com::sun::star::beans { class XPropertyChangeListener; }
-namespace com::sun::star::uno { class Any; }
-namespace com::sun::star::uno { template  class Reference; }
-namespace osl { class Mutex; }
-
-namespace cppu
-{
-class OWeakObject;
-}
-
-
-namespace svx
-{
-
-//= ShapeProperty
-
-enum class ShapePropertyProviderId
-{
-// generic (UNO) shape properties
-Position,
-Size,
-// text doc shape properties
-TextDocAnchor,
-LAST = TextDocAnchor
-};
-
-//= PropertyValueProvider
-
-/** Default provider for a property value
-
-This default implementation queries the object which it is constructed 
with for the XPropertySet interface,
-and calls the getPropertyValue method.
-*/
-class SVXCORE_DLLPUBLIC PropertyValueProvider
-{
-public:
-PropertyValueProvider( ::cppu::OWeakObject& _rContext, OUString 
_aPropertyName )
-:m_rContext( _rContext )
-,m_sPropertyName( std::move( _aPropertyName ) )
-{
-}
-virtual ~PropertyValueProvider();
-
-/** returns the name of the property which this provider is 
responsible for
-*/
-const OUString & getPropertyName() const;
-/** returns the current value of the property which the provider is 
responsible for
-*/
-virtual void getCurrentValue( css::uno::Any& _out_rValue ) const;
-
-protected:
-::cppu::OWeakObject&getContext() const { return m_rContext; }
-PropertyValueProvider(const PropertyValueProvider&) = delete;
-PropertyValueProvider& operator=(const PropertyValueProvider&) = 
delete;
-
-private:
-::cppu::OWeakObject&m_rContext;
-const OUString   m_sPropertyName;
-};
-
-
-/** helper class for notifying XPropertyChangeListeners
-
-The class is intended to be held as member of the class which does the 
property change broadcasting.
-*/
-class SVXCORE_DLLPUBLIC PropertyChangeNotifier
-{
-public:
-/** constructs a notifier instance
-
-@param _rOwner
-the owner instance of the notifier. Will be used as 
css.lang.EventObject.Source when
-notifying events.
-*/
-PropertyChangeNotifier( ::cppu::OWeakObject& _rOwner );
-

[Libreoffice-commits] core.git: include/svx reportdesign/source svx/source xmloff/source

2023-09-06 Thread Caolán McNamara (via logerrit)
 include/svx/unoshape.hxx|6 ++-
 reportdesign/source/core/sdr/ReportDrawPage.cxx |2 -
 svx/source/unodraw/shapeimpl.hxx|7 ++--
 svx/source/unodraw/unomod.cxx   |6 +++
 svx/source/unodraw/unopage.cxx  |   14 
 svx/source/unodraw/unoshap4.cxx |   38 +---
 xmloff/source/draw/ximpshap.cxx |4 ++
 7 files changed, 46 insertions(+), 31 deletions(-)

New commits:
commit c9b5c627ccb5b70c103c559b1df38c1175efc2d1
Author: Caolán McNamara 
AuthorDate: Wed Sep 6 10:05:23 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 6 14:49:32 2023 +0200

add referer to ole objects

so we can identify what document is requesting their contents

extends:

commit 5668e73beb30b95abc6520b7432c54972ca3ab2c
Date:   Wed Nov 20 14:43:45 2013 +0100

avmedia: Implement "block untrusted referer links" feature

See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 
'block
untrusted referer links' feature" for details.  This adds some further 
/*TODO?*/
comments, and one known problem (marked /*TODO!*/) is that 
movies/sounds are not
blocked during a slideshow presentation.

to these objects too, namely OLE2Shape and derivatives AppletShape,
FrameShape and PluginShape

so in paranoid mode we won't load the contents of such objects from
documents considered "untrusted".

Change-Id: I6d988035d0cd09fd3fade5f6885fe336c95579ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156612
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 654c60bb3c5e..bbdb8bdd65de 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -590,6 +590,8 @@ public:
 // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
 class SVXCORE_DLLPUBLIC SvxOle2Shape : public SvxShapeText
 {
+private:
+OUString referer_;
 protected:
 // override these for special property handling in subcasses. Return true 
if property is handled
 virtual bool setPropertyValueImpl( const OUString& rName, const 
SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override;
@@ -599,8 +601,8 @@ protected:
 
 SvGlobalName GetClassName_Impl(OUString& rHexCLSID);
 public:
-SvxOle2Shape(SdrObject* pObj);
-SvxOle2Shape(SdrObject* pObject, o3tl::span 
pPropertyMap, const SvxItemPropertySet* pPropertySet);
+SvxOle2Shape(SdrObject* pObj, OUString referer);
+SvxOle2Shape(SdrObject* pObject, OUString referer, o3tl::span pPropertyMap, const SvxItemPropertySet* pPropertySet);
 virtual ~SvxOle2Shape() noexcept override;
 
 bool createObject( const SvGlobalName  );
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx 
b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 9c88a39990c1..b58b9f0a3cc9 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -122,7 +122,7 @@ uno::Reference< drawing::XShape >  
OReportDrawPage::CreateShape( SdrObject *pObj
 awt::Size aSz( aTmp.Width(), aTmp.Height() );
 xObj->setVisualAreaSize( nAspect, aSz );
 }
-rtl::Reference pShape = new SvxOle2Shape( pObj );
+rtl::Reference pShape = new SvxOle2Shape( pObj, "" 
/*TODO?*/ );
 xShape = pShape;
 pShape->setShapeKind(pObj->GetObjIdentifier());
 }
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index 68189814fe6a..ce67e16bb572 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -36,7 +36,7 @@ protected:
 virtual bool getPropertyValueImpl( const OUString& rName, const 
SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
 
 public:
-explicit SvxPluginShape(SdrObject* pObj);
+explicit SvxPluginShape(SdrObject* pObj, OUString referer);
 virtual ~SvxPluginShape() noexcept override;
 
 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, 
const css::uno::Any& aValue ) override;
@@ -46,6 +46,7 @@ public:
 
 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
 };
+
 class SvxAppletShape : public SvxOle2Shape
 {
 protected:
@@ -54,7 +55,7 @@ protected:
 virtual bool getPropertyValueImpl( const OUString& rName, const 
SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override;
 
 public:
-explicit SvxAppletShape(SdrObject* pObj);
+explicit SvxAppletShape(SdrObject* pObj, OUString referer);
 virtual ~SvxAppletShape() noexcept override;
 
 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, 
const css::uno::Any& aValue ) override;
@@ -76,7 +77,7 @@ protected:
 css::uno::Any& rValue) override;
 
 public:
-explicit 

[Libreoffice-commits] core.git: include/svx svx/source

2023-09-04 Thread Miklos Vajna (via logerrit)
 include/svx/svdglue.hxx   |   10 +-
 svx/source/svdraw/svdglue.cxx |   22 +++---
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 9bb4fa71c230a34a07ea9b7c4e4f13f4d3f7b5fe
Author: Miklos Vajna 
AuthorDate: Mon Sep 4 08:29:26 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 4 16:27:30 2023 +0200

svx: prefix members of SdrGluePointList

See tdf#94879 for motivation.

Change-Id: Ia58a0c5319d51c463db23bae250e6c0c5e7a9741
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156505
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
index acdebd0bf4ea..234ecf08cdd0 100644
--- a/include/svx/svdglue.hxx
+++ b/include/svx/svdglue.hxx
@@ -182,7 +182,7 @@ public:
 
 class SVXCORE_DLLPUBLIC SdrGluePointList
 {
-std::vector aList;
+std::vector m_aList;
 public:
 SdrGluePointList() {};
 SdrGluePointList(const SdrGluePointList& rSrcList)
@@ -193,22 +193,22 @@ public:
 SdrGluePointList& operator=(const SdrGluePointList& rSrcList);
 sal_uInt16 GetCount() const
 {
-return sal_uInt16(aList.size());
+return sal_uInt16(m_aList.size());
 }
 // At insert, the object (GluePoint) automatically gets an ID assigned.
 // Return value is the index of the new GluePoint in the list.
 sal_uInt16 Insert(const SdrGluePoint& rGP);
 void Delete(sal_uInt16 nPos)
 {
-aList.erase(aList.begin() + nPos);
+m_aList.erase(m_aList.begin() + nPos);
 }
 SdrGluePoint& operator[](sal_uInt16 nPos)
 {
-return aList[nPos];
+return m_aList[nPos];
 }
 const SdrGluePoint& operator[](sal_uInt16 nPos) const
 {
-return aList[nPos];
+return m_aList[nPos];
 }
 sal_uInt16 FindGluePoint(sal_uInt16 nId) const;
 sal_uInt16 HitTest(const Point& rPnt, const OutputDevice& rOut, const 
SdrObject* pObj) const;
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 471089f3763c..c27fc2e2bde9 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -282,7 +282,7 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const 
OutputDevice& rOut, const SdrO
 
 SdrGluePointList& SdrGluePointList::operator=(const SdrGluePointList& rSrcList)
 {
-if (GetCount()!=0) aList.clear();
+if (GetCount()!=0) m_aList.clear();
 sal_uInt16 nCount=rSrcList.GetCount();
 for (sal_uInt16 i=0; i=nCount,"SdrGluePointList::Insert(): nLastIdnCount;
 if (nId<=nLastId) {
@@ -307,7 +307,7 @@ sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP)
 } else {
 bool bBrk = false;
 for (sal_uInt16 nNum=0; nNum0) && nRet==SDRGLUEPOINT_NOTFOUND) {
 nNum--;
-const auto& pGP = aList[nNum];
+const auto& pGP = m_aList[nNum];
 if (pGP.IsHit(rPnt,rOut,pObj))
 nRet = nNum;
 }
@@ -362,13 +362,13 @@ sal_uInt16 SdrGluePointList::HitTest(const Point& rPnt, 
const OutputDevice& rOut
 
 void SdrGluePointList::SetReallyAbsolute(bool bOn, const SdrObject& rObj)
 {
-for (auto& xGP : aList)
+for (auto& xGP : m_aList)
 xGP.SetReallyAbsolute(bOn,rObj);
 }
 
 void SdrGluePointList::Rotate(const Point& rRef, Degree100 nAngle, double sn, 
double cs, const SdrObject* pObj)
 {
-for (auto& xGP : aList)
+for (auto& xGP : m_aList)
 xGP.Rotate(rRef,nAngle,sn,cs,pObj);
 }
 
@@ -381,13 +381,13 @@ void SdrGluePointList::Mirror(const Point& rRef1, const 
Point& rRef2, const SdrO
 
 void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, 
Degree100 nAngle, const SdrObject* pObj)
 {
-for (auto& xGP : aList)
+for (auto& xGP : m_aList)
 xGP.Mirror(rRef1,rRef2,nAngle,pObj);
 }
 
 void SdrGluePointList::Shear(const Point& rRef, double tn, bool bVShear, const 
SdrObject* pObj)
 {
-for (auto& xGP : aList)
+for (auto& xGP : m_aList)
 xGP.Shear(rRef,tn,bVShear,pObj);
 }
 


[Libreoffice-commits] core.git: include/svx include/vcl svx/source vcl/source

2023-09-04 Thread Samuel Mehrbrodt (via logerrit)
 include/svx/sidebar/AreaPropertyPanelBase.hxx |6 
 include/vcl/EnumContext.hxx   |1 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   27 ++
 vcl/source/window/EnumContext.cxx |5 
 4 files changed, 39 insertions(+)

New commits:
commit d4cebb60c7757086fd737e7a2134326209bd4190
Author: Samuel Mehrbrodt 
AuthorDate: Mon Sep 4 13:17:15 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Sep 4 16:10:41 2023 +0200

tdf#154875 "Use slide background" is only for Impress

Change-Id: I078437a1cff58b868f4db4b482ad2aff335dc965
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156514
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index c2c967a8333b..07a5873acf53 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREAPROPERTYPANELBASE_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -33,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class ToolbarUnoDispatcher;
 class XFillFloatTransparenceItem;
@@ -48,6 +50,7 @@ namespace svx::sidebar {
 
 class SVX_DLLPUBLIC AreaPropertyPanelBase
 :   public PanelLayout,
+public ::sfx2::sidebar::IContextChangeReceiver,
 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
 {
 public:
@@ -99,9 +102,11 @@ public:
 
 private:
 void Initialize();
+virtual void HandleContextChange(const vcl::EnumContext& rContext) 
override;
 
 protected:
 const css::uno::Reference&  mxFrame;
+vcl::EnumContextmaContext;
 
 sal_uInt16  meLastXFS;
 
@@ -109,6 +114,7 @@ protected:
 sal_Int32   mnLastPosBitmap;
 sal_Int32   mnLastPosPattern;
 sal_uInt16  mnLastTransSolid;
+OUStringmsUseBackgroundText;
 
 basegfx::BGradient  maGradientLinear;
 basegfx::BGradient  maGradientAxial;
diff --git a/include/vcl/EnumContext.hxx b/include/vcl/EnumContext.hxx
index 9d82e72adc9d..b8e02efd1f68 100644
--- a/include/vcl/EnumContext.hxx
+++ b/include/vcl/EnumContext.hxx
@@ -128,6 +128,7 @@ public:
 */
 sal_Int32 GetCombinedContext_DI() const;
 
+Application GetApplication() const;
 Application GetApplication_DI() const;
 
 bool operator == (const EnumContext& rOther) const;
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 9adff2c65dfd..05f4c100d71c 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -1392,6 +1392,33 @@ basegfx::BColorStops 
AreaPropertyPanelBase::createColorStops()
 return aColorStops;
 }
 
+void AreaPropertyPanelBase::HandleContextChange(
+const vcl::EnumContext& rContext)
+{
+if (maContext.GetApplication() == rContext.GetApplication())
+return;
+
+maContext = rContext;
+
+switch (maContext.GetApplication())
+{
+case vcl::EnumContext::Application::Impress:
+if (!msUseBackgroundText.isEmpty())
+{
+mxLbFillType->insert_text(USE_BACKGROUND, msUseBackgroundText);
+msUseBackgroundText = OUString();
+}
+break;
+default:
+if (msUseBackgroundText.isEmpty())
+{
+msUseBackgroundText = mxLbFillType->get_text(USE_BACKGROUND);
+mxLbFillType->remove(USE_BACKGROUND);
+}
+break;
+}
+}
+
 } // end of namespace svx::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/EnumContext.cxx 
b/vcl/source/window/EnumContext.cxx
index 6ca075eb6943..ffe065568282 100644
--- a/vcl/source/window/EnumContext.cxx
+++ b/vcl/source/window/EnumContext.cxx
@@ -60,6 +60,11 @@ sal_Int32 EnumContext::GetCombinedContext_DI() const
 return CombinedEnumContext(GetApplication_DI(), meContext);
 }
 
+EnumContext::Application EnumContext::GetApplication() const
+{
+ return meApplication;
+}
+
 EnumContext::Application EnumContext::GetApplication_DI() const
 {
  switch (meApplication)


[Libreoffice-commits] core.git: include/svx svx/source

2023-09-01 Thread Henry Castro (via logerrit)
 include/svx/ParseContext.hxx |   11 +--
 svx/source/form/ParseContext.cxx |   16 
 2 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 47d77c822fb58f9617379969b078c8a6230767d6
Author: Henry Castro 
AuthorDate: Wed Aug 30 10:16:37 2023 -0400
Commit: Henry Castro 
CommitDate: Fri Sep 1 19:09:28 2023 +0200

svx: add class "ONeutralParseContext"

If Base SQL query:

SELECT COUNT("test"."id") FROM Test

Then changed to Spanish interface, it is required
to have a neutral keyword localized, the "COUNT"
will fail to detect column type, because the keyword
in Spanish is "RECUENTO"

Signed-off-by: Henry Castro 
Change-Id: I191b9591ad796d0dd9509c0fb10b11c16f72e1ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156296
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156423
Tested-by: Jenkins

diff --git a/include/svx/ParseContext.hxx b/include/svx/ParseContext.hxx
index 4b8f451a8014..b5b8b7c84ea6 100644
--- a/include/svx/ParseContext.hxx
+++ b/include/svx/ParseContext.hxx
@@ -31,11 +31,12 @@ namespace svxform
 
 //= OSystemParseContext
 
-class SAL_DLLPUBLIC_RTTI OSystemParseContext final : public 
::connectivity::IParseContext
+class SAL_DLLPUBLIC_RTTI OSystemParseContext : public 
::connectivity::IParseContext
 {
-private:
+protected:
 
 ::std::vector< OUString > m_aLocalizedKeywords;
+OSystemParseContext(bool bInit);
 
 public:
 SVXCORE_DLLPUBLIC OSystemParseContext();
@@ -57,6 +58,12 @@ namespace svxform
 
 };
 
+class SAL_DLLPUBLIC_RTTI ONeutralParseContext final : public 
OSystemParseContext
+{
+public:
+SVXCORE_DLLPUBLIC ONeutralParseContext();
+SVXCORE_DLLPUBLIC virtual ~ONeutralParseContext();
+};
 
 //= OParseContextClient
 
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 63634179142e..d231bfb3cd52 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -41,6 +41,11 @@ OSystemParseContext::OSystemParseContext()
 m_aLocalizedKeywords.push_back(SvxResId(RID_RSC_SQL_INTERNATIONAL[i]));
 }
 
+OSystemParseContext::OSystemParseContext(bool /*bInit*/)
+: IParseContext()
+{
+}
+
 OSystemParseContext::~OSystemParseContext()
 {
 }
@@ -140,6 +145,17 @@ IParseContext::InternationalKeyCode 
OSystemParseContext::getIntlKeyCode(const OS
 return InternationalKeyCode::None;
 }
 
+ONeutralParseContext::ONeutralParseContext()
+: OSystemParseContext(false)
+{
+std::locale aLocale = Translate::Create("svx", LanguageTag("en-US"));
+for (size_t i = 0; i < SAL_N_ELEMENTS(RID_RSC_SQL_INTERNATIONAL); ++i)
+
m_aLocalizedKeywords.push_back(Translate::get(RID_RSC_SQL_INTERNATIONAL[i], 
aLocale));
+}
+
+ONeutralParseContext::~ONeutralParseContext()
+{
+}
 
 namespace
 {


[Libreoffice-commits] core.git: include/svx svx/source

2023-08-30 Thread Miklos Vajna (via logerrit)
 include/svx/svdglue.hxx   |   72 +-
 svx/source/svdraw/svdglue.cxx |   70 
 2 files changed, 71 insertions(+), 71 deletions(-)

New commits:
commit 9e53afb9cad0e6ed66904ac38b61d1450e12f01d
Author: Miklos Vajna 
AuthorDate: Wed Aug 30 08:29:58 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Aug 30 09:16:48 2023 +0200

svx: prefix members of SdrGluePoint

See tdf#94879 for motivation.

Change-Id: I1f1abdf5c522306a5d897250afdb99221e5609f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156274
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
index 3c70ebeac3c4..acdebd0bf4ea 100644
--- a/include/svx/svdglue.hxx
+++ b/include/svx/svdglue.hxx
@@ -68,62 +68,62 @@ class SVXCORE_DLLPUBLIC SdrGluePoint {
 // Reference Point is SdrObject::GetSnapRect().Center()
 // bNoPercent=false: position is -5000..5000 (1/100)% or 0..1 
(depending on align)
 // bNoPercent=true : position is in log unit, relative to the reference 
point
-PointaPos;
-SdrEscapeDirection nEscDir;
-sal_uInt16   nId;
-SdrAlign nAlign;
-bool bNoPercent:1;
-bool bReallyAbsolute:1; // temp for transformations on the reference object
-bool bUserDefined:1; // #i38892#
+Pointm_aPos;
+SdrEscapeDirection m_nEscDir;
+sal_uInt16   m_nId;
+SdrAlign m_nAlign;
+bool m_bNoPercent:1;
+bool m_bReallyAbsolute:1; // temp for transformations on the reference 
object
+bool m_bUserDefined:1; // #i38892#
 public:
 SdrGluePoint()
-: nEscDir(SdrEscapeDirection::SMART)
-, nId(0)
-, nAlign(SdrAlign::NONE)
-, bNoPercent(false)
-, bReallyAbsolute(false)
-, bUserDefined(true)
+: m_nEscDir(SdrEscapeDirection::SMART)
+, m_nId(0)
+, m_nAlign(SdrAlign::NONE)
+, m_bNoPercent(false)
+, m_bReallyAbsolute(false)
+, m_bUserDefined(true)
 {}
 SdrGluePoint(const Point& rNewPos)
-: aPos(rNewPos)
-, nEscDir(SdrEscapeDirection::SMART)
-, nId(0)
-, nAlign(SdrAlign::NONE)
-, bNoPercent(false)
-, bReallyAbsolute(false)
-, bUserDefined(true)
+: m_aPos(rNewPos)
+, m_nEscDir(SdrEscapeDirection::SMART)
+, m_nId(0)
+, m_nAlign(SdrAlign::NONE)
+, m_bNoPercent(false)
+, m_bReallyAbsolute(false)
+, m_bUserDefined(true)
 {}
 const Point& GetPos() const
 {
-return aPos;
+return m_aPos;
 }
 void SetPos(const Point& rNewPos)
 {
-aPos = rNewPos;
+m_aPos = rNewPos;
 }
 SdrEscapeDirection GetEscDir() const
 {
-return nEscDir;
+return m_nEscDir;
 }
 void SetEscDir(SdrEscapeDirection nNewEsc)
 {
-nEscDir = nNewEsc;
+m_nEscDir = nNewEsc;
 }
 sal_uInt16   GetId() const
 {
-return nId;
+return m_nId;
 }
 void SetId(sal_uInt16 nNewId)
 {
-nId = nNewId;
+m_nId = nNewId;
 }
 bool IsPercent() const
 {
-return !bNoPercent;
+return !m_bNoPercent;
 }
 void SetPercent(bool bOn)
 {
-bNoPercent  = !bOn;
+m_bNoPercent  = !bOn;
 }
 // temp for transformations on the reference object
 void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
@@ -131,38 +131,38 @@ public:
 // #i38892#
 bool IsUserDefined() const
 {
-return bUserDefined;
+return m_bUserDefined;
 }
 void SetUserDefined(bool bNew)
 {
-bUserDefined = bNew;
+m_bUserDefined = bNew;
 }
 
 SdrAlign GetAlign() const
 {
-return nAlign;
+return m_nAlign;
 }
 void SetAlign(SdrAlign nAlg)
 {
-nAlign = nAlg;
+m_nAlign = nAlg;
 }
 SdrAlign GetHorzAlign() const
 {
-return nAlign & static_cast(0x00FF);
+return m_nAlign & static_cast(0x00FF);
 }
 void SetHorzAlign(SdrAlign nAlg)
 {
 assert((nAlg & static_cast(0xFF00)) == SdrAlign::NONE);
-nAlign = SdrAlign(nAlign & static_cast(0xFF00)) | (nAlg & 
static_cast(0x00FF));
+m_nAlign = SdrAlign(m_nAlign & static_cast(0xFF00)) | (nAlg 
& static_cast(0x00FF));
 }
 SdrAlign GetVertAlign() const
 {
-return nAlign & static_cast(0xFF00);
+return m_nAlign & static_cast(0xFF00);
 }
 void SetVertAlign(SdrAlign nAlg)
 {
 assert((nAlg & static_cast(0x00FF)) == SdrAlign::NONE);
-nAlign = SdrAlign(nAlign & static_cast(0x00FF)) | (nAlg & 
static_cast(0xFF00));
+m_nAlign = SdrAlign(m_nAlign & static_cast(0x00FF)) | (nAlg 
& static_cast(0xFF00));
 }
 
 bool IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* 
pObj) const;
diff --git a/svx/source/svdraw/svdglue.cxx 

[Libreoffice-commits] core.git: include/svx svx/source

2023-08-28 Thread Szymon Kłos (via logerrit)
 include/svx/dialog/ThemeDialog.hxx |3 ++-
 svx/source/dialog/ThemeDialog.cxx  |   19 ++-
 2 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 5733cdba90b099637805648b193510268def74be
Author: Szymon Kłos 
AuthorDate: Tue Aug 15 12:31:22 2023 +0200
Commit: Szymon Kłos 
CommitDate: Mon Aug 28 08:47:55 2023 +0200

Theme dialog: fix crash when closing parent first

When we have 'Add' subdialog opened and we close parent
by clicking 'cancel' - subdialog wasn't closed and we had
a crash on next interaction with 'Add' subdialog

Change-Id: I5865a725e93d7c11aa933b7566a7c584018740ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155715
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gülşah Köse 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156157
Tested-by: Jenkins

diff --git a/include/svx/dialog/ThemeDialog.hxx 
b/include/svx/dialog/ThemeDialog.hxx
index 7003fdebf168..9536bdb38d84 100644
--- a/include/svx/dialog/ThemeDialog.hxx
+++ b/include/svx/dialog/ThemeDialog.hxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -30,7 +31,7 @@ class SVX_DLLPUBLIC ThemeDialog final : public 
weld::GenericDialogController
 private:
 weld::Window* mpWindow;
 model::Theme* mpTheme;
-bool mxSubDialog;
+std::shared_ptr mxSubDialog;
 std::vector maColorSets;
 
 std::unique_ptr mxValueSetThemeColors;
diff --git a/svx/source/dialog/ThemeDialog.cxx 
b/svx/source/dialog/ThemeDialog.cxx
index 99e7c3ad466e..e3a206be6cab 100644
--- a/svx/source/dialog/ThemeDialog.cxx
+++ b/svx/source/dialog/ThemeDialog.cxx
@@ -8,7 +8,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -22,7 +21,6 @@ ThemeDialog::ThemeDialog(weld::Window* pParent, model::Theme* 
pTheme)
 : GenericDialogController(pParent, "svx/ui/themedialog.ui", "ThemeDialog")
 , mpWindow(pParent)
 , mpTheme(pTheme)
-, mxSubDialog(false)
 , mxValueSetThemeColors(new svx::ThemeColorValueSet)
 , mxValueSetThemeColorsWindow(
   new weld::CustomWeld(*m_xBuilder, "valueset_theme_colors", 
*mxValueSetThemeColors))
@@ -45,7 +43,11 @@ ThemeDialog::ThemeDialog(weld::Window* pParent, 
model::Theme* pTheme)
 }
 }
 
-ThemeDialog::~ThemeDialog() = default;
+ThemeDialog::~ThemeDialog()
+{
+if (mxSubDialog)
+mxSubDialog->response(RET_CANCEL);
+}
 
 void ThemeDialog::initColorSets()
 {
@@ -89,17 +91,16 @@ void ThemeDialog::runThemeColorEditDialog()
 if (mxSubDialog)
 return;
 
-auto pDialog = std::make_shared(mpWindow, 
*mpCurrentColorSet);
-std::shared_ptr xKeepAlive(shared_from_this());
+mxSubDialog = std::make_shared(mpWindow, 
*mpCurrentColorSet);
 
-mxSubDialog = weld::DialogController::runAsync(pDialog, [this, 
pDialog](sal_uInt32 nResult) {
+weld::DialogController::runAsync(mxSubDialog, [this](sal_uInt32 nResult) {
 if (nResult != RET_OK)
 {
 mxAdd->set_sensitive(true);
-mxSubDialog = false;
+mxSubDialog = nullptr;
 return;
 }
-auto aColorSet = pDialog->getColorSet();
+auto aColorSet = mxSubDialog->getColorSet();
 if (!aColorSet.getName().isEmpty())
 {
 ColorSets::get().insert(aColorSet, 
ColorSets::IdenticalNameAction::AutoRename);
@@ -113,7 +114,7 @@ void ThemeDialog::runThemeColorEditDialog()
 = 
std::make_shared(maColorSets[maColorSets.size() - 1]);
 }
 mxAdd->set_sensitive(true);
-mxSubDialog = false;
+mxSubDialog = nullptr;
 });
 }
 


  1   2   3   4   5   6   7   8   9   10   >