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
9ba833f0
Kaydet (Commit)
9ba833f0
authored
Tem 25, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
don't show the area sidebar for panels where it makes no sense
Change-Id: I06655e0574b28a88db920424fa515b8350133f10
üst
87f750f1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
18 deletions
+24
-18
ChartAreaPanel.cxx
chart2/source/controller/sidebar/ChartAreaPanel.cxx
+5
-3
ChartAreaPanel.hxx
chart2/source/controller/sidebar/ChartAreaPanel.hxx
+1
-1
ChartSidebarSelectionListener.cxx
...urce/controller/sidebar/ChartSidebarSelectionListener.cxx
+11
-11
ChartSidebarSelectionListener.hxx
...urce/controller/sidebar/ChartSidebarSelectionListener.hxx
+5
-2
Sidebar.xcu
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+2
-1
No files found.
chart2/source/controller/sidebar/ChartAreaPanel.cxx
Dosyayı görüntüle @
9ba833f0
...
...
@@ -212,6 +212,8 @@ ChartAreaPanel::ChartAreaPanel(vcl::Window* pParent,
mxSelectionListener
(
new
ChartSidebarSelectionListener
(
this
)),
mbUpdate
(
true
)
{
std
::
vector
<
ObjectType
>
aAcceptedTypes
{
OBJECTTYPE_PAGE
,
OBJECTTYPE_DIAGRAM
,
OBJECTTYPE_DATA_SERIES
,
OBJECTTYPE_TITLE
,
OBJECTTYPE_LEGEND
};
mxSelectionListener
->
setAcceptedTypes
(
aAcceptedTypes
);
Initialize
();
}
...
...
@@ -227,7 +229,7 @@ void ChartAreaPanel::dispose()
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
mxModel
->
getCurrentController
(),
css
::
uno
::
UNO_QUERY
);
if
(
xSelectionSupplier
.
is
())
xSelectionSupplier
->
removeSelectionChangeListener
(
mxSelectionListener
);
xSelectionSupplier
->
removeSelectionChangeListener
(
mxSelectionListener
.
get
()
);
AreaPropertyPanelBase
::
dispose
();
}
...
...
@@ -239,7 +241,7 @@ void ChartAreaPanel::Initialize()
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
mxModel
->
getCurrentController
(),
css
::
uno
::
UNO_QUERY
);
if
(
xSelectionSupplier
.
is
())
xSelectionSupplier
->
addSelectionChangeListener
(
mxSelectionListener
);
xSelectionSupplier
->
addSelectionChangeListener
(
mxSelectionListener
.
get
()
);
updateData
();
}
...
...
@@ -404,7 +406,7 @@ void ChartAreaPanel::updateModel(
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
mxModel
->
getCurrentController
(),
css
::
uno
::
UNO_QUERY
);
if
(
xSelectionSupplier
.
is
())
xSelectionSupplier
->
addSelectionChangeListener
(
mxSelectionListener
);
xSelectionSupplier
->
addSelectionChangeListener
(
mxSelectionListener
.
get
()
);
}
...
...
chart2/source/controller/sidebar/ChartAreaPanel.hxx
Dosyayı görüntüle @
9ba833f0
...
...
@@ -86,7 +86,7 @@ private:
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>
mxModel
;
css
::
uno
::
Reference
<
css
::
util
::
XModifyListener
>
mxListener
;
css
::
uno
::
Reference
<
css
::
view
::
XSelectionChange
Listener
>
mxSelectionListener
;
rtl
::
Reference
<
ChartSidebarSelection
Listener
>
mxSelectionListener
;
void
Initialize
();
...
...
chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
Dosyayı görüntüle @
9ba833f0
...
...
@@ -23,19 +23,16 @@ ChartSidebarSelectionListenerParent::~ChartSidebarSelectionListenerParent()
ChartSidebarSelectionListener
::
ChartSidebarSelectionListener
(
ChartSidebarSelectionListenerParent
*
pParent
)
:
mpParent
(
pParent
),
mbAll
(
true
),
meType
()
mpParent
(
pParent
)
{
}
ChartSidebarSelectionListener
::
ChartSidebarSelectionListener
(
ChartSidebarSelectionListenerParent
*
pParent
,
ObjectType
eType
)
:
mpParent
(
pParent
),
mbAll
(
false
),
meType
(
eType
)
mpParent
(
pParent
)
{
maTypes
.
push_back
(
eType
);
}
ChartSidebarSelectionListener
::~
ChartSidebarSelectionListener
()
...
...
@@ -45,13 +42,10 @@ ChartSidebarSelectionListener::~ChartSidebarSelectionListener()
void
ChartSidebarSelectionListener
::
selectionChanged
(
const
css
::
lang
::
EventObject
&
rEvent
)
throw
(
::
css
::
uno
::
RuntimeException
,
::
std
::
exception
)
{
(
void
)
rEvent
;
bool
bCorrectObjectSelected
=
false
;
if
(
mbAll
)
bCorrectObjectSelected
=
true
;
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
(
rEvent
.
Source
,
css
::
uno
::
UNO_QUERY
);
if
(
!
mbAll
&&
xController
.
is
())
if
(
xController
.
is
())
{
css
::
uno
::
Reference
<
css
::
view
::
XSelectionSupplier
>
xSelectionSupplier
(
xController
,
css
::
uno
::
UNO_QUERY
);
if
(
xSelectionSupplier
.
is
())
...
...
@@ -62,7 +56,8 @@ void ChartSidebarSelectionListener::selectionChanged(const css::lang::EventObjec
OUString
aCID
;
aAny
>>=
aCID
;
ObjectType
eType
=
ObjectIdentifier
::
getObjectType
(
aCID
);
bCorrectObjectSelected
=
eType
==
meType
;
bCorrectObjectSelected
=
std
::
any_of
(
maTypes
.
begin
(),
maTypes
.
end
(),
[
=
](
const
ObjectType
&
eTypeInVector
)
{
return
eType
==
eTypeInVector
;
});
}
}
}
...
...
@@ -76,6 +71,11 @@ void ChartSidebarSelectionListener::disposing(const css::lang::EventObject& /*rE
mpParent
->
SelectionInvalid
();
}
void
ChartSidebarSelectionListener
::
setAcceptedTypes
(
const
std
::
vector
<
ObjectType
>&
aTypes
)
{
maTypes
=
aTypes
;
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
chart2/source/controller/sidebar/ChartSidebarSelectionListener.hxx
Dosyayı görüntüle @
9ba833f0
...
...
@@ -15,6 +15,8 @@
#include "ObjectIdentifier.hxx"
#include <vector>
namespace
chart
{
namespace
sidebar
{
...
...
@@ -44,11 +46,12 @@ public:
virtual
void
SAL_CALL
disposing
(
const
css
::
lang
::
EventObject
&
rEvent
)
throw
(
::
css
::
uno
::
RuntimeException
,
::
std
::
exception
)
SAL_OVERRIDE
;
void
setAcceptedTypes
(
const
std
::
vector
<
ObjectType
>&
aTypes
);
private
:
ChartSidebarSelectionListenerParent
*
mpParent
;
bool
mbAll
;
ObjectType
meType
;
std
::
vector
<
ObjectType
>
maTypes
;
};
}
}
...
...
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
Dosyayı görüntüle @
9ba833f0
...
...
@@ -1266,7 +1266,8 @@
</prop>
<prop
oor:name=
"ContextList"
>
<value
oor:separator=
";"
>
Chart, any, visible ;
Chart, Chart, visible ;
Chart, Series, visible ;
</value>
</prop>
<prop
oor:name=
"ImplementationURL"
oor:type=
"xs:string"
>
...
...
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