diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-16 15:05:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 08:20:51 +0100 |
commit | 182a74d937088f0f08850014a7b918719e106b7d (patch) | |
tree | 0a286f4a6a5adcd32fd32a26b61b247d247c93d2 /sd | |
parent | 00657aef09d854c74fb426a935a3e8b1fc390bb0 (diff) |
de-hrc various things
e.g. helpid[s].hrc -> helpids.h
and insert include guards where missing
move "ordinary" defines into .hxx files
remove .hrc entries that are used as arguments to dialog factory
when a dedicated method can be added instead
Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
Diffstat (limited to 'sd')
30 files changed, 93 insertions, 198 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 58f0d0bf7afe..81f83b2a8297 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -20,7 +20,7 @@ #ifndef INCLUDED_SD_INC_APP_HRC #define INCLUDED_SD_INC_APP_HRC -#include <sfx2/sfx.hrc> +#include <svl/solar.hrc> // Helper IDs for templates #define HID_STANDARD_STYLESHEET_NAME (HID_SD_START + 70) diff --git a/sd/inc/errhdl.hrc b/sd/inc/errhdl.hrc index 20fe07e02f34..bcaa2a0a5328 100644 --- a/sd/inc/errhdl.hrc +++ b/sd/inc/errhdl.hrc @@ -22,7 +22,6 @@ #define NC_(Context, String) (Context "\004" u8##String) -#include "glob.hrc" #include "sderror.hxx" #define ERR_CODE( class, err ) ErrCode(class | (sal_uInt32(err) - ERROR_SD_BASE)) diff --git a/sd/inc/family.hrc b/sd/inc/family.hrc index 6e3d7114a8b4..b89c241af0a6 100644 --- a/sd/inc/family.hrc +++ b/sd/inc/family.hrc @@ -20,7 +20,6 @@ #ifndef INCLUDED_SD_INC_FAMILY_HRC #define INCLUDED_SD_INC_FAMILY_HRC -#include <sfx2/sfx.hrc> #include <svl/style.hxx> #define NC_(Context, String) (Context "\004" u8##String) diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc deleted file mode 100644 index 1ad0a198134d..000000000000 --- a/sd/inc/glob.hrc +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SD_INC_GLOB_HRC -#define INCLUDED_SD_INC_GLOB_HRC - -#include <sfx2/sfx.hrc> - -#define RID_GLOB_START RID_APP_START+1000 - -#define RID_CUSTOMANIMATION_START RID_GLOB_START+120 -// RID_CUSTOMANIMATION_END RID_GLOB_START+199 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h index daedcf1634db..26bed2967ffd 100644 --- a/sd/inc/helpids.h +++ b/sd/inc/helpids.h @@ -16,6 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + +#ifndef INCLUDED_SD_INC_HELPIDS_H +#define INCLUDED_SD_INC_HELPIDS_H + #include <svx/svxcommands.h> #include "sdcommands.h" @@ -76,4 +80,6 @@ #define HID_MN_SUB_CONVERT "SD_HID_MN_SUB_CONVERT" #define HID_MN_SUB_MIRROR "SD_HID_MN_SUB_MIRROR" +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index f39b7d369332..9582ea377530 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -193,7 +193,7 @@ public: virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) = 0; - virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; + virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index 791c03121d2e..dc1131a43f40 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -20,7 +20,7 @@ #ifndef INCLUDED_SD_INC_SDATTR_HRC #define INCLUDED_SD_INC_SDATTR_HRC -#include <sfx2/sfx.hrc> +#include <svl/solar.hrc> // Layer attributes #define ATTR_LAYER_START SID_SD_START + 1234 diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx index efa78ac6957e..adbcd403646a 100644 --- a/sd/inc/sdattr.hxx +++ b/sd/inc/sdattr.hxx @@ -23,7 +23,6 @@ #include <svl/intitem.hxx> #include <svl/eitem.hxx> #include <svl/stritem.hxx> -#include <sfx2/sfx.hrc> #include "sdattr.hrc" #include "glob.hxx" diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 3901d7e2ce86..685ccf556e30 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -47,7 +47,6 @@ #include "strings.hrc" #include "sdresid.hxx" #include "sdattr.hxx" -#include "prltempl.hrc" #include <comphelper/servicehelper.hxx> #include <comphelper/processfactory.hxx> @@ -475,7 +474,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) pRetval = getSdAbstractDialogFactory()->CreateSdPresLayoutTemplateDlg( getDocShell(), Application::GetDefDialogParent(), - TAB_PRES_LAYOUT_TEMPLATE, + false, *pStyleSheet, PO_TITLE, pStyleSheetPool); diff --git a/sd/sdi/sdslots.hrc b/sd/sdi/sdslots.hrc index 0830975613e1..969e8a64c7ec 100644 --- a/sd/sdi/sdslots.hrc +++ b/sd/sdi/sdslots.hrc @@ -16,10 +16,9 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sfx.hrc> #include <sfx2/sfxsids.hrc> #include <editeng/editids.hrc> -#include <editeng/memberids.hrc> +#include <editeng/memberids.h> #include <svx/svxids.hrc> #include <app.hrc> #include <sdattr.hrc> diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 62d29944df2c..216c8a871343 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -64,7 +64,6 @@ #include "DrawDocShell.hxx" #include "FrameView.hxx" -#include "cfgids.hxx" #include "strings.hrc" #include "PageListWatcher.hxx" diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ff6a01e2f406..d82d11b5fc97 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -61,7 +61,6 @@ #include "ViewShell.hxx" #include "View.hxx" #include "ViewShellBase.hxx" -#include "cfgids.hxx" #include "strings.hrc" #include "strings.hxx" diff --git a/sd/source/core/typemap.cxx b/sd/source/core/typemap.cxx index 6a91ddd3c31d..c655aa16bae3 100644 --- a/sd/source/core/typemap.cxx +++ b/sd/source/core/typemap.cxx @@ -60,7 +60,7 @@ #include <editeng/lineitem.hxx> #include "sdattr.hxx" #include <svx/zoomslideritem.hxx> -#include <editeng/memberids.hrc> +#include <editeng/memberids.h> #include <svx/xftstit.hxx> #include <svx/xlnwtit.hxx> #include <svx/xlineit0.hxx> diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index aca85dba64d0..765b9e3a9f4c 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -32,6 +32,7 @@ #include <vcl/layout.hxx> #include <vcl/metaact.hxx> #include <vcl/virdev.hxx> +#include <sfx2/sfxsids.hrc> #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/frame.hxx> diff --git a/sd/source/filter/html/sdhtmlfilter.cxx b/sd/source/filter/html/sdhtmlfilter.cxx index 67782dbae73d..ce21ecafcdce 100644 --- a/sd/source/filter/html/sdhtmlfilter.cxx +++ b/sd/source/filter/html/sdhtmlfilter.cxx @@ -26,6 +26,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/frame.hxx> +#include <sfx2/sfxsids.hrc> #include <svx/svdograf.hxx> #include <svx/svdpagv.hxx> #include <svx/xoutbmp.hxx> diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 95145459fb67..8bdf2709e922 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -23,13 +23,11 @@ #include <svx/svdmodel.hxx> #include <svx/svxids.hrc> #include <sfx2/app.hxx> -#include <sfx2/sfx.hrc> #include <tools/helpers.hxx> #include <unotools/syslocale.hxx> #include "sdmod.hxx" #include "optsitem.hxx" -#include "cfgids.hxx" #include "FrameView.hxx" #include <sdattr.hrc> @@ -76,10 +74,10 @@ bool SdOptionsItem::PutProperties( const Sequence< OUString >& rNames, const Seq return ConfigItem::PutProperties( rNames, rValues ); } -SdOptionsGeneric::SdOptionsGeneric(sal_uInt16 nConfigId, const OUString& rSubTree) +SdOptionsGeneric::SdOptionsGeneric(bool bImpress, const OUString& rSubTree) : maSubTree(rSubTree) , mpCfgItem( nullptr) - , mnConfigId(nConfigId) + , mbImpress(bImpress) , mbInit(rSubTree.isEmpty()) , mbEnableModify(false) { @@ -94,7 +92,7 @@ SdOptionsGeneric& SdOptionsGeneric::operator=(SdOptionsGeneric const & rSource) { maSubTree = rSource.maSubTree; mpCfgItem.reset(rSource.mpCfgItem ? new SdOptionsItem(*rSource.mpCfgItem) : nullptr ); - mnConfigId = rSource.mnConfigId; + mbImpress = rSource.mbImpress; mbInit = rSource.mbInit; mbEnableModify = rSource.mbEnableModify; return *this; @@ -181,11 +179,11 @@ bool SdOptionsGeneric::isMetricSystem() |* \************************************************************************/ -SdOptionsLayout::SdOptionsLayout( sal_uInt16 nConfigId, bool bUseConfig ) : - SdOptionsGeneric( nConfigId, bUseConfig ? - ( ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Layout" ) : - OUString( "Office.Impress/Layout" ) ) : +SdOptionsLayout::SdOptionsLayout(bool bImpress, bool bUseConfig) : + SdOptionsGeneric( bImpress, bUseConfig ? + ( bImpress ? + OUString( "Office.Impress/Layout" ) : + OUString( "Office.Draw/Layout" ) ) : OUString() ), bRuler( true ), bMoveOutline( true ), @@ -340,11 +338,11 @@ void SdOptionsLayoutItem::SetOptions( SdOptions* pOpts ) const |* \************************************************************************/ -SdOptionsContents::SdOptionsContents( sal_uInt16 nConfigId, bool bUseConfig ) : - SdOptionsGeneric( nConfigId, bUseConfig ? - ( ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Content" ) : - OUString( "Office.Impress/Content" ) ) : +SdOptionsContents::SdOptionsContents(bool bImpress, bool bUseConfig) : + SdOptionsGeneric( bImpress, bUseConfig ? + ( bImpress ? + OUString( "Office.Impress/Content" ) : + OUString( "Office.Draw/Content" ) ) : OUString() ) { EnableModify( true ); @@ -414,11 +412,11 @@ bool SdOptionsContentsItem::operator==( const SfxPoolItem& rAttr ) const |* \************************************************************************/ -SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, bool bUseConfig ) : - SdOptionsGeneric( nConfigId, bUseConfig ? - ( ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Misc" ) : - OUString( "Office.Impress/Misc" ) ) : +SdOptionsMisc::SdOptionsMisc( bool bImpress, bool bUseConfig ) : + SdOptionsGeneric( bImpress, bUseConfig ? + ( bImpress ? + OUString( "Office.Impress/Misc" ) : + OUString( "Office.Draw/Misc" ) ) : OUString() ), nDefaultObjectSizeWidth(8000), nDefaultObjectSizeHeight(5000), @@ -426,7 +424,7 @@ SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, bool bUseConfig ) : bMarkedHitMovesAlways( true ), bMoveOnlyDragging( false ), bCrookNoContortion( false ), - bQuickEdit( GetConfigId() != SDCFG_DRAW ), + bQuickEdit( IsImpress() ), bMasterPageCache( true ), bDragWithCopy( false ), bPickThrough( true ), @@ -527,7 +525,7 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) "TabBarVisible" }; - rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? SAL_N_ELEMENTS(aPropNames) : 14 ); + rCount = ( IsImpress() ? SAL_N_ELEMENTS(aPropNames) : 14 ); ppNames = aPropNames; } @@ -550,7 +548,7 @@ bool SdOptionsMisc::ReadData( const Any* pValues ) SetShowComments( *o3tl::doAccess<bool>(pValues[ 13 ]) ); // just for Impress - if( GetConfigId() == SDCFG_IMPRESS ) + if (IsImpress()) { if( pValues[14].hasValue() ) SetStartWithTemplate( *o3tl::doAccess<bool>(pValues[ 14 ]) ); @@ -613,7 +611,7 @@ bool SdOptionsMisc::WriteData( Any* pValues ) const pValues[ 13 ] <<= IsShowComments(); // just for Impress - if( GetConfigId() == SDCFG_IMPRESS ) + if (IsImpress()) { pValues[ 14 ] <<= IsStartWithTemplate(); pValues[ 15 ] <<= IsSummationOfParagraphs(); @@ -760,11 +758,11 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const |* \************************************************************************/ -SdOptionsSnap::SdOptionsSnap( sal_uInt16 nConfigId, bool bUseConfig ) : - SdOptionsGeneric( nConfigId, bUseConfig ? - ( ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Snap" ) : - OUString( "Office.Impress/Snap" ) ) : +SdOptionsSnap::SdOptionsSnap( bool bImpress, bool bUseConfig ) : + SdOptionsGeneric( bImpress, bUseConfig ? + ( bImpress ? + OUString( "Office.Impress/Snap" ) : + OUString( "Office.Draw/Snap" ) ) : OUString() ), bSnapHelplines( true ), bSnapBorder( true ), @@ -925,10 +923,10 @@ void SdOptionsSnapItem::SetOptions( SdOptions* pOpts ) const |* \************************************************************************/ -SdOptionsZoom::SdOptionsZoom( sal_uInt16 nConfigId ) : - SdOptionsGeneric( nConfigId, ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Zoom" ) : - OUString() ), +SdOptionsZoom::SdOptionsZoom( bool bImpress ) : + SdOptionsGeneric( bImpress, bImpress ? + OUString() : + OUString("Office.Draw/Zoom") ), nX( 1 ), nY( 1 ) @@ -944,7 +942,7 @@ void SdOptionsZoom::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) "ScaleY" }; - rCount = ( GetConfigId() == SDCFG_DRAW ) ? SAL_N_ELEMENTS(aPropNames) : 0; + rCount = !IsImpress() ? SAL_N_ELEMENTS(aPropNames) : 0; ppNames = aPropNames; } @@ -978,11 +976,11 @@ bool SdOptionsZoom::WriteData( Any* pValues ) const |* \************************************************************************/ -SdOptionsGrid::SdOptionsGrid( sal_uInt16 nConfigId ) : - SdOptionsGeneric( nConfigId, - ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Grid" ) : - OUString( "Office.Impress/Grid" ) +SdOptionsGrid::SdOptionsGrid(bool bImpress) : + SdOptionsGeneric( bImpress, + bImpress ? + OUString( "Office.Impress/Grid" ) : + OUString( "Office.Draw/Grid" ) ) { EnableModify( false ); @@ -1135,11 +1133,11 @@ void SdOptionsGridItem::SetOptions( SdOptions* pOpts ) const |* \************************************************************************/ -SdOptionsPrint::SdOptionsPrint( sal_uInt16 nConfigId, bool bUseConfig ) : - SdOptionsGeneric( nConfigId, bUseConfig ? - ( ( SDCFG_DRAW == nConfigId ) ? - OUString( "Office.Draw/Print" ) : - OUString( "Office.Impress/Print" ) ) : +SdOptionsPrint::SdOptionsPrint( bool bImpress, bool bUseConfig ) : + SdOptionsGeneric( bImpress, bUseConfig ? + ( bImpress ? + OUString( "Office.Impress/Print" ) : + OUString( "Office.Draw/Print" ) ) : OUString() ), bDraw( true ), bNotes( false ), @@ -1193,7 +1191,7 @@ bool SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const void SdOptionsPrint::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const { - if( GetConfigId() == SDCFG_IMPRESS ) + if (IsImpress()) { static const char* aImpressPropNames[] = { @@ -1264,7 +1262,7 @@ bool SdOptionsPrint::ReadData( const Any* pValues ) if( pValues[11].hasValue() ) SetDraw( *o3tl::doAccess<bool>(pValues[ 11 ]) ); // just for impress - if( GetConfigId() == SDCFG_IMPRESS ) + if (IsImpress()) { if( pValues[12].hasValue() ) SetNotes( *o3tl::doAccess<bool>(pValues[ 12 ]) ); if( pValues[13].hasValue() ) SetHandout( *o3tl::doAccess<bool>(pValues[ 13 ]) ); @@ -1292,7 +1290,7 @@ bool SdOptionsPrint::WriteData( Any* pValues ) const pValues[ 11 ] <<= IsDraw(); // just for impress - if( GetConfigId() == SDCFG_IMPRESS ) + if (IsImpress()) { pValues[ 12 ] <<= IsNotes(); pValues[ 13 ] <<= IsHandout(); @@ -1387,14 +1385,14 @@ void SdOptionsPrintItem::SetOptions( SdOptions* pOpts ) const |* \************************************************************************/ -SdOptions::SdOptions( sal_uInt16 nConfigId ) : - SdOptionsLayout( nConfigId, true ), - SdOptionsContents( nConfigId, true ), - SdOptionsMisc( nConfigId, true ), - SdOptionsSnap( nConfigId, true ), - SdOptionsZoom( nConfigId ), - SdOptionsGrid( nConfigId ), - SdOptionsPrint( nConfigId, true ) +SdOptions::SdOptions(bool bImpress) : + SdOptionsLayout( bImpress, true ), + SdOptionsContents( bImpress, true ), + SdOptionsMisc( bImpress, true ), + SdOptionsSnap( bImpress, true ), + SdOptionsZoom( bImpress ), + SdOptionsGrid( bImpress ), + SdOptionsPrint( bImpress, true ) { } diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index f1f59ad48f00..60b7a8b4748c 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -52,7 +52,6 @@ #include "PaneChildWindows.hxx" #include "sdresid.hxx" #include "sdobjfac.hxx" -#include "cfgids.hxx" #include "SpellDialogChildWindow.hxx" #include "SlideSorterViewShell.hxx" #include "SlideSorterViewShellBase.hxx" diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 8719d29aa4e2..1f907bb92325 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -52,10 +52,7 @@ #include "app.hrc" #include "strings.hrc" #include "strings.hrc" - #include "errhdl.hrc" -#include "cfgids.hxx" - #define SdModule #include "sdslots.hxx" @@ -64,7 +61,7 @@ SFX_IMPL_INTERFACE(SdModule, SfxModule) void SdModule::InitInterface_Impl() { - GetStaticInterface()->RegisterStatusBar(RID_DRAW_STATUSBAR); + GetStaticInterface()->RegisterStatusBar(StatusBarId::DrawStatusBar); } // Ctor @@ -136,14 +133,14 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType) if (eDocType == DocumentType::Draw) { if (!pDrawOptions) - pDrawOptions = new SdOptions( SDCFG_DRAW ); + pDrawOptions = new SdOptions(false); pOptions = pDrawOptions; } else if (eDocType == DocumentType::Impress) { if (!pImpressOptions) - pImpressOptions = new SdOptions( SDCFG_IMPRESS ); + pImpressOptions = new SdOptions(true); pOptions = pImpressOptions; } diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index a288cd7a117b..681c65880edd 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -38,7 +38,6 @@ #include "strings.hrc" #include "sdresid.hxx" #include "prltempl.hxx" -#include "prltempl.hrc" #include "bulmaper.hxx" #include <svl/intitem.hxx> #include <svx/svxgrahicitem.hxx> @@ -51,7 +50,7 @@ */ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, - sal_uInt16 nDlgId, + bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects _ePO, SfxStyleSheetBasePool* pSSPool ) : @@ -191,7 +190,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, if( !aCJKOptions.IsAsianTypographyEnabled() ) RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" ); - if (nDlgId == TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND) + if (bBackground) { RemoveTabPage( "RID_SVXPAGE_LINE"); diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 853d6cbcae7c..fd6cc5276f98 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -381,9 +381,9 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl: return VclPtr<SdVclAbstractDialog_Impl>::Create( VclPtr<::sd::RemoteDialog>::Create( pParent ) ); } -VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) +VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) { - return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create( VclPtr<SdPresLayoutTemplateDlg>::Create( pDocSh, pParent, nDlgId, rStyleBase, ePO, pSSPool ) ); + return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create( VclPtr<SdPresLayoutTemplateDlg>::Create( pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool ) ); } VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 4c1c9332b91c..e778e0bef616 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -228,7 +228,7 @@ public: virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override; virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // ad for RemoteDialog - virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override; diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 86b104f84c54..0697c0ad1322 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -28,7 +28,6 @@ #include "strings.hrc" #include "strings.hrc" -#include "prltempl.hrc" #include "strings.hxx" #include "sdresid.hxx" @@ -141,7 +140,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) if (pFact) { ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), - TAB_PRES_LAYOUT_TEMPLATE, rStyleSheet, ePO, pStyleSheetPool )); + false, rStyleSheet, ePO, pStyleSheetPool )); if( pDlg->Execute() == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 1ec074ebfd7d..2cb952c5be8a 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -60,7 +60,6 @@ #include "strings.hrc" #include "prlayout.hxx" -#include "prltempl.hrc" #include <svx/xfillit.hxx> #include "sdresid.hxx" #include "OutlineViewShell.hxx" @@ -311,40 +310,34 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) else if (eFamily == SD_STYLE_FAMILY_PSEUDO) { OUString aName(pStyleSheet->GetName()); - sal_uInt16 nDlgId = 0; + bool bBackground = false; if (aName == SdResId(STR_PSEUDOSHEET_TITLE)) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_TITLE; } else if (aName == SdResId(STR_PSEUDOSHEET_SUBTITLE)) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_SUBTITLE; } else if (aName == SdResId(STR_PSEUDOSHEET_BACKGROUND)) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND; + bBackground = true; ePO = PO_BACKGROUND; } else if (aName == SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_BACKGROUNDOBJECTS; } else if (aName == SdResId(STR_PSEUDOSHEET_NOTES)) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_NOTES; } else if(aName.indexOf(SdResId(STR_PSEUDOSHEET_OUTLINE)) != -1) { - nDlgId = TAB_PRES_LAYOUT_TEMPLATE; - OUString aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE)); // determine number, mind the blank between name and number OUString aNumStr(aName.copy(aOutlineStr.getLength() + 1)); @@ -370,7 +363,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( !bOldDocInOtherLanguage ) { - pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), nDlgId, *pStyleSheet, ePO, pSSPool ) : nullptr); + pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr); } } else if (eFamily == SD_STYLE_FAMILY_CELL) diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index e736bb1982d9..2d0cddea6b32 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -28,7 +28,6 @@ #include <svtools/transfer.hxx> #include "glob.hxx" #include "pres.hxx" -#include "cfgids.hxx" #include "View.hxx" #include "sddllapi.h" diff --git a/sd/source/ui/inc/cfgids.hxx b/sd/source/ui/inc/cfgids.hxx deleted file mode 100644 index 44ccb06b75e7..000000000000 --- a/sd/source/ui/inc/cfgids.hxx +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SD_SOURCE_UI_INC_CFGIDS_HXX -#define INCLUDED_SD_SOURCE_UI_INC_CFGIDS_HXX - -#include <sfx2/sfx.hrc> - -// Item IDs for config items -#define SDCFG_IMPRESS (SFX_ITEMTYPE_SD_BEGIN + 1) -#define SDCFG_DRAW (SFX_ITEMTYPE_SD_BEGIN + 3) - -// Acceleratoren, Menus, ... -#define RID_DRAW_STATUSBAR (SFX_ITEMTYPE_SD_BEGIN + 7) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index 5ff8e4cf7e81..c748a1555520 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -68,7 +68,7 @@ private: OUString maSubTree; std::unique_ptr<SdOptionsItem> mpCfgItem; - sal_uInt16 mnConfigId; + bool mbImpress; bool mbInit : 1; bool mbEnableModify : 1; @@ -88,13 +88,13 @@ protected: public: - SdOptionsGeneric( sal_uInt16 nConfigId, const OUString& rSubTree ); - SdOptionsGeneric( SdOptionsGeneric const & ); + SdOptionsGeneric(bool bImpress, const OUString& rSubTree); + SdOptionsGeneric(SdOptionsGeneric const &); virtual ~SdOptionsGeneric(); SdOptionsGeneric& operator=( SdOptionsGeneric const & ); - sal_uInt16 GetConfigId() const { return mnConfigId; } + bool IsImpress() const { return mbImpress; } void EnableModify( bool bModify ) { mbEnableModify = bModify; } @@ -122,7 +122,7 @@ protected: virtual bool WriteData( css::uno::Any* pValues ) const override; public: - SdOptionsLayout( sal_uInt16 nConfigId, bool bUseConfig ); + SdOptionsLayout(bool bImpress, bool bUseConfig); bool operator==( const SdOptionsLayout& rOpt ) const; @@ -171,7 +171,7 @@ protected: public: - SdOptionsContents( sal_uInt16 nConfigId, bool bUseConfig ); + SdOptionsContents(bool bImpress, bool bUseConfig); bool operator==( const SdOptionsContents& rOpt ) const; }; @@ -242,7 +242,7 @@ protected: public: - SdOptionsMisc( sal_uInt16 nConfigId, bool bUseConfig ); + SdOptionsMisc(bool bImpress, bool bUseConfig); bool operator==( const SdOptionsMisc& rOpt ) const; @@ -362,7 +362,7 @@ protected: public: - SdOptionsSnap( sal_uInt16 nConfigId, bool bUseConfig ); + SdOptionsSnap(bool bImpress, bool bUseConfig); bool operator==( const SdOptionsSnap& rOpt ) const; @@ -421,7 +421,7 @@ protected: public: - explicit SdOptionsZoom(sal_uInt16 nConfigId); + explicit SdOptionsZoom(bool bImpress); void GetScale( sal_Int32& rX, sal_Int32& rY ) const { Init(); rX = nX; rY = nY; } void SetScale( sal_Int32 nInX, sal_Int32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } } @@ -437,7 +437,7 @@ protected: public: - explicit SdOptionsGrid(sal_uInt16 nConfigId); + explicit SdOptionsGrid(bool bImpress); virtual ~SdOptionsGrid() override; void SetDefaults(); @@ -508,7 +508,7 @@ protected: public: - SdOptionsPrint( sal_uInt16 nConfigId, bool bUseConfig ); + SdOptionsPrint(bool bImpress, bool bUseConfig); bool operator==( const SdOptionsPrint& rOpt ) const; @@ -582,7 +582,7 @@ class SdOptions : public SdOptionsLayout, public SdOptionsContents, { public: - explicit SdOptions( sal_uInt16 nConfigId ); + explicit SdOptions(bool bImpress); virtual ~SdOptions() override; void StoreConfig(); diff --git a/sd/source/ui/inc/prltempl.hrc b/sd/source/ui/inc/prltempl.hrc deleted file mode 100644 index f5795ab35368..000000000000 --- a/sd/source/ui/inc/prltempl.hrc +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include <sfx2/sfx.hrc> -/* #define TAB_PRES_LAYOUT_TEMPLATE RID_APP_START+??? */ -#define TAB_PRES_LAYOUT_TEMPLATE 844 -#define TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND 846 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx index 1d86ccaa00aa..e2bf3747c07d 100644 --- a/sd/source/ui/inc/prltempl.hxx +++ b/sd/source/ui/inc/prltempl.hxx @@ -69,7 +69,7 @@ private: using SfxTabDialog::GetOutputItemSet; public: - SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, sal_uInt16 nDlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); + SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); virtual ~SdPresLayoutTemplateDlg() override; virtual void dispose() override; diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 7c7f2b911d76..69f5484cd805 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -37,6 +37,7 @@ #include <svtools/unoimap.hxx> #include <svtools/unoevent.hxx> #include <sfx2/bindings.hxx> +#include <sfx2/event.hxx> #include <sfx2/sfxsids.hrc> #include <comphelper/extract.hxx> #include <cppuhelper/implbase.hxx> diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index dd57a075214c..c0994c63fa4f 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -52,7 +52,6 @@ #include "Window.hxx" #include "ViewShellBase.hxx" #include "FormShellManager.hxx" -#include "cfgids.hxx" #include "anminfo.hxx" #include <editeng/lspcitem.hxx> |