create SfxInterfaceId o3tl::strong_int
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6 Reviewed-on: https://gerrit.libreoffice.org/35722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
6f968f00b1
commit
d615af618c
@@ -252,6 +252,10 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) {
|
||||
}
|
||||
}
|
||||
|
||||
static bool startswith(const std::string& rStr, const char* pSubStr) {
|
||||
return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
|
||||
}
|
||||
|
||||
void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const CXXMethodDecl * methodDecl) {
|
||||
|
||||
if (methodDecl && (methodDecl->isVirtual() || methodDecl->hasAttr<OverrideAttr>())) {
|
||||
@@ -303,6 +307,9 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
|
||||
.GlobalNamespace()) {
|
||||
return;
|
||||
}
|
||||
if (startswith(type.getAsString(), "struct o3tl::strong_int")) {
|
||||
return;
|
||||
}
|
||||
mbInsideFunctionDecl = true;
|
||||
mbFoundDisqualifier = false;
|
||||
TraverseStmt(functionDecl->getBody());
|
||||
@@ -313,9 +320,9 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
|
||||
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
"rather return %0 from function %1 %2 by const& than by value, to avoid unnecessary copying",
|
||||
"rather return %0 from function %1 by const& than by value, to avoid unnecessary copying",
|
||||
functionDecl->getSourceRange().getBegin())
|
||||
<< type.getAsString() << functionDecl->getQualifiedNameAsString() << type->getTypeClassName() << functionDecl->getSourceRange();
|
||||
<< type.getAsString() << functionDecl->getQualifiedNameAsString() << functionDecl->getSourceRange();
|
||||
|
||||
// display the location of the class member declaration so I don't have to search for it by hand
|
||||
if (functionDecl->getSourceRange().getBegin() != functionDecl->getCanonicalDecl()->getSourceRange().getBegin())
|
||||
|
||||
@@ -40,7 +40,7 @@ template <typename UNDERLYING_TYPE, typename PHANTOM_TYPE>
|
||||
struct strong_int
|
||||
{
|
||||
public:
|
||||
explicit strong_int(UNDERLYING_TYPE value) : m_value(value) {}
|
||||
explicit constexpr strong_int(UNDERLYING_TYPE value) : m_value(value) {}
|
||||
strong_int() : m_value(0) {}
|
||||
|
||||
explicit operator UNDERLYING_TYPE() const { return m_value; }
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
SfxModule* GetModule() const;
|
||||
|
||||
SAL_DLLPRIVATE void SetModule_Impl( SfxModule* );
|
||||
SAL_DLLPRIVATE sal_uInt16 GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const;
|
||||
SAL_DLLPRIVATE sal_uInt16 GetViewNo_Impl( const SfxInterfaceId i_nViewId, const sal_uInt16 i_nFallback ) const;
|
||||
|
||||
private:
|
||||
SfxObjectFactory(const SfxObjectFactory&) = delete;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <sfx2/dllapi.h>
|
||||
#include <sfx2/shell.hxx>
|
||||
#include <sal/types.h>
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <com/sun/star/uno/Any.hxx>
|
||||
@@ -109,7 +110,7 @@ public:
|
||||
static SfxFrame* Create( const css::uno::Reference< css::frame::XFrame >& xFrame );
|
||||
static css::uno::Reference< css::frame::XFrame >
|
||||
CreateBlankFrame();
|
||||
static SfxFrame* Create( SfxObjectShell& rDoc, vcl::Window& rWindow, sal_uInt16 nViewId, bool bHidden );
|
||||
static SfxFrame* Create( SfxObjectShell& rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden );
|
||||
|
||||
vcl::Window& GetWindow() const { return *pWindow;}
|
||||
void CancelTransfers();
|
||||
|
||||
+23
-36
@@ -27,6 +27,7 @@
|
||||
#include <sfx2/sfxuno.hxx>
|
||||
#include <svl/SfxBroadcaster.hxx>
|
||||
#include <o3tl/typed_flags_set.hxx>
|
||||
#include <o3tl/strong_int.hxx>
|
||||
|
||||
class ResMgr;
|
||||
namespace vcl { class Window; }
|
||||
@@ -64,35 +65,21 @@ namespace svl
|
||||
Id for <SfxInterface>s, gives a quasi-static access to the interface
|
||||
through an array to <SfxApplication>.
|
||||
*/
|
||||
enum SfxInterfaceId
|
||||
{
|
||||
SFX_INTERFACE_NONE,
|
||||
SFX_INTERFACE_SFXAPP,
|
||||
SFX_INTERFACE_SFXDOCSH,
|
||||
SFX_INTERFACE_SFXVIEWSH,
|
||||
SFX_INTERFACE_SFXVIEWFRM,
|
||||
SFX_INTERFACE_SFXMODULE,
|
||||
SFX_INTERFACE_OFA_START = 100,
|
||||
SFX_INTERFACE_OFA_END = 100,
|
||||
SFX_INTERFACE_SC_START = 150,
|
||||
SFX_INTERFACE_SC_END = 199,
|
||||
SFX_INTERFACE_SD_START = 200,
|
||||
SFX_INTERFACE_SD_END = 249,
|
||||
SFX_INTERFACE_SW_START = 250,
|
||||
SFX_INTERFACE_SW_END = 299,
|
||||
SFX_INTERFACE_SIM_START = 300,
|
||||
SFX_INTERFACE_SIM_END = 319,
|
||||
SFX_INTERFACE_SCH_START = 320,
|
||||
SFX_INTERFACE_SCH_END = 339,
|
||||
SFX_INTERFACE_SMA_START = 340,
|
||||
SFX_INTERFACE_SMA_END = 359,
|
||||
SFX_INTERFACE_SBA_START = 360,
|
||||
SFX_INTERFACE_SBA_END = 399,
|
||||
SFX_INTERFACE_IDE_START = 400,
|
||||
SFX_INTERFACE_IDE_END = 409,
|
||||
//-if one is still needed
|
||||
SFX_INTERFACE_APP = SFX_INTERFACE_SW_START,
|
||||
};
|
||||
struct SfxInterfaceIdTag {};
|
||||
typedef o3tl::strong_int<sal_uInt16, SfxInterfaceIdTag> SfxInterfaceId;
|
||||
|
||||
constexpr auto SFX_INTERFACE_NONE = SfxInterfaceId(0);
|
||||
constexpr auto SFX_INTERFACE_SFXAPP = SfxInterfaceId(1);
|
||||
constexpr auto SFX_INTERFACE_SFXDOCSH = SfxInterfaceId(2);
|
||||
constexpr auto SFX_INTERFACE_SFXVIEWSH = SfxInterfaceId(3);
|
||||
constexpr auto SFX_INTERFACE_SFXVIEWFRM = SfxInterfaceId(4);
|
||||
constexpr auto SFX_INTERFACE_SFXMODULE = SfxInterfaceId(5);
|
||||
constexpr auto SFX_INTERFACE_SC_START = SfxInterfaceId(150);
|
||||
constexpr auto SFX_INTERFACE_SD_START = SfxInterfaceId(200);
|
||||
constexpr auto SFX_INTERFACE_SW_START = SfxInterfaceId(250);
|
||||
constexpr auto SFX_INTERFACE_SMA_START = SfxInterfaceId(340);
|
||||
constexpr auto SFX_INTERFACE_IDE_START = SfxInterfaceId(400);
|
||||
constexpr auto SFX_INTERFACE_IDE_END = SfxInterfaceId(409);
|
||||
|
||||
enum class SfxShellFeature
|
||||
{
|
||||
@@ -547,16 +534,16 @@ inline void SfxShell::SetPool
|
||||
pPool = pNewPool;
|
||||
}
|
||||
|
||||
#define SFX_DECL_INTERFACE(nId) \
|
||||
static SfxInterface* pInterface; \
|
||||
static SfxInterface* GetStaticInterface(); \
|
||||
static SfxInterfaceId GetInterfaceId() {return SfxInterfaceId(nId);} \
|
||||
static void RegisterInterface(SfxModule* pMod=nullptr); \
|
||||
virtual SfxInterface* GetInterface() const override;
|
||||
#define SFX_DECL_INTERFACE(nId) \
|
||||
static SfxInterface* pInterface; \
|
||||
static SfxInterface* GetStaticInterface(); \
|
||||
static SfxInterfaceId GetInterfaceId() {return nId;} \
|
||||
static void RegisterInterface(SfxModule* pMod=nullptr); \
|
||||
virtual SfxInterface* GetInterface() const override;
|
||||
|
||||
#define SFX_TMPL_INTERFACE(Class,SuperClass,Abstract) \
|
||||
\
|
||||
SfxInterface* Class::pInterface = nullptr; \
|
||||
SfxInterface* Class::pInterface = nullptr; \
|
||||
SfxInterface* Class::GetStaticInterface() \
|
||||
{ \
|
||||
if ( !pInterface ) \
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <sal/config.h>
|
||||
#include <sfx2/dllapi.h>
|
||||
#include <sfx2/shell.hxx>
|
||||
|
||||
class SfxViewFrame;
|
||||
class SfxViewShell;
|
||||
@@ -34,10 +35,10 @@ class SFX2_DLLPUBLIC SfxViewFactory
|
||||
{
|
||||
public:
|
||||
SfxViewFactory( SfxViewCtor fnC,
|
||||
sal_uInt16 nOrdinal, const sal_Char* asciiViewName );
|
||||
SfxInterfaceId nOrdinal, const sal_Char* asciiViewName );
|
||||
|
||||
SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
|
||||
sal_uInt16 GetOrdinal() const { return nOrd; }
|
||||
SfxViewShell* CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
|
||||
SfxInterfaceId GetOrdinal() const { return nOrd; }
|
||||
|
||||
/// returns a legacy view name. This is "view" with an appended ordinal/ID.
|
||||
OUString GetLegacyViewName() const;
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
|
||||
private:
|
||||
SfxViewCtor fnCreate;
|
||||
sal_uInt16 nOrd;
|
||||
SfxInterfaceId nOrd;
|
||||
const OUString m_sViewName;
|
||||
};
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ public:
|
||||
|
||||
static void SetViewFrame( SfxViewFrame* );
|
||||
|
||||
static SfxViewFrame* LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
|
||||
static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
|
||||
static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId );
|
||||
static SfxViewFrame* LoadHiddenDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId );
|
||||
static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId );
|
||||
static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId );
|
||||
static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem );
|
||||
static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest );
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
SAL_DLLPRIVATE void InvalidateBorderImpl( const SfxViewShell *pSh );
|
||||
|
||||
virtual SfxObjectShell* GetObjectShell() override;
|
||||
sal_uInt16 GetCurViewId() const;
|
||||
SfxInterfaceId GetCurViewId() const;
|
||||
SfxFrame& GetFrame() const;
|
||||
SfxViewFrame* GetTopViewFrame() const;
|
||||
|
||||
@@ -206,12 +206,12 @@ public:
|
||||
SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
|
||||
SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
|
||||
|
||||
SAL_DLLPRIVATE void SetCurViewId_Impl( const sal_uInt16 i_nID );
|
||||
SAL_DLLPRIVATE void SetCurViewId_Impl( const SfxInterfaceId i_nID );
|
||||
|
||||
private:
|
||||
SAL_DLLPRIVATE bool SwitchToViewShell_Impl( sal_uInt16 nNo, bool bIsIndex = false );
|
||||
SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
|
||||
SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId );
|
||||
SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const SfxInterfaceId i_nNewViewId );
|
||||
|
||||
/** loads the given existing document into the given frame
|
||||
|
||||
@@ -234,7 +234,7 @@ private:
|
||||
const SfxObjectShell& i_rDoc,
|
||||
const css::uno::Reference< css::frame::XFrame >& i_rFrame,
|
||||
const css::uno::Sequence< css::beans::PropertyValue >& i_rLoadArgs,
|
||||
const sal_uInt16 i_nViewId,
|
||||
const SfxInterfaceId i_nViewId,
|
||||
const bool i_bHidden
|
||||
);
|
||||
|
||||
@@ -256,7 +256,7 @@ private:
|
||||
SAL_DLLPRIVATE static SfxViewFrame* LoadViewIntoFrame_Impl_NoThrow(
|
||||
const SfxObjectShell& i_rDoc,
|
||||
const css::uno::Reference< css::frame::XFrame >& i_rFrame,
|
||||
const sal_uInt16 i_nViewId,
|
||||
const SfxInterfaceId i_nViewId,
|
||||
const bool i_bHidden
|
||||
);
|
||||
};
|
||||
|
||||
@@ -118,7 +118,7 @@ private: \
|
||||
static SfxViewFactory *pFactory; \
|
||||
public: \
|
||||
static SfxViewShell *CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView); \
|
||||
static void RegisterFactory( sal_uInt16 nPrio = USHRT_MAX ); \
|
||||
static void RegisterFactory( SfxInterfaceId nPrio ); \
|
||||
static SfxViewFactory*Factory() { return pFactory; } \
|
||||
static void InitFactory()
|
||||
|
||||
@@ -126,7 +126,7 @@ public: \
|
||||
SfxViewFactory* Class::pFactory; \
|
||||
SfxViewShell* Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
|
||||
{ return new Class(pFrame, pOldView); } \
|
||||
void Class::RegisterFactory( sal_uInt16 nPrio ) \
|
||||
void Class::RegisterFactory( SfxInterfaceId nPrio ) \
|
||||
{ \
|
||||
pFactory = new SfxViewFactory(&CreateInstance,nPrio,AsciiViewName);\
|
||||
InitFactory(); \
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
#include <sfx2/shell.hxx>
|
||||
|
||||
#define SVX_INTERFACE_BASIDE_DOCSH (SFX_INTERFACE_IDE_START+ 0)
|
||||
#define SVX_INTERFACE_BASIDE_VIEWSH (SFX_INTERFACE_IDE_START+ 1)
|
||||
#define SVX_INTERFACE_EXTRUSION_BAR (SFX_INTERFACE_IDE_START+ 2)
|
||||
#define SVX_INTERFACE_FONTWORK_BAR (SFX_INTERFACE_IDE_START+ 3)
|
||||
#define SVX_INTERFACE_BASIDE_DOCSH (SFX_INTERFACE_IDE_START)
|
||||
#define SVX_INTERFACE_BASIDE_VIEWSH (SFX_INTERFACE_IDE_START + SfxInterfaceId(1))
|
||||
#define SVX_INTERFACE_EXTRUSION_BAR (SFX_INTERFACE_IDE_START + SfxInterfaceId(2))
|
||||
#define SVX_INTERFACE_FONTWORK_BAR (SFX_INTERFACE_IDE_START + SfxInterfaceId(3))
|
||||
|
||||
|
||||
#define SVX_INTERFACE_FORM_SH (SFX_INTERFACE_IDE_END+ 1)
|
||||
#define SVX_INTERFACE_FORM_SH (SFX_INTERFACE_IDE_END + SfxInterfaceId(1))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+18
-18
@@ -21,25 +21,25 @@
|
||||
#define INCLUDED_SC_INC_SHELLIDS_HXX
|
||||
|
||||
// Sfx Interface-IDs
|
||||
#define SCID_APP (SFX_INTERFACE_SC_START+0)
|
||||
#define SCID_DOC_SHELL (SFX_INTERFACE_SC_START+1)
|
||||
#define SCID_TABVIEW_SHELL (SFX_INTERFACE_SC_START+2)
|
||||
#define SCID_TABPOP_SHELL (SFX_INTERFACE_SC_START+3)
|
||||
#define SCID_EDIT_SHELL (SFX_INTERFACE_SC_START+4)
|
||||
#define SCID_DRAW_SHELL (SFX_INTERFACE_SC_START+5)
|
||||
#define SCID_DRAW_TEXT_SHELL (SFX_INTERFACE_SC_START+6)
|
||||
#define SCID_PREVIEW_SHELL (SFX_INTERFACE_SC_START+7)
|
||||
#define SCID_PIVOT_SHELL (SFX_INTERFACE_SC_START+8)
|
||||
#define SCID_AUDITING_SHELL (SFX_INTERFACE_SC_START+9)
|
||||
#define SCID_FORM_SHELL (SFX_INTERFACE_SC_START+10)
|
||||
#define SCID_APP (SFX_INTERFACE_SC_START+SfxInterfaceId(0))
|
||||
#define SCID_DOC_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(1))
|
||||
#define SCID_TABVIEW_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(2))
|
||||
#define SCID_TABPOP_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(3))
|
||||
#define SCID_EDIT_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(4))
|
||||
#define SCID_DRAW_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(5))
|
||||
#define SCID_DRAW_TEXT_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(6))
|
||||
#define SCID_PREVIEW_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(7))
|
||||
#define SCID_PIVOT_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(8))
|
||||
#define SCID_AUDITING_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(9))
|
||||
#define SCID_FORM_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(10))
|
||||
|
||||
#define SCID_FORMAT_SHELL (SFX_INTERFACE_SC_START+11)
|
||||
#define SCID_CELL_SHELL (SFX_INTERFACE_SC_START+12)
|
||||
#define SCID_OLEOBJECT_SHELL (SFX_INTERFACE_SC_START+13)
|
||||
#define SCID_CHART_SHELL (SFX_INTERFACE_SC_START+14)
|
||||
#define SCID_GRAPHIC_SHELL (SFX_INTERFACE_SC_START+15)
|
||||
#define SCID_PAGEBREAK_SHELL (SFX_INTERFACE_SC_START+16)
|
||||
#define SCID_MEDIA_SHELL (SFX_INTERFACE_SC_START+17)
|
||||
#define SCID_FORMAT_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(11))
|
||||
#define SCID_CELL_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(12))
|
||||
#define SCID_OLEOBJECT_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(13))
|
||||
#define SCID_CHART_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(14))
|
||||
#define SCID_GRAPHIC_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(15))
|
||||
#define SCID_PAGEBREAK_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(16))
|
||||
#define SCID_MEDIA_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(17))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -129,8 +129,8 @@ void ScDLL::Init()
|
||||
ScGlobal::Init();
|
||||
|
||||
// register your view-factories here
|
||||
ScTabViewShell ::RegisterFactory(1);
|
||||
ScPreviewShell ::RegisterFactory(2);
|
||||
ScTabViewShell ::RegisterFactory(SFX_INTERFACE_SFXAPP);
|
||||
ScPreviewShell ::RegisterFactory(SFX_INTERFACE_SFXDOCSH);
|
||||
|
||||
// register your shell-interfaces here
|
||||
ScModule ::RegisterInterface(pMod);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef INCLUDED_SD_INC_FACTORYIDS_HXX
|
||||
#define INCLUDED_SD_INC_FACTORYIDS_HXX
|
||||
|
||||
#include <sfx2/shell.hxx>
|
||||
|
||||
namespace sd {
|
||||
|
||||
/** This are ids used by SfxTopFrame::Create() or CreateViewFrame() to
|
||||
@@ -28,14 +30,11 @@ namespace sd {
|
||||
with a certain view instead of first create a default view and
|
||||
then switch to the desired view.
|
||||
*/
|
||||
enum ViewShellFactoryIds
|
||||
{
|
||||
IMPRESS_FACTORY_ID = 1,
|
||||
DRAW_FACTORY_ID = 1,
|
||||
SLIDE_SORTER_FACTORY_ID = 2,
|
||||
OUTLINE_FACTORY_ID = 3,
|
||||
PRESENTATION_FACTORY_ID = 4
|
||||
};
|
||||
constexpr auto IMPRESS_FACTORY_ID = SfxInterfaceId(1);
|
||||
constexpr auto DRAW_FACTORY_ID = SfxInterfaceId(1);
|
||||
constexpr auto SLIDE_SORTER_FACTORY_ID = SfxInterfaceId(2);
|
||||
constexpr auto OUTLINE_FACTORY_ID = SfxInterfaceId(3);
|
||||
constexpr auto PRESENTATION_FACTORY_ID = SfxInterfaceId(4);
|
||||
|
||||
} // end of namespace sd
|
||||
|
||||
|
||||
+18
-18
@@ -23,24 +23,24 @@
|
||||
#include <rsc/rscsfx.hxx>
|
||||
#include <sal/types.h>
|
||||
|
||||
#define SD_IF_SDAPP SFX_INTERFACE_SD_START + 0
|
||||
#define SD_IF_SDDRAWDOCSHELL SFX_INTERFACE_SD_START + 1
|
||||
#define SD_IF_SDDRAWVIEWSHELL SFX_INTERFACE_SD_START + 3
|
||||
#define SD_IF_SDOUTLINEVIEWSHELL SFX_INTERFACE_SD_START + 5
|
||||
#define SD_IF_SDDRAWTEXTOBJECTBAR SFX_INTERFACE_SD_START + 7
|
||||
#define SD_IF_SDDRAWBEZIEROBJECTBAR SFX_INTERFACE_SD_START + 8
|
||||
#define SD_IF_SDGRAPHICDOCSHELL SFX_INTERFACE_SD_START + 10
|
||||
#define SD_IF_SDGRAPHICVIEWSHELL SFX_INTERFACE_SD_START + 11
|
||||
#define SD_IF_SDDRAWGRAFOBJECTBAR SFX_INTERFACE_SD_START + 13
|
||||
#define SD_IF_SDPRESVIEWSHELL SFX_INTERFACE_SD_START + 14
|
||||
#define SD_IF_SDVIEWSHELLBASE SFX_INTERFACE_SD_START + 16
|
||||
#define SD_IF_SDSLIDESORTERVIEWSHELL SFX_INTERFACE_SD_START + 19
|
||||
#define SD_IF_SDDRAWMEDIAOBJECTBAR SFX_INTERFACE_SD_START + 23
|
||||
#define SD_IF_SDLEFTIMPRESSPANESHELL SFX_INTERFACE_SD_START + 24
|
||||
#define SD_IF_SDLEFTDRAWPANESHELL SFX_INTERFACE_SD_START + 25
|
||||
#define SD_IF_SDDRAWTABLEOBJECTBAR SFX_INTERFACE_SD_START + 27
|
||||
#define SD_IF_SDTOOLPANELPANESHELL SFX_INTERFACE_SD_START + 29
|
||||
#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + 30
|
||||
#define SD_IF_SDAPP SFX_INTERFACE_SD_START + SfxInterfaceId(0)
|
||||
#define SD_IF_SDDRAWDOCSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(1)
|
||||
#define SD_IF_SDDRAWVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(3)
|
||||
#define SD_IF_SDOUTLINEVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(5)
|
||||
#define SD_IF_SDDRAWTEXTOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(7)
|
||||
#define SD_IF_SDDRAWBEZIEROBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(8)
|
||||
#define SD_IF_SDGRAPHICDOCSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(10)
|
||||
#define SD_IF_SDGRAPHICVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(11)
|
||||
#define SD_IF_SDDRAWGRAFOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(13)
|
||||
#define SD_IF_SDPRESVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(14)
|
||||
#define SD_IF_SDVIEWSHELLBASE SFX_INTERFACE_SD_START + SfxInterfaceId(16)
|
||||
#define SD_IF_SDSLIDESORTERVIEWSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(19)
|
||||
#define SD_IF_SDDRAWMEDIAOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(23)
|
||||
#define SD_IF_SDLEFTIMPRESSPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(24)
|
||||
#define SD_IF_SDLEFTDRAWPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(25)
|
||||
#define SD_IF_SDDRAWTABLEOBJECTBAR SFX_INTERFACE_SD_START + SfxInterfaceId(27)
|
||||
#define SD_IF_SDTOOLPANELPANESHELL SFX_INTERFACE_SD_START + SfxInterfaceId(29)
|
||||
#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + SfxInterfaceId(30)
|
||||
|
||||
|
||||
// Object-Ids for StarDraw UserData
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
configuration that has in the center pane a view shell of the same
|
||||
type as mrViewShell.
|
||||
*/
|
||||
sal_uInt16 GetViewId();
|
||||
SfxInterfaceId GetViewId();
|
||||
|
||||
/** Return a pointer to the image map dialog that is displayed in some
|
||||
child window.
|
||||
|
||||
@@ -43,7 +43,7 @@ SfxViewShell* GraphicViewShellBase::CreateInstance (
|
||||
pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
|
||||
return pBase;
|
||||
}
|
||||
void GraphicViewShellBase::RegisterFactory( sal_uInt16 nPrio )
|
||||
void GraphicViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
|
||||
{
|
||||
pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
|
||||
InitFactory();
|
||||
|
||||
@@ -44,7 +44,7 @@ SfxViewShell* ImpressViewShellBase::CreateInstance (
|
||||
pBase->LateInit("");
|
||||
return pBase;
|
||||
}
|
||||
void ImpressViewShellBase::RegisterFactory( sal_uInt16 nPrio )
|
||||
void ImpressViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
|
||||
{
|
||||
pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
|
||||
InitFactory();
|
||||
|
||||
@@ -41,7 +41,7 @@ SfxViewShell* OutlineViewShellBase::CreateInstance (
|
||||
pBase->LateInit(framework::FrameworkHelper::msOutlineViewURL);
|
||||
return pBase;
|
||||
}
|
||||
void OutlineViewShellBase::RegisterFactory( sal_uInt16 nPrio )
|
||||
void OutlineViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
|
||||
{
|
||||
pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Outline");
|
||||
InitFactory();
|
||||
|
||||
@@ -49,7 +49,7 @@ SfxViewShell* PresentationViewShellBase::CreateInstance (
|
||||
pBase->LateInit(framework::FrameworkHelper::msPresentationViewURL);
|
||||
return pBase;
|
||||
}
|
||||
void PresentationViewShellBase::RegisterFactory( sal_uInt16 nPrio )
|
||||
void PresentationViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
|
||||
{
|
||||
pFactory = new SfxViewFactory(
|
||||
&CreateInstance,nPrio,"FullScreenPresentation");
|
||||
|
||||
@@ -42,7 +42,7 @@ SfxViewShell* SlideSorterViewShellBase::CreateInstance (
|
||||
return pBase;
|
||||
}
|
||||
|
||||
void SlideSorterViewShellBase::RegisterFactory( sal_uInt16 nPrio )
|
||||
void SlideSorterViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
|
||||
{
|
||||
pFactory = new SfxViewFactory(&CreateInstance,nPrio,"SlideSorter");
|
||||
InitFactory();
|
||||
|
||||
@@ -280,7 +280,7 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP
|
||||
}
|
||||
}
|
||||
|
||||
sal_uInt16 ViewShell::Implementation::GetViewId()
|
||||
SfxInterfaceId ViewShell::Implementation::GetViewId()
|
||||
{
|
||||
switch (mrViewShell.GetShellType())
|
||||
{
|
||||
|
||||
@@ -970,13 +970,11 @@ void ViewShell::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert
|
||||
// Get the view id from the view shell in the center pane. This will
|
||||
// usually be the called view shell, but to be on the safe side we call
|
||||
// the main view shell explicitly.
|
||||
sal_uInt16 nViewID (IMPRESS_FACTORY_ID);
|
||||
SfxInterfaceId nViewID (IMPRESS_FACTORY_ID);
|
||||
if (GetViewShellBase().GetMainViewShell().get() != nullptr)
|
||||
nViewID = GetViewShellBase().GetMainViewShell()->mpImpl->GetViewId();
|
||||
rSequence[nIndex].Name = sUNO_View_ViewId;
|
||||
OUStringBuffer sBuffer( "view" );
|
||||
sBuffer.append( static_cast<sal_Int32>(nViewID));
|
||||
rSequence[nIndex].Value <<= sBuffer.makeStringAndClear();
|
||||
rSequence[nIndex].Value <<= "view" + OUString::number( static_cast<sal_uInt16>(nViewID));
|
||||
|
||||
mpFrameView->WriteUserDataSequence( rSequence, bBrowse );
|
||||
}
|
||||
|
||||
@@ -117,8 +117,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
|
||||
, pViewFrame( nullptr )
|
||||
, pSlotPool( nullptr )
|
||||
, pAppDispat( nullptr )
|
||||
, pInterfaces( nullptr )
|
||||
, nInterfaces( 0 )
|
||||
, bDowning( true )
|
||||
, bInQuit( false )
|
||||
|
||||
|
||||
@@ -241,9 +241,6 @@ void SfxApplication::Initialize_Impl()
|
||||
pImpl->pViewFrames = new SfxViewFrameArr_Impl;
|
||||
pImpl->pViewShells = new SfxViewShellArr_Impl;
|
||||
pImpl->pObjShells = new SfxObjectShellArr_Impl;
|
||||
pImpl->nInterfaces = SFX_INTERFACE_APP+8;
|
||||
pImpl->pInterfaces = new SfxInterface*[pImpl->nInterfaces];
|
||||
memset( pImpl->pInterfaces, 0, sizeof(SfxInterface*) * pImpl->nInterfaces );
|
||||
|
||||
Registrations_Impl();
|
||||
|
||||
|
||||
@@ -100,9 +100,6 @@ void SfxApplication::Deinitialize()
|
||||
|
||||
DBG_ASSERT( pImpl->pViewFrame == nullptr, "active foreign ViewFrame" );
|
||||
|
||||
delete[] pImpl->pInterfaces;
|
||||
pImpl->pInterfaces = nullptr;
|
||||
|
||||
// free administration managers
|
||||
DELETEZ(pImpl->pAppDispat);
|
||||
SfxResId::DeleteResMgr();
|
||||
|
||||
@@ -481,7 +481,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (sal_uInt16 nNo) const
|
||||
|
||||
sal_uInt32 nRet = pImplData->aChildWindows[nNo]->nResId;
|
||||
if ( pImplData->aChildWindows[nNo]->bContext )
|
||||
nRet += sal_uInt32( nClassId ) << 16;
|
||||
nRet += sal_uInt16( nClassId ) << 16;
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -370,11 +370,11 @@ OUString SfxObjectFactory::GetModuleName() const
|
||||
}
|
||||
|
||||
|
||||
sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const sal_uInt16 i_nViewId, const sal_uInt16 i_nFallback ) const
|
||||
sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const SfxInterfaceId i_nViewId, const sal_uInt16 i_nFallback ) const
|
||||
{
|
||||
for ( sal_uInt16 curViewNo = 0; curViewNo < GetViewFactoryCount(); ++curViewNo )
|
||||
{
|
||||
const sal_uInt16 curViewId = GetViewFactory( curViewNo ).GetOrdinal();
|
||||
const SfxInterfaceId curViewId = GetViewFactory( curViewNo ).GetOrdinal();
|
||||
if ( i_nViewId == curViewId )
|
||||
return curViewNo;
|
||||
}
|
||||
|
||||
@@ -118,11 +118,8 @@ public:
|
||||
SfxViewFrame* pViewFrame;
|
||||
SfxSlotPool* pSlotPool;
|
||||
SfxDispatcher* pAppDispat; // Dispatcher if no document
|
||||
SfxInterface** pInterfaces;
|
||||
::rtl::Reference<sfx2::sidebar::Theme> m_pSidebarTheme;
|
||||
|
||||
sal_uInt16 nInterfaces;
|
||||
|
||||
bool bDowning:1; // sal_True on Exit and afterwards
|
||||
bool bInQuit : 1;
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ void SfxFrame::GetViewData_Impl()
|
||||
}
|
||||
|
||||
if ( pViewFrame->GetCurViewId() )
|
||||
pSet->Put( SfxUInt16Item( SID_VIEW_ID, pViewFrame->GetCurViewId() ) );
|
||||
pSet->Put( SfxUInt16Item( SID_VIEW_ID, (sal_uInt16)pViewFrame->GetCurViewId() ) );
|
||||
if ( pChildArr )
|
||||
{
|
||||
// For Framesets also the data from the ChildViews have to be processed
|
||||
|
||||
@@ -218,7 +218,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
|
||||
return xFrame;
|
||||
}
|
||||
|
||||
SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, sal_uInt16 nViewId, bool bHidden )
|
||||
SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, SfxInterfaceId nViewId, bool bHidden )
|
||||
{
|
||||
SfxFrame* pFrame = nullptr;
|
||||
try
|
||||
@@ -242,8 +242,8 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, sal_uInt
|
||||
::comphelper::NamedValueCollection aArgs( aLoadArgs );
|
||||
aArgs.put( "Model", rDoc.GetModel() );
|
||||
aArgs.put( "Hidden", bHidden );
|
||||
if ( nViewId )
|
||||
aArgs.put( "ViewId", nViewId );
|
||||
if ( nViewId != SfxInterfaceId(0) )
|
||||
aArgs.put( "ViewId", (sal_uInt16)nViewId );
|
||||
|
||||
aLoadArgs = aArgs.getPropertyValues();
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
::comphelper::NamedValueCollection& io_rDescriptor
|
||||
);
|
||||
|
||||
static sal_Int16 impl_determineEffectiveViewId_nothrow(
|
||||
static SfxInterfaceId impl_determineEffectiveViewId_nothrow(
|
||||
const SfxObjectShell& i_rDocument,
|
||||
const ::comphelper::NamedValueCollection& i_rDescriptor
|
||||
);
|
||||
@@ -536,12 +536,13 @@ void SfxFrameLoader_Impl::impl_removeLoaderArguments( ::comphelper::NamedValueCo
|
||||
}
|
||||
|
||||
|
||||
sal_Int16 SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor )
|
||||
SfxInterfaceId SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor )
|
||||
{
|
||||
sal_Int16 nViewId = i_rDescriptor.getOrDefault( "ViewId", sal_Int16( 0 ) );
|
||||
SfxInterfaceId nViewId(i_rDescriptor.getOrDefault( "ViewId", sal_Int16( 0 ) ));
|
||||
try
|
||||
{
|
||||
if ( nViewId == 0 ) do
|
||||
if ( nViewId == SfxInterfaceId(0) )
|
||||
do
|
||||
{
|
||||
Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY );
|
||||
Reference< XIndexAccess > xViewData;
|
||||
@@ -567,7 +568,7 @@ sal_Int16 SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxO
|
||||
|
||||
SfxViewFactory* pViewFactory = i_rDocument.GetFactory().GetViewFactoryByViewName( sViewId );
|
||||
if ( pViewFactory )
|
||||
nViewId = sal_Int16( pViewFactory->GetOrdinal() );
|
||||
nViewId = pViewFactory->GetOrdinal();
|
||||
}
|
||||
while ( false );
|
||||
}
|
||||
@@ -576,7 +577,7 @@ sal_Int16 SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxO
|
||||
DBG_UNHANDLED_EXCEPTION();
|
||||
}
|
||||
|
||||
if ( nViewId == 0 )
|
||||
if ( nViewId == SfxInterfaceId(0) )
|
||||
nViewId = i_rDocument.GetFactory().GetViewFactory().GetOrdinal();
|
||||
return nViewId;
|
||||
}
|
||||
@@ -708,7 +709,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
|
||||
ENSURE_OR_THROW( xDoc.is(), "no SfxObjectShell for the given model" );
|
||||
|
||||
// ensure the ID of the to-be-created view is in the descriptor, if possible
|
||||
const sal_Int16 nViewId = impl_determineEffectiveViewId_nothrow( *xDoc, aDescriptor );
|
||||
const SfxInterfaceId nViewId = impl_determineEffectiveViewId_nothrow( *xDoc, aDescriptor );
|
||||
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
|
||||
const OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ struct SfxViewFrame_Impl
|
||||
SfxViewFrame* pActiveChild;
|
||||
VclPtr<vcl::Window> pFocusWin;
|
||||
sal_uInt16 nDocViewNo;
|
||||
sal_uInt16 nCurViewId;
|
||||
bool bResizeInToOut:1;
|
||||
bool bObjLocked:1;
|
||||
bool bReloading:1;
|
||||
bool bIsDowning:1;
|
||||
bool bModal:1;
|
||||
bool bEnabled:1;
|
||||
bool bWindowWasEnabled:1;
|
||||
bool bActive;
|
||||
SfxInterfaceId nCurViewId;
|
||||
bool bResizeInToOut:1;
|
||||
bool bObjLocked:1;
|
||||
bool bReloading:1;
|
||||
bool bIsDowning:1;
|
||||
bool bModal:1;
|
||||
bool bEnabled:1;
|
||||
bool bWindowWasEnabled:1;
|
||||
bool bActive;
|
||||
OUString aFactoryName;
|
||||
|
||||
explicit SfxViewFrame_Impl(SfxFrame& i_rFrame)
|
||||
|
||||
@@ -30,10 +30,7 @@ SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame *pFrame, SfxViewShell
|
||||
|
||||
OUString SfxViewFactory::GetLegacyViewName() const
|
||||
{
|
||||
OUStringBuffer aViewName;
|
||||
aViewName.append( "view" );
|
||||
aViewName.append( sal_Int32( GetOrdinal() ) );
|
||||
return aViewName.makeStringAndClear();
|
||||
return "view" + OUString::number( sal_uInt16( GetOrdinal() ) );
|
||||
}
|
||||
|
||||
OUString SfxViewFactory::GetAPIViewName() const
|
||||
@@ -41,7 +38,7 @@ OUString SfxViewFactory::GetAPIViewName() const
|
||||
if ( !m_sViewName.isEmpty() )
|
||||
return m_sViewName;
|
||||
|
||||
if ( GetOrdinal() == 0 )
|
||||
if ( GetOrdinal() == SfxInterfaceId(0) )
|
||||
return OUString( "Default" );
|
||||
|
||||
return GetLegacyViewName();
|
||||
@@ -50,7 +47,7 @@ OUString SfxViewFactory::GetAPIViewName() const
|
||||
// CTOR / DTOR -----------------------------------------------------------
|
||||
|
||||
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC,
|
||||
sal_uInt16 nOrdinal, const sal_Char* asciiViewName ):
|
||||
SfxInterfaceId nOrdinal, const sal_Char* asciiViewName ):
|
||||
fnCreate(fnC),
|
||||
nOrd(nOrdinal),
|
||||
m_sViewName( OUString::createFromAscii( asciiViewName ) )
|
||||
|
||||
@@ -563,7 +563,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
|
||||
// collect the views of the document
|
||||
// TODO: when UNO ViewFactories are available for SFX-based documents, the below code should
|
||||
// be UNOized, too
|
||||
typedef ::std::pair< Reference< XFrame >, sal_uInt16 > ViewDescriptor;
|
||||
typedef ::std::pair< Reference< XFrame >, SfxInterfaceId > ViewDescriptor;
|
||||
::std::list< ViewDescriptor > aViewFrames;
|
||||
SfxViewFrame *pView = GetFirst( xOldObj );
|
||||
while ( pView )
|
||||
@@ -1325,7 +1325,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
|
||||
m_pImpl->bObjLocked = false;
|
||||
m_pImpl->pFocusWin = nullptr;
|
||||
m_pImpl->pActiveChild = nullptr;
|
||||
m_pImpl->nCurViewId = 0;
|
||||
m_pImpl->nCurViewId = SfxInterfaceId(0);
|
||||
m_pImpl->bReloading = false;
|
||||
m_pImpl->bIsDowning = false;
|
||||
m_pImpl->bModal = false;
|
||||
@@ -1708,7 +1708,7 @@ SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
|
||||
}
|
||||
|
||||
SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
|
||||
const sal_uInt16 i_nViewId, const bool i_bHidden )
|
||||
const SfxInterfaceId i_nViewId, const bool i_bHidden )
|
||||
{
|
||||
Reference< XFrame > xFrame( i_rFrame );
|
||||
bool bOwnFrame = false;
|
||||
@@ -1778,7 +1778,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
|
||||
}
|
||||
|
||||
SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
|
||||
const Sequence< PropertyValue >& i_rLoadArgs, const sal_uInt16 i_nViewId,
|
||||
const Sequence< PropertyValue >& i_rLoadArgs, const SfxInterfaceId i_nViewId,
|
||||
const bool i_bHidden )
|
||||
{
|
||||
Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
|
||||
@@ -1786,7 +1786,7 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
|
||||
::comphelper::NamedValueCollection aTransformLoadArgs( i_rLoadArgs.getLength() ? i_rLoadArgs : xDocument->getArgs() );
|
||||
aTransformLoadArgs.put( "Model", xDocument );
|
||||
if ( i_nViewId )
|
||||
aTransformLoadArgs.put( "ViewId", sal_Int16( i_nViewId ) );
|
||||
aTransformLoadArgs.put( "ViewId", sal_uInt16( i_nViewId ) );
|
||||
if ( i_bHidden )
|
||||
aTransformLoadArgs.put( "Hidden", i_bHidden );
|
||||
else
|
||||
@@ -1806,22 +1806,22 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
|
||||
return pViewShell;
|
||||
}
|
||||
|
||||
SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
|
||||
SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId )
|
||||
{
|
||||
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
|
||||
}
|
||||
|
||||
SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
|
||||
SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, SfxInterfaceId i_nViewId )
|
||||
{
|
||||
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false );
|
||||
}
|
||||
|
||||
SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame )
|
||||
{
|
||||
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, 0, false );
|
||||
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, SfxInterfaceId(0), false );
|
||||
}
|
||||
|
||||
SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId )
|
||||
SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId )
|
||||
{
|
||||
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : nullptr, i_nViewId, false );
|
||||
}
|
||||
@@ -1834,7 +1834,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const Sf
|
||||
return LoadViewIntoFrame_Impl_NoThrow(
|
||||
i_rDoc,
|
||||
pFrameItem ? pFrameItem->GetFrame() : nullptr,
|
||||
0,
|
||||
SfxInterfaceId(0),
|
||||
pHiddenItem && pHiddenItem->GetValue()
|
||||
);
|
||||
}
|
||||
@@ -1871,7 +1871,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
|
||||
return pViewFrame;
|
||||
}
|
||||
|
||||
void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
|
||||
void SfxViewFrame::SaveCurrentViewData_Impl( const SfxInterfaceId i_nNewViewId )
|
||||
{
|
||||
SfxViewShell* pCurrentShell = GetViewShell();
|
||||
ENSURE_OR_RETURN_VOID( pCurrentShell != nullptr, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
|
||||
@@ -1990,7 +1990,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl
|
||||
|
||||
// ID of the new view
|
||||
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
|
||||
const sal_uInt16 nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
|
||||
const SfxInterfaceId nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : SfxInterfaceId(nViewIdOrNo);
|
||||
|
||||
// save the view data of the old view, so it can be restored later on (when needed)
|
||||
SaveCurrentViewData_Impl( nViewId );
|
||||
@@ -2025,12 +2025,12 @@ bool SfxViewFrame::SwitchToViewShell_Impl
|
||||
return true;
|
||||
}
|
||||
|
||||
void SfxViewFrame::SetCurViewId_Impl( const sal_uInt16 i_nID )
|
||||
void SfxViewFrame::SetCurViewId_Impl( const SfxInterfaceId i_nID )
|
||||
{
|
||||
m_pImpl->nCurViewId = i_nID;
|
||||
}
|
||||
|
||||
sal_uInt16 SfxViewFrame::GetCurViewId() const
|
||||
SfxInterfaceId SfxViewFrame::GetCurViewId() const
|
||||
{
|
||||
return m_pImpl->nCurViewId;
|
||||
}
|
||||
@@ -2104,7 +2104,7 @@ void SfxViewFrame::ExecView_Impl
|
||||
|
||||
// the view ID (optional arg. TODO: this is currently not supported in the slot definition ...)
|
||||
const SfxUInt16Item* pViewIdItem = rReq.GetArg<SfxUInt16Item>(SID_VIEW_ID);
|
||||
const sal_uInt16 nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
|
||||
const SfxInterfaceId nViewId = pViewIdItem ? SfxInterfaceId(pViewIdItem->GetValue()) : GetCurViewId();
|
||||
|
||||
Reference < XFrame > xFrame;
|
||||
// the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
|
||||
@@ -2216,7 +2216,7 @@ void SfxViewFrame::StateView_Impl
|
||||
{
|
||||
case SID_VIEWSHELL:
|
||||
{
|
||||
rSet.Put( SfxUInt16Item( nWhich, m_pImpl->nCurViewId ) );
|
||||
rSet.Put( SfxUInt16Item( nWhich, sal_uInt16(m_pImpl->nCurViewId )) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
|
||||
void InvalidateCursor();
|
||||
|
||||
public:
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+1)
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+SfxInterfaceId(1))
|
||||
|
||||
SFX_DECL_OBJECTFACTORY();
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class SmModule : public SfxModule, public utl::ConfigurationListener
|
||||
static void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
|
||||
|
||||
public:
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START + 0)
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START + SfxInterfaceId(0))
|
||||
|
||||
private:
|
||||
/// SfxInterface initializer.
|
||||
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
void NextError();
|
||||
void PrevError();
|
||||
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+2)
|
||||
SFX_DECL_INTERFACE(SFX_INTERFACE_SMA_START+SfxInterfaceId(2))
|
||||
SFX_DECL_VIEWFACTORY(SmViewShell);
|
||||
|
||||
private:
|
||||
|
||||
@@ -108,7 +108,7 @@ void Test::setUp()
|
||||
SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
|
||||
m_xDocShRef->DoInitNew();
|
||||
|
||||
SfxViewFrame *pViewFrame = SfxViewFrame::LoadHiddenDocument(*m_xDocShRef, 0);
|
||||
SfxViewFrame *pViewFrame = SfxViewFrame::LoadHiddenDocument(*m_xDocShRef, SFX_INTERFACE_NONE);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Should have a SfxViewFrame", pViewFrame);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace
|
||||
SmDocShell::RegisterInterface(pModule);
|
||||
SmViewShell::RegisterInterface(pModule);
|
||||
|
||||
SmViewShell::RegisterFactory(1);
|
||||
SmViewShell::RegisterFactory(SFX_INTERFACE_SFXAPP);
|
||||
|
||||
SvxZoomStatusBarControl::RegisterControl(SID_ATTR_ZOOM, pModule);
|
||||
SvxZoomSliderControl::RegisterControl(SID_ATTR_ZOOMSLIDER, pModule);
|
||||
|
||||
+33
-33
@@ -23,44 +23,44 @@
|
||||
|
||||
// Mapping for UI-parameters
|
||||
|
||||
#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1)
|
||||
#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2)
|
||||
#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3)
|
||||
#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4)
|
||||
#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5)
|
||||
#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6)
|
||||
#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7)
|
||||
#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8)
|
||||
#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9)
|
||||
#define SW_BASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(1))
|
||||
#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(2))
|
||||
#define SW_LISTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(3))
|
||||
#define SW_TABSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(4))
|
||||
#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(5))
|
||||
#define SW_GRFSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(6))
|
||||
#define SW_OLESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(7))
|
||||
#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(8))
|
||||
#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(9))
|
||||
|
||||
#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10)
|
||||
#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11)
|
||||
#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12)
|
||||
#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13)
|
||||
#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14)
|
||||
#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15)
|
||||
#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + SfxInterfaceId(10))
|
||||
#define SW_DOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(11))
|
||||
#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(12))
|
||||
#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + SfxInterfaceId(13))
|
||||
#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(14))
|
||||
#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(15))
|
||||
|
||||
#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16)
|
||||
#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17)
|
||||
#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18)
|
||||
#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(16))
|
||||
#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(17))
|
||||
#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(18))
|
||||
|
||||
#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19)
|
||||
#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20)
|
||||
#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21)
|
||||
#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22)
|
||||
#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23)
|
||||
#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24)
|
||||
#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25)
|
||||
#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26)
|
||||
#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27)
|
||||
#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28)
|
||||
#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29)
|
||||
#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30)
|
||||
#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(19))
|
||||
#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(20))
|
||||
#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(21))
|
||||
#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(22))
|
||||
#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(23))
|
||||
#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(24))
|
||||
#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(25))
|
||||
#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(26))
|
||||
#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(27))
|
||||
#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(28))
|
||||
#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(29))
|
||||
#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(30))
|
||||
|
||||
#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31)
|
||||
#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32)
|
||||
#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(31))
|
||||
#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(32))
|
||||
|
||||
#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + 33)
|
||||
#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(33))
|
||||
#endif // _UIPARAM_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -327,7 +327,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
|
||||
if( SPLITDOC_TO_HTML == eDocType &&
|
||||
!pDoc->GetSpzFrameFormats()->empty() )
|
||||
{
|
||||
SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
|
||||
SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE );
|
||||
}
|
||||
xDocSh->DoSaveAs( *pTmpMed );
|
||||
xDocSh->DoSaveCompleted( pTmpMed );
|
||||
|
||||
@@ -647,7 +647,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha
|
||||
m_bRemoveHidden = ( pHiddenItem == nullptr || !pHiddenItem->GetValue() );
|
||||
}
|
||||
|
||||
m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 );
|
||||
m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, SFX_INTERFACE_NONE );
|
||||
CallStartAction();
|
||||
pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
|
||||
// this ridiculous hack also enables Undo, so turn it off again
|
||||
|
||||
@@ -694,7 +694,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
|
||||
// the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
|
||||
SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
|
||||
xTempDocShell->DoInitNew();
|
||||
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
|
||||
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, SFX_INTERFACE_NONE );
|
||||
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
|
||||
pTargetView->GetWrtShell().StartAction();
|
||||
SwgReaderOption aOpt;
|
||||
@@ -1101,7 +1101,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void)
|
||||
// the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
|
||||
SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
|
||||
xTempDocShell->DoInitNew();
|
||||
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
|
||||
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, SFX_INTERFACE_NONE );
|
||||
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
|
||||
pTargetView->GetWrtShell().StartAction();
|
||||
SwgReaderOption aOpt;
|
||||
|
||||
@@ -160,7 +160,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
|
||||
// Create new document (don't show!)
|
||||
SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
|
||||
xDocSh->DoInitNew();
|
||||
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
|
||||
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE );
|
||||
pNewView = static_cast<SwView*>( pFrame->GetViewShell());
|
||||
pNewView->AttrChangedNotify( &pNewView->GetWrtShell() ); // so that SelectShell is being called
|
||||
pSh = pNewView->GetWrtShellPtr();
|
||||
|
||||
@@ -746,7 +746,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
|
||||
else
|
||||
{
|
||||
// Create new document
|
||||
SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 );
|
||||
SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, SFX_INTERFACE_NONE );
|
||||
SwView *pCurrView = static_cast<SwView*>( pFrame->GetViewShell());
|
||||
|
||||
// Set document's title
|
||||
|
||||
@@ -230,15 +230,15 @@ void SwDLL::RegisterFactories()
|
||||
// These Id's must not be changed. Through these Id's the View (resume Documentview)
|
||||
// is created by Sfx.
|
||||
if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsWriter())
|
||||
SwView::RegisterFactory ( 2 );
|
||||
SwView::RegisterFactory ( SFX_INTERFACE_SFXDOCSH );
|
||||
|
||||
#if HAVE_FEATURE_DESKTOP
|
||||
SwWebView::RegisterFactory ( 5 );
|
||||
SwWebView::RegisterFactory ( SFX_INTERFACE_SFXMODULE );
|
||||
|
||||
if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsWriter())
|
||||
{
|
||||
SwSrcView::RegisterFactory ( 6 );
|
||||
SwPagePreview::RegisterFactory ( 7 );
|
||||
SwSrcView::RegisterFactory ( SfxInterfaceId(6) );
|
||||
SwPagePreview::RegisterFactory ( SfxInterfaceId(7) );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -973,7 +973,7 @@ static SfxObjectShell* lcl_CreateWorkingDocument(
|
||||
{
|
||||
const SwDoc *pSourceDoc = rSourceWrtShell.GetDoc();
|
||||
SfxObjectShellRef xWorkObjectShell = pSourceDoc->CreateCopy( true, (aType == WorkingDocType::TARGET) );
|
||||
SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkObjectShell, 0 );
|
||||
SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkObjectShell, SFX_INTERFACE_NONE );
|
||||
|
||||
if( pSourceWindow )
|
||||
{
|
||||
|
||||
@@ -204,10 +204,10 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
|
||||
if (pGroup && pGroup->GetCount())
|
||||
{
|
||||
// query which view is registered. In WebWriter there is no normal view
|
||||
sal_uInt16 nViewId = nullptr != SwView::Factory() ? 2 : 6;
|
||||
SfxInterfaceId nViewId = nullptr != SwView::Factory() ? SFX_INTERFACE_SFXDOCSH : SfxInterfaceId(6);
|
||||
const OUString sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
|
||||
|
||||
if( 6 == nViewId )
|
||||
if( SfxInterfaceId(6) == nViewId )
|
||||
{
|
||||
SwWebGlosDocShell* pDocSh = new SwWebGlosDocShell();
|
||||
xDocSh = pDocSh;
|
||||
|
||||
@@ -384,7 +384,7 @@ SwXMailMerge::SwXMailMerge() :
|
||||
// like in: SwModule::InsertEnv (appenv.cxx)
|
||||
m_xDocSh = new SwDocShell( SfxObjectCreateMode::STANDARD );
|
||||
m_xDocSh->DoInitNew();
|
||||
SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *m_xDocSh, 0 );
|
||||
SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *m_xDocSh, SFX_INTERFACE_NONE );
|
||||
SwView *pView = static_cast<SwView*>( pFrame->GetViewShell() );
|
||||
pView->AttrChangedNotify( &pView->GetWrtShell() ); //So that SelectShell is called.
|
||||
m_xModel = m_xDocSh->GetModel();
|
||||
|
||||
@@ -1152,7 +1152,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
|
||||
SolarMutexGuard aGuard;
|
||||
if(IsValid())
|
||||
{
|
||||
SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 );
|
||||
SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, SfxInterfaceId(7) );
|
||||
SfxRequest aReq(FN_PRINT_PAGEPREVIEW, SfxCallMode::SYNCHRON,
|
||||
pDocShell->GetDoc()->GetAttrPool());
|
||||
aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, true));
|
||||
@@ -2482,7 +2482,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
|
||||
{
|
||||
//create a hidden view to be able to export as PDF also in print preview
|
||||
//pView and pSwView are not changed intentionally!
|
||||
m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, 2 );
|
||||
m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, SFX_INTERFACE_SFXDOCSH );
|
||||
pViewShell = static_cast<SwView*>(m_pHiddenViewFrame->GetViewShell())->GetWrtShellPtr();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -635,7 +635,7 @@ SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
|
||||
// #i103634#, #i112425#: do not expand numbering and fields on PDF export
|
||||
pTempDoc->SetClipBoard(true);
|
||||
rOldSh.FillPrtDoc(pTempDoc, pPrt);
|
||||
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
|
||||
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE );
|
||||
SwView* pDocView = static_cast<SwView*>( pDocFrame->GetViewShell() );
|
||||
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//So that SelectShell is called.
|
||||
SwWrtShell* pSh = pDocView->GetWrtShellPtr();
|
||||
|
||||
Reference in New Issue
Block a user