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

2023-04-19 Thread Caolán McNamara (via logerrit)
 include/svx/svdoole2.hxx  |   17 
 include/svx/unoshape.hxx  |2 
 sc/source/ui/docshell/documentlinkmgr.cxx |9 ++
 svx/source/svdraw/svdoole2.cxx|  104 --
 svx/source/unodraw/shapeimpl.hxx  |5 +
 svx/source/unodraw/unoshap4.cxx   |   18 -
 xmloff/source/draw/ximpshap.cxx   |   16 
 7 files changed, 147 insertions(+), 24 deletions(-)

New commits:
commit 07179a5a5bd00f34acfa8a3f260dd834ae003c63
Author: Caolán McNamara 
AuthorDate: Tue Apr 18 09:00:42 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Apr 19 11:03:21 2023 +0200

add a route to get calc Floating Frame links under 'manage links'

much harder than writer because the organization and ordering
of properties and object activation etc is different.

This ended up ugly, but functions.

We set FrameURL before AddShape, we have to do it again later because it
gets cleared when the SdrOle2Obj is attached to the XShape.  But we want
FrameURL to exist when AddShape triggers SetPersistName which itself
triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to
know what URL will end up being used. So bodge this by setting FrameURL
to the temp pre-SdrOle2Obj attached properties and we can smuggle it
eventually into SdrOle2Obj::SetPersistName at the right point after
PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called
in order to inform the link manager that this is an IFrame that links to
a URL

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

diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 4bbe38e451d5..444c12348226 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -42,6 +42,7 @@ namespace io { class XInputStream; }
 namespace svt { class EmbeddedObjectRef; }
 
 class SdrOle2ObjImpl;
+class SvxOle2Shape;
 
 class SVXCORE_DLLPUBLIC SdrOle2Obj : public SdrRectObj
 {
@@ -49,7 +50,7 @@ private:
 std::unique_ptr mpImpl;
 
 private:
-SVX_DLLPRIVATE void Connect_Impl();
+SVX_DLLPRIVATE void Connect_Impl(SvxOle2Shape* pCreator = nullptr);
 SVX_DLLPRIVATE void Disconnect_Impl();
 SVX_DLLPRIVATE void AddListeners_Impl();
 SVX_DLLPRIVATE void RemoveListeners_Impl();
@@ -107,7 +108,7 @@ public:
 // OLE object has got a separate PersistName member now;
 // !!! use ::SetPersistName( ... ) only, if you know what you do !!!
 const OUString& GetPersistName() const;
-voidSetPersistName( const OUString& rPersistName );
+voidSetPersistName( const OUString& rPersistName, SvxOle2Shape* 
pCreator = nullptr );
 
 // One can add an application name to a SdrOle2Obj, which can be queried 
for
 // later on (SD needs this for presentation objects).
@@ -152,7 +153,7 @@ public:
  sal_Int64 nAspect );
 static bool Unload( const css::uno::Reference< css::embed::XEmbeddedObject 
>& xObj, sal_Int64 nAspect );
 bool Unload();
-void Connect();
+void Connect(SvxOle2Shape* pCreator = nullptr);
 void Disconnect();
 void ObjectLoaded();
 
@@ -199,4 +200,14 @@ public:
 voidConnect() { GetRealObject(); }
 };
 
+class SVXCORE_DLLPUBLIC SdrIFrameLink final : public sfx2::SvBaseLink
+{
+SdrOle2Obj* m_pObject;
+
+public:
+explicit SdrIFrameLink(SdrOle2Obj* pObject);
+virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+const OUString& rMimeType, const css::uno::Any & rValue ) override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index e2a5d47e22be..654c60bb3c5e 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -606,6 +606,8 @@ public:
 bool createObject( const SvGlobalName  );
 
 void createLink( const OUString& aLinkURL );
+
+virtual OUString GetAndClearInitialFrameURL();
 };
 
 
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx 
b/sc/source/ui/docshell/documentlinkmgr.cxx
index 3652df5cca0a..79a86d08b438 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -144,7 +144,7 @@ bool DocumentLinkManager::hasDdeOrOleOrWebServiceLinks(bool 
bDde, bool bOle, boo
 sfx2::SvBaseLink* pBase = rLink.get();
 if (bDde && dynamic_cast(pBase))
 return true;
-if (bOle && dynamic_cast(pBase))
+if (bOle && (dynamic_cast(pBase) || 
dynamic_cast(pBase)))
 return true;
 if (bWebService && dynamic_cast(pBase))
 return true;
@@ -175,6 +175,13 @@ bool 
DocumentLinkManager::updateDdeOrOleOrWebServiceLinks(weld::Window* pWin)
 continue;
 }
 
+SdrIFrameLink* pIFrameLink = 

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

2022-02-21 Thread Luboš Luňák (via logerrit)
 include/svx/svdpage.hxx |8 
 sc/source/core/data/segmenttree.cxx |5 ++---
 svx/source/svdraw/svdpage.cxx   |4 ++--
 3 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit db345bee733fee8c7157c246979bed2c65799507
Author: Luboš Luňák 
AuthorDate: Mon Feb 21 16:42:24 2022 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 21 19:35:33 2022 +0100

use 64bit for window sizes (tdf#147458)

Change-Id: Iaa240aeae8bacbff6bccd9bf0721a02414b6f47d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130288
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 83c0592f060e..2ba7017a01a3 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -411,8 +411,8 @@ private:
 SdrModel&   mrSdrModelFromSdrPage;
 
 private:
-sal_Int32 mnWidth;   // page size
-sal_Int32 mnHeight;  // page size
+tools::Long mnWidth;   // page size
+tools::Long mnHeight;  // page size
 sal_Int32 mnBorderLeft;  // left page margin
 sal_Int32 mnBorderUpper; // top page margin
 sal_Int32 mnBorderRight; // right page margin
@@ -477,8 +477,8 @@ public:
 Size GetSize() const;
 virtual void SetOrientation(Orientation eOri);
 virtual Orientation GetOrientation() const;
-sal_Int32 GetWidth() const;
-sal_Int32 GetHeight() const;
+tools::Long GetWidth() const;
+tools::Long GetHeight() const;
 virtual void  SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, 
sal_Int32 Lwr);
 virtual void  SetLeftBorder(sal_Int32 nBorder);
 virtual void  SetUpperBorder(sal_Int32 nBorder);
diff --git a/sc/source/core/data/segmenttree.cxx 
b/sc/source/core/data/segmenttree.cxx
index a71e310ab641..aa10d32544cb 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -50,7 +50,7 @@ public:
 bool setValue(SCCOLROW nPos1, SCCOLROW nPos2, ValueType nValue);
 void setValueIf(SCCOLROW nPos1, SCCOLROW nPos2, ValueType nValue, const 
std::function& rPredicate);
 ValueType getValue(SCCOLROW nPos);
-ExtValueType getSumValue(SCCOLROW nPos1, SCCOLROW nPos2);
+sal_uInt64 getSumValue(SCCOLROW nPos1, SCCOLROW nPos2);
 bool getRangeData(SCCOLROW nPos, RangeData& rData);
 bool getRangeDataLeaf(SCCOLROW nPos, RangeData& rData);
 void removeSegment(SCCOLROW nPos1, SCCOLROW nPos2);
@@ -144,8 +144,7 @@ typename ScFlatSegmentsImpl::ValueType ScFlatSegments
 }
 
 template
-typename ScFlatSegmentsImpl::ExtValueType
-ScFlatSegmentsImpl::getSumValue(SCCOLROW nPos1, 
SCCOLROW nPos2)
+sal_uInt64 ScFlatSegmentsImpl::getSumValue(SCCOLROW 
nPos1, SCCOLROW nPos2)
 {
 if (mbTreeSearchEnabled)
 {
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 536167b04e56..b66ed3433d18 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1447,7 +1447,7 @@ Size SdrPage::GetSize() const
 return Size(mnWidth,mnHeight);
 }
 
-sal_Int32 SdrPage::GetWidth() const
+tools::Long SdrPage::GetWidth() const
 {
 return mnWidth;
 }
@@ -1473,7 +1473,7 @@ Orientation SdrPage::GetOrientation() const
 return eRet;
 }
 
-sal_Int32 SdrPage::GetHeight() const
+tools::Long SdrPage::GetHeight() const
 {
 return mnHeight;
 }


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

2022-02-02 Thread Dennis Francis (via logerrit)
 include/svx/svdmrkv.hxx |6 ++
 sc/source/ui/unoobj/docuno.cxx  |6 ++
 sc/source/ui/view/drawvie3.cxx  |2 ++
 sc/source/ui/view/gridwin4.cxx  |2 ++
 svx/source/svdraw/sdrpagewindow.cxx |   13 +
 svx/source/svdraw/svdmrkv.cxx   |9 +
 6 files changed, 34 insertions(+), 4 deletions(-)

New commits:
commit 2c250e8f5007e756afb794944f0be791e2d535f4
Author: Dennis Francis 
AuthorDate: Mon Dec 6 13:42:27 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Feb 2 10:10:07 2022 +0100

lokCalcRTL: shapes: do not send negative(X) invalidations

LOK client expects tile invalidations in positive document coordinates
irrespective of RTL flags.

For this introduce a flag mbNegativeX in svx class SdrMarkView to
indicate the case when all x coordinates are negated (this happens only
for the LOK + Calc + RTL mode). Use this flag to counter negate the
x coordinates before sending invalidation rectangles.

Conflicts:
sc/source/ui/view/drawvie3.cxx

Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951
(cherry picked from commit 5e37acbaaa0b0891829907331ecacd2d3b67526d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129195
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index d4ece164bece..ec9055711c3f 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -130,6 +130,9 @@ protected:
 // flag to completely disable handles at the view
 boolmbMarkHandlesHidden : 1;
 
+// flag indicating whether all x coordinates are negated or not
+boolmbNegativeX : 1;
+
 // Helper to get a possible GridOffset from SdrObject
 bool getPossibleGridOffsetForSdrObject(
 basegfx::B2DVector& rOffset,
@@ -240,6 +243,9 @@ public:
 
 bool HasMarkableObj() const { return MarkableObjectsExceed(0); };
 
+/// whether all x coordinates in use are negated or not
+void SetNegativeX(bool bOn) { mbNegativeX = bOn; }
+bool IsNegativeX() const { return mbNegativeX; }
 
 // migrate selections
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 80ac5e29db7e..2525b360d1a3 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -578,7 +578,13 @@ void ScModelObj::setPart( int nPart, bool 
/*bAllowChangeFocus*/ )
 ScTabView* pTabView = pViewData->GetView();
 
 if (pTabView)
+{
+if (SdrView* pDrawView = pViewData->GetViewShell()->GetScDrawView())
+pDrawView->SetNegativeX(comphelper::LibreOfficeKit::isActive() &&
+pViewData->GetDocument().IsLayoutRTL(nPart));
+
 pTabView->SelectTabPage(nPart + 1);
+}
 }
 
 int ScModelObj::getParts()
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 88c74b442bfe..ce4d132b87e4 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -49,6 +50,7 @@ ScDrawView::ScDrawView(
 pDropMarkObj( nullptr ),
 bInConstruct( true )
 {
+SetNegativeX(comphelper::LibreOfficeKit::isActive() && 
rDoc.IsLayoutRTL(nTab));
 // #i73602# Use default from the configuration
 SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_Calc());
 
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 5a21738bb9c3..42ce441e53d1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1609,6 +1609,8 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
 new FmFormView(
 *pModel,
 ));
+
+mpLOKDrawView->SetNegativeX(bLayoutRTL);
 mpLOKDrawView->ShowSdrPage(mpLOKDrawView->GetModel()->GetPage(nTab));
 aOutputData.SetDrawView(mpLOKDrawView.get());
 aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get());
diff --git a/svx/source/svdraw/sdrpagewindow.cxx 
b/svx/source/svdraw/sdrpagewindow.cxx
index aeb337d7a8e5..5facfc45d237 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -430,7 +430,8 @@ void SdrPageWindow::RedrawLayer(const SdrLayerID* pId,
 // Invalidate call, used from ObjectContact(OfPageView) in 
InvalidatePartOfView(...)
 void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
 {
-if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow())
+bool bLOKActive = comphelper::LibreOfficeKit::isActive();
+if (!bLOKActive && GetPageView().IsVisible() && 
GetPaintWindow().OutputToWindow())
 {
 OutputDevice& rWindow(GetPaintWindow().GetOutputDevice());
 basegfx::B2DRange aDiscreteRange(rRange);
@@ -454,15 +455,19 @@ void SdrPageWindow::InvalidatePageWindow(const 
basegfx::B2DRange& rRange)
 

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

2021-09-09 Thread Caolán McNamara (via logerrit)
 include/svx/weldeditview.hxx   |1 +
 sc/source/ui/app/inputwin.cxx  |7 ++-
 sc/source/ui/inc/inputwin.hxx  |1 +
 svx/source/dialog/weldeditview.cxx |4 +++-
 4 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit c36fff84afb7eaa05fa065e15009c9426a5af44e
Author: Caolán McNamara 
AuthorDate: Thu Sep 9 10:15:01 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 9 12:41:59 2021 +0200

Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possible

the expectations are that this isn't possible and if it happens then
under windows there is a QueryCharPosition which will trigger the
deletion of the ScTextWnd EditView due to that expectation before it is
then unconditionally dereferenced

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

diff --git a/include/svx/weldeditview.hxx b/include/svx/weldeditview.hxx
index 4593d0ecf26a..004be7b609fb 100644
--- a/include/svx/weldeditview.hxx
+++ b/include/svx/weldeditview.hxx
@@ -68,6 +68,7 @@ public:
 virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
 virtual bool KeyInput(const KeyEvent& rKEvt) override;
 virtual bool Command(const CommandEvent& rCEvt) override;
+virtual bool CanFocus() const;
 virtual void GetFocus() override;
 virtual void LoseFocus() override;
 virtual void Resize() override;
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 76e57e1833ca..1a0bcc828767 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1639,12 +1639,17 @@ bool ScTextWnd::MouseMove( const MouseEvent& rMEvt )
 return m_xEditView && m_xEditView->MouseMove(rMEvt);
 }
 
+bool ScTextWnd::CanFocus() const
+{
+return SC_MOD()->IsEditMode();
+}
+
 bool ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt )
 {
 if (!HasFocus())
 {
 StartEditEngine();
-if ( SC_MOD()->IsEditMode() )
+if (CanFocus())
 TextGrabFocus();
 }
 
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 20991ac85908..86cc6594910c 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -120,6 +120,7 @@ protected:
 virtual boolMouseButtonUp( const MouseEvent& rMEvt ) override;
 virtual boolCommand( const CommandEvent& rCEvt ) override;
 virtual boolKeyInput(const KeyEvent& rKEvt) override;
+virtual boolCanFocus() const override;
 virtual voidGetFocus() override;
 
 virtual boolStartDrag() override;
diff --git a/svx/source/dialog/weldeditview.cxx 
b/svx/source/dialog/weldeditview.cxx
index 8a7a9f58c225..a0f5e5e1cd03 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -259,7 +259,7 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt)
 if (!IsMouseCaptured())
 CaptureMouse();
 
-if (!HasFocus())
+if (!HasFocus() && CanFocus())
 {
 GrabFocus();
 GetFocus();
@@ -1629,6 +1629,8 @@ void WeldEditView::LoseFocus()
 }
 }
 
+bool WeldEditView::CanFocus() const { return true; }
+
 css::uno::Reference 
WeldEditView::GetDropTarget()
 {
 if (!m_xDropTarget)


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

2021-06-19 Thread Tomaž Vajngerl (via logerrit)
 include/svx/svdotable.hxx   |2 
 include/svx/svdotext.hxx|  108 -
 sc/source/filter/html/htmlexp2.cxx  |2 
 svx/source/sdr/properties/customshapeproperties.cxx |6 
 svx/source/svdraw/svdoashp.cxx  |   84 +++
 svx/source/svdraw/svdocirc.cxx  |   85 ---
 svx/source/svdraw/svdograf.cxx  |   20 -
 svx/source/svdraw/svdomeas.cxx  |   18 -
 svx/source/svdraw/svdopath.cxx  |   44 +--
 svx/source/svdraw/svdorect.cxx  |   59 ++---
 svx/source/svdraw/svdotext.cxx  |  222 ++--
 svx/source/svdraw/svdotxat.cxx  |   24 +-
 svx/source/svdraw/svdotxdr.cxx  |   20 -
 svx/source/svdraw/svdotxed.cxx  |   30 +-
 svx/source/svdraw/svdotxln.cxx  |   56 ++---
 svx/source/svdraw/svdotxtr.cxx  |   78 +++
 svx/source/svdraw/svdouno.cxx   |   14 -
 svx/source/svdraw/textchainflow.cxx |4 
 svx/source/table/svdotable.cxx  |   32 +-
 svx/source/unodraw/unoshap2.cxx |2 
 20 files changed, 456 insertions(+), 454 deletions(-)

New commits:
commit e6cb7f9ab25bca32dc85aef8ff127e070cd109b6
Author: Tomaž Vajngerl 
AuthorDate: Tue Jun 15 23:57:58 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Jun 19 11:12:03 2021 +0200

svx: prefix member variables for SdrTextObj and others

All classes in svdotext.hxx

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

diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index a85bfa6e507a..5d006fe6c3f7 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -177,7 +177,7 @@ public:
 // #i121917#
 virtual bool HasText() const override;
 
-bool IsTextEditActive() const { return (pEdtOutl != nullptr); }
+bool IsTextEditActive() const { return mpEdtOutl != nullptr; }
 bool IsTextEditActive( const sdr::table::CellPos& rPos );
 
 /** Returns true only if we are in edit mode and the user actually changed 
anything */
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index d5c981d632db..210839c179e4 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -37,7 +37,6 @@
 
 //   forward declarations
 
-
 class OutlinerParaObject;
 class OverflowingText;
 class SdrOutliner;
@@ -82,36 +81,29 @@ namespace sdr::table {
 
 
 //   Defines
-
-
 constexpr const sal_uInt16 SDRUSERDATA_OBJTEXTLINK = 1;
 
 
 //   helper class SdrTextObjGeoData
-
-
 class SdrTextObjGeoData : public SdrObjGeoData
 {
 public:
-tools::Rectangle aRect;
-GeoStat aGeo;
+tools::Rectangle maRect;
+GeoStat maGeo;
 };
 
 
 //   helper class ImpSdrObjTextLinkUserData
-
-
 class ImpSdrObjTextLinkUserData final : public SdrObjUserData
 {
-friend classSdrTextObj;
-friend classImpSdrObjTextLink;
+friend class SdrTextObj;
+friend class ImpSdrObjTextLink;
 
-OUStringaFileName;   // name of the referenced document
-OUStringaFilterName; // a filter, if need be
-DateTimeaFileDate0;  // avoiding unnecessary reload
-tools::SvRef
-pLink;
-rtl_TextEncodingeCharSet;
+OUString maFileName;   // name of the referenced document
+OUString maFilterName; // a filter, if need be
+DateTime maFileDate0;  // avoiding unnecessary reload
+tools::SvRef mpLink;
+rtl_TextEncoding meCharSet;
 
 public:
 ImpSdrObjTextLinkUserData();
@@ -134,12 +126,12 @@ class SVXCORE_DLLPUBLIC SdrTextObj : public SdrAttrObj, 
public svx::ITextProvide
 {
 private:
 // Cell needs access to ImpGetDrawOutliner();
-friend classsdr::table::Cell;
-friend classsdr::table::SdrTableRtfExporter;
-friend classsdr::table::SdrTableRTFParser;
-friend classTextChain;
-friend classTextChainFlow;
-friend classEditingTextChainFlow;
+friend class sdr::table::Cell;
+friend class sdr::table::SdrTableRtfExporter;
+friend class sdr::table::SdrTableRTFParser;
+friend class TextChain;
+friend class TextChainFlow;
+friend class EditingTextChainFlow;
 
 // CustomShapeproperties need to access the "bTextFrame" member:
 friend class sdr::properties::CustomShapeProperties;
@@ -152,7 +144,7 @@ private:
 // This method is only allowed for sdr::properties::TextProperties
 SVX_DLLPRIVATE SdrOutliner* GetTextEditOutliner() const
 {
-return pEdtOutl;
+return mpEdtOutl;
 }
 

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

2021-02-08 Thread Noel Grandin (via logerrit)
 include/svx/obj3d.hxx|2 +-
 include/svx/scene3d.hxx  |2 +-
 include/svx/svdoashp.hxx |2 +-
 include/svx/svdobj.hxx   |7 +++
 include/svx/svdocapt.hxx |2 +-
 include/svx/svdocirc.hxx |2 +-
 include/svx/svdoedge.hxx |2 +-
 include/svx/svdograf.hxx |2 +-
 include/svx/svdomeas.hxx |2 +-
 include/svx/svdopath.hxx |2 +-
 include/svx/svdotable.hxx|2 +-
 include/svx/svdotext.hxx |2 +-
 include/svx/svdovirt.hxx |4 ++--
 sc/source/filter/html/htmlexp2.cxx   |2 +-
 sc/source/filter/xml/xmlexprt.cxx|2 +-
 svx/source/engine3d/obj3d.cxx|4 ++--
 svx/source/engine3d/scene3d.cxx  |4 ++--
 svx/source/sdr/misc/ImageMapInfo.cxx |2 +-
 svx/source/svdraw/svdoashp.cxx   |4 ++--
 svx/source/svdraw/svdobj.cxx |8 
 svx/source/svdraw/svdocapt.cxx   |4 ++--
 svx/source/svdraw/svdocirc.cxx   |4 ++--
 svx/source/svdraw/svdoedge.cxx   |4 ++--
 svx/source/svdraw/svdograf.cxx   |4 ++--
 svx/source/svdraw/svdomeas.cxx   |4 ++--
 svx/source/svdraw/svdopath.cxx   |4 ++--
 svx/source/svdraw/svdotext.cxx   |4 ++--
 svx/source/svdraw/svdovirt.cxx   |4 ++--
 svx/source/svdraw/svdundo.cxx|6 +++---
 svx/source/table/svdotable.cxx   |4 ++--
 30 files changed, 50 insertions(+), 51 deletions(-)

New commits:
commit 80ad69dc67fa0bfaf6f99cd0b5a458dcaaee6e33
Author: Noel Grandin 
AuthorDate: Mon Feb 8 14:54:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 9 07:41:46 2021 +0100

return by unique_ptr from NewGeoData

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

diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index e786cbbfbcbd..4455711779af 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -127,7 +127,7 @@ public:
 virtual E3dObject* CloneSdrObject(SdrModel& rTargetModel) const override;
 E3dObject& operator=( const E3dObject& rObj );
 
-virtual SdrObjGeoData *NewGeoData() const override;
+virtual std::unique_ptr NewGeoData() const override;
 virtual void  SaveGeoData(SdrObjGeoData& rGeo) const override;
 virtual void  RestGeoData(const SdrObjGeoData& rGeo) override;
 
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index 13d4157d3449..680cd0717d84 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -130,7 +130,7 @@ public:
 virtual E3dScene* CloneSdrObject(SdrModel& rTargetModel) const override;
 E3dScene& operator=(const E3dScene&);
 
-virtual SdrObjGeoData *NewGeoData() const override;
+virtual std::unique_ptr NewGeoData() const override;
 virtual void  SaveGeoData(SdrObjGeoData& rGeo) const override;
 virtual void  RestGeoData(const SdrObjGeoData& rGeo) override;
 
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 070cb2111dfd..e73ecf58ac97 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -228,7 +228,7 @@ public:
 // react on model/page change
 virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) 
override;
 
-virtual SdrObjGeoData *NewGeoData() const override;
+virtual std::unique_ptr NewGeoData() const override;
 virtual void SaveGeoData(SdrObjGeoData ) const override;
 virtual void RestGeoData(const SdrObjGeoData ) override;
 
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index a944345eac99..bf70559ebdf4 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -172,7 +171,7 @@ public:
 /**
  * All geometrical data of an arbitrary object for use in undo/redo
  */
-class SAL_DLLPUBLIC_RTTI SdrObjGeoData
+class SVXCORE_DLLPUBLIC SdrObjGeoData
 {
 public:
 tools::Rectangle   aBoundRect;
@@ -600,7 +599,7 @@ public:
 virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
 
 // get all geometrical data for undo/redo
-virtual SdrObjGeoData* GetGeoData() const;
+virtual std::unique_ptr GetGeoData() const;
 virtual void SetGeoData(const SdrObjGeoData& rGeo);
 
 // ItemSet access
@@ -920,7 +919,7 @@ protected:
 /// data that must be saved for Undo.
 /// NewGeoData() creates an empty instance of a class derived from
 /// SdrObjGeoData.
-virtual SdrObjGeoData* NewGeoData() const;
+virtual std::unique_ptr NewGeoData() const;
 virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
 virtual void RestGeoData(const SdrObjGeoData& rGeo);
 
diff --git a/include/svx/svdocapt.hxx 

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

2020-06-17 Thread Caolán McNamara (via logerrit)
 include/svx/srchdlg.hxx|7 +++
 sc/source/ui/dialogs/searchresults.cxx |2 +-
 svx/source/dialog/srchdlg.cxx  |   17 +
 3 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 9da14cf5461a1883718da9f92e03dd0dd6e28efd
Author: Caolán McNamara 
AuthorDate: Tue Jun 16 21:37:46 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 17 15:55:53 2020 +0200

tdf#133807 re-present search dialog after a short timeout

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

diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 6b45e838dcf9..8982e4d37a2b 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -132,8 +133,12 @@ public:
 
 void SetSearchLabel(const OUString& rStr);
 
+// bring this window back to the foreground
+void Present();
+
 private:
 SfxBindings&rBindings;
+Timer   m_aPresentIdle;
 boolbWriter;
 boolbSearch;
 boolbFormat;
@@ -255,6 +260,8 @@ private:
 SVX_DLLPRIVATE bool IsOtherOptionsExpanded() const;
 
 SVX_DLLPRIVATE short executeSubDialog(VclAbstractDialog * dialog);
+
+DECL_DLLPRIVATE_LINK(PresentTimeoutHdl_Impl, Timer*, void);
 };
 
 #endif
diff --git a/sc/source/ui/dialogs/searchresults.cxx 
b/sc/source/ui/dialogs/searchresults.cxx
index b1b0e45aec5f..950726a18c4e 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -55,7 +55,7 @@ SearchResultsDlg::~SearchResultsDlg()
 SvxSearchDialog* pSearchDlg = 
static_cast(pChildWindow->GetController().get());
 if (!pSearchDlg)
 return;
-pSearchDlg->getDialog()->present();
+pSearchDlg->Present();
 }
 
 namespace
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index adab6f86b642..6653be858078 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -255,6 +255,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 : SfxModelessDialogController(, pChildWin, pParent,
   "svx/ui/findreplacedialog.ui", 
"FindReplaceDialog")
 , rBindings(rBind)
+, m_aPresentIdle("Bring SvxSearchDialog to Foreground")
 , bWriter(false)
 , bSearch(true)
 , bFormat(false)
@@ -312,6 +313,9 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 , m_xAllSheetsCB(m_xBuilder->weld_check_button("allsheets"))
 , m_xCalcStrFT(m_xBuilder->weld_label("entirecells"))
 {
+m_aPresentIdle.SetTimeout(50);
+m_aPresentIdle.SetInvokeHandler(LINK(this, SvxSearchDialog, 
PresentTimeoutHdl_Impl));
+
 m_xSearchTmplLB->make_sorted();
 m_xSearchAttrText->hide();
 m_xSearchLabel->show();
@@ -338,6 +342,18 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 Construct_Impl();
 }
 
+IMPL_LINK_NOARG(SvxSearchDialog, PresentTimeoutHdl_Impl, Timer*, void)
+{
+getDialog()->present();
+}
+
+void SvxSearchDialog::Present()
+{
+PresentTimeoutHdl_Impl(nullptr);
+// tdf#133807 try again in a short timeout
+m_aPresentIdle.Start();
+}
+
 void SvxSearchDialog::ChildWinDispose()
 {
 rBindings.EnterRegistrations();
@@ -350,6 +366,7 @@ void SvxSearchDialog::ChildWinDispose()
 
 SvxSearchDialog::~SvxSearchDialog()
 {
+m_aPresentIdle.Stop();
 }
 
 void SvxSearchDialog::Construct_Impl()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-11 Thread Caolán McNamara (via logerrit)
 include/svx/ctredlin.hxx   |5 -
 sc/source/ui/miscdlgs/acredlin.cxx |6 ++
 svx/source/dialog/ctredlin.cxx |   13 -
 3 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 7c201f2e961d6eefdcaf410edc2499112df3896b
Author: Caolán McNamara 
AuthorDate: Sat Jan 11 17:09:10 2020 +
Commit: Caolán McNamara 
CommitDate: Sat Jan 11 20:32:36 2020 +0100

Resolves: tdf#129763 resize to request happening on every activate

even though the state remains the same, so only do the resize
if the EnableClearFormatButton[All] state changes.

also change the default to off, which is what writer typically
set it to, and make calc the one that enables it explicitly. Its
easier to grow a dialog than shrink a dialog.

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

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 91c95fa52454..55462c9dce28 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -262,6 +262,9 @@ private:
 bool bEnableRejectAll;
 bool bEnableUndo;
 
+bool bEnableClearFormat;
+bool bEnableClearFormatAll;
+
 weld::Window* m_pDialog;
 std::unique_ptr m_xAccept;
 std::unique_ptr m_xReject;
@@ -272,6 +275,7 @@ private:
 
 DECL_LINK( PbClickHdl, weld::Button&, void );
 
+voidEnableClearFormatButton(weld::Button&, bool bFlag);
 public:
 SvxTPView(weld::Container* pParent, weld::Window* pDialog, weld::Builder* 
pTopLevel);
 virtual ~SvxTPView() override;
@@ -282,7 +286,6 @@ public:
 voidEnableAcceptAll(bool bFlag);
 voidEnableReject(bool bFlag);
 voidEnableRejectAll(bool bFlag);
-voidEnableClearFormatButton(weld::Button&, bool bFlag);
 voidEnableClearFormat(bool bFlag);
 voidEnableClearFormatAll(bool bFlag);
 voidEnableUndo(bool bFlag=true);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 583733befb41..ba2edd3d554b 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -106,6 +106,12 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::Windo
 
 pTPFilter = m_xAcceptChgCtr->GetFilterPage();
 pTPView = m_xAcceptChgCtr->GetViewPage();
+
+// set wider window for the optional extending button labels
+// eg. "Reject/Clear formatting" instead of "Reject"
+pTPView->EnableClearFormat(true);
+pTPView->EnableClearFormatAll(true);
+
 pTheView = pTPView->GetTableControl();
 pTheView->SetCalcView();
 aSelectionIdle.SetInvokeHandler(LINK( this, ScAcceptChgDlg, 
UpdateSelectionHdl ));
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index f5defbb30ba8..15155c6c6edc 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -304,6 +304,8 @@ SvxTPView::SvxTPView(weld::Container* pParent, 
weld::Window* pDialog, weld::Buil
 , bEnableReject(true)
 , bEnableRejectAll(true)
 , bEnableUndo(true)
+, bEnableClearFormat(false)
+, bEnableClearFormatAll(false)
 , m_pDialog(pDialog)
 , m_xAccept(pTopLevel->weld_button("accept"))
 , m_xReject(pTopLevel->weld_button("reject"))
@@ -313,11 +315,6 @@ SvxTPView::SvxTPView(weld::Container* pParent, 
weld::Window* pDialog, weld::Buil
 , m_xViewData(new 
SvxRedlinTable(m_xBuilder->weld_tree_view("writerchanges"),
  
m_xBuilder->weld_tree_view("calcchanges")))
 {
-// set wider window for the optional extending button labels
-// eg. "Reject/Clear formatting" instead of "Reject"
-EnableClearFormat(true);
-EnableClearFormatAll(true);
-
 Size aControlSize(80, 65);
 m_xViewData->set_size_request(aControlSize.Width(), aControlSize.Height());
 
@@ -440,12 +437,18 @@ void SvxTPView::EnableClearFormatButton(weld::Button& 
rButton, bool bFlag)
 
 void SvxTPView::EnableClearFormat(bool bFlag)
 {
+if (bEnableClearFormat == bFlag)
+return;
 EnableClearFormatButton(*m_xReject, bFlag);
+bEnableClearFormat = bFlag;
 }
 
 void SvxTPView::EnableClearFormatAll(bool bFlag)
 {
+if (bEnableClearFormatAll == bFlag)
+return;
 EnableClearFormatButton(*m_xRejectAll, bFlag);
+bEnableClearFormatAll = bFlag;
 }
 
 void SvxTPView::ShowUndo()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-06-03 Thread Caolán McNamara (via logerrit)
 include/svx/ctredlin.hxx   |1 +
 sc/source/ui/miscdlgs/acredlin.cxx |2 +-
 svx/source/dialog/ctredlin.cxx |7 +++
 3 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit e620291e7ce0d7c63a4e23bfcce3fdbd54789469
Author: Caolán McNamara 
AuthorDate: Sun Jun 2 15:52:28 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jun 3 22:15:38 2019 +0200

Resolves: tdf#125589 we are initially unsorted

so turn on sorting on first sort request

Change-Id: I897f64c0695be8cca6d93e234a7d7c4718c94f78
Reviewed-on: https://gerrit.libreoffice.org/73344
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index b6ae656d586f..16147e60bd08 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -92,6 +92,7 @@ private:
 boolbAuthor;
 boolbDate;
 boolbComment;
+boolbSorted;
 SvxRedlinDateMode nDaTiMode;
 DateTimeaDaTiFirst;
 DateTimeaDaTiLast;
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index c04fa55f0b85..44d89d2669be 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1748,7 +1748,7 @@ int ScAcceptChgDlg::ColCompareHdl(const weld::TreeIter& 
rLeft, const weld::TreeI
 weld::TreeView& rTreeView = pTheView->GetWidget();
 
 sal_Int32 nCompare = 0;
-SCCOL nSortCol= rTreeView.get_sort_column();
+SCCOL nSortCol = rTreeView.get_sort_column();
 
 if (CALC_DATE == nSortCol)
 {
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 22595f923e2a..9cdfe60d40d5 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -83,6 +83,7 @@ 
SvxRedlinTable::SvxRedlinTable(std::unique_ptr xWriterControl,
 , bAuthor(false)
 , bDate(false)
 , bComment(false)
+, bSorted(false)
 , nDaTiMode(SvxRedlinDateMode::BEFORE)
 , aDaTiFirst( DateTime::EMPTY )
 , aDaTiLast( DateTime::EMPTY )
@@ -121,6 +122,12 @@ SvxRedlinTable::~SvxRedlinTable()
 
 IMPL_LINK(SvxRedlinTable, HeaderBarClick, int, nColumn, void)
 {
+if (!bSorted)
+{
+pTreeView->make_sorted();
+bSorted = true;
+}
+
 bool bSortAtoZ = pTreeView->get_sort_order();
 
 //set new arrow positions in headerbar
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-01-16 Thread Libreoffice Gerrit user
 include/svx/ctredlin.hxx   |6 +++---
 sc/source/ui/miscdlgs/acredlin.cxx |   24 +++-
 sc/source/ui/miscdlgs/conflictsdlg.cxx |   10 +-
 svx/source/dialog/ctredlin.cxx |   12 ++--
 sw/source/uibase/misc/redlndlg.cxx |8 
 5 files changed, 29 insertions(+), 31 deletions(-)

New commits:
commit 3c93d34caa79c37c41eab1d3212a7ff1cdf53d34
Author: Noel Grandin 
AuthorDate: Tue Jan 15 08:04:49 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Jan 16 11:54:38 2019 +0100

pass RedlinData around by unique_ptr

Change-Id: Ibe709e64b89e5e036e741203a14242f27df8c637
Reviewed-on: https://gerrit.libreoffice.org/66416
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 78eaed2ff4f2..e83b9eec7e0c 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -166,14 +166,14 @@ public:
 
 The rStr contains the entire redline entry; the columns are delimited 
by '\t'.
 */
-SvTreeListEntry* InsertEntry(const OUString , RedlinData *pUserData,
+SvTreeListEntry* InsertEntry(const OUString , 
std::unique_ptr pUserData,
  SvTreeListEntry* pParent = nullptr, sal_uLong 
nPos = TREELIST_APPEND);
 
 /** Insert a redline entry.
 
 The rStr contains the entire redline entry; the columns are delimited 
by '\t'.
 */
-SvTreeListEntry* InsertEntry(const OUString , RedlinData *pUserData, 
const Color&,
+SvTreeListEntry* InsertEntry(const OUString , 
std::unique_ptr pUserData, const Color&,
  SvTreeListEntry* pParent, sal_uLong nPos = 
TREELIST_APPEND);
 
 /** Insert a redline entry.
@@ -181,7 +181,7 @@ public:
 rRedlineType contains the image for this redline entry (plus for 
insertion, minus for deletion etc.).
 rStr contains the rest of the redline entry; the columns are delimited 
by '\t'.
 */
-SvTreeListEntry* InsertEntry(const Image , const OUString 
, RedlinData *pUserData,
+SvTreeListEntry* InsertEntry(const Image , const OUString 
, std::unique_ptr pUserData,
  SvTreeListEntry* pParent, sal_uLong nPos = 
TREELIST_APPEND);
 
 virtual SvTreeListEntry* CreateEntry() const override;
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 05d1ab0b22d3..ad4d2ba5e61c 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -370,7 +370,7 @@ SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
 OUStringBuffer aBuf;
 OUString aDesc;
 
-ScRedlinData* pNewData=new ScRedlinData;
+std::unique_ptr pNewData(new ScRedlinData);
 pNewData->pData=const_cast(pScChangeAction);
 pNewData->nActionNo=pScChangeAction->GetActionNumber();
 pNewData->bIsAcceptable=pScChangeAction->IsClickable();
@@ -474,12 +474,12 @@ SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
 if(!bFlag&& bUseColor&& pParent==nullptr)
 {
 pEntry = pTheView->InsertEntry(
-aBuf.makeStringAndClear() ,pNewData, COL_LIGHTBLUE, pParent, 
TREELIST_APPEND);
+aBuf.makeStringAndClear(), std::move(pNewData), COL_LIGHTBLUE, 
pParent, TREELIST_APPEND);
 }
 else if(bFlag&& bUseColor&& pParent!=nullptr)
 {
 pEntry = pTheView->InsertEntry(
-aBuf.makeStringAndClear(), pNewData, COL_GREEN, pParent, 
TREELIST_APPEND);
+aBuf.makeStringAndClear(), std::move(pNewData), COL_GREEN, 
pParent, TREELIST_APPEND);
 SvTreeListEntry* pExpEntry=pParent;
 
 while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
@@ -494,7 +494,7 @@ SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
 else
 {
 pEntry = pTheView->InsertEntry(
-aBuf.makeStringAndClear(), pNewData, pParent, TREELIST_APPEND);
+aBuf.makeStringAndClear(), std::move(pNewData), pParent, 
TREELIST_APPEND);
 }
 return pEntry;
 }
@@ -545,7 +545,7 @@ SvTreeListEntry* ScAcceptChgDlg::AppendFilteredAction(
 OUString aString;
 OUString aDesc;
 
-ScRedlinData* pNewData=new ScRedlinData;
+std::unique_ptr pNewData(new ScRedlinData);
 pNewData->pData=const_cast(pScChangeAction);
 pNewData->nActionNo=pScChangeAction->GetActionNumber();
 pNewData->bIsAcceptable=pScChangeAction->IsClickable();
@@ -614,10 +614,8 @@ SvTreeListEntry* ScAcceptChgDlg::AppendFilteredAction(
 if (pTheView->IsValidComment(aComment))
 {
 aString+=aComment;
-
pEntry=pTheView->InsertEntry(aString,pNewData,pParent,TREELIST_APPEND);
+
pEntry=pTheView->InsertEntry(aString,std::move(pNewData),pParent,TREELIST_APPEND);
 }
-else
-delete pNewData;
 }
 return pEntry;
 }
@@ -718,7 +716,7 @@ SvTreeListEntry* 
ScAcceptChgDlg::InsertChangeActionContent(const 

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

2018-08-02 Thread Libreoffice Gerrit user
 include/svx/svdobj.hxx   |   17 -
 sc/source/core/data/drwlayer.cxx |7 +--
 sc/source/core/data/postit.cxx   |7 +--
 svx/source/svdraw/svdobj.cxx |   28 
 4 files changed, 10 insertions(+), 49 deletions(-)

New commits:
commit 4804a1474ccba8df57f0a0151bd69237e82eb618
Author: Armin Le Grand 
AuthorDate: Wed Aug 1 21:47:30 2018 +0200
Commit: Armin Le Grand 
CommitDate: Thu Aug 2 10:53:47 2018 +0200

Directly prevent multiple change broadcasts

Instead of using members in SdrObject and a class
(SdrDelayBroadcastObjectChange) to prevent special,
selected SdrObnjects from executing BroadcastObjectChange,
use existing possibilities.

Change-Id: Iccab28249cfdc73219143b681495c84d7f520b62
Reviewed-on: https://gerrit.libreoffice.org/58451
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index ee447493ca34..1d112cc3841e 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -312,7 +312,6 @@ private:
 friend classSdrObjListIter;
 friend classSdrVirtObj;
 friend classSdrRectObj;
-friend classSdrDelayBroadcastObjectChange;
 
 // OperationSmiley: Allow at each SdrObject to set a 
FillGeometryDefiningShape,
 // so that for SdrObjects where this is set, the definition of a defined 
FillStyle
@@ -1016,8 +1015,6 @@ private:
   mpProperties;
 std::unique_ptr
   mpViewContact;
-bool  mbDelayBroadcastObjectChange : 1;
-mutable bool  mbBroadcastObjectChangePending : 1;
 
 // global static ItemPool for not-yet-inserted items
 static SdrItemPool* mpGlobalItemPool;
@@ -1046,20 +1043,6 @@ struct SVX_DLLPUBLIC SdrObjectFreeOp
 }
 };
 
-/** Suppress BroadcastObjectChange() until destruction of the (last) instance.
-Prevents multiple broadcasts for a sequence of calls that would trigger a
-broadcast each. Instances may be nested in levels, the outer instance will
-trigger the final broadcast.
- */
-class SVX_DLLPUBLIC SdrDelayBroadcastObjectChange
-{
-SdrObject&  mrObj;
-boolmbOldDelayBroadcastObjectChange;
-public:
-SdrDelayBroadcastObjectChange( SdrObject& rObj );
-~SdrDelayBroadcastObjectChange();
-};
-
 struct SdrObjCreatorParams
 {
 SdrInventor nInventor;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 007a3a72f4fd..1c49c947cb01 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -895,8 +895,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, 
ScDrawObjData& rData, bool bNegati
 else
 {
 // Prevent multiple broadcasts during the series of changes.
-SdrDelayBroadcastObjectChange aDelayBroadcastObjectChange(*pObj);
-
+pObj->getSdrModelFromSdrObject().setLock(true);
 bool bCanResize = bValid2 && !pObj->IsResizeProtect() && 
rData.mbResizeWithCell;
 
 //First time positioning, must be able to at least move it
@@ -1018,6 +1017,10 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, 
ScDrawObjData& rData, bool bNegati
 // update 'unrotated' anchor
 ScDrawLayer::UpdateCellAnchorFromPositionEnd(*pObj, 
rNoRotatedAnchor, *pDoc, nTab1 );
 }
+
+// End prevent multiple broadcasts during the series of changes.
+pObj->getSdrModelFromSdrObject().setLock(false);
+pObj->BroadcastObjectChange();
 }
 }
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index d4c3372de75f..47928e54ee12 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -700,8 +700,7 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& 
rPos ) const
 if( maNoteData.m_pCaption )
 {
 // Prevent triple change broadcasts of the same object.
-SdrDelayBroadcastObjectChange aDelayChange( 
*maNoteData.m_pCaption);
-
+
maNoteData.m_pCaption->getSdrModelFromSdrObject().setLock(true);
 ScCaptionInitData& rInitData = *maNoteData.mxInitData;
 
 // transfer ownership of outliner object to caption, or set 
simple text
@@ -736,6 +735,10 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& 
rPos ) const
 maNoteData.m_pCaption->SetLogicRect( aCaptRect );
 aCreator.FitCaptionToRect();
 }
+
+// End prevent triple change broadcasts of the same object.
+
maNoteData.m_pCaption->getSdrModelFromSdrObject().setLock(false);
+maNoteData.m_pCaption->BroadcastObjectChange();
 }
 }
 // forget the initial caption data struct
diff --git 

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

2018-07-20 Thread Libreoffice Gerrit user
 include/svx/svdobj.hxx   |8 +-
 include/svx/svdocapt.hxx |   19 +-
 sc/source/filter/xcl97/xcl97rec.cxx  |   33 ++-
 svx/source/svdraw/svdobj.cxx |   29 ++
 svx/source/svdraw/svdocapt.cxx   |8 ++
 svx/source/svdraw/svdpage.cxx|   14 ++---
 svx/source/unodraw/unoshape.cxx  |   86 +--
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |2 
 8 files changed, 130 insertions(+), 69 deletions(-)

New commits:
commit cbc992e7370ab006ea7c0f8520896845f79f7749
Author: Armin Le Grand 
AuthorDate: Thu Jul 19 19:26:14 2018 +0200
Commit: Armin Le Grand 
CommitDate: Fri Jul 20 20:29:11 2018 +0200

tdf#118662 Cleanup old hack with cloned SdrCaptionObj

XclObjComment formally cloned the SdrCaptionObj for a single
reason - to suppress functionality of the UNO API implementation
in SvxShape::GetBitmap - non-inserted SdrObjects did not create
Graphic return values.

Changed this to use an exclusive flag at SdrCaptionObj, only
accessible for XclObjComment. Due to bad/undefined behaviour
of SdrObjects that are not iinserted anywhere (see old comment
in XclObjComment) there is no way to return to cloning the
SdrObjects just to have them without being added to a SdrPage.

Also improved the time eater UNO API implementation SvxShape::GetBitmap
to use more modern stuff to create the Graphics needed. All the
time constructing a full E3DView and setting SdrObjects selected
and getting the selection as graphic is way too expensive. That
way save may even get somewhat faster.

Last was to cleanup the bInserted flag in SdrObject. It is no
longer needed, being inserted now depends on being a member
of an SdrObjList (Group or Page) - sounds normal anyways and
is a synergy effect of already done AW080 cleanups.

Checked now on linux. Problem is UnitTest 'testN777345' which
checks file "n777345.docx".

First point is that this only happens
  #if !defined(MACOSX)
  #if !defined(_WIN32)
so it's clear why I detected no problem on Windows.

Second point is that this test takes a checksum of a Graphic
that is created using getReplacementGraphic() this value *will*
change - of course - every time creation of that graphic is
even *slightly* modified, so from my POV this UnitTest is
defined to fill quite often. It may even create different
results on different systems (!). Adaption of the test value
 will be needed quite often and makes this test questionable.

Change-Id: If0918831a9cbd61b31298aeac7342e1913ee6c7a
Reviewed-on: https://gerrit.libreoffice.org/57758
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index a7a80105122b..52183e78ecc1 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -790,11 +790,14 @@ public:
 // is invalid, if this is a group object
 bool IsClosedObj() const { return bClosedObj;}
 
+// tdf#118662 reorganize inserted state, no local bool needed anymore,
+// it depends on being a member of a SdrObjList
+void InsertedStateChange();
+bool IsInserted() const { return nullptr != 
getParentSdrObjListFromSdrObject(); }
+
 bool IsEdgeObj() const { return bIsEdge;}
 bool Is3DObj() const { return bIs3DObj;}
 bool IsUnoObj() const { return bIsUnoObj;}
-void SetInserted(bool bIns);
-bool IsInserted() const { return bInserted;}
 void SetMoveProtect(bool bProt);
 bool IsMoveProtect() const { return bMovProt;}
 void SetResizeProtect(bool bProt);
@@ -1004,7 +1007,6 @@ private:
 // Position in the navigation order. SAL_MAX_UINT32 when not used.
 sal_uInt32mnNavigationPosition;
 SdrLayerIDmnLayerID;
-bool  bInserted : 1;  // only if set to true, 
there are RepaintBroadcast & SetModify
 bool  bNoPrint : 1;   // if true, the object 
is not printed.
 bool  mbVisible : 1;  // if false, the object 
is not visible on screen (but maybe on printer, depending on bNoprint
 bool  bMarkProt : 1;  // marking forbidden, 
persistent
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index b75d4867b8e1..124e83c206b2 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -46,15 +46,23 @@ private:
 friend class sdr::properties::CaptionProperties;
 friend classSdrTextObj; // for ImpRecalcTail() during 
AutoGrow
 
+// tdf#118662 exclusive friend function and setter for SuppressGetBitmap
+friend void setSuppressGetBitmapFromXclObjComment(SdrCaptionObj* 
pSdrCaptionObj, bool bValue);
+void setSuppressGetBitmap(bool bNew)
+{
+mbSuppressGetBitmap = bNew;
+}
+
 

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

2018-06-16 Thread Caolán McNamara
 include/svx/hdft.hxx  |   49 +--
 include/svx/pagectrl.hxx  |  123 
 sc/source/ui/inc/tphf.hxx |   10 
 sc/source/ui/pagedlg/tphf.cxx |   49 +--
 svx/source/dialog/hdft.cxx|  473 ++
 svx/source/dialog/pagectrl.cxx|  375 ++
 svx/uiconfig/ui/headfootformatpage.ui |   89 ++
 7 files changed, 791 insertions(+), 377 deletions(-)

New commits:
commit 0af04819bc0352f58b45a945fbb1451e3f8ba605
Author: Caolán McNamara 
Date:   Fri Jun 15 12:34:40 2018 +0100

weld SvxHFPage

Change-Id: I9e39e276c64da4fca01ff79ebbb42d6f342f0379
Reviewed-on: https://gerrit.libreoffice.org/55863
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 2e6d14dc7cce..d7d910c772ba 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -21,6 +21,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -47,7 +48,6 @@ public:
 virtual voidReset( const SfxItemSet* rSet ) override;
 
 virtual ~SvxHFPage() override;
-virtual voiddispose() override;
 
 void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
 
@@ -61,37 +61,36 @@ protected:
 virtual voidActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
 
-SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId 
);
-
-VclPtr   m_pPageLbl;
-VclPtrm_pTurnOnBox;
-VclPtrm_pCntSharedBox;
-VclPtrm_pCntSharedFirstBox;
-VclPtr   m_pLMLbl;
-VclPtr m_pLMEdit;
-VclPtr   m_pRMLbl;
-VclPtr m_pRMEdit;
-VclPtr   m_pDistFT;
-VclPtr m_pDistEdit;
-VclPtrm_pDynSpacingCB;
-VclPtr   m_pHeightFT;
-VclPtr m_pHeightEdit;
-VclPtrm_pHeightDynBtn;
-VclPtr   m_pBspWin;
-VclPtr  m_pBackgroundBtn;
+SvxHFPage(TabPageParent pParent, const SfxItemSet& rSet, sal_uInt16 
nSetId);
 
 sal_uInt16   nId;
 std::unique_ptr pBBSet;
 boolmbDisableQueryBox : 1;
 boolmbEnableDrawingLayerFillStyles : 1;
 
+PageWindow m_aBspWin;
+std::unique_ptr m_xPageLbl;
+std::unique_ptr m_xTurnOnBox;
+std::unique_ptr m_xCntSharedBox;
+std::unique_ptr m_xCntSharedFirstBox;
+std::unique_ptr m_xLMLbl;
+std::unique_ptrm_xLMEdit;
+std::unique_ptr m_xRMLbl;
+std::unique_ptr m_xRMEdit;
+std::unique_ptr m_xDistFT;
+std::unique_ptr m_xDistEdit;
+std::unique_ptr m_xDynSpacingCB;
+std::unique_ptr m_xHeightFT;
+std::unique_ptr m_xHeightEdit;
+std::unique_ptr m_xHeightDynBtn;
+std::unique_ptr m_xBackgroundBtn;
+std::unique_ptr m_xBspWin;
+
 voidInitHandler();
-DECL_LINK(TurnOnHdl, Button*, void);
-DECL_LINK(DistModify, Edit&, void);
-DECL_LINK(HeightModify, Edit&, void);
-DECL_LINK(BorderModify, Edit&, void);
-DECL_LINK(BackgroundHdl, Button*, void);
-DECL_LINK(RangeFocusHdl, Control&, void);
+void TurnOn(weld::ToggleButton* pButton);
+DECL_LINK(TurnOnHdl, weld::ToggleButton&, void);
+DECL_LINK(BackgroundHdl, weld::Button&, void);
+DECL_LINK(ValueChangeHdl, weld::MetricSpinButton&, void);
 void RangeHdl();
 voidUpdateExample();
 
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index cf2065cc4f38..8f1dc24192e8 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_SVX_PAGECTRL_HXX
 #define INCLUDED_SVX_PAGECTRL_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -152,6 +153,128 @@ public:
 virtual Size GetOptimalSize() const override;
 };
 
+class SVX_DLLPUBLIC PageWindow : public weld::CustomWidgetController
+{
+private:
+Size aWinSize;
+Size aSize;
+
+long nTop;
+long nBottom;
+long nLeft;
+long nRight;
+
+bool bResetBackground;
+bool bFrameDirection;
+SvxFrameDirection nFrameDirection;
+
+long nHdLeft;
+long nHdRight;
+long nHdDist;
+long nHdHeight;
+
+long nFtLeft;
+long nFtRight;
+long nFtDist;
+long nFtHeight;
+
+drawinglayer::attribute::SdrAllFillAttributesHelperPtr  
maHeaderFillAttributes;
+drawinglayer::attribute::SdrAllFillAttributesHelperPtr  
maFooterFillAttributes;
+drawinglayer::attribute::SdrAllFillAttributesHelperPtr  
maPageFillAttributes;
+
+bool bFooter : 1;
+bool bHeader : 1;
+bool bTable : 1;
+bool bHorz : 1;
+bool bVert : 1;
+
+SvxPageUsage eUsage;
+
+protected:
+virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
+
+virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& 
rPoint,
+  const bool bSecond, const bool bEnabled);
+
+void 

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

2018-03-26 Thread Noel Grandin
 include/svx/sdr/animation/scheduler.hxx|   13 ++-
 include/svx/sdr/overlay/overlaymanager.hxx |2 -
 sc/source/ui/view/overlayobject.cxx|2 -
 svx/source/sdr/animation/animationstate.cxx|2 -
 svx/source/sdr/animation/scheduler.cxx |   37 +
 svx/source/sdr/overlay/overlayanimatedbitmapex.cxx |2 -
 svx/source/sdr/overlay/overlayrectangle.cxx|2 -
 7 files changed, 26 insertions(+), 34 deletions(-)

New commits:
commit d312ff2b52c0ea2e2864518a36f6b432653c8297
Author: Noel Grandin 
Date:   Sun Mar 25 15:23:47 2018 +0200

tdf#112997 multiple animated gif only one frame

Not sure what the problem is, but using a vector and just making sure
we insert into the right spot for the sorting fixes it.

Change-Id: I11c08e08a14c98ba7eb6a5d925c75bab891ecf63
Reviewed-on: https://gerrit.libreoffice.org/51829
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/svx/sdr/animation/scheduler.hxx 
b/include/svx/sdr/animation/scheduler.hxx
index 15eaa344b9d6..1ab5c7a92237 100644
--- a/include/svx/sdr/animation/scheduler.hxx
+++ b/include/svx/sdr/animation/scheduler.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 
 namespace sdr
@@ -49,11 +49,6 @@ namespace sdr
 virtual void Trigger(sal_uInt32 nTime) = 0;
 };
 
-struct CompareEvent
-{
-bool operator()(Event* const& lhs, Event* const& rhs) const;
-};
-
 class SVX_DLLPUBLIC Scheduler : public Timer
 {
 // time in ms
@@ -62,8 +57,8 @@ namespace sdr
 // next delta time
 sal_uInt32  mnDeltaTime;
 
-// list of events
-o3tl::sorted_vector   maList;
+// list of events, sorted by time
+std::vector mvEvents;
 
 // Flag which remembers if this timer is paused. Default
 // is false.
@@ -90,7 +85,7 @@ namespace sdr
 SAL_DLLPRIVATE void checkTimeout();
 
 // insert/remove events, wrapper to EventList methods
-void InsertEvent(Event* pNew);
+void InsertEvent(Event& rNew);
 SAL_DLLPRIVATE void RemoveEvent(Event* pOld);
 
 // get/set pause
diff --git a/include/svx/sdr/overlay/overlaymanager.hxx 
b/include/svx/sdr/overlay/overlaymanager.hxx
index 0396ec7cdd98..25cae11e9dbc 100644
--- a/include/svx/sdr/overlay/overlaymanager.hxx
+++ b/include/svx/sdr/overlay/overlaymanager.hxx
@@ -131,7 +131,7 @@ namespace sdr
 // access to maDrawinglayerOpt
 const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return 
maDrawinglayerOpt; }
 
-void InsertEvent(sdr::animation::Event* pNew) { 
Scheduler::InsertEvent(pNew); }
+void InsertEvent(sdr::animation::Event& rNew) { 
Scheduler::InsertEvent(rNew); }
 };
 } // end of namespace overlay
 } // end of namespace sdr
diff --git a/sc/source/ui/view/overlayobject.cxx 
b/sc/source/ui/view/overlayobject.cxx
index b8aff2502ddb..ad5f34d95846 100644
--- a/sc/source/ui/view/overlayobject.cxx
+++ b/sc/source/ui/view/overlayobject.cxx
@@ -53,7 +53,7 @@ void ScOverlayDashedBorder::Trigger(sal_uInt32 nTime)
 {
 SetTime(nTime + DASH_UPDATE_INTERVAL);
 mbToggle = !mbToggle;
-pMgr->InsertEvent(this);
+pMgr->InsertEvent(*this);
 objectChange();
 }
 }
diff --git a/svx/source/sdr/animation/animationstate.cxx 
b/svx/source/sdr/animation/animationstate.cxx
index f0e67cfcec07..4b3b5f2fa08e 100644
--- a/svx/source/sdr/animation/animationstate.cxx
+++ b/svx/source/sdr/animation/animationstate.cxx
@@ -102,7 +102,7 @@ namespace sdr
 
 // set time and reactivate by re-adding to the scheduler
 SetTime(nNextTime);
-
mrVOContact.GetObjectContact().getPrimitiveAnimator().InsertEvent(this);
+
mrVOContact.GetObjectContact().getPrimitiveAnimator().InsertEvent(*this);
 }
 }
 
diff --git a/svx/source/sdr/animation/scheduler.cxx 
b/svx/source/sdr/animation/scheduler.cxx
index 0d7490850792..a8fc3272be8b 100644
--- a/svx/source/sdr/animation/scheduler.cxx
+++ b/svx/source/sdr/animation/scheduler.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 
 
@@ -45,12 +46,6 @@ namespace sdr
 }
 }
 
-bool CompareEvent::operator()(Event* const& lhs, Event* const& rhs) 
const
-{
-return lhs->GetTime() < rhs->GetTime();
-}
-
-
 Scheduler::Scheduler()
 :   mnTime(0),
 mnDeltaTime(0),
@@ -78,17 +73,17 @@ namespace sdr
 
 void Scheduler::triggerEvents()
 {
-if (maList.empty())
+if 

[Libreoffice-commits] core.git: include/svx sc/source svx/source sw/inc sw/source uui/source vcl/headless vcl/inc vcl/unx

2017-02-07 Thread Caolán McNamara
 include/svx/swframeposstrings.hxx   |6 
 sc/source/core/data/funcdesc.cxx|8 
 sc/source/core/src/compiler.src |   58 +++-
 svx/source/dialog/swframeposstrings.cxx |   27 +-
 svx/source/dialog/swframeposstrings.src |  259 +++
 sw/inc/shellres.hxx |3 
 sw/source/ui/utlui/utlui.src|  114 ++--
 sw/source/uibase/inc/utlui.hrc  |   40 --
 sw/source/uibase/utlui/initui.cxx   |   32 +-
 sw/source/uibase/utlui/initui.src   |  332 
 uui/source/iahndl.cxx   |   10 
 uui/source/iahndl.hxx   |8 
 uui/source/ids.src  |  429 +---
 vcl/headless/svpframe.cxx   |4 
 vcl/headless/svpgdi.cxx |  131 +++--
 vcl/headless/svpvd.cxx  |   21 -
 vcl/inc/headless/svpgdi.hxx |5 
 vcl/inc/headless/svpvd.hxx  |1 
 vcl/inc/unx/gtk/gtkframe.hxx|2 
 vcl/unx/gtk3/gtk3gtkframe.cxx   |   50 ++-
 20 files changed, 955 insertions(+), 585 deletions(-)

New commits:
commit 19ea3db6d33e8e1de57104e42796454757facd45
Author: Caolán McNamara 
Date:   Tue Feb 7 13:09:31 2017 +

revert unready stuff

Change-Id: I2b112a17a2bc70bfe4d5a6af7964a3c1d7eacf9b

diff --git a/include/svx/swframeposstrings.hxx 
b/include/svx/swframeposstrings.hxx
index e04522e..b81765a 100644
--- a/include/svx/swframeposstrings.hxx
+++ b/include/svx/swframeposstrings.hxx
@@ -27,7 +27,7 @@
 contains strings needed for positioning dialogs
 of frames and drawing in Writer
  */
-class ResStringArray;
+class SvxSwFramePosString_Impl;
 class SVX_DLLPUBLIC SvxSwFramePosString
 {
 public:
@@ -80,10 +80,10 @@ public:
 
 STR_MAX
 };
-OUString GetString(StringId eId) const;
+const OUString& GetString(StringId eId);
 
 private:
-std::unique_ptr pImpl;
+std::unique_ptr pImpl;
 };
 #endif
 
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index b0c2671..56288b9 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -629,7 +629,7 @@ sal_uInt32 ScFunctionCategory::getCount() const
 OUString ScFunctionCategory::getName() const
 {
 if ( m_sName.isEmpty() )
-m_sName = ScFunctionMgr::GetCategoryName(m_nCategory);
+m_sName = ScFunctionMgr::GetCategoryName(m_nCategory+1);
 return m_sName;
 }
 
@@ -770,14 +770,14 @@ void 
ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::
 
 OUString ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber )
 {
-if (_nCategoryNumber >= SC_FUNCGROUP_COUNT)
+if ( _nCategoryNumber > SC_FUNCGROUP_COUNT )
 {
 OSL_FAIL("Invalid category number!");
 return OUString();
 }
 
-ResStringArray aStringArray(ScResId(RID_FUNCTION_CATEGORIES));
-return aStringArray.GetString(_nCategoryNumber);
+std::unique_ptr pCategories( new ScResourcePublisher( 
ScResId( RID_FUNCTION_CATEGORIES ) ) );
+return SC_RESSTR(static_cast(_nCategoryNumber));
 }
 
 sal_Unicode ScFunctionMgr::getSingleToken(const 
formula::IFunctionManager::EToken _eToken) const
diff --git a/sc/source/core/src/compiler.src b/sc/source/core/src/compiler.src
index dd3199e..d89ad70 100644
--- a/sc/source/core/src/compiler.src
+++ b/sc/source/core/src/compiler.src
@@ -20,21 +20,51 @@
 #include "sc.hrc"
 #include 
 
-StringArray RID_FUNCTION_CATEGORIES
+Resource RID_FUNCTION_CATEGORIES
 {
-ItemList [ en-US ] =
-{
-< "Database" ; >;
-< "Date" ; >;
-< "Financial" ; >;
-< "Information" ; >;
-< "Logical" ; >;
-< "Mathematical" ; >;
-< "Array" ; >;
-< "Statistical" ; >;
-< "Spreadsheet" ; >;
-< "Text" ; >;
-< "Add-in" ; >;
+String 1
+{
+Text[ en-US ] =  "Database" ;
+};
+String 2
+{
+Text[ en-US ] =  "Date" ;
+};
+String 3
+{
+Text[ en-US ] =  "Financial" ;
+};
+String 4
+{
+Text[ en-US ] =  "Information" ;
+};
+String 5
+{
+Text[ en-US ] =  "Logical" ;
+};
+String 6
+{
+Text[ en-US ] =  "Mathematical" ;
+};
+String 7
+{
+Text[ en-US ] =  "Array" ;
+};
+String 8
+{
+Text[ en-US ] =  "Statistical" ;
+};
+String 9
+{
+Text[ en-US ] =  "Spreadsheet" ;
+};
+String 10
+{
+Text[ en-US ] =  "Text" ;
+};
+String 11
+{
+Text[ en-US ] =  "Add-in" ;
 };
 };
 
diff --git a/svx/source/dialog/swframeposstrings.cxx 
b/svx/source/dialog/swframeposstrings.cxx
index 731b17d..a055b77 100644
--- a/svx/source/dialog/swframeposstrings.cxx
+++ b/svx/source/dialog/swframeposstrings.cxx
@@ -18,27 +18,44 @@
  */
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 
+class 

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

2016-11-19 Thread Eike Rathke
 include/svx/svdobj.hxx |   20 
 sc/source/core/data/postit.cxx |5 +
 svx/source/svdraw/svdobj.cxx   |   29 +
 3 files changed, 54 insertions(+)

New commits:
commit 451c47e3ec3f1e046d3232cb52f6fc443f59
Author: Eike Rathke 
Date:   Sat Nov 19 01:11:21 2016 +0100

sc-perf: bundle SdrObject::BroadcastObjectChange() calls during Save

Test doc https://bugs.documentfoundation.org/attachment.cgi?id=128252 from
https://bugs.documentfoundation.org/show_bug.cgi?id=103493

ScPostIt::CreateCaptionFromInitData() called through
ScDocument::CreateAllNoteCaptions()

  Incl. Self  Called
Before:
326,418,830,114  487,308   6,645
After:
145,055,889,118  511,681   6,645

Reduced to 44% or speed-up by factor 2.25

Overall ScDocShell::SaveXML()
Before: 370,433,720,090
 After: 189,120,982,786

Reduced to 51% or speed-up by factor 1.96

There's still too much broadcasting to accessibility going on though..

Change-Id: I50555fd9751ac24006cc96b2fa8e82b32aba0748

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 4855868..b398a19 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -295,6 +295,7 @@ private:
 friend classSdrObjListIter;
 friend classSdrVirtObj;
 friend classSdrRectObj;
+friend classSdrDelayBroadcastObjectChange;
 
 protected:
 Rectangle   aOutRect; // surrounding rectangle for 
Paint (incl. LineWdt, ...)
@@ -351,6 +352,11 @@ protected:
 // #i25616#
 boolmbSupportTextIndentingOnLineWidthChange : 1;
 
+private:
+boolmbDelayBroadcastObjectChange : 1;
+mutable boolmbBroadcastObjectChangePending : 1;
+
+protected:
 // on import of OLE object from MS documents the BLIP size might be 
retrieved,
 // in this case the following member is initialized as nonempty rectangle
 Rectangle   maBLIPSizeRectangle;
@@ -968,6 +974,20 @@ private:
 bool mbDoNotInsertIntoPageAutomatically;
 };
 
+/** Suppress BroadcastObjectChange() until destruction of the (last) instance.
+Prevents multiple broadcasts for a sequence of calls that would trigger a
+broadcast each. Instances may be nested in levels, the outer instance will
+trigger the final broadcast.
+ */
+class SVX_DLLPUBLIC SdrDelayBroadcastObjectChange
+{
+SdrObject&  mrObj;
+boolmbOldDelayBroadcastObjectChange;
+public:
+SdrDelayBroadcastObjectChange( SdrObject& rObj );
+~SdrDelayBroadcastObjectChange();
+};
+
 struct SdrObjCreatorParams
 {
 sal_uInt32 nInventor;
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 18da0ce..623a199 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -640,6 +640,11 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& 
rPos ) const
 ScNoteCaptionCreator aCreator( mrDoc, rPos, maNoteData );
 if( maNoteData.mpCaption )
 {
+// Prevent triple change broadcasts of the same object, which
+// during Save triggered by ScDocument::CreateAllNoteCaptions()
+// creates a major performance bottleneck.
+SdrDelayBroadcastObjectChange aDelayChange( 
*maNoteData.mpCaption);
+
 ScCaptionInitData& rInitData = *maNoteData.mxInitData;
 
 // transfer ownership of outliner object to caption, or set 
simple text
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index f87ecd1..0f3de29 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -302,6 +302,8 @@ SdrObject::SdrObject() :
 ,pGrabBagItem(nullptr)
 ,mnNavigationPosition(SAL_MAX_UINT32)
 ,mnLayerID(0)
+,mbDelayBroadcastObjectChange(false)
+,mbBroadcastObjectChangePending(false)
 ,mpSvxShape( nullptr )
 ,maWeakUnoShape()
 ,mbDoNotInsertIntoPageAutomatically(false)
@@ -880,6 +882,12 @@ void SdrObject::BroadcastObjectChange() const
 if( pModel && pModel->isLocked() )
 return;
 
+if (mbDelayBroadcastObjectChange)
+{
+mbBroadcastObjectChangePending = true;
+return;
+}
+
 bool bPlusDataBroadcast(pPlusData && pPlusData->pBroadcast);
 bool bObjectChange(IsInserted() && pModel);
 
@@ -3092,6 +3100,27 @@ bool SdrObject::HasText() const
 return false;
 }
 
+
+SdrDelayBroadcastObjectChange::SdrDelayBroadcastObjectChange( SdrObject& rObj 
) :
+mrObj(rObj), mbOldDelayBroadcastObjectChange( 
rObj.mbDelayBroadcastObjectChange)
+{
+mrObj.mbDelayBroadcastObjectChange = true;
+}
+
+SdrDelayBroadcastObjectChange::~SdrDelayBroadcastObjectChange()
+{
+if (!mbOldDelayBroadcastObjectChange)
+{
+

[Libreoffice-commits] core.git: include/svx sc/source svx/source unusedcode.easy vcl/inc vcl/opengl

2015-01-21 Thread Caolán McNamara
 include/svx/sdr/overlay/overlaytriangle.hxx |6 +---
 sc/source/ui/optdlg/calcoptionsdlg.cxx  |   42 
 sc/source/ui/optdlg/calcoptionsdlg.hxx  |3 --
 svx/source/sdr/overlay/overlaytriangle.cxx  |   24 
 unusedcode.easy |1 
 vcl/inc/opengl/program.hxx  |1 
 vcl/opengl/program.cxx  |6 
 7 files changed, 2 insertions(+), 81 deletions(-)

New commits:
commit b5f607a4aa5c622efba748a1d443131dbee38ad0
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jan 21 09:40:33 2015 +

callcatcher: update unused code

Change-Id: I225cbb3a4a66a8f20bec91c4770ad78e72b663b1

diff --git a/include/svx/sdr/overlay/overlaytriangle.hxx 
b/include/svx/sdr/overlay/overlaytriangle.hxx
index b2ae411..da7567e 100644
--- a/include/svx/sdr/overlay/overlaytriangle.hxx
+++ b/include/svx/sdr/overlay/overlaytriangle.hxx
@@ -44,13 +44,11 @@ namespace sdr
 Color aTriangleColor);
 virtual ~OverlayTriangle();
 
-// change second position
+// get second position
 const basegfx::B2DPoint getSecondPosition() const { return 
maSecondPosition; }
-void setSecondPosition(const basegfx::B2DPoint rNew);
 
-// change third position
+// get third position
 const basegfx::B2DPoint getThirdPosition() const { return 
maThirdPosition; }
-void setThirdPosition(const basegfx::B2DPoint rNew);
 };
 } // end of namespace overlay
 } // end of namespace sdr
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx 
b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 287fccc..1b3e13ac1 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -110,48 +110,6 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* 
pParent, const ScCalcConfi
 
 ScCalcOptionsDialog::~ScCalcOptionsDialog() {}
 
-#if HAVE_FEATURE_OPENCL
-
-void ScCalcOptionsDialog::fillOpenCLList()
-{
-mpOpenclInfoList-SetUpdateMode(false);
-mpOpenclInfoList-Clear();
-SvTreeListEntry* pSoftwareEntry = 
mpOpenclInfoList-InsertEntry(maSoftware);
-
-OUString aStoredDevice = maConfig.maOpenCLDevice;
-
-SvTreeListEntry* pSelectedEntry = NULL;
-
-sc::FormulaGroupInterpreter::fillOpenCLInfo(maPlatformInfo);
-for(std::vectorOpenCLPlatformInfo::iterator it = maPlatformInfo.begin(),
-itEnd = maPlatformInfo.end(); it != itEnd; ++it)
-{
-for(std::vectorOpenCLDeviceInfo::iterator
-itr = it-maDevices.begin(), itrEnd = it-maDevices.end(); itr 
!= itrEnd; ++itr)
-{
-OUString aDeviceId = it-maVendor +   + itr-maName +   + 
itr-maDriver;
-SvTreeListEntry* pEntry = mpOpenclInfoList-InsertEntry(aDeviceId);
-if(aDeviceId == aStoredDevice)
-{
-pSelectedEntry = pEntry;
-}
-pEntry-SetUserData((*itr));
-}
-}
-
-mpOpenclInfoList-SetUpdateMode(true);
-mpOpenclInfoList-GetModel()-GetView(0)-SelectAll(false, false);
-
-if (pSelectedEntry)
-mpOpenclInfoList-Select(pSelectedEntry);
-else if (aStoredDevice == OPENCL_SOFTWARE_DEVICE_CONFIG_NAME)
-mpOpenclInfoList-Select(pSoftwareEntry);
-
-SelectedDeviceChanged();
-}
-
-#endif
-
 void ScCalcOptionsDialog::OpenCLAutomaticSelectionChanged()
 {
 bool bValue = mpBtnAutomaticSelectionTrue-IsChecked();
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx 
b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 61c5c43..08fad6c 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -53,9 +53,6 @@ public:
 private:
 void OpenCLAutomaticSelectionChanged();
 void SelectedDeviceChanged();
-#if HAVE_FEATURE_OPENCL
-void fillOpenCLList();
-#endif
 
 SvTreeListEntry *createItem(const OUString rCaption, const OUString 
sValue) const;
 void setValueAt(size_t nPos, const OUString rString);
diff --git a/svx/source/sdr/overlay/overlaytriangle.cxx 
b/svx/source/sdr/overlay/overlaytriangle.cxx
index 52a3cb7..1785ce8 100644
--- a/svx/source/sdr/overlay/overlaytriangle.cxx
+++ b/svx/source/sdr/overlay/overlaytriangle.cxx
@@ -65,30 +65,6 @@ namespace sdr
 {
 }
 
-void OverlayTriangle::setSecondPosition(const basegfx::B2DPoint rNew)
-{
-if(rNew != maSecondPosition)
-{
-// remember new value
-maSecondPosition = rNew;
-
-// register change (after change)
-objectChange();
-}
-}
-
-void OverlayTriangle::setThirdPosition(const basegfx::B2DPoint rNew)
-{
-if(rNew != maThirdPosition)
-{
-// remember new value
-maThirdPosition = rNew;
-
-// register change (after change)
-objectChange();
-  

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

2013-08-17 Thread Matteo Casalin
 include/svx/ctredlin.hxx   |8 +++-
 sc/source/ui/miscdlgs/acredlin.cxx |   14 +++---
 svx/source/dialog/ctredlin.cxx |   19 ++-
 sw/source/ui/misc/redlndlg.cxx |4 ++--
 4 files changed, 22 insertions(+), 23 deletions(-)

New commits:
commit d0fffe44c0ab8ea79cbf3f2ef383a48aa6f492f3
Author: Matteo Casalin matteo.casa...@yahoo.com
Date:   Fri Aug 16 18:41:07 2013 +0200

No need for pointers here, use references

Change-Id: If00f4f6248f40e3a8feb0c11b3d46b85748a97bc
Reviewed-on: https://gerrit.libreoffice.org/5459
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 6b3685d..320881c 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -132,11 +132,9 @@ public:
 
 voidSetCalcView(sal_Bool bFlag=sal_True);
 
-// no NULL-pointer checking {
-boolIsValidEntry(const String* pAuthor,const DateTime 
*pDateTime,const String* pComment);
-boolIsValidEntry(const String* pAuthor,const DateTime 
*pDateTime);
-boolIsValidComment(const String* pComment);
-// }
+boolIsValidEntry(const String rAuthor, const DateTime 
rDateTime, const String rComment);
+boolIsValidEntry(const String rAuthor, const DateTime 
rDateTime);
+boolIsValidComment(const String rComment);
 
 SvTreeListEntry*InsertEntry(const OUString ,RedlinData *pUserData,
 SvTreeListEntry* pParent=NULL,sal_uIntPtr 
nPos=LIST_APPEND);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 7c5f54b..360882e 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -323,7 +323,7 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* 
pScChangeAction)
 aComment += ')';
 }
 
-if(pTheView-IsValidEntry(aUser,aDateTime,aComment))
+if (pTheView-IsValidEntry(aUser, aDateTime, aComment))
 {
 if(pTPFilter-IsRange())
 {
@@ -442,9 +442,9 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
 
 aBuf.append(aComment);
 
-if(pTheView-IsValidEntry(aUser,aDateTime)|| bIsGenerated)
+if (pTheView-IsValidEntry(aUser, aDateTime) || bIsGenerated)
 {
-if(pTheView-IsValidComment(aComment))
+if (pTheView-IsValidComment(aComment))
 {
 if(pTPFilter-IsRange())
 {
@@ -514,7 +514,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
 String aUser=pScChangeAction-GetUser();
 DateTime aDateTime=pScChangeAction-GetDateTime();
 
-if(pTheView-IsValidEntry(aUser,aDateTime)||bIsGenerated)
+if (pTheView-IsValidEntry(aUser, aDateTime) || bIsGenerated)
 {
 if(pTPFilter-IsRange())
 {
@@ -610,7 +610,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
 aComment += String(aDesc);
 aComment += ')';
 }
-if(pTheView-IsValidComment(aComment))
+if (pTheView-IsValidComment(aComment))
 {
 aString+=aComment;
 pEntry=pTheView-InsertEntry(aString,pNewData,pParent,nPos);
@@ -637,7 +637,7 @@ SvTreeListEntry* 
ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC
 String aUser=pScChangeAction-GetUser();
 DateTime aDateTime=pScChangeAction-GetDateTime();
 
-if(pTheView-IsValidEntry(aUser,aDateTime)||bIsGenerated)
+if (pTheView-IsValidEntry(aUser, aDateTime) || bIsGenerated)
 {
 if(pTPFilter-IsRange())
 {
@@ -740,7 +740,7 @@ SvTreeListEntry* 
ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionC
 pNewData-nCol  = aRef.aStart.Col();
 pNewData-nTable= aRef.aStart.Tab();
 
-if(pTheView-IsValidComment(aComment)  bFlag)
+if (pTheView-IsValidComment(aComment)  bFlag)
 {
 bHasFilterEntry=true;
 pEntry=pTheView-InsertEntry(aString,pNewData,pParent);
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index c7fc333..272ec7f 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -302,32 +302,33 @@ void SvxRedlinTable::SetCommentParams( const 
utl::SearchParam* pSearchPara )
 }
 }
 
-bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,
-  const DateTime *pDateTime,const String* 
pCommentStr)
+bool SvxRedlinTable::IsValidEntry(const String rAuthorStr,
+  const DateTime rDateTime,
+  const String rCommentStr)
 {
-return IsValidEntry(pAuthorStr, pDateTime)  IsValidComment(pCommentStr);
+return IsValidEntry(rAuthorStr, rDateTime)  IsValidComment(rCommentStr);
 }
 
-bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,const DateTime 
*pDateTime)
+bool SvxRedlinTable::IsValidEntry(const String rAuthorStr,const DateTime