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
1cecb228
Kaydet (Commit)
1cecb228
authored
Ara 02, 2009
tarafından
Kurt Zenker
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
CWS-TOOLING: integrate CWS impresspaintbrush01
üst
3838b0a0
9a0f53a4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
101 additions
and
370 deletions
+101
-370
_drvwsh.sdi
sd/sdi/_drvwsh.sdi
+1
-1
docshell.cxx
sd/source/ui/docshell/docshell.cxx
+0
-6
formatclipboard.cxx
sd/source/ui/docshell/formatclipboard.cxx
+0
-237
makefile.mk
sd/source/ui/docshell/makefile.mk
+0
-1
fuformatpaintbrush.cxx
sd/source/ui/func/fuformatpaintbrush.cxx
+0
-0
DrawDocShell.hxx
sd/source/ui/inc/DrawDocShell.hxx
+0
-4
ViewShellBase.hxx
sd/source/ui/inc/ViewShellBase.hxx
+4
-0
formatclipboard.hxx
sd/source/ui/inc/formatclipboard.hxx
+0
-64
fuformatpaintbrush.hxx
sd/source/ui/inc/fuformatpaintbrush.hxx
+21
-9
ViewShellBase.cxx
sd/source/ui/view/ViewShellBase.cxx
+53
-0
drviews6.cxx
sd/source/ui/view/drviews6.cxx
+0
-33
drviews7.cxx
sd/source/ui/view/drviews7.cxx
+2
-14
drviewse.cxx
sd/source/ui/view/drviewse.cxx
+20
-1
No files found.
sd/sdi/_drvwsh.sdi
Dosyayı görüntüle @
1cecb228
...
...
@@ -2226,7 +2226,7 @@ interface DrawView
SID_FORMATPAINTBRUSH //
[
ExecMethod = Fu
Temporary
;
ExecMethod = Fu
Permanent
;
StateMethod = GetMenuState ;
]
...
...
sd/source/ui/docshell/docshell.cxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -92,7 +92,6 @@
#include "FrameView.hxx"
#endif
#include "unomodel.hxx"
#include "formatclipboard.hxx"
#include "undo/undomanager.hxx"
#include "undo/undofactory.hxx"
#include "OutlineView.hxx"
...
...
@@ -169,7 +168,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
BOOL
bDataObject
,
DocumentType
eDocumentType
,
BOOL
bScriptSupport
)
:
SfxObjectShell
(
eMode
==
SFX_CREATE_MODE_INTERNAL
?
SFX_CREATE_MODE_EMBEDDED
:
eMode
),
mpFormatClipboard
(
new
SdFormatClipboard
()),
mpDoc
(
NULL
),
mpUndoManager
(
NULL
),
mpPrinter
(
NULL
),
...
...
@@ -196,7 +194,6 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
BOOL
bDataObject
,
DocumentType
eDocumentType
)
:
SfxObjectShell
(
eMode
==
SFX_CREATE_MODE_INTERNAL
?
SFX_CREATE_MODE_EMBEDDED
:
eMode
),
mpFormatClipboard
(
new
SdFormatClipboard
()),
mpDoc
(
pDoc
),
mpUndoManager
(
NULL
),
mpPrinter
(
NULL
),
...
...
@@ -235,9 +232,6 @@ DrawDocShell::~DrawDocShell()
mpDoc
->
SetSdrUndoManager
(
0
);
delete
mpUndoManager
;
if
(
mpFormatClipboard
)
delete
mpFormatClipboard
;
if
(
mbOwnPrinter
)
delete
mpPrinter
;
...
...
sd/source/ui/docshell/formatclipboard.cxx
deleted
100644 → 0
Dosyayı görüntüle @
3838b0a0
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formatclipboard.cxx,v $
* $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "formatclipboard.hxx"
#include <svx/globl3d.hxx>
// header for class SfxItemIter
#include <svtools/itemiter.hxx>
// header for class SfxStyleSheet
#include <svtools/style.hxx>
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
SdFormatClipboard
::
SdFormatClipboard
()
:
m_pItemSet
(
0
)
,
m_bPersistentCopy
(
false
)
,
m_nType_Inventor
(
0
)
,
m_nType_Identifier
(
0
)
{
}
SdFormatClipboard
::~
SdFormatClipboard
()
{
if
(
m_pItemSet
)
delete
m_pItemSet
;
}
bool
SdFormatClipboard
::
HasContent
()
const
{
return
m_pItemSet
!=
0
;
}
bool
SdFormatClipboard
::
CanCopyThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
)
const
{
if
(
nObjectInventor
!=
SdrInventor
&&
nObjectInventor
!=
E3dInventor
)
return
false
;
switch
(
nObjectIdentifier
)
{
case
OBJ_NONE
:
case
OBJ_GRUP
:
return
false
;
case
OBJ_LINE
:
case
OBJ_RECT
:
case
OBJ_CIRC
:
case
OBJ_SECT
:
case
OBJ_CARC
:
case
OBJ_CCUT
:
case
OBJ_POLY
:
case
OBJ_PLIN
:
case
OBJ_PATHLINE
:
case
OBJ_PATHFILL
:
case
OBJ_FREELINE
:
case
OBJ_FREEFILL
:
case
OBJ_SPLNLINE
:
case
OBJ_SPLNFILL
:
case
OBJ_TEXT
:
case
OBJ_TEXTEXT
:
case
OBJ_TITLETEXT
:
return
true
;
case
OBJ_OUTLINETEXT
:
case
OBJ_GRAF
:
case
OBJ_OLE2
:
case
OBJ_EDGE
:
case
OBJ_CAPTION
:
return
false
;
case
OBJ_PATHPOLY
:
case
OBJ_PATHPLIN
:
return
true
;
case
OBJ_PAGE
:
case
OBJ_MEASURE
:
case
OBJ_DUMMY
:
case
OBJ_FRAME
:
case
OBJ_UNO
:
return
false
;
case
OBJ_CUSTOMSHAPE
:
return
true
;
default
:
return
false
;
}
}
bool
SdFormatClipboard
::
HasContentForThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
)
const
{
if
(
!
HasContent
()
)
return
false
;
if
(
!
CanCopyThisType
(
nObjectInventor
,
nObjectIdentifier
)
)
return
false
;
return
true
;
}
void
SdFormatClipboard
::
Copy
(
::
sd
::
View
&
rDrawView
,
bool
bPersistentCopy
)
{
this
->
Erase
();
m_bPersistentCopy
=
bPersistentCopy
;
const
SdrMarkList
&
rMarkList
=
rDrawView
.
GetMarkedObjectList
();
if
(
rMarkList
.
GetMarkCount
()
>=
1
)
{
BOOL
bOnlyHardAttr
=
FALSE
;
m_pItemSet
=
new
SfxItemSet
(
rDrawView
.
GetAttrFromMarked
(
bOnlyHardAttr
)
);
SdrObject
*
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
m_nType_Inventor
=
pObj
->
GetObjInventor
();
m_nType_Identifier
=
pObj
->
GetObjIdentifier
();
}
}
void
SdFormatClipboard
::
Paste
(
::
sd
::
View
&
rDrawView
,
bool
,
bool
)
{
if
(
!
rDrawView
.
AreObjectsMarked
()
)
{
if
(
!
m_bPersistentCopy
)
this
->
Erase
();
return
;
}
SdrObject
*
pObj
=
0
;
bool
bWrongTargetType
=
false
;
{
const
SdrMarkList
&
rMarkList
=
rDrawView
.
GetMarkedObjectList
();
if
(
rMarkList
.
GetMarkCount
()
!=
1
)
bWrongTargetType
=
true
;
else
{
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
if
(
pObj
&&
pObj
->
GetStyleSheet
()
)
bWrongTargetType
=
!
this
->
HasContentForThisType
(
pObj
->
GetObjInventor
(),
pObj
->
GetObjIdentifier
()
);
}
}
if
(
bWrongTargetType
)
{
if
(
!
m_bPersistentCopy
)
this
->
Erase
();
return
;
}
if
(
m_pItemSet
)
{
//modify source itemset
{
boost
::
shared_ptr
<
SfxItemSet
>
pTargetSet
;
if
(
pObj
->
GetStyleSheet
()
)
{
pTargetSet
.
reset
(
new
SfxItemSet
(
pObj
->
GetStyleSheet
()
->
GetItemSet
()
)
);
}
else
{
SdrModel
*
pModel
=
pObj
->
GetModel
();
if
(
pModel
)
{
pTargetSet
.
reset
(
new
SfxItemSet
(
pModel
->
GetItemPool
()
)
);
}
}
if
(
pTargetSet
.
get
()
)
{
USHORT
nWhich
=
0
;
SfxItemState
nSourceState
;
SfxItemState
nTargetState
;
const
SfxPoolItem
*
pSourceItem
=
0
;
const
SfxPoolItem
*
pTargetItem
=
0
;
SfxItemIter
aSourceIter
(
*
m_pItemSet
);
pSourceItem
=
aSourceIter
.
FirstItem
();
while
(
pSourceItem
!=
NULL
)
{
if
(
!
IsInvalidItem
(
pSourceItem
))
{
nWhich
=
pSourceItem
->
Which
();
if
(
nWhich
)
{
nSourceState
=
m_pItemSet
->
GetItemState
(
nWhich
);
nTargetState
=
pTargetSet
->
GetItemState
(
nWhich
);
pTargetItem
=
pTargetSet
->
GetItem
(
nWhich
);
if
(
!
pTargetItem
)
m_pItemSet
->
ClearItem
(
nWhich
);
else
if
(
(
*
pSourceItem
)
==
(
*
pTargetItem
)
)
{
//do not set items which have the same content in source and target
m_pItemSet
->
ClearItem
(
nWhich
);
}
}
}
pSourceItem
=
aSourceIter
.
NextItem
();
}
//end while
}
}
BOOL
bReplaceAll
=
TRUE
;
rDrawView
.
SetAttrToMarked
(
*
m_pItemSet
,
bReplaceAll
);
}
if
(
!
m_bPersistentCopy
)
this
->
Erase
();
}
void
SdFormatClipboard
::
Erase
()
{
if
(
m_pItemSet
)
{
delete
m_pItemSet
;
m_pItemSet
=
0
;
}
m_nType_Inventor
=
0
;
m_nType_Identifier
=
0
;
m_bPersistentCopy
=
false
;
}
sd/source/ui/docshell/makefile.mk
Dosyayı görüntüle @
1cecb228
...
...
@@ -47,7 +47,6 @@ AUTOSEG=true
# --- Files --------------------------------------------------------
SLOFILES
=
\
$(SLO)$/
formatclipboard.obj
\
$(SLO)$/
docshell.obj
\
$(SLO)$/
docshel2.obj
\
$(SLO)$/
docshel3.obj
\
...
...
sd/source/ui/func/fuformatpaintbrush.cxx
Dosyayı görüntüle @
1cecb228
This diff is collapsed.
Click to expand it.
sd/source/ui/inc/DrawDocShell.hxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -52,7 +52,6 @@ class SfxPrinter;
struct
SdrDocumentStreamInfo
;
struct
SpellCallbackInfo
;
class
AbstractSvxNameDialog
;
class
SdFormatClipboard
;
namespace
sd
{
...
...
@@ -209,9 +208,6 @@ public:
void
ClearUndoBuffer
();
public
:
SdFormatClipboard
*
mpFormatClipboard
;
protected
:
SdDrawDocument
*
mpDoc
;
...
...
sd/source/ui/inc/ViewShellBase.hxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -259,6 +259,10 @@ public:
CustomHandleManager
&
getCustomHandleManager
()
const
;
/** returns the ui descriptive name for the given uno slot. The result is taken from the configuration
and not cached, so do not use it excessive (f.e. in status updates) */
::
rtl
::
OUString
RetrieveLabelFromCommand
(
const
::
rtl
::
OUString
&
aCmdURL
)
const
;
protected
:
osl
::
Mutex
maMutex
;
...
...
sd/source/ui/inc/formatclipboard.hxx
deleted
100644 → 0
Dosyayı görüntüle @
3838b0a0
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formatclipboard.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _SDFORMATCLIPBOARD_HXX
#define _SDFORMATCLIPBOARD_HXX
#include "View.hxx"
// header for class SfxItemSet
#include <svtools/itemset.hxx>
//-----------------------------------------------------------------------------
/** This class acts as data container and execution class for the format paintbrush feature in draw and impress.
*/
class
SdFormatClipboard
{
public
:
SdFormatClipboard
();
virtual
~
SdFormatClipboard
();
bool
HasContent
()
const
;
bool
CanCopyThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
)
const
;
bool
HasContentForThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
)
const
;
void
Copy
(
::
sd
::
View
&
rDrawView
,
bool
bPersistentCopy
=
false
);
void
Paste
(
::
sd
::
View
&
rDrawView
,
bool
bNoCharacterFormats
=
false
,
bool
bNoParagraphFormats
=
false
);
void
Erase
();
private
:
SfxItemSet
*
m_pItemSet
;
bool
m_bPersistentCopy
;
UINT32
m_nType_Inventor
;
UINT16
m_nType_Identifier
;
};
#endif
sd/source/ui/inc/fuformatpaintbrush.hxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -31,15 +31,19 @@
#ifndef SD_FU_FORMATPAINTBRUSH_HXX
#define SD_FU_FORMATPAINTBRUSH_HXX
#include "fu
poor
.hxx"
#include "fu
text
.hxx"
// header for class SfxItemSet
#include <svtools/itemset.hxx>
#include <boost/scoped_ptr.hpp>
class
SfxItemSet
;
namespace
sd
{
class
FuFormatPaintBrush
:
public
FuPoor
class
DrawViewShell
;
class
FuFormatPaintBrush
:
public
FuText
{
public
:
TYPEINFO
();
...
...
@@ -54,14 +58,22 @@ public:
virtual
void
Activate
();
virtual
void
Deactivate
();
static
void
GetMenuState
(
DrawViewShell
&
rDrawViewShell
,
SfxItemSet
&
rSet
);
static
bool
CanCopyThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
);
private
:
FuFormatPaintBrush
(
ViewShell
*
pViewSh
,
::
sd
::
Window
*
pWin
,
::
sd
::
View
*
pView
,
SdDrawDocument
*
pDoc
,
SfxRequest
&
rReq
);
FuFormatPaintBrush
(
ViewShell
*
pViewSh
,
::
sd
::
Window
*
pWin
,
::
sd
::
View
*
pView
,
SdDrawDocument
*
pDoc
,
SfxRequest
&
rReq
);
void
DoExecute
(
SfxRequest
&
rReq
);
bool
HasContentForThisType
(
UINT32
nObjectInventor
,
UINT16
nObjectIdentifier
)
const
;
void
Paste
(
bool
,
bool
);
void
implcancel
();
::
boost
::
shared_ptr
<
SfxItemSet
>
mpItemSet
;
bool
mbPermanent
;
bool
mbOldIsQuickTextEditMode
;
};
}
// end of namespace sd
...
...
sd/source/ui/view/ViewShellBase.cxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -31,6 +31,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/frame/UnknownModuleException.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include "ViewShellBase.hxx"
#include <algorithm>
#include "EventMultiplexer.hxx"
...
...
@@ -94,6 +101,11 @@ using namespace sd;
using
::
sd
::
framework
::
FrameworkHelper
;
using
::
rtl
::
OUString
;
using
namespace
com
::
sun
::
star
::
uno
;
using
namespace
com
::
sun
::
star
::
frame
;
using
namespace
com
::
sun
::
star
::
container
;
using
namespace
com
::
sun
::
star
::
lang
;
using
namespace
com
::
sun
::
star
::
beans
;
namespace
{
...
...
@@ -1210,6 +1222,47 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
return
*
mpImpl
->
mpCustomHandleManager
.
get
();
}
::
rtl
::
OUString
ViewShellBase
::
RetrieveLabelFromCommand
(
const
::
rtl
::
OUString
&
aCmdURL
)
const
{
::
rtl
::
OUString
aLabel
;
if
(
aCmdURL
.
getLength
()
>
0
)
try
{
Reference
<
XMultiServiceFactory
>
xServiceManager
(
::
comphelper
::
getProcessServiceFactory
(),
UNO_QUERY_THROW
);
Reference
<
XModuleManager
>
xModuleManager
(
xServiceManager
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.ModuleManager"
)
)
),
UNO_QUERY_THROW
);
Reference
<
XInterface
>
xIfac
(
GetMainViewShell
()
->
GetViewFrame
()
->
GetFrame
()
->
GetFrameInterface
(),
UNO_QUERY_THROW
);
::
rtl
::
OUString
aModuleIdentifier
(
xModuleManager
->
identify
(
xIfac
)
);
if
(
aModuleIdentifier
.
getLength
()
>
0
)
{
Reference
<
XNameAccess
>
xNameAccess
(
xServiceManager
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.UICommandDescription"
)
)
),
UNO_QUERY
);
if
(
xNameAccess
.
is
()
)
{
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
m_xUICommandLabels
(
xNameAccess
->
getByName
(
aModuleIdentifier
),
UNO_QUERY_THROW
);
Sequence
<
PropertyValue
>
aPropSeq
;
if
(
m_xUICommandLabels
->
getByName
(
aCmdURL
)
>>=
aPropSeq
)
{
for
(
sal_Int32
i
=
0
;
i
<
aPropSeq
.
getLength
();
i
++
)
{
if
(
aPropSeq
[
i
].
Name
.
equalsAscii
(
"Name"
))
{
aPropSeq
[
i
].
Value
>>=
aLabel
;
break
;
}
}
}
}
}
}
catch
(
Exception
&
)
{
}
return
aLabel
;
}
//===== ViewShellBase::Implementation =========================================
...
...
sd/source/ui/view/drviews6.cxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -81,12 +81,8 @@
#include "fusumry.hxx"
#include "fucushow.hxx"
#include "drawview.hxx"
#ifndef SD_FRAME_VIEW
#include "FrameView.hxx"
#endif
#include "Window.hxx"
#include "fuformatpaintbrush.hxx"
#include "formatclipboard.hxx"
#include "DrawDocShell.hxx"
#include "TaskPaneViewShell.hxx"
#include "framework/FrameworkHelper.hxx"
...
...
@@ -501,35 +497,6 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq)
USHORT
nSId
=
rReq
.
GetSlot
();
switch
(
nSId
)
{
case
SID_FORMATPAINTBRUSH
:
{
SdFormatClipboard
*
pFormatClipboard
=
GetDocSh
()
->
mpFormatClipboard
;
if
(
pFormatClipboard
)
{
if
(
pFormatClipboard
->
HasContent
()
)
{
pFormatClipboard
->
Erase
();
GetViewFrame
()
->
GetBindings
().
Invalidate
(
SID_FORMATPAINTBRUSH
);
Cancel
();
rReq
.
Ignore
();
}
else
{
bool
bPersistentCopy
=
false
;
const
SfxItemSet
*
pArgs
=
rReq
.
GetArgs
();
if
(
pArgs
&&
pArgs
->
Count
()
>=
1
)
{
bPersistentCopy
=
static_cast
<
bool
>
(((
SfxBoolItem
&
)
pArgs
->
Get
(
SID_FORMATPAINTBRUSH
)).
GetValue
());
}
pFormatClipboard
->
Copy
(
*
mpDrawView
,
bPersistentCopy
);
SetCurrentFunction
(
FuFormatPaintBrush
::
Create
(
this
,
GetActiveWindow
(),
mpDrawView
,
GetDoc
(),
rReq
)
);
GetViewFrame
()
->
GetBindings
().
Invalidate
(
SID_FORMATPAINTBRUSH
);
}
}
}
break
;
case
SID_FONTWORK
:
{
if
(
rReq
.
GetArgs
()
)
...
...
sd/source/ui/view/drviews7.cxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -87,7 +87,6 @@
#include "zoomlist.hxx"
#include "slideshow.hxx"
#include "drawview.hxx"
#include "formatclipboard.hxx"
#include "ViewShellBase.hxx"
#include "ViewShellManager.hxx"
#include "LayerTabBar.hxx"
...
...
@@ -95,6 +94,7 @@
#include "Window.hxx"
#include "fuediglu.hxx"
#include "fubullet.hxx"
#include "fuformatpaintbrush.hxx"
using
::
rtl
::
OUString
;
using
namespace
::
com
::
sun
::
star
;
...
...
@@ -249,19 +249,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
const
ULONG
nMarkCount
=
rMarkList
.
GetMarkCount
();
//format paintbrush
{
SdFormatClipboard
*
pFormatClipboard
=
GetDocSh
()
->
mpFormatClipboard
;
bool
bHasContent
=
pFormatClipboard
&&
pFormatClipboard
->
HasContent
();
rSet
.
Put
(
SfxBoolItem
(
SID_FORMATPAINTBRUSH
,
bHasContent
));
if
(
(
nMarkCount
!=
1
&&
!
bHasContent
)
||
mpDrawView
->
IsTextEdit
()
)
rSet
.
DisableItem
(
SID_FORMATPAINTBRUSH
);
if
(
!
bHasContent
&&
nMarkCount
==
1
)
{
SdrObject
*
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
if
(
!
pFormatClipboard
->
CanCopyThisType
(
pObj
->
GetObjInventor
(),
pObj
->
GetObjIdentifier
())
)
rSet
.
DisableItem
(
SID_FORMATPAINTBRUSH
);
}
}
FuFormatPaintBrush
::
GetMenuState
(
*
this
,
rSet
);
// Stati der SfxChild-Windows (Animator, Fontwork etc.)
SetChildWindowState
(
rSet
);
...
...
sd/source/ui/view/drviewse.cxx
Dosyayı görüntüle @
1cecb228
...
...
@@ -106,7 +106,7 @@
#include "anminfo.hxx"
#include "optsitem.hxx"
#include "Window.hxx"
#include "fuformatpaintbrush.hxx"
using
::
rtl
::
OUString
;
using
namespace
::
com
::
sun
::
star
;
...
...
@@ -202,14 +202,23 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
return
;
if
(
HasCurrentFunction
())
{
if
(
(
nSId
==
SID_FORMATPAINTBRUSH
)
&&
(
GetCurrentFunction
()
->
GetSlotID
()
==
SID_TEXTEDIT
)
)
{
// save text edit mode for format paintbrush!
SetOldFunction
(
GetCurrentFunction
()
);
}
else
{
if
(
GetOldFunction
()
==
GetCurrentFunction
())
{
SetOldFunction
(
0
);
}
}
if
(
nSId
!=
SID_TEXTEDIT
&&
nSId
!=
SID_ATTR_CHAR
&&
nSId
!=
SID_TEXT_FITTOSIZE
&&
nSId
!=
SID_ATTR_CHAR_VERTICAL
&&
nSId
!=
SID_TEXT_FITTOSIZE_VERTICAL
&&
nSId
!=
SID_FORMATPAINTBRUSH
&&
mpDrawView
->
IsTextEdit
()
)
{
mpDrawView
->
SdrEndTextEdit
();
...
...
@@ -526,6 +535,16 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
}
break
;
case
SID_FORMATPAINTBRUSH
:
{
SetCurrentFunction
(
FuFormatPaintBrush
::
Create
(
this
,
GetActiveWindow
(),
mpDrawView
,
GetDoc
(),
rReq
)
);
rReq
.
Done
();
SfxBindings
&
rBind
=
GetViewFrame
()
->
GetBindings
();
rBind
.
Invalidate
(
nSId
);
rBind
.
Update
(
nSId
);
break
;
}
default
:
break
;
}
...
...
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