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
489af4ed
Kaydet (Commit)
489af4ed
authored
Tem 13, 2015
tarafından
Maxim Monastirsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert insert buttons to the generic controller
Change-Id: If7c6c1c5000893fca4205162526b4b4035637c11
üst
dac1be92
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
49 additions
and
378 deletions
+49
-378
Controller.xcu
...cfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+42
-0
Library_sc.mk
sc/Library_sc.mk
+0
-1
scalc.sdi
sc/sdi/scalc.sdi
+2
-2
tabvwsh.sdi
sc/sdi/tabvwsh.sdi
+2
-2
scdll.cxx
sc/source/ui/app/scdll.cxx
+0
-3
tbinsert.cxx
sc/source/ui/cctrl/tbinsert.cxx
+0
-106
tabvwsh.hxx
sc/source/ui/inc/tabvwsh.hxx
+0
-6
tbinsert.hxx
sc/source/ui/inc/tbinsert.hxx
+0
-44
tabvwsh4.cxx
sc/source/ui/view/tabvwsh4.cxx
+0
-35
view.hxx
sw/inc/view.hxx
+0
-4
_viewsh.sdi
sw/sdi/_viewsh.sdi
+1
-3
swriter.sdi
sw/sdi/swriter.sdi
+2
-2
viewsh.sdi
sw/sdi/viewsh.sdi
+0
-1
swmodule.cxx
sw/source/uibase/app/swmodule.cxx
+0
-2
workctrl.hxx
sw/source/uibase/inc/workctrl.hxx
+0
-20
workctrl.cxx
sw/source/uibase/ribbar/workctrl.cxx
+0
-89
view.cxx
sw/source/uibase/uiview/view.cxx
+0
-4
view2.cxx
sw/source/uibase/uiview/view2.cxx
+0
-24
viewstat.cxx
sw/source/uibase/uiview/viewstat.cxx
+0
-30
No files found.
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
Dosyayı görüntüle @
489af4ed
...
...
@@ -176,6 +176,48 @@
</node>
</node>
<node
oor:name=
"ToolBar"
>
<node
oor:name=
"InsertControl"
oor:op=
"replace"
>
<prop
oor:name=
"Command"
>
<value>
.uno:InsertCtrl
</value>
</prop>
<prop
oor:name=
"Module"
>
<value/>
</prop>
<prop
oor:name=
"Controller"
>
<value>
com.sun.star.comp.framework.SubToolBarController
</value>
</prop>
<prop
oor:name=
"Value"
>
<value>
insertbar;.uno:InsertGraphic
</value>
</prop>
</node>
<node
oor:name=
"InsertObjectControl"
oor:op=
"replace"
>
<prop
oor:name=
"Command"
>
<value>
.uno:InsertObjCtrl
</value>
</prop>
<prop
oor:name=
"Module"
>
<value/>
</prop>
<prop
oor:name=
"Controller"
>
<value>
com.sun.star.comp.framework.SubToolBarController
</value>
</prop>
<prop
oor:name=
"Value"
>
<value>
insertobjectbar;.uno:InsertObject
</value>
</prop>
</node>
<node
oor:name=
"InsertCellControl"
oor:op=
"replace"
>
<prop
oor:name=
"Command"
>
<value>
.uno:InsCellsCtrl
</value>
</prop>
<prop
oor:name=
"Module"
>
<value>
com.sun.star.sheet.SpreadsheetDocument
</value>
</prop>
<prop
oor:name=
"Controller"
>
<value>
com.sun.star.comp.framework.SubToolBarController
</value>
</prop>
<prop
oor:name=
"Value"
>
<value>
insertcellsbar;.uno:InsertCellsDown
</value>
</prop>
</node>
<node
oor:name=
"c1"
oor:op=
"replace"
>
<prop
oor:name=
"Command"
>
<value>
.uno:DBNewForm
</value>
...
...
sc/Library_sc.mk
Dosyayı görüntüle @
489af4ed
...
...
@@ -381,7 +381,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/ui/cctrl/checklistmenu \
sc/source/ui/cctrl/dpcontrol \
sc/source/ui/cctrl/popmenu \
sc/source/ui/cctrl/tbinsert \
sc/source/ui/cctrl/tbzoomsliderctrl \
sc/source/ui/condformat/condformatdlg \
sc/source/ui/condformat/condformatdlgentry \
...
...
sc/sdi/scalc.sdi
Dosyayı görüntüle @
489af4ed
...
...
@@ -3931,7 +3931,7 @@ SfxVoidItem InputLineMatrix FID_INPUTLINE_MATRIX
]
Sfx
UInt16
Item InsCellsCtrl SID_TBXCTL_INSCELLS
Sfx
Void
Item InsCellsCtrl SID_TBXCTL_INSCELLS
[
/* flags: */
...
...
@@ -4209,7 +4209,7 @@ SfxVoidItem InsertContents FID_INS_CELL_CONTENTS
]
Sfx
UInt16
Item InsertCtrl SID_TBXCTL_INSERT
Sfx
Void
Item InsertCtrl SID_TBXCTL_INSERT
[
/* flags: */
...
...
sc/sdi/tabvwsh.sdi
Dosyayı görüntüle @
489af4ed
...
...
@@ -267,8 +267,8 @@ shell ScTabViewShell
SID_STATUS_PAGESTYLE [ ExecMethod = Execute; StateMethod = GetState; ]
SID_TBXCTL_INSERT [
ExecMethod = ExecTbx; StateMethod = GetTbxState;
]
SID_TBXCTL_INSCELLS [
ExecMethod = ExecTbx; StateMethod = GetTbxState;
]
SID_TBXCTL_INSERT []
SID_TBXCTL_INSCELLS []
}
...
...
sc/source/ui/app/scdll.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -85,7 +85,6 @@
#include <svx/lboxctrl.hxx>
#include <svx/verttexttbxctrl.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include "tbinsert.hxx"
#include "tbzoomsliderctrl.hxx"
#include <svx/zoomsliderctrl.hxx>
...
...
@@ -154,8 +153,6 @@ void ScDLL::Init()
SfxRecentFilesToolBoxControl
::
RegisterControl
(
SID_OPEN_CALC
,
pMod
);
// Own Controller
ScTbxInsertCtrl
::
RegisterControl
(
SID_TBXCTL_INSERT
,
pMod
);
ScTbxInsertCtrl
::
RegisterControl
(
SID_TBXCTL_INSCELLS
,
pMod
);
ScZoomSliderControl
::
RegisterControl
(
SID_PREVIEW_SCALINGFACTOR
,
pMod
);
// SvxToolboxController
...
...
sc/source/ui/cctrl/tbinsert.cxx
deleted
100644 → 0
Dosyayı görüntüle @
dac1be92
/* -*- 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 <string>
#include <svl/intitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/imagemgr.hxx>
#include <vcl/toolbox.hxx>
#include "tbinsert.hxx"
#include "global.hxx"
#include "scmod.hxx"
#include "scresid.hxx"
#include "sc.hrc"
SFX_IMPL_TOOLBOX_CONTROL
(
ScTbxInsertCtrl
,
SfxUInt16Item
);
// ToolBox - Controller
ScTbxInsertCtrl
::
ScTbxInsertCtrl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
)
:
SfxToolBoxControl
(
nSlotId
,
nId
,
rTbx
),
nLastSlotId
(
0
)
{
rTbx
.
SetItemBits
(
nId
,
ToolBoxItemBits
::
DROPDOWN
|
rTbx
.
GetItemBits
(
nId
)
);
}
ScTbxInsertCtrl
::~
ScTbxInsertCtrl
()
{
}
void
ScTbxInsertCtrl
::
StateChanged
(
sal_uInt16
/* nSID */
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
GetToolBox
().
EnableItem
(
GetId
(),
(
GetItemState
(
pState
)
!=
SfxItemState
::
DISABLED
)
);
if
(
eState
==
SfxItemState
::
DEFAULT
)
{
const
SfxUInt16Item
*
pItem
=
PTR_CAST
(
SfxUInt16Item
,
pState
);
if
(
pItem
)
{
nLastSlotId
=
pItem
->
GetValue
();
sal_uInt16
nImageId
=
nLastSlotId
?
nLastSlotId
:
GetSlotId
();
OUString
aSlotURL
(
"slot:"
);
aSlotURL
+=
OUString
::
number
(
nImageId
);
Image
aImage
=
GetImage
(
m_xFrame
,
aSlotURL
,
hasBigImages
()
);
GetToolBox
().
SetItemImage
(
GetId
(),
aImage
);
}
}
}
VclPtr
<
SfxPopupWindow
>
ScTbxInsertCtrl
::
CreatePopupWindow
()
{
sal_uInt16
nSlotId
=
GetSlotId
();
if
(
nSlotId
==
SID_TBXCTL_INSERT
)
{
OUString
aInsertBarResStr
(
"private:resource/toolbar/insertbar"
);
createAndPositionSubToolBar
(
aInsertBarResStr
);
}
else
if
(
nSlotId
==
SID_TBXCTL_INSCELLS
)
{
OUString
aInsertCellsBarResStr
(
"private:resource/toolbar/insertcellsbar"
);
createAndPositionSubToolBar
(
aInsertCellsBarResStr
);
}
return
NULL
;
}
void
ScTbxInsertCtrl
::
Select
(
sal_uInt16
/*nSelectModifier*/
)
{
SfxViewShell
*
pCurSh
(
SfxViewShell
::
Current
()
);
SfxDispatcher
*
pDispatch
(
0
);
if
(
pCurSh
)
{
SfxViewFrame
*
pViewFrame
=
pCurSh
->
GetViewFrame
();
if
(
pViewFrame
)
pDispatch
=
pViewFrame
->
GetDispatcher
();
}
if
(
pDispatch
)
pDispatch
->
Execute
(
nLastSlotId
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/inc/tabvwsh.hxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -92,9 +92,6 @@ enum ObjectSelectionType
class
ScTabViewShell
:
public
SfxViewShell
,
public
ScDBFunc
{
private
:
static
sal_uInt16
nInsertCtrlState
;
static
sal_uInt16
nInsCellsCtrlState
;
SvxHtmlOptions
aHTMLOpt
;
ObjectSelectionType
eCurOST
;
sal_uInt16
nDrawSfxId
;
...
...
@@ -276,9 +273,6 @@ public:
void
ExecImageMap
(
SfxRequest
&
rReq
);
void
GetImageMapState
(
SfxItemSet
&
rSet
);
void
ExecTbx
(
SfxRequest
&
rReq
);
static
void
GetTbxState
(
SfxItemSet
&
rSet
);
void
ExecuteSave
(
SfxRequest
&
rReq
);
void
GetSaveState
(
SfxItemSet
&
rSet
);
void
ExecSearch
(
SfxRequest
&
rReq
);
...
...
sc/source/ui/inc/tbinsert.hxx
deleted
100644 → 0
Dosyayı görüntüle @
dac1be92
/* -*- 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_SC_SOURCE_UI_INC_TBINSERT_HXX
#define INCLUDED_SC_SOURCE_UI_INC_TBINSERT_HXX
#include <sfx2/tbxctrl.hxx>
class
ScTbxInsertCtrl
:
public
SfxToolBoxControl
{
sal_uInt16
nLastSlotId
;
virtual
void
Select
(
sal_uInt16
nSelectModifier
)
SAL_OVERRIDE
;
public
:
SFX_DECL_TOOLBOX_CONTROL
();
ScTbxInsertCtrl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rBox
);
virtual
~
ScTbxInsertCtrl
();
virtual
VclPtr
<
SfxPopupWindow
>
CreatePopupWindow
()
SAL_OVERRIDE
;
virtual
void
StateChanged
(
sal_uInt16
nSID
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
SAL_OVERRIDE
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/view/tabvwsh4.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -102,11 +102,6 @@ extern SfxViewShell* pScActiveViewShell; // global.cxx
using
namespace
com
::
sun
::
star
;
// STATIC DATA -----------------------------------------------------------
sal_uInt16
ScTabViewShell
::
nInsertCtrlState
=
SID_INSERT_GRAPHIC
;
sal_uInt16
ScTabViewShell
::
nInsCellsCtrlState
=
0
;
void
ScTabViewShell
::
Activate
(
bool
bMDI
)
{
SfxViewShell
::
Activate
(
bMDI
);
...
...
@@ -1830,34 +1825,4 @@ ScNavigatorSettings* ScTabViewShell::GetNavigatorSettings()
return
pNavSettings
;
}
void
ScTabViewShell
::
ExecTbx
(
SfxRequest
&
rReq
)
{
const
SfxItemSet
*
pReqArgs
=
rReq
.
GetArgs
();
sal_uInt16
nSlot
=
rReq
.
GetSlot
();
const
SfxPoolItem
*
pItem
=
NULL
;
if
(
pReqArgs
)
pReqArgs
->
GetItemState
(
nSlot
,
true
,
&
pItem
);
switch
(
nSlot
)
{
case
SID_TBXCTL_INSERT
:
if
(
pItem
)
nInsertCtrlState
=
static_cast
<
const
SfxUInt16Item
*>
(
pItem
)
->
GetValue
();
break
;
case
SID_TBXCTL_INSCELLS
:
if
(
pItem
)
nInsCellsCtrlState
=
static_cast
<
const
SfxUInt16Item
*>
(
pItem
)
->
GetValue
();
break
;
default
:
OSL_FAIL
(
"Slot im Wald"
);
}
GetViewFrame
()
->
GetBindings
().
Invalidate
(
nSlot
);
}
void
ScTabViewShell
::
GetTbxState
(
SfxItemSet
&
rSet
)
{
rSet
.
Put
(
SfxUInt16Item
(
SID_TBXCTL_INSERT
,
nInsertCtrlState
)
);
rSet
.
Put
(
SfxUInt16Item
(
SID_TBXCTL_INSCELLS
,
nInsCellsCtrlState
)
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/inc/view.hxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -156,10 +156,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
static
VclPtr
<
SvxSearchDialog
>
m_pSrchDlg
;
static
SvxSearchItem
*
m_pSrchItem
;
static
sal_uInt16
m_nInsertCtrlState
;
static
sal_uInt16
m_nWebInsertCtrlState
;
static
sal_uInt16
m_nInsertObjectCtrlState
;
static
sal_uInt16
m_nInsertFieldCtrlState
;
static
sal_uInt16
m_nMoveType
;
// for buttons below the scrollbar (viewmdi)
static
sal_Int32
m_nActMark
;
// current jump mark for unknown mark
...
...
sw/sdi/_viewsh.sdi
Dosyayı görüntüle @
489af4ed
...
...
@@ -531,10 +531,8 @@ interface BaseTextEditView
]
FN_INSERT_CTRL
[
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
]
]
SID_ATTR_DEFTABSTOP
[
...
...
sw/sdi/swriter.sdi
Dosyayı görüntüle @
489af4ed
...
...
@@ -3710,7 +3710,7 @@ SfxStringItem InsertSection FN_INSERT_REGION
GroupId = GID_INSERT;
]
Sfx
Image
Item InsertCtrl FN_INSERT_CTRL
Sfx
Void
Item InsertCtrl FN_INSERT_CTRL
[
/* flags: */
...
...
@@ -4133,7 +4133,7 @@ SfxVoidItem InsertNeutralParagraph FN_NUM_BULLET_NONUM
GroupId = GID_ENUMERATION;
]
Sfx
Image
Item InsertObjCtrl FN_INSERT_OBJ_CTRL
Sfx
Void
Item InsertObjCtrl FN_INSERT_OBJ_CTRL
[
/* flags: */
...
...
sw/sdi/viewsh.sdi
Dosyayı görüntüle @
489af4ed
...
...
@@ -46,7 +46,6 @@ interface TextEditView : BaseTextEditView
// Slots, which are not needed in the WebDocShell
FN_INSERT_OBJ_CTRL
[
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
...
...
sw/source/uibase/app/swmodule.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -290,8 +290,6 @@ void SwDLL::RegisterControls()
SvxTbxCtlDraw
::
RegisterControl
(
SID_INSERT_DRAW
,
pMod
);
SvxTbxCtlAlign
::
RegisterControl
(
SID_OBJECT_ALIGN
,
pMod
);
SwTbxAnchor
::
RegisterControl
(
FN_TOOL_ANCHOR
,
pMod
);
SwTbxInsertCtrl
::
RegisterControl
(
FN_INSERT_CTRL
,
pMod
);
SwTbxInsertCtrl
::
RegisterControl
(
FN_INSERT_OBJ_CTRL
,
pMod
);
SwTbxFieldCtrl
::
RegisterControl
(
FN_INSERT_FIELD_CTRL
,
pMod
);
SwTbxAutoTextCtrl
::
RegisterControl
(
FN_GLOSSARY_DLG
,
pMod
);
svx
::
ParaLineSpacingPopup
::
RegisterControl
(
SID_ATTR_PARA_LINESPACE
,
pMod
);
...
...
sw/source/uibase/inc/workctrl.hxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -52,26 +52,6 @@ class SwView;
#define NID_TABLE_FORMULA_ERROR 20019
#define NID_COUNT 20
class
SwTbxInsertCtrl
:
public
SfxToolBoxControl
{
sal_uInt16
nLastSlotId
;
virtual
void
Select
(
sal_uInt16
nSelectModifier
)
SAL_OVERRIDE
;
public
:
SFX_DECL_TOOLBOX_CONTROL
();
SwTbxInsertCtrl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
);
virtual
~
SwTbxInsertCtrl
();
virtual
VclPtr
<
SfxPopupWindow
>
CreatePopupWindow
()
SAL_OVERRIDE
;
virtual
void
StateChanged
(
sal_uInt16
nSID
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
update
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
};
class
SwTbxAutoTextCtrl
:
public
SfxToolBoxControl
{
PopupMenu
*
pPopup
;
...
...
sw/source/uibase/ribbar/workctrl.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -64,98 +64,9 @@ using namespace ::com::sun::star::uno;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
namespace
::
com
::
sun
::
star
::
frame
;
SFX_IMPL_TOOLBOX_CONTROL
(
SwTbxInsertCtrl
,
SfxImageItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SwTbxAutoTextCtrl
,
SfxVoidItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SwTbxFieldCtrl
,
SfxBoolItem
);
SwTbxInsertCtrl
::
SwTbxInsertCtrl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
)
:
SfxToolBoxControl
(
nSlotId
,
nId
,
rTbx
),
nLastSlotId
(
FN_INSERT_CTRL
==
nSlotId
?
FN_INSERT_TABLE
:
SID_INSERT_DIAGRAM
)
{
rTbx
.
SetItemBits
(
nId
,
ToolBoxItemBits
::
DROPDOWN
|
rTbx
.
GetItemBits
(
nId
)
);
}
SwTbxInsertCtrl
::~
SwTbxInsertCtrl
()
{
}
void
SAL_CALL
SwTbxInsertCtrl
::
update
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
ToolBox
&
rTbx
=
GetToolBox
();
OUString
aSlotURL
=
"slot:"
+
OUString
::
number
(
nLastSlotId
);
Image
aImage
=
GetImage
(
m_xFrame
,
aSlotURL
,
hasBigImages
()
);
rTbx
.
SetItemImage
(
GetId
(),
aImage
);
rTbx
.
Invalidate
();
SfxToolBoxControl
::
update
();
}
void
SwTbxInsertCtrl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
sal_uInt16
nId
=
GetId
();
GetToolBox
().
EnableItem
(
nId
,
(
GetItemState
(
pState
)
!=
SfxItemState
::
DISABLED
)
);
if
(
eState
==
SfxItemState
::
DEFAULT
)
{
const
SfxImageItem
*
pItem
=
PTR_CAST
(
SfxImageItem
,
pState
);
if
(
pItem
)
{
nLastSlotId
=
pItem
->
GetValue
();
if
(
nLastSlotId
)
nId
=
nLastSlotId
;
OUString
aSlotURL
=
"slot:"
+
OUString
::
number
(
nId
);
ToolBox
&
rBox
=
GetToolBox
();
Image
aImage
=
GetImage
(
m_xFrame
,
aSlotURL
,
hasBigImages
()
);
rBox
.
SetItemImage
(
GetId
(),
aImage
);
rBox
.
SetItemImageMirrorMode
(
GetId
(),
false
);
rBox
.
SetItemImageAngle
(
GetId
(),
pItem
->
GetRotation
()
);
rBox
.
SetItemImageMirrorMode
(
GetId
(),
pItem
->
IsMirrored
()
);
}
}
}
VclPtr
<
SfxPopupWindow
>
SwTbxInsertCtrl
::
CreatePopupWindow
()
{
if
(
GetSlotId
()
==
FN_INSERT_CTRL
)
{
OUString
aToolBarResStr
(
"private:resource/toolbar/insertbar"
);
createAndPositionSubToolBar
(
aToolBarResStr
);
}
else
/* FN_INSERT_OBJ_CTRL */
{
OUString
aToolBarResStr
(
"private:resource/toolbar/insertobjectbar"
);
createAndPositionSubToolBar
(
aToolBarResStr
);
}
return
NULL
;
}
void
SwTbxInsertCtrl
::
Select
(
sal_uInt16
/*nSelectModifier*/
)
{
if
(
nLastSlotId
)
{
SfxViewShell
*
pCurSh
(
SfxViewShell
::
Current
()
);
SfxDispatcher
*
pDispatch
(
0
);
if
(
pCurSh
)
{
SfxViewFrame
*
pViewFrame
=
pCurSh
->
GetViewFrame
();
if
(
pViewFrame
)
pDispatch
=
pViewFrame
->
GetDispatcher
();
}
if
(
pDispatch
)
pDispatch
->
Execute
(
nLastSlotId
);
}
}
SwTbxAutoTextCtrl
::
SwTbxAutoTextCtrl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
...
...
sw/source/uibase/uiview/view.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -128,10 +128,6 @@ bool bDocSzUpdated = true;
SvxSearchItem
*
SwView
::
m_pSrchItem
=
0
;
sal_uInt16
SwView
::
m_nInsertCtrlState
=
FN_INSERT_TABLE
;
sal_uInt16
SwView
::
m_nWebInsertCtrlState
=
FN_INSERT_TABLE
;
sal_uInt16
SwView
::
m_nInsertObjectCtrlState
=
SID_INSERT_DIAGRAM
;
bool
SwView
::
m_bExtra
=
false
;
bool
SwView
::
m_bFound
=
false
;
bool
SwView
::
m_bJustOpened
=
false
;
...
...
sw/source/uibase/uiview/view2.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -991,30 +991,6 @@ void SwView::Execute(SfxRequest &rReq)
m_pShell
->
ExecuteSlot
(
rReq
);
}
break
;
case
FN_INSERT_CTRL
:
case
FN_INSERT_OBJ_CTRL
:
{
if
(
pArgs
&&
SfxItemState
::
SET
==
pArgs
->
GetItemState
(
nSlot
,
false
,
&
pItem
))
{
const
sal_uInt16
nValue
=
static_cast
<
const
SfxUInt16Item
*>
(
pItem
)
->
GetValue
();
switch
(
nSlot
)
{
case
FN_INSERT_CTRL
:
{
bool
bWeb
=
0
!=
PTR_CAST
(
SwWebView
,
this
);
if
(
bWeb
)
SwView
::
m_nWebInsertCtrlState
=
nValue
;
else
SwView
::
m_nInsertCtrlState
=
nValue
;
}
break
;
case
FN_INSERT_OBJ_CTRL
:
SwView
::
m_nInsertObjectCtrlState
=
nValue
;
break
;
}
}
GetViewFrame
()
->
GetBindings
().
Invalidate
(
nSlot
);
}
break
;
#if defined WNT || defined UNX
case
SID_TWAIN_SELECT
:
case
SID_TWAIN_TRANSFER
:
...
...
sw/source/uibase/uiview/viewstat.cxx
Dosyayı görüntüle @
489af4ed
...
...
@@ -191,42 +191,12 @@ void SwView::GetState(SfxItemSet &rSet)
rSet
.
DisableItem
(
nWhich
);
}
break
;
case
FN_INSERT_CTRL
:
{
SfxImageItem
aImgItem
(
nWhich
,
bWeb
?
SwView
::
m_nWebInsertCtrlState
:
SwView
::
m_nInsertCtrlState
);
SfxSlotPool
&
rPool
=
SfxSlotPool
::
GetSlotPool
(
GetViewFrame
()
);
const
SfxSlot
*
pSlot
=
rPool
.
GetSlot
(
aImgItem
.
GetValue
()
);
if
(
pSlot
&&
pSlot
->
IsMode
(
SfxSlotMode
::
IMAGEROTATION
))
{
if
(
m_pWrtShell
->
IsInVerticalText
())
aImgItem
.
SetRotation
(
2700
);
if
(
m_pWrtShell
->
IsInRightToLeftText
())
aImgItem
.
SetMirrored
(
true
);
}
rSet
.
Put
(
aImgItem
);
}
break
;
case
FN_INSERT_OBJ_CTRL
:
if
(
bWeb
||
m_pWrtShell
->
CrsrInsideInputField
()
)
{
rSet
.
DisableItem
(
nWhich
);
}
else
{
SfxImageItem
aImgItem
(
nWhich
,
SwView
::
m_nInsertObjectCtrlState
);
SfxSlotPool
&
rPool
=
SfxSlotPool
::
GetSlotPool
(
GetViewFrame
()
);
const
SfxSlot
*
pSlot
=
rPool
.
GetSlot
(
aImgItem
.
GetValue
()
);
if
(
pSlot
&&
pSlot
->
IsMode
(
SfxSlotMode
::
IMAGEROTATION
))
{
if
(
m_pWrtShell
->
IsInVerticalText
())
aImgItem
.
SetRotation
(
2700
);
if
(
m_pWrtShell
->
IsInRightToLeftText
())
aImgItem
.
SetMirrored
(
true
);
}
rSet
.
Put
(
aImgItem
);
}
break
;
case
FN_UPDATE_TOX
:
...
...
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