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
6014e3c9
Kaydet (Commit)
6014e3c9
authored
Kas 28, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use rtl::Reference instead of std::auto_ptr
Change-Id: I4402b0b259c0dcd03a222993c861114028d6fb75
üst
dc664990
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
56 deletions
+31
-56
ChildrenManager.hxx
include/svx/ChildrenManager.hxx
+2
-5
AccessibleDrawDocumentView.cxx
sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+16
-41
AccessibleDrawDocumentView.hxx
sd/source/ui/inc/AccessibleDrawDocumentView.hxx
+1
-1
ChildrenManager.cxx
svx/source/accessibility/ChildrenManager.cxx
+2
-2
ChildrenManagerImpl.cxx
svx/source/accessibility/ChildrenManagerImpl.cxx
+6
-3
ChildrenManagerImpl.hxx
svx/source/accessibility/ChildrenManagerImpl.hxx
+4
-4
No files found.
include/svx/ChildrenManager.hxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -24,13 +24,11 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <memory>
#include <svx/svxdllapi.h>
namespace
accessibility
{
class
AccessibleContextBase
;
class
AccessibleShape
;
class
ChildrenManagerImpl
;
/** The AccessibleChildrenManager class acts as a cache of the
...
...
@@ -154,10 +152,9 @@ public:
be created by the shape factory. This gives the caller full control
over object creation.
@param pShape
This class <em>does</em> take ownership of the argument.
@param shape must be non-null
*/
void
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
pS
hape
);
void
AddAccessibleShape
(
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessible
>
const
&
s
hape
);
/** Clear the list of accessible shapes which have been added by
previous calls to <member>AddAccessibleShape</member>.
...
...
sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -122,20 +122,11 @@ void AccessibleDrawDocumentView::Init (void)
mpChildrenManager
=
new
ChildrenManager
(
this
,
xShapeList
,
maShapeTreeInfo
,
*
this
);
if
(
mpChildrenManager
!=
NULL
)
{
// Create the page shape and initialize it. The shape is acquired
// before initialization and released after transferring ownership
// to the children manager to prevent premature disposing of the
// shape.
AccessiblePageShape
*
pPage
=
CreateDrawPageShape
();
if
(
pPage
!=
NULL
)
rtl
::
Reference
<
AccessiblePageShape
>
xPage
(
CreateDrawPageShape
());
if
(
xPage
.
is
())
{
pPage
->
acquire
();
pPage
->
Init
();
SAL_WNODEPRECATED_DECLARATIONS_PUSH
mpChildrenManager
->
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
(
pPage
));
SAL_WNODEPRECATED_DECLARATIONS_POP
pPage
->
release
();
xPage
->
Init
();
mpChildrenManager
->
AddAccessibleShape
(
xPage
.
get
());
mpChildrenManager
->
Update
();
}
mpChildrenManager
->
UpdateSelection
();
...
...
@@ -159,9 +150,9 @@ void AccessibleDrawDocumentView::ViewForwarderChanged (ChangeType aChangeType,
/** The page shape is created on every call at the moment (provided that
every thing goes well).
*/
AccessiblePageShape
*
AccessibleDrawDocumentView
::
CreateDrawPageShape
(
void
)
rtl
::
Reference
<
AccessiblePageShape
>
AccessibleDrawDocumentView
::
CreateDrawPageShape
(
void
)
{
AccessiblePageShape
*
pShape
=
NULL
;
rtl
::
Reference
<
AccessiblePageShape
>
xShape
;
// Create a shape that represents the actual draw page.
uno
::
Reference
<
drawing
::
XDrawView
>
xView
(
mxController
,
uno
::
UNO_QUERY
);
...
...
@@ -201,12 +192,12 @@ AccessiblePageShape* AccessibleDrawDocumentView::CreateDrawPageShape (void)
// Create the accessible object for the shape and
// initialize it.
p
Shape
=
new
AccessiblePageShape
(
x
Shape
=
new
AccessiblePageShape
(
xView
->
getCurrentPage
(),
this
,
maShapeTreeInfo
);
}
}
}
return
p
Shape
;
return
x
Shape
;
}
...
...
@@ -351,21 +342,12 @@ void SAL_CALL
mpChildrenManager
->
SetShapeList
(
uno
::
Reference
<
drawing
::
XShapes
>
(
xView
->
getCurrentPage
(),
uno
::
UNO_QUERY
));
// Create the page shape and initialize it. The shape is
// acquired before initialization and released after
// transferring ownership to the children manager to prevent
// premature disposing of the shape.
AccessiblePageShape
*
pPage
=
CreateDrawPageShape
();
if
(
pPage
!=
NULL
)
rtl
::
Reference
<
AccessiblePageShape
>
xPage
(
CreateDrawPageShape
());
if
(
xPage
.
is
())
{
pPage
->
acquire
();
pPage
->
Init
();
SAL_WNODEPRECATED_DECLARATIONS_PUSH
mpChildrenManager
->
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
(
pPage
));
SAL_WNODEPRECATED_DECLARATIONS_POP
xPage
->
Init
();
mpChildrenManager
->
AddAccessibleShape
(
xPage
.
get
());
mpChildrenManager
->
Update
(
false
);
pPage
->
release
();
}
}
else
...
...
@@ -415,19 +397,12 @@ void SAL_CALL
}
}
}
// Create the page shape and initialize it. The shape is
// acquired before initialization and released after
// transferring ownership to the children manager to prevent
// premature disposing of the shape.
AccessiblePageShape
*
pPage
=
CreateDrawPageShape
();
if
(
pPage
!=
NULL
)
rtl
::
Reference
<
AccessiblePageShape
>
xPage
(
CreateDrawPageShape
());
if
(
xPage
.
is
())
{
pPage
->
acquire
();
pPage
->
Init
();
mpChildrenManager
->
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
(
pPage
));
xPage
->
Init
();
mpChildrenManager
->
AddAccessibleShape
(
xPage
.
get
());
mpChildrenManager
->
Update
(
false
);
pPage
->
release
();
}
}
}
...
...
sd/source/ui/inc/AccessibleDrawDocumentView.hxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -158,7 +158,7 @@ protected:
/** Create a shape the represents the page as seen on the screen.
*/
AccessiblePageShape
*
CreateDrawPageShape
(
void
);
rtl
::
Reference
<
AccessiblePageShape
>
CreateDrawPageShape
(
void
);
/// Create an accessible name that contains the current view mode.
virtual
OUString
...
...
svx/source/accessibility/ChildrenManager.cxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -111,10 +111,10 @@ void ChildrenManager::SetShapeList (const ::com::sun::star::uno::Reference<
void
ChildrenManager
::
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
pS
hape
)
void
ChildrenManager
::
AddAccessibleShape
(
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessible
>
const
&
s
hape
)
{
OSL_ASSERT
(
mpImpl
!=
NULL
);
mpImpl
->
AddAccessibleShape
(
pS
hape
);
mpImpl
->
AddAccessibleShape
(
s
hape
);
}
...
...
svx/source/accessibility/ChildrenManagerImpl.cxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <cassert>
#include "ChildrenManagerImpl.hxx"
#include <svx/ShapeTypeHandler.hxx>
...
...
@@ -536,10 +539,10 @@ void ChildrenManagerImpl::SetShapeList (const ::com::sun::star::uno::Reference<
void
ChildrenManagerImpl
::
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
pS
hape
)
void
ChildrenManagerImpl
::
AddAccessibleShape
(
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessible
>
const
&
s
hape
)
{
if
(
pShape
.
get
()
!=
NULL
)
maAccessibleShapes
.
push_back
(
pShape
.
release
()
);
assert
(
shape
.
is
());
maAccessibleShapes
.
push_back
(
shape
);
}
...
...
svx/source/accessibility/ChildrenManagerImpl.hxx
Dosyayı görüntüle @
6014e3c9
...
...
@@ -26,7 +26,6 @@
#include <cppuhelper/compbase2.hxx>
#include <osl/mutex.hxx>
#include <vector>
#include <memory>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/document/XEventListener.hpp>
...
...
@@ -204,10 +203,11 @@ public:
or the list of visible shapes. Accessible shapes are, at the
moment, not tested against the visible area but are always appended
to the list of visible children.
@param pShape
The new shape that is added to the list of accessible shapes.
@param shape
The new shape that is added to the list of accessible shapes; must
be non-null.
*/
void
AddAccessibleShape
(
std
::
auto_ptr
<
AccessibleShape
>
pS
hape
);
void
AddAccessibleShape
(
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessible
>
const
&
s
hape
);
/** Clear the lists of accessible shapes and that of visible accessible
shapes. The list of UNO shapes is not modified.
...
...
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