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
4e6a1615
Kaydet (Commit)
4e6a1615
authored
Tem 07, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use XController instead of XFrame where it makes sense
Change-Id: I22990c861c0dd9d9dab3fbdbc35fdb2b51e82005
üst
04716cb9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
32 deletions
+32
-32
ResourceManager.hxx
include/sfx2/sidebar/ResourceManager.hxx
+5
-5
SidebarController.hxx
include/sfx2/sidebar/SidebarController.hxx
+1
-1
Tools.hxx
include/sfx2/sidebar/Tools.hxx
+1
-1
ControllerFactory.cxx
sfx2/source/sidebar/ControllerFactory.cxx
+1
-1
ResourceManager.cxx
sfx2/source/sidebar/ResourceManager.cxx
+9
-9
SidebarController.cxx
sfx2/source/sidebar/SidebarController.cxx
+8
-8
Tools.cxx
sfx2/source/sidebar/Tools.cxx
+3
-3
UnoDecks.cxx
sfx2/source/sidebar/UnoDecks.cxx
+2
-2
UnoPanels.cxx
sfx2/source/sidebar/UnoPanels.cxx
+2
-2
No files found.
include/sfx2/sidebar/ResourceManager.hxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -23,7 +23,7 @@
#include "PanelDescriptor.hxx"
#include <sfx2/sidebar/Context.hxx>
#include <unotools/confignode.hxx>
#include <com/sun/star/frame/X
Frame
.hpp>
#include <com/sun/star/frame/X
Controller
.hpp>
#include <set>
#include <boost/shared_ptr.hpp>
#include <svtools/miscopt.hxx>
...
...
@@ -89,13 +89,13 @@ public:
DeckContextDescriptorContainer
&
rDeckDescriptors
,
const
Context
&
rContext
,
const
bool
bIsDocumentReadOnly
,
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
);
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxController
);
const
PanelContextDescriptorContainer
&
GetMatchingPanels
(
PanelContextDescriptorContainer
&
rPanelDescriptors
,
const
Context
&
rContext
,
const
OUString
&
rsDeckId
,
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
);
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxController
);
/** Remember the expansions state per panel and context.
This is not persistent past application end.
...
...
@@ -121,13 +121,13 @@ private:
static
void
ReadContextList
(
const
utl
::
OConfigurationNode
&
rNode
,
ContextList
&
rContextList
,
const
OUString
&
rsDefaultMenuCommand
);
void
ReadLegacyAddons
(
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
);
void
ReadLegacyAddons
(
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxController
);
static
utl
::
OConfigurationTreeRoot
GetLegacyAddonRootNode
(
const
OUString
&
rsModuleName
);
static
void
GetToolPanelNodeNames
(
std
::
vector
<
OUString
>&
rMatchingNames
,
const
utl
::
OConfigurationTreeRoot
&
aRoot
);
static
bool
IsDeckEnabled
(
const
OUString
&
rsDeckId
,
const
Context
&
rContext
,
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
);
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxController
);
};
}
}
// end of namespace sfx2::sidebar
...
...
include/sfx2/sidebar/SidebarController.hxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -158,7 +158,7 @@ public:
private
:
typedef
::
std
::
map
<
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>
,
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>
,
css
::
uno
::
WeakReference
<
SidebarController
>
>
SidebarControllerContainer
;
static
SidebarControllerContainer
maSidebarControllerContainer
;
...
...
include/sfx2/sidebar/Tools.hxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -54,7 +54,7 @@ public:
const
css
::
util
::
URL
&
rURL
);
static
::
rtl
::
OUString
GetModuleName
(
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
);
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxFrame
);
};
...
...
sfx2/source/sidebar/ControllerFactory.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -143,7 +143,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBarController(
{
Reference
<
XComponentContext
>
xContext
=
comphelper
::
getProcessComponentContext
();
Reference
<
frame
::
XUIControllerFactory
>
xFactory
=
frame
::
theToolbarControllerFactory
::
get
(
xContext
);
OUString
sModuleName
(
Tools
::
GetModuleName
(
rxFrame
));
OUString
sModuleName
(
Tools
::
GetModuleName
(
rxFrame
->
getController
()
));
if
(
xFactory
.
is
()
&&
xFactory
->
hasController
(
rsCommandName
,
sModuleName
))
{
...
...
sfx2/source/sidebar/ResourceManager.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -179,9 +179,9 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
DeckContextDescriptorContainer
&
rDecks
,
const
Context
&
rContext
,
const
bool
bIsDocumentReadOnly
,
const
Reference
<
frame
::
X
Frame
>&
rxFrame
)
const
Reference
<
frame
::
X
Controller
>&
rxController
)
{
ReadLegacyAddons
(
rx
Frame
);
ReadLegacyAddons
(
rx
Controller
);
std
::
multimap
<
sal_Int32
,
DeckContextDescriptor
>
aOrderedIds
;
DeckContainer
::
const_iterator
iDeck
;
...
...
@@ -196,7 +196,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
aDeckContextDescriptor
.
msId
=
rDeckDescriptor
.
msId
;
aDeckContextDescriptor
.
mbIsEnabled
=
!
bIsDocumentReadOnly
||
IsDeckEnabled
(
rDeckDescriptor
.
msId
,
rContext
,
rx
Frame
);
||
IsDeckEnabled
(
rDeckDescriptor
.
msId
,
rContext
,
rx
Controller
);
aOrderedIds
.
insert
(
::
std
::
multimap
<
sal_Int32
,
DeckContextDescriptor
>::
value_type
(
rDeckDescriptor
.
mnOrderIndex
,
aDeckContextDescriptor
));
...
...
@@ -215,9 +215,9 @@ const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatc
PanelContextDescriptorContainer
&
rPanelIds
,
const
Context
&
rContext
,
const
OUString
&
rsDeckId
,
const
Reference
<
frame
::
X
Frame
>&
rxFrame
)
const
Reference
<
frame
::
X
Controller
>&
rxController
)
{
ReadLegacyAddons
(
rx
Frame
);
ReadLegacyAddons
(
rx
Controller
);
std
::
multimap
<
sal_Int32
,
PanelContextDescriptor
>
aOrderedIds
;
PanelContainer
::
const_iterator
iPanel
;
...
...
@@ -485,10 +485,10 @@ void ResourceManager::ReadContextList (
}
}
void
ResourceManager
::
ReadLegacyAddons
(
const
Reference
<
frame
::
X
Frame
>&
rxFrame
)
void
ResourceManager
::
ReadLegacyAddons
(
const
Reference
<
frame
::
X
Controller
>&
rxController
)
{
// Get module name for given frame.
OUString
sModuleName
(
Tools
::
GetModuleName
(
rx
Frame
));
OUString
sModuleName
(
Tools
::
GetModuleName
(
rx
Controller
));
if
(
sModuleName
.
getLength
()
==
0
)
return
;
if
(
maProcessedApplications
.
find
(
sModuleName
)
!=
maProcessedApplications
.
end
())
...
...
@@ -625,14 +625,14 @@ void ResourceManager::GetToolPanelNodeNames (
bool
ResourceManager
::
IsDeckEnabled
(
const
OUString
&
rsDeckId
,
const
Context
&
rContext
,
const
Reference
<
frame
::
X
Frame
>&
rxFrame
)
const
Reference
<
frame
::
X
Controller
>&
rxController
)
{
// Check if any panel that matches the current context can be
// displayed.
ResourceManager
::
PanelContextDescriptorContainer
aPanelContextDescriptors
;
ResourceManager
::
Instance
().
GetMatchingPanels
(
aPanelContextDescriptors
,
rContext
,
rsDeckId
,
rx
Frame
);
rContext
,
rsDeckId
,
rx
Controller
);
ResourceManager
::
PanelContextDescriptorContainer
::
const_iterator
iPanel
;
for
(
iPanel
=
aPanelContextDescriptors
.
begin
();
iPanel
!=
aPanelContextDescriptors
.
end
();
++
iPanel
)
...
...
sfx2/source/sidebar/SidebarController.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -153,7 +153,7 @@ SidebarController::SidebarController (
WeakReference
<
SidebarController
>
xWeakController
(
this
);
maSidebarControllerContainer
.
insert
(
SidebarControllerContainer
::
value_type
(
rxFrame
,
rxFrame
->
getController
()
,
xWeakController
));
}
...
...
@@ -164,7 +164,7 @@ SidebarController::~SidebarController()
SidebarController
*
SidebarController
::
GetSidebarControllerForFrame
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
)
{
SidebarControllerContainer
::
iterator
iEntry
(
maSidebarControllerContainer
.
find
(
rxFrame
));
SidebarControllerContainer
::
iterator
iEntry
(
maSidebarControllerContainer
.
find
(
rxFrame
->
getController
()
));
if
(
iEntry
==
maSidebarControllerContainer
.
end
())
return
NULL
;
...
...
@@ -190,7 +190,7 @@ void SAL_CALL SidebarController::disposing()
aDecks
,
GetCurrentContext
(),
IsDocumentReadOnly
(),
mxFrame
);
mxFrame
->
getController
()
);
for
(
ResourceManager
::
DeckContextDescriptorContainer
::
const_iterator
iDeck
(
aDecks
.
begin
()),
iEnd
(
aDecks
.
end
());
...
...
@@ -202,7 +202,7 @@ void SAL_CALL SidebarController::disposing()
aDeck
.
disposeAndClear
();
}
SidebarControllerContainer
::
iterator
iEntry
(
maSidebarControllerContainer
.
find
(
mxFrame
));
SidebarControllerContainer
::
iterator
iEntry
(
maSidebarControllerContainer
.
find
(
mxFrame
->
getController
()
));
if
(
iEntry
!=
maSidebarControllerContainer
.
end
())
maSidebarControllerContainer
.
erase
(
iEntry
);
...
...
@@ -425,7 +425,7 @@ void SidebarController::UpdateConfigurations()
aDecks
,
maCurrentContext
,
mbIsDocumentReadOnly
,
mxFrame
);
mxFrame
->
getController
()
);
// Notify the tab bar about the updated set of decks.
mpTabBar
->
SetDecks
(
aDecks
);
...
...
@@ -564,7 +564,7 @@ void SidebarController::SwitchToDeck (
aPanelContextDescriptors
,
rContext
,
rDeckDescriptor
.
msId
,
mxFrame
);
mxFrame
->
getController
()
);
if
(
aPanelContextDescriptors
.
empty
())
{
...
...
@@ -1219,7 +1219,7 @@ ResourceManager::DeckContextDescriptorContainer SidebarController::GetMatchingDe
mpResourceManager
->
GetMatchingDecks
(
aDecks
,
GetCurrentContext
(),
IsDocumentReadOnly
(),
mxFrame
);
mxFrame
->
getController
()
);
return
aDecks
;
}
...
...
@@ -1230,7 +1230,7 @@ ResourceManager::PanelContextDescriptorContainer SidebarController::GetMatchingP
mpResourceManager
->
GetMatchingPanels
(
aPanels
,
GetCurrentContext
(),
rDeckId
,
mxFrame
);
mxFrame
->
getController
()
);
return
aPanels
;
}
...
...
sfx2/source/sidebar/Tools.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -146,16 +146,16 @@ Reference<frame::XDispatch> Tools::GetDispatch (
}
::
rtl
::
OUString
Tools
::
GetModuleName
(
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Frame
>&
rxFrame
)
const
css
::
uno
::
Reference
<
css
::
frame
::
X
Controller
>&
rxController
)
{
if
(
!
rxFrame
.
is
()
||
!
rxFrame
->
getController
()
.
is
())
if
(
!
rxController
.
is
())
return
::
rtl
::
OUString
();
try
{
const
Reference
<
XComponentContext
>
xComponentContext
(
::
comphelper
::
getProcessComponentContext
());
const
Reference
<
frame
::
XModuleManager
>
xModuleManager
=
frame
::
ModuleManager
::
create
(
xComponentContext
);
return
xModuleManager
->
identify
(
rx
Frame
);
return
xModuleManager
->
identify
(
rx
Controller
);
}
catch
(
const
Exception
&
)
{
...
...
sfx2/source/sidebar/UnoDecks.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -68,7 +68,7 @@ uno::Sequence< OUString > SAL_CALL SfxUnoDecks::getElementNames()
aDecks
,
pSidebarController
->
GetCurrentContext
(),
pSidebarController
->
IsDocumentReadOnly
(),
xFrame
);
xFrame
->
getController
()
);
deckList
.
realloc
(
aDecks
.
size
());
...
...
@@ -104,7 +104,7 @@ sal_Bool SAL_CALL SfxUnoDecks::hasByName( const OUString& aName )
aDecks
,
pSidebarController
->
GetCurrentContext
(),
pSidebarController
->
IsDocumentReadOnly
(),
xFrame
);
xFrame
->
getController
()
);
for
(
ResourceManager
::
DeckContextDescriptorContainer
::
const_iterator
iDeck
(
aDecks
.
begin
()),
iEnd
(
aDecks
.
end
());
...
...
sfx2/source/sidebar/UnoPanels.cxx
Dosyayı görüntüle @
4e6a1615
...
...
@@ -81,7 +81,7 @@ uno::Sequence< OUString > SAL_CALL SfxUnoPanels::getElementNames()
pSidebarController
->
GetResourceManager
()
->
GetMatchingPanels
(
aPanels
,
pSidebarController
->
GetCurrentContext
(),
mDeckId
,
xFrame
);
xFrame
->
getController
()
);
panelList
.
realloc
(
aPanels
.
size
());
...
...
@@ -114,7 +114,7 @@ sal_Bool SAL_CALL SfxUnoPanels::hasByName( const OUString& aName )
pSidebarController
->
GetResourceManager
()
->
GetMatchingPanels
(
aPanels
,
pSidebarController
->
GetCurrentContext
(),
mDeckId
,
xFrame
);
xFrame
->
getController
()
);
for
(
ResourceManager
::
PanelContextDescriptorContainer
::
const_iterator
iPanel
(
aPanels
.
begin
()),
iEnd
(
aPanels
.
end
());
...
...
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