Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
08348b22
Kaydet (Commit)
08348b22
authored
Şub 14, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
boost::scoped_ptr->std::unique_ptr
Change-Id: I0f9d93e945ec554e9ea89621ecd30f683f3f184c
üst
bf8a4f0d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
63 deletions
+59
-63
ElementsDockingWindow.hxx
starmath/inc/ElementsDockingWindow.hxx
+1
-2
precompiled_sm.hxx
starmath/inc/pch/precompiled_sm.hxx
+0
-1
test_nodetotextvisitors.cxx
starmath/qa/cppunit/test_nodetotextvisitors.cxx
+4
-4
ElementsDockingWindow.cxx
starmath/source/ElementsDockingWindow.cxx
+17
-17
document.cxx
starmath/source/document.cxx
+18
-18
edit.cxx
starmath/source/edit.cxx
+10
-12
view.cxx
starmath/source/view.cxx
+9
-9
No files found.
starmath/inc/ElementsDockingWindow.hxx
Dosyayı görüntüle @
08348b22
...
...
@@ -20,7 +20,6 @@
#ifndef INCLUDED_STARMATH_INC_ELEMENTSDOCKINGWINDOW_HXX
#define INCLUDED_STARMATH_INC_ELEMENTSDOCKINGWINDOW_HXX
#include <boost/scoped_ptr.hpp>
#include <boost/signals2/signal.hpp>
#include <sfx2/dockwin.hxx>
#include <svx/dlgctrl.hxx>
...
...
@@ -97,7 +96,7 @@ class SmElementsControl : public Control
SmElementList
maElementList
;
Size
maMaxElementDimensions
;
bool
mbVerticalMode
;
boost
::
scoped_ptr
<
ScrollBar
>
mp
Scroll
;
std
::
unique_ptr
<
ScrollBar
>
mx
Scroll
;
void
addElement
(
const
OUString
&
aElementVisual
,
const
OUString
&
aElementSource
,
const
OUString
&
aHelpText
);
...
...
starmath/inc/pch/precompiled_sm.hxx
Dosyayı görüntüle @
08348b22
...
...
@@ -17,7 +17,6 @@
#include "svx/modctrl.hxx"
#include "tools/rcid.h"
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
...
...
starmath/qa/cppunit/test_nodetotextvisitors.cxx
Dosyayı görüntüle @
08348b22
...
...
@@ -19,7 +19,7 @@
#include <cursor.hxx>
#include "mock-visitor.hxx"
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
typedef
tools
::
SvRef
<
SmDocShell
>
SmDocShellRef
;
...
...
@@ -447,7 +447,7 @@ void Test::parseandparseagain(const char *formula, const char *test_name)
output2
);
// auxiliary test for Accept()
boost
::
scoped
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
std
::
unique
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
pNode1
->
Accept
(
mv
.
get
());
pNode2
->
Accept
(
mv
.
get
());
...
...
@@ -473,7 +473,7 @@ void Test::ParseAndCheck(const char *formula, const char * expected, const char
sOutput
);
// auxiliary test for Accept()
boost
::
scoped
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
std
::
unique
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
pNode
->
Accept
(
mv
.
get
());
delete
pNode
;
...
...
@@ -500,7 +500,7 @@ void Test::ParseAndCompare(const char *formula1, const char *formula2, const cha
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
test_name
,
sOutput1
,
sOutput2
);
// auxiliary test for Accept()
boost
::
scoped
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
std
::
unique
_ptr
<
MockVisitor
>
mv
(
new
MockVisitor
);
pNode1
->
Accept
(
mv
.
get
());
pNode2
->
Accept
(
mv
.
get
());
...
...
starmath/source/ElementsDockingWindow.cxx
Dosyayı görüntüle @
08348b22
...
...
@@ -222,7 +222,7 @@ SmElementsControl::SmElementsControl(vcl::Window *pParent)
,
maCurrentSetId
(
0
)
,
mpCurrentElement
(
NULL
)
,
mbVerticalMode
(
true
)
,
m
p
Scroll
(
new
ScrollBar
(
this
,
WB_VERT
))
,
m
x
Scroll
(
new
ScrollBar
(
this
,
WB_VERT
))
{
SetMapMode
(
MapMode
(
MAP_100TH_MM
)
);
SetDrawMode
(
DRAWMODE_DEFAULT
);
...
...
@@ -231,8 +231,8 @@ SmElementsControl::SmElementsControl(vcl::Window *pParent)
maFormat
.
SetBaseSize
(
PixelToLogic
(
Size
(
0
,
SmPtsTo100th_mm
(
12
))));
m
p
Scroll
->
SetScrollHdl
(
LINK
(
this
,
SmElementsControl
,
ScrollHdl
)
);
m
p
Scroll
->
Show
();
m
x
Scroll
->
SetScrollHdl
(
LINK
(
this
,
SmElementsControl
,
ScrollHdl
)
);
m
x
Scroll
->
Show
();
}
SmElementsControl
::~
SmElementsControl
()
...
...
@@ -249,7 +249,7 @@ void SmElementsControl::Paint(const Rectangle&)
{
Push
();
bool
bOldVisibleState
=
m
p
Scroll
->
IsVisible
();
bool
bOldVisibleState
=
m
x
Scroll
->
IsVisible
();
sal_Int32
nScrollbarWidth
=
bOldVisibleState
?
GetSettings
().
GetStyleSettings
().
GetScrollBarSize
()
:
0
;
...
...
@@ -260,7 +260,7 @@ void SmElementsControl::Paint(const Rectangle&)
sal_Int32
boxY
=
maMaxElementDimensions
.
Height
()
+
10
;
sal_Int32
x
=
0
;
sal_Int32
y
=
-
m
p
Scroll
->
GetThumbPos
();
sal_Int32
y
=
-
m
x
Scroll
->
GetThumbPos
();
sal_Int32
perLine
=
0
;
...
...
@@ -351,24 +351,24 @@ void SmElementsControl::Paint(const Rectangle&)
}
}
sal_Int32
nTotalControlHeight
=
y
+
boxY
+
m
p
Scroll
->
GetThumbPos
();
sal_Int32
nTotalControlHeight
=
y
+
boxY
+
m
x
Scroll
->
GetThumbPos
();
if
(
nTotalControlHeight
>
GetOutputSizePixel
().
Height
())
{
m
p
Scroll
->
SetRangeMax
(
nTotalControlHeight
);
m
p
Scroll
->
SetPosSizePixel
(
Point
(
nControlWidth
,
0
),
Size
(
nScrollbarWidth
,
nControlHeight
));
m
p
Scroll
->
SetVisibleSize
(
nControlHeight
);
m
p
Scroll
->
Show
();
m
x
Scroll
->
SetRangeMax
(
nTotalControlHeight
);
m
x
Scroll
->
SetPosSizePixel
(
Point
(
nControlWidth
,
0
),
Size
(
nScrollbarWidth
,
nControlHeight
));
m
x
Scroll
->
SetVisibleSize
(
nControlHeight
);
m
x
Scroll
->
Show
();
}
else
{
m
p
Scroll
->
SetThumbPos
(
0
);
m
p
Scroll
->
Hide
();
m
x
Scroll
->
SetThumbPos
(
0
);
m
x
Scroll
->
Hide
();
}
// If scrollbar visibility changed, we have to go through the
// calculation once more, see nScrollbarWidth
if
(
bOldVisibleState
!=
m
p
Scroll
->
IsVisible
())
if
(
bOldVisibleState
!=
m
x
Scroll
->
IsVisible
())
Invalidate
();
Pop
();
...
...
@@ -428,17 +428,17 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent)
IMPL_LINK_NOARG
(
SmElementsControl
,
ScrollHdl
)
{
DoScroll
(
m
p
Scroll
->
GetDelta
());
DoScroll
(
m
x
Scroll
->
GetDelta
());
return
0
;
}
void
SmElementsControl
::
DoScroll
(
long
nDelta
)
{
Point
aNewPoint
=
m
p
Scroll
->
GetPosPixel
();
Point
aNewPoint
=
m
x
Scroll
->
GetPosPixel
();
Rectangle
aRect
(
Point
(),
GetOutputSize
());
aRect
.
Right
()
-=
m
p
Scroll
->
GetSizePixel
().
Width
();
aRect
.
Right
()
-=
m
x
Scroll
->
GetSizePixel
().
Width
();
Scroll
(
0
,
-
nDelta
,
aRect
);
m
p
Scroll
->
SetPosPixel
(
aNewPoint
);
m
x
Scroll
->
SetPosPixel
(
aNewPoint
);
Invalidate
();
}
...
...
starmath/source/document.cxx
Dosyayı görüntüle @
08348b22
...
...
@@ -94,7 +94,7 @@
#include <tools/diagnose_ex.h>
#include "visitors.hxx"
#include "accessibility.hxx"
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
accessibility
;
...
...
@@ -989,15 +989,15 @@ void SmDocShell::Execute(SfxRequest& rReq)
pDev
=
&
SM_MOD
()
->
GetDefaultVirtualDev
();
OSL_ENSURE
(
pDev
,
"device for font list missing"
);
boost
::
scoped_ptr
<
SmFontTypeDialog
>
p
FontTypeDialog
(
new
SmFontTypeDialog
(
NULL
,
pDev
));
std
::
unique_ptr
<
SmFontTypeDialog
>
x
FontTypeDialog
(
new
SmFontTypeDialog
(
NULL
,
pDev
));
SmFormat
aOldFormat
=
GetFormat
();
p
FontTypeDialog
->
ReadFrom
(
aOldFormat
);
if
(
p
FontTypeDialog
->
Execute
()
==
RET_OK
)
x
FontTypeDialog
->
ReadFrom
(
aOldFormat
);
if
(
x
FontTypeDialog
->
Execute
()
==
RET_OK
)
{
SmFormat
aNewFormat
(
aOldFormat
);
p
FontTypeDialog
->
WriteTo
(
aNewFormat
);
x
FontTypeDialog
->
WriteTo
(
aNewFormat
);
::
svl
::
IUndoManager
*
pTmpUndoMgr
=
GetUndoManager
();
if
(
pTmpUndoMgr
)
pTmpUndoMgr
->
AddUndoAction
(
...
...
@@ -1011,15 +1011,15 @@ void SmDocShell::Execute(SfxRequest& rReq)
case
SID_FONTSIZE
:
{
boost
::
scoped_ptr
<
SmFontSizeDialog
>
p
FontSizeDialog
(
new
SmFontSizeDialog
(
NULL
));
std
::
unique_ptr
<
SmFontSizeDialog
>
x
FontSizeDialog
(
new
SmFontSizeDialog
(
NULL
));
SmFormat
aOldFormat
=
GetFormat
();
p
FontSizeDialog
->
ReadFrom
(
aOldFormat
);
if
(
p
FontSizeDialog
->
Execute
()
==
RET_OK
)
x
FontSizeDialog
->
ReadFrom
(
aOldFormat
);
if
(
x
FontSizeDialog
->
Execute
()
==
RET_OK
)
{
SmFormat
aNewFormat
(
aOldFormat
);
p
FontSizeDialog
->
WriteTo
(
aNewFormat
);
x
FontSizeDialog
->
WriteTo
(
aNewFormat
);
::
svl
::
IUndoManager
*
pTmpUndoMgr
=
GetUndoManager
();
if
(
pTmpUndoMgr
)
...
...
@@ -1034,15 +1034,15 @@ void SmDocShell::Execute(SfxRequest& rReq)
case
SID_DISTANCE
:
{
boost
::
scoped_ptr
<
SmDistanceDialog
>
p
DistanceDialog
(
new
SmDistanceDialog
(
NULL
));
std
::
unique_ptr
<
SmDistanceDialog
>
x
DistanceDialog
(
new
SmDistanceDialog
(
NULL
));
SmFormat
aOldFormat
=
GetFormat
();
p
DistanceDialog
->
ReadFrom
(
aOldFormat
);
if
(
p
DistanceDialog
->
Execute
()
==
RET_OK
)
x
DistanceDialog
->
ReadFrom
(
aOldFormat
);
if
(
x
DistanceDialog
->
Execute
()
==
RET_OK
)
{
SmFormat
aNewFormat
(
aOldFormat
);
p
DistanceDialog
->
WriteTo
(
aNewFormat
);
x
DistanceDialog
->
WriteTo
(
aNewFormat
);
::
svl
::
IUndoManager
*
pTmpUndoMgr
=
GetUndoManager
();
if
(
pTmpUndoMgr
)
...
...
@@ -1057,19 +1057,19 @@ void SmDocShell::Execute(SfxRequest& rReq)
case
SID_ALIGN
:
{
boost
::
scoped_ptr
<
SmAlignDialog
>
p
AlignDialog
(
new
SmAlignDialog
(
NULL
));
std
::
unique_ptr
<
SmAlignDialog
>
x
AlignDialog
(
new
SmAlignDialog
(
NULL
));
SmFormat
aOldFormat
=
GetFormat
();
p
AlignDialog
->
ReadFrom
(
aOldFormat
);
if
(
p
AlignDialog
->
Execute
()
==
RET_OK
)
x
AlignDialog
->
ReadFrom
(
aOldFormat
);
if
(
x
AlignDialog
->
Execute
()
==
RET_OK
)
{
SmFormat
aNewFormat
(
aOldFormat
);
p
AlignDialog
->
WriteTo
(
aNewFormat
);
x
AlignDialog
->
WriteTo
(
aNewFormat
);
SmModule
*
pp
=
SM_MOD
();
SmFormat
aFmt
(
pp
->
GetConfig
()
->
GetStandardFormat
()
);
p
AlignDialog
->
WriteTo
(
aFmt
);
x
AlignDialog
->
WriteTo
(
aFmt
);
pp
->
GetConfig
()
->
SetStandardFormat
(
aFmt
);
::
svl
::
IUndoManager
*
pTmpUndoMgr
=
GetUndoManager
();
...
...
starmath/source/edit.cxx
Dosyayı görüntüle @
08348b22
...
...
@@ -49,7 +49,7 @@
#include "document.hxx"
#include "config.hxx"
#include "accessibility.hxx"
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
#define SCROLL_LINE 24
...
...
@@ -337,7 +337,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
GetParent
()
->
ToTop
();
Point
aPoint
=
rCEvt
.
GetMousePosPixel
();
boost
::
scoped_ptr
<
PopupMenu
>
p
PopupMenu
(
new
PopupMenu
(
SmResId
(
RID_COMMANDMENU
)));
std
::
unique_ptr
<
PopupMenu
>
x
PopupMenu
(
new
PopupMenu
(
SmResId
(
RID_COMMANDMENU
)));
// added for replaceability of context menus
Menu
*
pMenu
=
NULL
;
...
...
@@ -346,17 +346,17 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
aEvent
.
ExecutePosition
.
X
=
aPoint
.
X
();
aEvent
.
ExecutePosition
.
Y
=
aPoint
.
Y
();
OUString
sDummy
;
if
(
GetView
()
->
TryContextMenuInterception
(
*
p
PopupMenu
,
sDummy
,
pMenu
,
aEvent
)
)
if
(
GetView
()
->
TryContextMenuInterception
(
*
x
PopupMenu
,
sDummy
,
pMenu
,
aEvent
)
)
{
if
(
pMenu
)
{
p
PopupMenu
.
reset
(
static_cast
<
PopupMenu
*>
(
pMenu
));
x
PopupMenu
.
reset
(
static_cast
<
PopupMenu
*>
(
pMenu
));
}
}
p
PopupMenu
->
SetSelectHdl
(
LINK
(
this
,
SmEditWindow
,
MenuSelectHdl
));
x
PopupMenu
->
SetSelectHdl
(
LINK
(
this
,
SmEditWindow
,
MenuSelectHdl
));
p
PopupMenu
->
Execute
(
this
,
aPoint
);
x
PopupMenu
->
Execute
(
this
,
aPoint
);
bForwardEvt
=
false
;
}
else
if
(
rCEvt
.
GetCommand
()
==
COMMAND_WHEEL
)
...
...
@@ -1088,22 +1088,20 @@ void SmEditWindow::Flush()
}
}
void
SmEditWindow
::
DeleteEditView
(
SmViewShell
&
/*rView*/
)
{
if
(
pEditView
)
{
boost
::
scoped_ptr
<
EditEngine
>
p
EditEngine
(
pEditView
->
GetEditEngine
());
if
(
p
EditEngine
)
std
::
unique_ptr
<
EditEngine
>
x
EditEngine
(
pEditView
->
GetEditEngine
());
if
(
x
EditEngine
)
{
p
EditEngine
->
SetStatusEventHdl
(
Link
()
);
p
EditEngine
->
RemoveView
(
pEditView
);
x
EditEngine
->
SetStatusEventHdl
(
Link
()
);
x
EditEngine
->
RemoveView
(
pEditView
);
}
pEditView
=
0
;
}
}
uno
::
Reference
<
XAccessible
>
SmEditWindow
::
CreateAccessible
()
{
if
(
!
pAccessible
)
...
...
starmath/source/view.cxx
Dosyayı görüntüle @
08348b22
...
...
@@ -73,7 +73,7 @@
#include "cursor.hxx"
#include "accessibility.hxx"
#include "ElementsDockingWindow.hxx"
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
#define MINZOOM 25
#define MAXZOOM 800
...
...
@@ -563,8 +563,8 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
{
GetParent
()
->
ToTop
();
SmResId
aResId
(
RID_VIEWMENU
);
boost
::
scoped_ptr
<
PopupMenu
>
p
PopupMenu
(
new
PopupMenu
(
aResId
));
p
PopupMenu
->
SetSelectHdl
(
LINK
(
this
,
SmGraphicWindow
,
MenuSelectHdl
));
std
::
unique_ptr
<
PopupMenu
>
x
PopupMenu
(
new
PopupMenu
(
aResId
));
x
PopupMenu
->
SetSelectHdl
(
LINK
(
this
,
SmGraphicWindow
,
MenuSelectHdl
));
Point
aPos
(
5
,
5
);
if
(
rCEvt
.
IsMouseEvent
())
aPos
=
rCEvt
.
GetMousePosPixel
();
...
...
@@ -1738,7 +1738,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
{
if
(
!
GetViewFrame
()
->
GetFrame
().
IsInPlace
()
)
{
boost
::
scoped_ptr
<
AbstractSvxZoomDialog
>
p
Dlg
;
std
::
unique_ptr
<
AbstractSvxZoomDialog
>
x
Dlg
;
const
SfxItemSet
*
pSet
=
rReq
.
GetArgs
();
if
(
!
pSet
)
{
...
...
@@ -1747,11 +1747,11 @@ void SmViewShell::Execute(SfxRequest& rReq)
SvxAbstractDialogFactory
*
pFact
=
SvxAbstractDialogFactory
::
Create
();
if
(
pFact
)
{
p
Dlg
.
reset
(
pFact
->
CreateSvxZoomDialog
(
&
GetViewFrame
()
->
GetWindow
(),
aSet
));
SAL_WARN_IF
(
!
p
Dlg
,
"starmath"
,
"Dialog creation failed!"
);
p
Dlg
->
SetLimits
(
MINZOOM
,
MAXZOOM
);
if
(
pDlg
->
Execute
()
!=
RET_CANCEL
)
pSet
=
p
Dlg
->
GetOutputItemSet
();
x
Dlg
.
reset
(
pFact
->
CreateSvxZoomDialog
(
&
GetViewFrame
()
->
GetWindow
(),
aSet
));
SAL_WARN_IF
(
!
x
Dlg
,
"starmath"
,
"Dialog creation failed!"
);
x
Dlg
->
SetLimits
(
MINZOOM
,
MAXZOOM
);
if
(
xDlg
->
Execute
()
!=
RET_CANCEL
)
pSet
=
x
Dlg
->
GetOutputItemSet
();
}
}
if
(
pSet
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment