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

2023-08-31 Thread Tomaž Vajngerl (via logerrit)
 sd/source/core/ThemeColorChanger.cxx |   42 ++-
 svx/source/theme/ThemeColorChangerCommon.cxx |   17 +-
 2 files changed, 32 insertions(+), 27 deletions(-)

New commits:
commit 70663f464b24f223c4174681b9a469d9f554bcee
Author: Tomaž Vajngerl 
AuthorDate: Thu Aug 31 08:11:18 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Fri Sep 1 07:29:02 2023 +0200

sd: set the theme for all master pages

It can be annoying for the user to set the theme one by one for
each master page. The reason for this is that in MSO the master
slide (which contains the theme) has multiple layouts, which are
converted to master pages in LO. As LO doesn't group master pages
together the theme is defined on each master page, so it is needed
to change each master page one by one.

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

diff --git a/sd/source/core/ThemeColorChanger.cxx 
b/sd/source/core/ThemeColorChanger.cxx
index adfacb6a47ac..3a5c7804ae57 100644
--- a/sd/source/core/ThemeColorChanger.cxx
+++ b/sd/source/core/ThemeColorChanger.cxx
@@ -154,31 +154,35 @@ void 
ThemeColorChanger::apply(std::shared_ptr const& pColorSet)
 {
 SdrPage* pCurrentPage = rModel.GetPage(nPage);
 
-// Skip pages that are using a different master page
-if (!pCurrentPage->TRG_HasMasterPage()
-|| >TRG_GetMasterPage() != mpMasterPage)
-continue;
-
-for (size_t nObject = 0; nObject < pCurrentPage->GetObjCount(); 
++nObject)
+// TODO - for now change all the objects regardless to which master 
page it belongs to.
+// Currently we don't have a concept of master slide with a group of 
layouts as in MSO, but we always only
+// have master pages, which aren't grouped together. In MSO the theme 
is defined per master slide, so when
+// changing a theme, all the layouts get the new theme, as layouts are 
synonomus to master pages in LibreOffise,
+// this is not possible to do and we would need to change the theme 
for each master page separately, which
+// is just annoying for the user.
+
+// if (!pCurrentPage->TRG_HasMasterPage() || 
>TRG_GetMasterPage() != mpMasterPage)
+// continue;
+
+SdrObjListIter aIter(pCurrentPage, SdrIterMode::DeepWithGroups);
+while (aIter.IsMore())
 {
-SdrObject* pObject = pCurrentPage->GetObj(nObject);
-svx::theme::updateSdrObject(*pColorSet, pObject, pView, 
pUndoManager);
-
-// update child objects
-SdrObjList* pList = pObject->GetSubList();
-if (pList)
-{
-SdrObjListIter aIter(pList, SdrIterMode::DeepWithGroups);
-while (aIter.IsMore())
-{
-svx::theme::updateSdrObject(*pColorSet, aIter.Next(), 
pView, pUndoManager);
-}
-}
+svx::theme::updateSdrObject(*pColorSet, aIter.Next(), pView, 
pUndoManager);
 }
 }
 
 changeThemeColors(mpDocShell, mpMasterPage, pColorSet);
 
+// See the TODO comment a couple of line above for the explanation - need 
to change the ThemeColors for all master
+// pages for now, but the following code will need to be changed in the 
future when we have the concept similar to
+// master slide and layouts
+for (sal_uInt16 nPage = 0; nPage < rModel.GetPageCount(); ++nPage)
+{
+SdrPage* pCurrentPage = rModel.GetPage(nPage);
+if (pCurrentPage->IsMasterPage() && pCurrentPage != mpMasterPage)
+changeThemeColors(mpDocShell, pCurrentPage, pColorSet);
+}
+
 pUndoManager->LeaveListAction();
 }
 
diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx 
b/svx/source/theme/ThemeColorChangerCommon.cxx
index 44f041f5f3b0..446943100101 100644
--- a/svx/source/theme/ThemeColorChangerCommon.cxx
+++ b/svx/source/theme/ThemeColorChangerCommon.cxx
@@ -104,13 +104,8 @@ bool updateEditEngTextSections(model::ColorSet const& 
rColorSet, SdrObject* pObj
 bool updateObjectAttributes(model::ColorSet const& rColorSet, SdrObject& 
rObject,
 SfxUndoManager* pUndoManager)
 {
-if (pUndoManager)
-{
-pUndoManager->AddUndoAction(
-
rObject.getSdrModelFromSdrObject().GetSdrUndoFactory().CreateUndoAttrObject(
-rObject, true, true));
-}
 bool bChanged = false;
+
 auto aItemSet = rObject.GetMergedItemSet();
 
 if (const XFillColorItem* pItem = aItemSet.GetItemIfSet(XATTR_FILLCOLOR, 
false))
@@ -151,6 +146,13 @@ bool updateObjectAttributes(model::ColorSet const& 
rColorSet, SdrObject& rObject
 }
 if (bChanged)
 {
+const bool bUndo = pUndoManager && pUndoManager->IsInListAction();
+if (bUndo)
+{
+

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

2023-01-31 Thread Mike Kaganski (via logerrit)
 sd/source/ui/app/sdxfer.cxx   |2 +-
 svx/source/customshapes/EnhancedCustomShape3d.cxx |7 ---
 svx/source/svdraw/svdmodel.cxx|2 +-
 svx/source/svdraw/svdograf.cxx|   12 ++--
 svx/source/svdraw/svdotext.cxx|6 +-
 svx/source/svdraw/svdxcgv.cxx |   18 +-
 6 files changed, 10 insertions(+), 37 deletions(-)

New commits:
commit f4804a8fb60cc999c9b08bf451732749b44eb355
Author: Mike Kaganski 
AuthorDate: Tue Jan 31 09:42:50 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jan 31 09:30:16 2023 +

Some simplification after 743dd1d3c1142c1c99b0844cc26dd0be91a1de40

MapMode ctor taking origin and scales sets mbSimple to false, so
avoid calling it when these are the defaults.

Some calculations become unneeded when the fraction is (1, 1).

Change-Id: I19a98ad2cac0a66b9bd7b72620180addb3f7fec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146375
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 95d9e9aa1cee..e7fb0ff357f9 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -251,7 +251,7 @@ void SdTransferable::CreateData()
 CreateObjectReplacement( pPage->GetObj( 0 ) );
 
 mpVDev = VclPtr::Create( 
*Application::GetDefaultDevice() );
-mpVDev->SetMapMode(MapMode(mpSdDrawDocumentIntern->GetScaleUnit(), 
Point(), Fraction(1,1), Fraction(1,1)));
+mpVDev->SetMapMode(MapMode(mpSdDrawDocumentIntern->GetScaleUnit()));
 mpSdViewIntern = new ::sd::View( *mpSdDrawDocumentIntern, mpVDev );
 mpSdViewIntern->EndListening(*mpSdDrawDocumentIntern );
 mpSdViewIntern->hideMarkHandles();
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx 
b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 9a0ef6bebf92..468a1c66fa93 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -238,13 +238,6 @@ rtl::Reference 
EnhancedCustomShape3d::Create3DObject(
 rtl::Reference pRet;
 const SdrCustomShapeGeometryItem& 
rGeometryItem(rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
 double fMap(1.0), *pMap = nullptr;
-Fraction aFraction(1, 1);
-
-if ( aFraction.GetNumerator() != 1 || aFraction.GetDenominator() != 1 )
-{
-fMap *= double(aFraction);
-pMap = 
-}
 
 if ( rSdrObjCustomShape.getSdrModelFromSdrObject().GetScaleUnit() != 
MapUnit::Map100thMM )
 {
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 73d99b29d5ad..eb971b7f6b30 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -682,7 +682,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* 
pOutliner, bool bInit )
 
 if ( !GetRefDevice() )
 {
-MapMode aMapMode(m_eObjUnit, Point(0,0), Fraction(1,1), Fraction(1,1));
+MapMode aMapMode(m_eObjUnit);
 pOutliner->SetRefMapMode(aMapMode);
 }
 }
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 9ac5536c5716..d9becdfdb80d 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -387,11 +387,7 @@ Graphic SdrGrafObj::GetTransformedGraphic( 
SdrGrafObjTransformsAttrs nTransformF
 {
 // Refactored most of the code to GraphicObject, where
 // everybody can use e.g. the cropping functionality
-MapMode aDestMap(
-getSdrModelFromSdrObject().GetScaleUnit(),
-Point(),
-Fraction(1,1),
-Fraction(1,1));
+MapMode aDestMap(getSdrModelFromSdrObject().GetScaleUnit());
 const Size aDestSize( GetLogicRect().GetSize() );
 GraphicAttr aActAttr = GetGraphicAttr(nTransformFlags);
 
@@ -869,11 +865,7 @@ GDIMetaFile 
SdrGrafObj::getMetafileFromEmbeddedVectorGraphicData() const
 {
 ScopedVclPtrInstance< VirtualDevice > pOut;
 const tools::Rectangle aBoundRect(GetCurrentBoundRect());
-const MapMode aMap(
-getSdrModelFromSdrObject().GetScaleUnit(),
-Point(),
-Fraction(1,1),
-Fraction(1,1));
+const MapMode aMap(getSdrModelFromSdrObject().GetScaleUnit());
 
 pOut->EnableOutput(false);
 pOut->SetMapMode(aMap);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index ad27f101c6cb..078e067aa14e 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1324,11 +1324,7 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& 
rOutl, tools::Rectangle&
 Fraction aFitXCorrection(1,1);
 
 const bool bContourFrame(IsContourTextFrame());
-const MapMode aMapMode(
-getSdrModelFromSdrObject().GetScaleUnit(),
-Point(0,0),
-Fraction(1,1),
-Fraction(1,1));
+const MapMode 

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

2022-06-02 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/func/fusel.cxx   |2 +-
 svx/source/diagram/IDiagramHelper.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9030bfb8401a73ff45a8df0f7ba05ae46332fafb
Author: Andrea Gelmini 
AuthorDate: Tue May 31 21:22:42 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 2 20:55:41 2022 +0200

Fix typos

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

diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index bd82a7a97da0..a525f3bfce89 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -705,7 +705,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
 pSingleObj = 
mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
 }
 
-// Check for klick on svx::diagram::DiagramFrameHdl
+// Check for click on svx::diagram::DiagramFrameHdl
 // - if we hit a SdrHdl
 // - if it was not moved
 // - if single object is selected
diff --git a/svx/source/diagram/IDiagramHelper.cxx 
b/svx/source/diagram/IDiagramHelper.cxx
index 25acb3719a1c..b701a5930917 100644
--- a/svx/source/diagram/IDiagramHelper.cxx
+++ b/svx/source/diagram/IDiagramHelper.cxx
@@ -116,7 +116,7 @@ class OverlayDiagramPrimitive final : public 
drawinglayer::primitive2d::Discrete
 private:
 basegfx::B2DHomMatrix maTransformation;  // object dimensions
 double mfDiscreteDistance; // distance from object in pixels
-double mfDiscreteGap; // gap/widh of visualization in pixels
+double mfDiscreteGap; // gap/width of visualization in pixels
 Color maColor;  // base color (made lighter/darker as needed, should be 
system selection color)
 
 virtual void create2DDecomposition(
@@ -153,7 +153,7 @@ void OverlayDiagramPrimitive::create2DDecomposition(
 // initially try to create lap
 if(bCreateLap)
 {
-// take a ressource text (for now existing one that fits)
+// take a resource text (for now existing one that fits)
 const OUString aName(SvxResId(RID_STR_DATANAV_EDIT_ELEMENT));
 drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
 basegfx::B2DPolyPolygonVector aTarget;


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

2022-03-18 Thread Michael Weghorn (via logerrit)
 sd/source/ui/annotations/annotationwindow.cxx |4 +---
 svx/source/dialog/weldeditview.cxx|4 +---
 sw/source/uibase/docvw/SidebarTxtControl.cxx  |2 --
 3 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit cfa5489982a84f847d86b8bf8ce49b25e033ed48
Author: Michael Weghorn 
AuthorDate: Fri Mar 18 14:17:28 2022 +0100
Commit: Michael Weghorn 
CommitDate: Fri Mar 18 15:28:44 2022 +0100

WeldEditView: Just pass new Size object as param

Just pass `aOutputSize` as parameter instead
of assigning that to `aSize` again and then
passing that one as parameter in
`WeldEditView::SetDrawingArea` and
overrides in derived classes.

`aSize.setHeight(aSize.Height())` can just be dropped
as an overly complicated way of keeping the
height as it is.

In `SidebarTextControl::SetDrawingArea`, `aOutputSize`
was already passed as param, so the new value of `aSize`
was ignored anyway.

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

diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index 42ebe77c306f..6c1210575915 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -188,14 +188,12 @@ void 
AnnotationTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 rDevice.SetBackground(aBgColor);
 
 Size aOutputSize(rDevice.PixelToLogic(aSize));
-aSize = aOutputSize;
-aSize.setHeight(aSize.Height());
 
 EditView* pEditView = GetEditView();
 pEditView->setEditViewCallbacks(this);
 
 EditEngine* pEditEngine = GetEditEngine();
-pEditEngine->SetPaperSize(aSize);
+pEditEngine->SetPaperSize(aOutputSize);
 pEditEngine->SetRefDevice();
 
 pEditView->SetOutputArea(::tools::Rectangle(Point(0, 0), aOutputSize));
diff --git a/svx/source/dialog/weldeditview.cxx 
b/svx/source/dialog/weldeditview.cxx
index d3f3c3f79c9e..42eb22c12223 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -1554,11 +1554,9 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 rDevice.SetBackground(aBgColor);
 
 Size aOutputSize(rDevice.PixelToLogic(aSize));
-aSize = aOutputSize;
-aSize.setHeight(aSize.Height());
 
 makeEditEngine();
-m_xEditEngine->SetPaperSize(aSize);
+m_xEditEngine->SetPaperSize(aOutputSize);
 m_xEditEngine->SetRefDevice();
 
 m_xEditEngine->SetControlWord(m_xEditEngine->GetControlWord() | 
EEControlBits::MARKFIELDS);
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index fecaf6aafef3..8502601e8b1e 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -107,8 +107,6 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 rDevice.SetBackground(aBgColor);
 
 Size aOutputSize(rDevice.PixelToLogic(aSize));
-aSize = aOutputSize;
-aSize.setHeight(aSize.Height());
 
 EditView* pEditView = GetEditView();
 pEditView->setEditViewCallbacks(this);


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

2022-02-10 Thread Caolán McNamara (via logerrit)
 sd/source/core/CustomAnimationEffect.cxx|1 
 sd/source/ui/animations/CustomAnimationList.cxx |   13 
 sd/source/ui/animations/CustomAnimationPane.cxx |   36 
 svx/source/unodraw/unoshtxt.cxx |5 ++-
 4 files changed, 52 insertions(+), 3 deletions(-)

New commits:
commit f8eb28d6b6e306d87e5cec3f1b6f83c841a5f01e
Author: Caolán McNamara 
AuthorDate: Wed Feb 9 19:52:43 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Feb 10 21:30:44 2022 +0100

tdf#137571 use XActionGuard to lock blocks that don't need updating

so we can avoid constantly generating new TextForwarders which
are the same as the one they replace.

The underlying problem is that of tdf#123470 but this solution should
be safe to backport

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

diff --git a/sd/source/core/CustomAnimationEffect.cxx 
b/sd/source/core/CustomAnimationEffect.cxx
index cf6dcadc1b86..d9d88443ebe5 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 356093d69810..09822606d67d 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -26,7 +28,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -182,6 +184,15 @@ static OUString getDescription( const Any& rTarget, bool 
bWithText )
 ParagraphTarget aParaTarget;
 rTarget >>= aParaTarget;
 
+css::uno::Reference 
xLockable(aParaTarget.Shape, css::uno::UNO_QUERY);
+if (xLockable.is())
+xLockable->addActionLock();
+comphelper::ScopeGuard aGuard([]()
+{
+if (xLockable.is())
+xLockable->removeActionLock();
+});
+
 Reference< XEnumerationAccess > xText( aParaTarget.Shape, 
UNO_QUERY_THROW );
 Reference< XEnumeration > xEnumeration( xText->createEnumeration(), 
css::uno::UNO_SET_THROW );
 sal_Int32 nPara = aParaTarget.Paragraph;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 66ded2c772c9..3f52abb544b3 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -36,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1657,6 +1659,15 @@ static bool getTextSelection( const Any& rSelection, 
Reference< XShape >& xShape
 {
 xShape.set( xSelectedText->getText(), UNO_QUERY_THROW );
 
+css::uno::Reference xLockable(xShape, 
css::uno::UNO_QUERY);
+if (xLockable.is())
+xLockable->addActionLock();
+comphelper::ScopeGuard aGuard([]()
+{
+if (xLockable.is())
+xLockable->removeActionLock();
+});
+
 Reference< XTextRangeCompare > xTextRangeCompare( xShape, 
UNO_QUERY_THROW );
 Reference< XEnumerationAccess > xParaEnumAccess( xShape, 
UNO_QUERY_THROW );
 Reference< XEnumeration > xParaEnum( 
xParaEnumAccess->createEnumeration(), UNO_SET_THROW );
@@ -1710,6 +1721,22 @@ static bool getTextSelection( const Any& rSelection, 
Reference< XShape >& xShape
 return false;
 }
 
+namespace
+{
+Reference getTargetShape(const Any& rTarget)
+{
+Reference xShape;
+rTarget >>= xShape;
+if( !xShape.is() )
+{
+ParagraphTarget aParaTarget;
+if (rTarget >>= aParaTarget)
+xShape = aParaTarget.Shape;
+}
+return xShape;
+}
+}
+
 void CustomAnimationPane::onAdd()
 {
 bool bHasText = true;
@@ -1815,6 +1842,15 @@ void CustomAnimationPane::onAdd()
 bool bFirst = true;
 for( const auto& rTarget : aTargets )
 {
+css::uno::Reference 
xLockable(getTargetShape(rTarget), css::uno::UNO_QUERY);
+if (xLockable.is())
+xLockable->addActionLock();
+comphelper::ScopeGuard aGuard([]()
+{
+if (xLockable.is())
+xLockable->removeActionLock();
+});
+
 CustomAnimationEffectPtr pCreated = mpMainSequence->append( 
pDescriptor, rTarget, fDuration );
 
 // if only one shape with text and no fill or outline is selected, 
animate only by first level paragraphs
diff --git 

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

2021-02-18 Thread Tamás Zolnai (via logerrit)
 sd/source/ui/view/drawview.cxx |7 ++-
 svx/source/svdraw/svdedxv.cxx  |1 -
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 92d1eaab8adf8de7afa607119770adb042283700
Author: Tamás Zolnai 
AuthorDate: Wed Feb 17 15:53:08 2021 +0100
Commit: Tamás Zolnai 
CommitDate: Thu Feb 18 16:13:17 2021 +0100

Better fix for tdf#125824: switch page only for the current view.

First workaround was avoiding undoing:
9dca7c2fac5c6b83a6910aa61b1a2a316f36d948

Second workaround was forcing all views to exit text editing:
e6c7a018a0cfee395ce2886d41c908a2447ef5cc

Instead of these solutions, we allow to continue text editing
in other views. What we do is avoiding jumping to the object
location in all views while undoing. In theory, the two views
/ windows should be able to edit the document's different parts
independently. So one view should not jump to the location where
the other view edits something / does an undo.

It works both with multi-window and Collabora Online's collaborative
editing.

Change-Id: I7ffe29bf175b8f855fe3e92b3d7e11ca6bcd3f5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111073
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 7db8c3d36db3ed727ade2609b7c1017cc813a560)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/12
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 4ac4580cd118..deaa309e5031 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -423,8 +423,13 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& 
rHint)
 // switch to that page when it's not a master page
 if(SdrHintKind::SwitchToPage == eHintKind)
 {
-const SdrPage* pPage = static_cast(rHint).GetPage();
+// We switch page only in the current view, which triggered this 
event
+// and keep other views ontouched.
+SfxViewShell* pViewShell = SfxViewShell::Current();
+if(pViewShell && pViewShell != 
>GetViewShellBase())
+return;
 
+const SdrPage* pPage = static_cast(rHint).GetPage();
 if(pPage && !pPage->IsMasterPage())
 {
 if(mpDrawViewShell->GetActualPage() != pPage)
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 15dac1b614ee..268981f99df0 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1523,7 +1523,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool 
bDontDeleteReally)
 const bool bUndo = IsUndoEnabled();
 if (bUndo)
 {
-EndTextEditAllViews();
 OUString aObjName(pTEObj->TakeObjNameSingul());
 BegUndo(SvxResId(STR_UndoObjSetText), aObjName);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-03 Thread Mike Kaganski (via logerrit)
 sd/source/ui/func/futext.cxx  |3 ---
 svx/source/svdraw/svdedxv.cxx |7 +++
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 49124a6c5e14562110ea9a9318d1a93b14f9fa5c
Author: Mike Kaganski 
AuthorDate: Fri Jul 3 16:25:03 2020 +0300
Commit: Mike Kaganski 
CommitDate: Sat Jul 4 00:12:32 2020 +0200

Re-implement 481e686a66e550229ec0b600a785452f0d753342

Marking documents modified simply on entry to an edit box created a
problem, when using search in a read-only Online session made the
document modified, and then auto-save failed, displaying a warning:

Document cannot be saved. Check your permissions or contact the
storage server administrator.

The original problem, that 481e686a66e550229ec0b600a785452f0d753342
fixed, was that entering a box in Impress in browser, typing, then
pressing Save without exiting the box did not save the edits. Yet,
the same sequence works outside of Online. In that case, the doc is
marked modified in SdrObjEditView::KeyInput, which obviously is not
called from Online, where SdrObjEditView::Command is called instead
with CommandEventId::ExtTextInput. So just make sure that we mark
the document modified also in this case, making sure that only the
actual edits set the "modified" flag.

This reverts 481e686a66e550229ec0b600a785452f0d753342.

Change-Id: Ib05bc0492616a306dd328bcb8f2e1c9d7e7aa191
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97870
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index ca22efc08780..358805436097 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -64,7 +64,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -196,8 +195,6 @@ void FuText::DoExecute( SfxRequest& )
 SdrViewEvent aVEvt;
 mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
 mpView->MarkObj(aVEvt.pRootObj, pPV);
-if (comphelper::LibreOfficeKit::isActive() && mpViewShell->GetDocSh())
-mpViewShell->GetDocSh()->SetModified();
 
 mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) );
 }
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6270005c..9551cf985b03 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1980,6 +1980,13 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, 
vcl::Window* pWin)
 else
 {
 pTextEditOutlinerView->Command(rCEvt);
+if (mpModel && comphelper::LibreOfficeKit::isActive())
+{
+// It could execute CommandEventId::ExtTextInput, while 
SdrObjEditView::KeyInput
+// isn't called
+if (pTextEditOutliner && pTextEditOutliner->IsModified())
+mpModel->SetChanged();
+}
 return true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-15 Thread Libreoffice Gerrit user
 sd/source/filter/ppt/pptin.cxx|8 +++
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |   41 --
 2 files changed, 27 insertions(+), 22 deletions(-)

New commits:
commit 307f561e8dce3c7a685de4af92563c9094925de6
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 11:37:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 15 22:22:57 2018 +0200

ofz#9821 Indirect-leak

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

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c0f022282699..70a5ae3ee8ed 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2785,7 +2785,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool 
TestImportPPT(SvStream )
 ::sd::DrawDocShellRef xDocShRef = new 
::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
 SdDrawDocument *pDoc = xDocShRef->GetDoc();
 
-bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+try
+{
+bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+}
+catch (...)
+{
+}
 
 xDocShRef->DoClose();
 }
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index de998eb422e5..6a8dd7d3986e 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -298,29 +298,27 @@ Reference< drawing::XShape > SAL_CALL 
EnhancedCustomShapeEngine::render()
 bool bFlipH = aCustomShape2d.IsFlipHorz();
 bool bLineGeometryNeededOnly = bTextPathOn;
 
-SdrObject* pRenderedShape = aCustomShape2d.CreateObject( 
bLineGeometryNeededOnly );
-if ( pRenderedShape )
+std::unique_ptr 
xRenderedShape(aCustomShape2d.CreateObject(bLineGeometryNeededOnly));
+if (xRenderedShape)
 {
 if ( bTextPathOn )
 {
-SdrObject* pRenderedFontWork(
+std::unique_ptr xRenderedFontWork(
 EnhancedCustomShapeFontWork::CreateFontWork(
-pRenderedShape,
+xRenderedShape.get(),
 rSdrObjCustomShape));
 
-if ( pRenderedFontWork )
+if (xRenderedFontWork)
 {
-SdrObject::Free( pRenderedShape );
-pRenderedShape = pRenderedFontWork;
+xRenderedShape = std::move(xRenderedFontWork);
 }
 }
-SdrObject* pRenderedShape3d = 
EnhancedCustomShape3d::Create3DObject(pRenderedShape, rSdrObjCustomShape);
-if ( pRenderedShape3d )
+std::unique_ptr 
xRenderedShape3d(EnhancedCustomShape3d::Create3DObject(xRenderedShape.get(), 
rSdrObjCustomShape));
+if (xRenderedShape3d)
 {
 bFlipV = bFlipH = false;
 nRotateAngle = 0;
-SdrObject::Free( pRenderedShape );
-pRenderedShape = pRenderedShape3d;
+xRenderedShape = std::move(xRenderedShape3d);
 }
 
 tools::Rectangle aRect(rSdrObjCustomShape.GetSnapRect());
@@ -336,43 +334,44 @@ Reference< drawing::XShape > SAL_CALL 
EnhancedCustomShapeEngine::render()
 nTan = -nTan;
 }
 
-pRenderedShape->Shear(rSdrObjCustomShape.GetSnapRect().Center(), 
nShearAngle, nTan, false);
+xRenderedShape->Shear(rSdrObjCustomShape.GetSnapRect().Center(), 
nShearAngle, nTan, false);
 }
 if(nRotateAngle )
 {
 double a = nRotateAngle * F_PI18000;
 
-
pRenderedShape->NbcRotate(rSdrObjCustomShape.GetSnapRect().Center(), 
nRotateAngle, sin( a ), cos( a ));
+
xRenderedShape->NbcRotate(rSdrObjCustomShape.GetSnapRect().Center(), 
nRotateAngle, sin( a ), cos( a ));
 }
 if ( bFlipV )
 {
 Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 );
 Point aRight( aLeft.X() + 1000, aLeft.Y() );
-pRenderedShape->NbcMirror( aLeft, aRight );
+xRenderedShape->NbcMirror( aLeft, aRight );
 }
 if ( bFlipH )
 {
 Point aTop( ( aRect.Left() + aRect.Right() ) >> 1, aRect.Top() );
 Point aBottom( aTop.X(), aTop.Y() + 1000 );
-pRenderedShape->NbcMirror( aTop, aBottom );
+xRenderedShape->NbcMirror( aTop, aBottom );
 }
 
-pRenderedShape->NbcSetStyleSheet(rSdrObjCustomShape.GetStyleSheet(), 
true);
-pRenderedShape->RecalcSnapRect();
+xRenderedShape->NbcSetStyleSheet(rSdrObjCustomShape.GetStyleSheet(), 
true);
+xRenderedShape->RecalcSnapRect();
 }
 
 if ( mbForceGroupWithText )
 {
-pRenderedShape = ImplForceGroupWithText(
+

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

2018-07-31 Thread Libreoffice Gerrit user
 sd/source/filter/ppt/pptinanimations.cxx |2 +-
 svx/source/svdraw/svdopath.cxx   |2 +-
 vcl/source/gdi/bmpfast.cxx   |4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8d5a74868383e5405a2225d6a7268dec5ca9cbff
Author: Andrea Gelmini 
AuthorDate: Tue Jul 31 23:49:50 2018 +0200
Commit: Jens Carl 
CommitDate: Wed Aug 1 02:37:46 2018 +0200

Fix typos

Change-Id: Id59caa7da8fdfd613eb3b97196c52131aeb7378c
Reviewed-on: https://gerrit.libreoffice.org/58375
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sd/source/filter/ppt/pptinanimations.cxx 
b/sd/source/filter/ppt/pptinanimations.cxx
index 60a59688d6c3..18c3b82988f4 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2150,7 +2150,7 @@ void AnimationImporter::importAnimateKeyPoints( const 
Atom* pAtom, const Referen
 pValue = Atom::findNextChildAtom(pValue);
 if( pValue && pValue->getType() == 
DFF_msofbtAnimAttributeValue )
 {
-// Any occurence of the formula becomes the 
formula of the whole list.
+// Any occurrence of the formula becomes the 
formula of the whole list.
 if (importAttributeValue(pValue, aValue2))
 aValue2 >>= aFormula;
 }
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index ec60bc5a857a..63acf8d4f9f5 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2322,7 +2322,7 @@ void SdrPathObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const Fract
 // manipulate at all - that may change aGeo rapidly (and wrongly) in
 // SdrTextObj::NbcResize. Combined with the UNO API trying to not 
'apply'
 // a rotation but to manipulate the existing one, this is fatal. So 
just
-// avoid this error as long as we have to deal with unprecise geometry
+// avoid this error as long as we have to deal with imprecise geometry
 // manipulations
 return;
 }
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 3f1d678f9767..ebc181e42d07 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -440,7 +440,7 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const 
BitmapBuffer& rSrc,
 // TODO: rDst.mnFormat ^= ScanlineFormat::TopDown;
 return false;
 
-// offseted conversion is not implemented yet
+// offsetted conversion is not implemented yet
 if( rTR.mnSrcX || rTR.mnSrcY )
 return false;
 if( rTR.mnDestX || rTR.mnDestY )
@@ -680,7 +680,7 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & 
rDstWA,
 // TODO: rDst.mnFormat ^= ScanlineFormat::TopDown;
 return false;
 
-// offseted blending is not implemented yet
+// offsetted blending is not implemented yet
 if( rTR.mnSrcX || rTR.mnSrcY )
 return false;
 if( rTR.mnDestX || rTR.mnDestY )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-14 Thread Mark Hung
 sd/source/ui/func/fuediglu.cxx |2 +-
 svx/source/svdraw/svddrgv.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bf151f0716910b56e3538579f4af7ede8f51bbcf
Author: Mark Hung 
Date:   Fri Dec 15 00:13:49 2017 +0800

tdf113594: marking gluepoints immediately.

pPV was for the parameter of MarkGluePoint that was removed
in ec38966951f2, and was kept somehow and is converted
to bool here.  Just replace the default boolean value to false
( that means marking instead of unmarking. )

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

diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index bed07d6d72ed..da333d6b0621 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -141,7 +141,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& 
rMEvt)
 if (!rMEvt.IsShift())
 mpView->UnmarkAllGluePoints();
 
-mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, aVEvt.pPV);
+mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, false);
 SdrHdl* pHdl = mpView->GetGluePointHdl(aVEvt.pObj, aVEvt.nGlueId);
 
 if (pHdl)
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 19cafe3e0b30..29293f1c7540 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -741,7 +741,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
 rGP.SetAbsolutePos(rPnt,*pObj);
 
 SdrHdl* pHdl=nullptr;
-if (MarkGluePoint(pObj,nGlueId,pPV))
+if (MarkGluePoint(pObj,nGlueId,false))
 {
 pHdl=GetGluePointHdl(pObj,nGlueId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-11 Thread Takeshi Abe
 sd/source/ui/func/fuarea.cxx |2 +-
 sd/source/ui/func/fuchar.cxx |2 +-
 sd/source/ui/func/fuline.cxx |2 +-
 sd/source/ui/func/fuoltext.cxx   |2 +-
 sd/source/ui/func/fuparagr.cxx   |2 +-
 sd/source/ui/func/fusearch.cxx   |2 +-
 sd/source/ui/func/futext.cxx |2 +-
 sd/source/ui/func/fuzoom.cxx |2 +-
 sd/source/ui/inc/fuzoom.hxx  |2 +-
 sd/source/ui/sidebar/SlideBackground.cxx |2 +-
 svx/source/toolbars/extrusionbar.cxx |2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 5e79d60fa9e48c343dfebbed360a420b9e0f4e2d
Author: Takeshi Abe 
Date:   Sun Dec 11 15:15:49 2016 +0900

Mark as const

Change-Id: Ie4b7d45d26fbd839f9afcd11a7ba4bff80ed54e8
Reviewed-on: https://gerrit.libreoffice.org/31854
Tested-by: Jenkins 
Reviewed-by: Takeshi Abe 

diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index ac4fff6..1b83544 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -70,7 +70,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
 }
 
 // attributes changed, update Listboxes in Objectbars
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_ATTR_FILL_STYLE,
 SID_ATTR_FILL_COLOR,
 SID_ATTR_FILL_GRADIENT,
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index f5601b3..91dce94 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -134,7 +134,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
 mpView->SetAttributes(*pArgs);
 
 // invalidate the Slots which are in DrTxtObjBar
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_ATTR_CHAR_FONT,
 SID_ATTR_CHAR_POSTURE,
 SID_ATTR_CHAR_WEIGHT,
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 5f643ef..16a1200 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -82,7 +82,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
 }
 
 // some attributes are changed, we have to update the listboxes in the 
objectbars
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_ATTR_LINE_STYLE,// ( SID_SVX_START + 169 )
 SID_ATTR_LINE_DASH, // ( SID_SVX_START + 170 )
 SID_ATTR_LINE_WIDTH,// ( SID_SVX_START + 171 )
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 88507be..b342d50 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -41,7 +41,7 @@
 
 namespace sd {
 
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_STYLE_FAMILY2,
 SID_STYLE_FAMILY3,
 SID_STYLE_FAMILY5,
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 9daab0a..9d0f39d 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -132,7 +132,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
 }
 
 // invalidate slots
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_ATTR_TABSTOP,
 SID_ATTR_PARA_ADJUST_LEFT,
 SID_ATTR_PARA_ADJUST_RIGHT,
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 48aca71..b49ed70 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -40,7 +40,7 @@ class SfxRequest;
 
 namespace sd {
 
-static sal_uInt16 SidArraySpell[] = {
+static const sal_uInt16 SidArraySpell[] = {
 SID_DRAWINGMODE,
 SID_OUTLINE_MODE,
 SID_SLIDE_SORTER_MODE,
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 200c001..17aa214 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::linguistic2;
 
 namespace sd {
 
-static sal_uInt16 SidArray[] = {
+static const sal_uInt16 SidArray[] = {
 SID_STYLE_FAMILY2,//5542
 SID_STYLE_FAMILY5,//5545
 SID_REDO, //5700
diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx
index f0e7fa8..1cac382 100644
--- a/sd/source/ui/func/fuzoom.cxx
+++ b/sd/source/ui/func/fuzoom.cxx
@@ -34,7 +34,7 @@
 
 namespace sd {
 
-sal_uInt16 SidArrayZoom[] = {
+const sal_uInt16 SidArrayZoom[] = {
 SID_ATTR_ZOOM,
 SID_ZOOM_OUT,
 SID_ZOOM_IN,
diff --git a/sd/source/ui/inc/fuzoom.hxx b/sd/source/ui/inc/fuzoom.hxx
index fe4dbaa..0286224 100644
--- 

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

2016-04-26 Thread Armin Le Grand
 sd/source/ui/unoidl/unopage.cxx|   34 ---
 svx/source/inc/svdoutlinercache.hxx|   15 --
 svx/source/svdraw/svdmodel.cxx |4 --
 svx/source/svdraw/svdoutlinercache.cxx |   47 ++---
 svx/source/unodraw/unoshap2.cxx|   18 
 xmloff/source/draw/ximpbody.cxx|   23 
 xmloff/source/draw/ximpshap.cxx|   23 
 7 files changed, 75 insertions(+), 89 deletions(-)

New commits:
commit e6adb3e8b4de3c0f78d249b83de19b849ef65b59
Author: Armin Le Grand 
Date:   Fri Apr 22 17:54:14 2016 +0200

tdf#98163 Flush ressources at CustomShapes during import

During ODF import using API for CustomShapes Outliners and
VirtualDevioces get created and not destroyed due to referencing.
This makes the ressources blow up, even under 64bit windows.
Also see tdf#93994 where this was already fixed on page base,
but this is not sufficient for this case.

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

diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index e0ad670..cea55cb 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -606,40 +606,6 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const 
OUString& aPropertyName
 
 throwIfDisposed();
 
-// tdf#93994 Use a custom slot to have filter code flush the UNO
-// API implementations of SdrObjCustomShape. Used e.g. by
-// SdXMLDrawPageContext::EndElement(), see there for more
-// information
-if(SvxFmDrawPage::mpPage)
-{
-const OUString 
sFlushCustomShapeUnoApiObjects("FlushCustomShapeUnoApiObjects");
-
-if(sFlushCustomShapeUnoApiObjects == aPropertyName)
-{
-SdrObjListIter aIter(static_cast< SdPage& 
>(*SvxFmDrawPage::mpPage), IM_DEEPWITHGROUPS);
-
-while(aIter.IsMore())
-{
-SdrObjCustomShape* pCustomShape = dynamic_cast< 
SdrObjCustomShape* >(aIter.Next());
-
-if(pCustomShape)
-{
-// tdf#96522 do not reset UNO API implementation since 
e.g. the
-// animation evtl. added to the object uses weak 
references and
-// will be lost when resetting it. In that sense it is 
*not* a
-// on-demand recreatable ressource.
-// Luckily, the object causing problems in tdf#93994 is 
not the
-// UNO API object, but the XCustomShapeEngine involved. 
This
-// object is on-demand replacable and can be reset here. 
This
-// will free the involved EditEngine and VirtualDevice.
-pCustomShape->mxCustomShapeEngine.set(nullptr);
-}
-}
-
-return;
-}
-}
-
 const SfxItemPropertySimpleEntry* pEntry = 
mpPropSet->getPropertyMapEntry(aPropertyName);
 
 switch( pEntry ? pEntry->nWID : -1 )
diff --git a/svx/source/inc/svdoutlinercache.hxx 
b/svx/source/inc/svdoutlinercache.hxx
index 39bb5d8..3bc3212 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 
 class SdrModel;
 class SdrOutliner;
@@ -30,22 +31,18 @@ class SdrOutliner;
 class SdrOutlinerCache
 {
 private:
-SdrModel*   mpModel;
+SdrModel*mpModel;
+std::vector< SdrOutliner* >  maModeOutline;
+std::vector< SdrOutliner* >  maModeText;
+std::set< SdrOutliner* > maActiveOutliners;
 
-SdrOutliner*mpModeOutline;
-SdrOutliner*mpModeText;
-
-std::vector maActiveOutliners;
 public:
 SdrOutlinerCache( SdrModel* pModel );
 ~SdrOutlinerCache();
 
 SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
 void disposeOutliner( SdrOutliner* pOutliner );
-const std::vector& GetActiveOutliners() const
-{
-return maActiveOutliners;
-}
+std::vector< SdrOutliner* > GetActiveOutliners() const;
 };
 
 #endif
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index ffa16dc..4aea8c6 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1963,9 +1963,7 @@ SdrOutliner* SdrModel::createOutliner( sal_uInt16 
nOutlinerMode )
 
 std::vector SdrModel::GetActiveOutliners() const
 {
-std::vector aRet(mpOutlinerCache ?
-mpOutlinerCache->GetActiveOutliners() : std::vector());
-
+std::vector< SdrOutliner* > aRet(mpOutlinerCache ? 
mpOutlinerCache->GetActiveOutliners() : std::vector< SdrOutliner* >());
 aRet.push_back(pDrawOutliner);
 aRet.push_back(pHitTestOutliner);
 
diff 

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

2016-04-15 Thread Noel Grandin
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx|1 -
 sd/source/ui/view/clview.cxx |3 +--
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |4 +++-
 sw/source/core/doc/DocumentDrawModelManager.cxx  |1 -
 4 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 7ac9973da65d80832069afa76fd7325cf53c9293
Author: Noel Grandin 
Date:   Fri Apr 15 13:20:14 2016 +0200

clang-tidy misc-forward-declaration-namespace

Change-Id: I0566e9992e0d96ee710c8bce2ae6f44a9e83b4e4

diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx 
b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 0925b0f..3c9cebc 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -75,7 +75,6 @@ private:
 // compactor.
 bool mbIsPrecious;
 };
-class CacheEntry;
 
 class CacheHash {
 public:
diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx
index 9fff091..b885d3b 100644
--- a/sd/source/ui/view/clview.cxx
+++ b/sd/source/ui/view/clview.cxx
@@ -23,10 +23,9 @@
 #include "drawview.hxx"
 #include "sdpage.hxx"
 
-class DrawDocShell;
-
 namespace sd {
 
+class DrawDocShell;
 class DrawViewShell;
 
 /**
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index afe99c3..bc27dbc 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -46,7 +46,6 @@
 #include 
 
 
-class TransparencePrimitive2D;
 using namespace com::sun::star;
 
 
@@ -54,6 +53,9 @@ namespace drawinglayer
 {
 namespace primitive2d
 {
+
+class TransparencePrimitive2D;
+
 Primitive2DReference createPolyPolygonFillPrimitive(
 const basegfx::B2DPolyPolygon& rPolyPolygon,
 const attribute::SdrFillAttribute& rFill,
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx 
b/sw/source/core/doc/DocumentDrawModelManager.cxx
index b889b8c..dfc542d 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -49,7 +49,6 @@
 #include 
 
 class SdrOutliner;
-class XSpellChecker1;
 
 namespace sw
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-03 Thread Jorenz Paragas
 sd/source/ui/tools/PropertySet.cxx |8 
 svx/source/form/formcontroller.cxx |   10 --
 2 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 4a2e0fa708bb00d35febe9e8939dcc0c2197e2f4
Author: Jorenz Paragas j.paragas@gmail.com
Date:   Sat Aug 1 15:04:02 2015 -0700

tdf#91112: replace o3tl::compose1 with lambdas in sd and svx

Change-Id: I53c73c6210ba3eec4d73949a329a35ad7834220e
Reviewed-on: https://gerrit.libreoffice.org/17468
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/sd/source/ui/tools/PropertySet.cxx 
b/sd/source/ui/tools/PropertySet.cxx
index eb7c06d..dd1e650 100644
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -119,10 +119,10 @@ void SAL_CALL PropertySet::removePropertyChangeListener (
 ::std::find_if(
 aRange.first,
 aRange.second,
-o3tl::compose1(
-
std::bind1st(std::equal_toReferencebeans::XPropertyChangeListener (),
-rxListener),
-o3tl::select2ndChangeListenerContainer::value_type(;
+[rxListener] (const ChangeListenerContainer::value_type 
listener) {
+return listener.second == rxListener;
+}));
+
 if (iListener != mpChangeListeners-end())
 {
 mpChangeListeners-erase(iListener);
diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index 8c88f64..c907601 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -507,7 +507,7 @@ struct UpdateAllListeners : public ::std::unary_function 
Reference XDispatch 
 bool operator()( const Reference XDispatch  _rxDispatcher ) const
 {
 static_cast svx::OSingleFeatureDispatcher* ( _rxDispatcher.get() 
)-updateAllListeners();
-// the return is a dummy only so we can use this struct in a 
o3tl::compose1 call
+// the return is a dummy only so we can use this struct in a lambda 
expression
 return true;
 }
 };
@@ -2607,11 +2607,9 @@ void FormController::updateAllDispatchers() const
 ::std::for_each(
 m_aFeatureDispatchers.begin(),
 m_aFeatureDispatchers.end(),
-::o3tl::compose1(
-UpdateAllListeners(),
-::o3tl::select2nd DispatcherContainer::value_type ()
-)
-);
+[] (const DispatcherContainer::value_type dispatcher) {
+UpdateAllListeners()(dispatcher.second);
+});
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-07-15 Thread Michael Stahl
 sd/source/core/stlpool.cxx |5 -
 svx/source/unodraw/unopool.cxx |5 -
 sw/source/core/unocore/SwXTextDefaults.cxx |7 +--
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5
Author: Michael Stahl mst...@redhat.com
Date:   Wed Jul 15 18:38:38 2015 +0200

svx, sd, sw: GetPoolDefaultItem() can actually return nullptr

...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall.

Change-Id: I409484c172fb5843270aee2425844076a008b4df

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index f4eee39..a45bbaa 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1127,7 +1127,10 @@ void SdStyleSheetPool::PutNumBulletItem( 
SfxStyleSheetBase* pSheet,
 case HID_PSEUDOSHEET_SUBTITLE :
 {
 // Subtitle template
-SvxNumRule* pDefaultRule = static_castconst SvxNumBulletItem*( 
rSet.GetPool()-GetSecondaryPool()-GetPoolDefaultItem(EE_PARA_NUMBULLET))-GetNumRule();
+SvxNumBulletItem const*const pItem(
+static_castconst SvxNumBulletItem*(
+
rSet.GetPool()-GetSecondaryPool()-GetPoolDefaultItem(EE_PARA_NUMBULLET)));
+SvxNumRule *const pDefaultRule = (pItem) ? pItem-GetNumRule() : 
nullptr;
 DBG_ASSERT( pDefaultRule, Where is my default template? [CL] );
 
 if(pDefaultRule)
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index bc4f253..dccdbad 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -321,7 +321,10 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const 
comphelper::PropertyMapEntry
 SfxItemPool* pPool = getModelPool( true );
 const sal_uInt16 nWhich = pPool-GetWhich( (sal_uInt16)pEntry-mnHandle );
 const SfxPoolItem *pItem = pPool-GetPoolDefaultItem ( nWhich );
-pItem-QueryValue( aAny, pEntry-mnMemberId );
+if (pItem)
+{
+pItem-QueryValue( aAny, pEntry-mnMemberId );
+}
 
 return aAny;
 }
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx 
b/sw/source/core/unocore/SwXTextDefaults.cxx
index 9955b44..5c6e256 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -219,8 +219,11 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const 
OUString rPropertyName
 throw UnknownPropertyException( Unknown property:  + rPropertyName, 
static_cast  cppu::OWeakObject *  ( this ) );
 Any aRet;
 SfxItemPool rSet (m_pDoc-GetAttrPool());
-const SfxPoolItem *pItem = rSet.GetPoolDefaultItem ( pMap-nWID );
-pItem-QueryValue( aRet, pMap-nMemberId );
+SfxPoolItem const*const pItem = rSet.GetPoolDefaultItem(pMap-nWID);
+if (pItem)
+{
+pItem-QueryValue( aRet, pMap-nMemberId );
+}
 return aRet;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-14 Thread Caolán McNamara
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |6 +++---
 svx/source/fmcomp/dbaobjectex.cxx |2 +-
 xmloff/source/text/txtfldi.cxx|2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0b3766645d7d52d5c2022b1e8e4617eff06403c8
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Nov 14 17:21:20 2014 +

more catch by reference

Change-Id: I2db9f94a517f814ef0854190e6f1194501070409

diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx 
b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 3cd301c..2621071 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -979,12 +979,12 @@ uno::ReferenceXAccessible 
AccessibleDrawDocumentView::GetSelAccContextInTable(
 }
 }
 }
-catch ( lang::IndexOutOfBoundsException )
+catch (const lang::IndexOutOfBoundsException)
 {
 uno::ReferenceXAccessible xEmpty;
 return xEmpty;
 }
-catch ( uno::RuntimeException )
+catch (const uno::RuntimeException)
 {
 uno::ReferenceXAccessible xEmpty;
 return xEmpty;
@@ -1014,7 +1014,7 @@ void AccessibleDrawDocumentView::UpdateAccessibleName 
(void)
 sNewName += OUString::number(nPageNumber);
 }
 }
-catch (beans::UnknownPropertyException)
+catch (const beans::UnknownPropertyException)
 {
 }
 }
diff --git a/svx/source/fmcomp/dbaobjectex.cxx 
b/svx/source/fmcomp/dbaobjectex.cxx
index c327c75..d43184e 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -80,7 +80,7 @@ namespace svx
 if ( xProp.is() )
 xProp-getPropertyValue(IsForm) = bForm;
 }
-catch(Exception)
+catch(const Exception)
 {}
 AddFormat(getDescriptorFormatId(bForm));
 }
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index b456ae6..93e1d81 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3765,7 +3765,7 @@ void XMLAnnotationImportContext::EndElement()
 {
 GetImportHelper().InsertTextContent( xTextContent );
 }
-catch (lang::IllegalArgumentException)
+catch (const lang::IllegalArgumentException)
 {
 // ignore
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-12 Thread Stephan Bergmann
 sd/source/ui/unoidl/unopage.cxx |6 +++---
 svx/source/unodraw/unoprov.cxx  |   12 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7b3c5cb12e91ce2a88b232c099366e7d1f633e7e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Dec 12 11:58:59 2013 +0100

Fix C++03 digraphs

Change-Id: I456469c27b60290ad8280fe12fcb82958e1a6c85

diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index c285a6a..6a0e9d1 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -147,7 +147,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( 
sal_Bool bImpress, PageKin
 { OUString(TransitionFadeColor),  WID_TRANSITION_FADE_COLOR, 
::getCppuType((const sal_Int32*)0), 0,  0},
 { OUString(TransitionDuration),   WID_TRANSITION_DURATION, 
::getCppuType((const double*)0),  0,  0},
 { OUString(LoopSound),WID_LOOP_SOUND, 
::getBooleanCppuType(),0, 0},
-{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoType::com::sun::star::container::XIndexAccess::get(),0,  0},
+{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoTypecss::container::XIndexAccess::get(),0,  0},
 { OUString(), 0, css::uno::Type(), 0, 0 }
 };
 
@@ -174,7 +174,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( 
sal_Bool bImpress, PageKin
 { OUString(IsDateTimeFixed),  WID_PAGE_DATETIMEFIXED, 
::getBooleanCppuType(),0, 0},   
  \
 { OUString(DateTimeText), WID_PAGE_DATETIMETEXT, 
::getCppuType((const OUString*)0),  0,  0}, 
   \
 { OUString(DateTimeFormat),   WID_PAGE_DATETIMEFORMAT, 
::getCppuType((const sal_Int32*)0),   0,  0},   
 \
-{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoType::com::sun::star::container::XIndexAccess::get(),0,  0}, 
   \
+{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoTypecss::container::XIndexAccess::get(),0,  0},  
  \
 { OUString(), 0, css::uno::Type(), 0, 0 }
 
 static const SfxItemPropertyMapEntry 
aDrawPageNotesHandoutPropertyMap_Impl[] =
@@ -204,7 +204,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( 
sal_Bool bImpress, PageKin
 { OUString(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, 
::getCppuType((const Reference ::com::sun::star::container::XNameContainer 
*)0)  , 0, 0},  \
 { OUString(sUNO_Prop_BookmarkURL),  WID_PAGE_BOOKMARK,  
::getCppuType((const OUString*)0), 0,  0},  
   \
 { OUString(IsBackgroundDark), WID_PAGE_ISDARK,
::getBooleanCppuType(),
beans::PropertyAttribute::READONLY, 0}, 
\
-{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoType::com::sun::star::container::XIndexAccess::get(),0,  0}, 
\
+{ OUString(NavigationOrder),  WID_NAVORDER, 
cppu::UnoTypecss::container::XIndexAccess::get(),0,  0},  
   \
 { OUString(), 0, css::uno::Type(), 0, 0 }
 
 static const SfxItemPropertyMapEntry aGraphicPagePropertyMap_Impl[] =
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 0ec21af..4972b49 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -245,7 +245,7 @@ SfxItemPropertyMapEntry const * 
ImplGetSvxGraphicObjectPropertyMap()
 { OUString(IsMirrored), OWN_ATTR_MIRRORED, ::getCppuBooleanType(), 
0, 0},
 { OUString(UserDefinedAttributes), SDRATTR_XMLATTRIBUTES, 
::getCppuType((const ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameContainer *)0)  ,0, 0},
 { OUString(ParaUserDefinedAttributes), EE_PARA_XMLATTRIBS, 
::getCppuType((const ::com::sun::star::uno::Reference 
::com::sun::star::container::XNameContainer *)0)  ,0, 0},
-{ OUString(GraphicStream), OWN_ATTR_GRAPHIC_STREAM, 
cppu::UnoType::com::sun::star::io::XInputStream::get(), 
::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+{ OUString(GraphicStream), OWN_ATTR_GRAPHIC_STREAM, 
cppu::UnoTypecss::io::XInputStream::get(), 
::com::sun::star::beans::PropertyAttribute::READONLY, 0},
 { OUString(), 0, css::uno::Type(), 0, 0 }
 };
 
@@ -726,7 +726,7 @@ 

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

2013-11-16 Thread Julien Nabet
 sd/source/ui/view/drviewsa.cxx |3 +--
 svx/source/svdraw/svddrgmt.cxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 49ca17de76ba4a6396b9207a82d460cbae7c6d53
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sat Nov 16 13:17:09 2013 +0100

cppcheck: reduce scope

Change-Id: Ifa54cc132f0c6591c57639f85e789b08a60b7f4b

diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index a836a22..0d48e74 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -733,7 +733,6 @@ void DrawViewShell::GetStatusBarState(SfxItemSet rSet)
 {
 SdrLayerAdmin rLayerAdmin = GetDoc()-GetLayerAdmin();
 SdrLayerID nLayer = 0, nOldLayer = 0;
-SdrLayer*  pLayer = NULL;
 SdrObject* pObj = NULL;
 const SdrMarkList rMarkList = mpDrawView-GetMarkedObjectList();
 sal_uLong nMarkCount = rMarkList.GetMarkCount();
@@ -759,7 +758,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet rSet)
 // Append the layer name to the current page number.
 if( bOneLayer  nMarkCount )
 {
-pLayer = rLayerAdmin.GetLayerPerID( nLayer );
+SdrLayer* pLayer = rLayerAdmin.GetLayerPerID( nLayer );
 if( pLayer )
 {
 aOUString +=  ( ;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 73d13ea..5a6cba4 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1777,7 +1777,6 @@ SdrDragResize::SdrDragResize(SdrDragView rNewView)
 void SdrDragResize::TakeSdrDragComment(OUString rStr) const
 {
 ImpTakeDescriptionStr(STR_DragMethResize, rStr);
-bool bEqual(aXFact == aYFact);
 Fraction aFact1(1,1);
 Point aStart(DragStat().GetStart());
 Point aRef(DragStat().GetRef1());
@@ -1800,6 +1799,7 @@ void SdrDragResize::TakeSdrDragComment(OUString rStr) 
const
 
 rStr +=  (;
 
+bool bEqual(aXFact == aYFact);
 if(bX)
 {
 if(!bEqual)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits