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
836d9864
Kaydet (Commit)
836d9864
authored
Şub 21, 2012
tarafından
Winfried Donkers
Kaydeden (comit)
Michael Meeks
Şub 21, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#44611 writer: paragraph background color picker with split button
üst
46cf18fd
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
73 deletions
+102
-73
toolboxcontroller.cxx
reportdesign/source/ui/misc/toolboxcontroller.cxx
+2
-2
scdll.cxx
sc/source/ui/app/scdll.cxx
+1
-1
formatsh.cxx
sc/source/ui/view/formatsh.cxx
+1
-1
svxids.hrc
svx/inc/svx/svxids.hrc
+0
-0
tbcontrl.hxx
svx/inc/svx/tbcontrl.hxx
+13
-16
tbcontrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
+69
-46
swmodule.cxx
sw/source/ui/app/swmodule.cxx
+3
-3
basesh.hxx
sw/source/ui/inc/basesh.hxx
+4
-1
basesh.cxx
sw/source/ui/shells/basesh.cxx
+9
-3
No files found.
reportdesign/source/ui/misc/toolboxcontroller.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -197,7 +197,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
{
m_aStates
.
insert
(
TCommandState
::
value_type
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:FontColor"
)),
sal_True
));
m_aStates
.
insert
(
TCommandState
::
value_type
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:Color"
)),
sal_True
));
m_pToolbarController
=
TToolbarHelper
::
createFromQuery
(
new
Svx
FontColorExtToolBoxControl
/*SvxFontColorToolBoxControl*/
(
m_nSlotId
=
SID_ATTR_CHAR_COLOR2
,
m_nToolBoxId
,
*
pToolBox
));
m_pToolbarController
=
TToolbarHelper
::
createFromQuery
(
new
Svx
ColorExtToolBoxControl
(
m_nSlotId
=
SID_ATTR_CHAR_COLOR2
,
m_nToolBoxId
,
*
pToolBox
));
}
else
{
...
...
@@ -268,7 +268,7 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event
::
Color
aGcc3WorkaroundTemporary
(
nColor
);
SvxColorItem
aColorItem
(
aGcc3WorkaroundTemporary
,
1
);
if
(
SID_ATTR_CHAR_COLOR2
==
m_nSlotId
)
static_cast
<
Svx
Font
ColorExtToolBoxControl
*>
(
m_pToolbarController
.
get
())
->
StateChanged
(
m_nSlotId
,
Event
.
IsEnabled
?
SFX_ITEM_SET
:
SFX_ITEM_DISABLED
,
&
aColorItem
);
static_cast
<
SvxColorExtToolBoxControl
*>
(
m_pToolbarController
.
get
())
->
StateChanged
(
m_nSlotId
,
Event
.
IsEnabled
?
SFX_ITEM_SET
:
SFX_ITEM_DISABLED
,
&
aColorItem
);
else
static_cast
<
SvxColorToolBoxControl
*>
(
m_pToolbarController
.
get
())
->
StateChanged
(
m_nSlotId
,
Event
.
IsEnabled
?
SFX_ITEM_SET
:
SFX_ITEM_DISABLED
,
&
aColorItem
);
}
...
...
sc/source/ui/app/scdll.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -204,7 +204,7 @@ void ScDLL::Init()
SvxFontNameToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_FONT
,
pMod
);
// SvxFontHeightToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod);
SvxFontColorToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR
,
pMod
);
Svx
FontColorExtToolBoxControl
::
RegisterControl
(
SID_BACKGROUND_COLOR
,
pMod
);
Svx
ColorExtToolBoxControl
::
RegisterControl
(
SID_BACKGROUND_COLOR
,
pMod
);
SvxFrameToolBoxControl
::
RegisterControl
(
SID_ATTR_BORDER
,
pMod
);
SvxFrameLineStyleToolBoxControl
::
RegisterControl
(
SID_FRAME_LINESTYLE
,
pMod
);
SvxFrameLineColorToolBoxControl
::
RegisterControl
(
SID_FRAME_LINECOLOR
,
pMod
);
...
...
sc/source/ui/view/formatsh.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -1453,10 +1453,10 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case
SID_BACKGROUND_COLOR
:
{
// SID_BACKGROUND_COLOR without arguments -> set background to last used color
SvxBrushItem
aBrushItem
(
(
const
SvxBrushItem
&
)
pTabViewShell
->
GetSelectionPattern
()
->
GetItem
(
ATTR_BACKGROUND
)
);
aBrushItem
.
SetColor
(
pTabViewShell
->
GetBackgroundColor
()
);
pTabViewShell
->
ApplyAttr
(
aBrushItem
);
...
...
svx/inc/svx/svxids.hrc
100755 → 100644
Dosyayı görüntüle @
836d9864
File mode changed from 100755 to 100644
svx/inc/svx/tbcontrl.hxx
Dosyayı görüntüle @
836d9864
...
...
@@ -65,23 +65,23 @@
from DocShell: presently none
in future: color palette
class Svx
Font
ColorExtToolBoxControl
class SvxColorExtToolBoxControl
-----------------------------------
for font color
Item type: SvxColorItem
und SfxBoolItem
and SfxBoolItem
for font color (writer, ...)
Execute-Id SID_ATTR_CHAR_COLOR2
u
nd SID_ATTR_CHAR_COLOR_EXT
a
nd SID_ATTR_CHAR_COLOR_EXT
for character background color (writer)
Item-Typ SvxColorItem
und SfxBoolItem
Execute-Id SID_ATTR_CHAR_COLOR_BACKGROUND
und SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
and SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
for paragraph background color (writer)
Execute-Id SID_BACKGROUND_COLOR
for cell background color (calc)
Item-Typ SvxColorItem
und SfxBoolItem
Execute-Id SID_ATTR_CHAR_COLOR_BACKGROUND
SvxColorToolBoxControl
...
...
@@ -89,9 +89,6 @@
Item type: SvxBrushItem
Execute-Id: SID_BACKGROUND_COLOR
-> SvxColorItem
Additional information
from DocShell: presently none
in future: color palette
SvxPatternToolBoxControl
------------------------
...
...
@@ -306,12 +303,12 @@ public:
//========================================================================
// class Svx
Font
ColorExtToolBoxControl --------------------------------------
// class SvxColorExtToolBoxControl --------------------------------------
//========================================================================
class
SVX_DLLPUBLIC
Svx
Font
ColorExtToolBoxControl
:
public
SfxToolBoxControl
class
SVX_DLLPUBLIC
SvxColorExtToolBoxControl
:
public
SfxToolBoxControl
{
using
SfxToolBoxControl
::
StateChanged
;
using
SfxToolBoxControl
::
Select
;
...
...
@@ -323,8 +320,8 @@ class SVX_DLLPUBLIC SvxFontColorExtToolBoxControl : public SfxToolBoxControl
public
:
SFX_DECL_TOOLBOX_CONTROL
();
Svx
Font
ColorExtToolBoxControl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
);
~
Svx
Font
ColorExtToolBoxControl
();
SvxColorExtToolBoxControl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
);
~
SvxColorExtToolBoxControl
();
virtual
void
StateChanged
(
sal_uInt16
nSID
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
);
...
...
svx/source/tbxctrls/tbcontrl.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -122,7 +122,7 @@ using namespace ::com::sun::star::lang;
SFX_IMPL_TOOLBOX_CONTROL
(
SvxStyleToolBoxControl
,
SfxTemplateItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxFontNameToolBoxControl
,
SvxFontItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxFontColorToolBoxControl
,
SvxColorItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
Svx
Font
ColorExtToolBoxControl
,
SvxColorItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxColorExtToolBoxControl
,
SvxColorItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxColorToolBoxControl
,
SvxColorItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxFrameToolBoxControl
,
SvxBoxItem
);
SFX_IMPL_TOOLBOX_CONTROL
(
SvxFrameLineStyleToolBoxControl
,
SvxLineItem
);
...
...
@@ -2235,10 +2235,10 @@ void SvxColorToolBoxControl::StateChanged(
}
//========================================================================
// class Svx
FontColorExtToolBoxControl
--------------------------------------
// class Svx
ColorExtToolBoxControl --
--------------------------------------
//========================================================================
Svx
FontColorExtToolBoxControl
::
SvxFont
ColorExtToolBoxControl
(
Svx
ColorExtToolBoxControl
::
Svx
ColorExtToolBoxControl
(
sal_uInt16
nSlotId
,
sal_uInt16
nId
,
ToolBox
&
rTbx
)
:
...
...
@@ -2247,37 +2247,47 @@ SvxFontColorExtToolBoxControl::SvxFontColorExtToolBoxControl(
pBtnUpdater
(
0
),
mLastColor
(
COL_AUTO
)
{
sal_uInt16
nMode
;
rTbx
.
SetItemBits
(
nId
,
TIB_DROPDOWN
|
rTbx
.
GetItemBits
(
nId
)
);
bChoiceFromPalette
=
sal_False
;
// The following commands are available at the writer and the calc module.
if
(
SID_ATTR_CHAR_COLOR2
==
nSlotId
||
SID_ATTR_CHAR_COLOR
==
nSlotId
)
addStatusListener
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharColorExt"
)));
else
addStatusListener
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharBackgroundExt"
)));
// The following commands are available at the various modules
switch
(
nSlotId
)
{
case
SID_ATTR_CHAR_COLOR2
:
case
SID_ATTR_CHAR_COLOR
:
addStatusListener
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharColorExt"
)));
nMode
=
TBX_UPDATER_MODE_CHAR_COLOR_NEW
;
break
;
sal_uInt16
nMode
=
TBX_UPDATER_MODE_CHAR_COLOR_NEW
;
case
SID_ATTR_CHAR_COLOR_BACKGROUND
:
case
SID_BACKGROUND_COLOR
:
addStatusListener
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharBackgroundExt"
)));
nMode
=
TBX_UPDATER_MODE_CHAR_COLOR_NEW
;
break
;
}
pBtnUpdater
=
new
::
svx
::
ToolboxButtonColorUpdater
(
nSlotId
,
nId
,
&
GetToolBox
(),
nMode
);
}
// -----------------------------------------------------------------------
Svx
FontColorExtToolBoxControl
::~
SvxFont
ColorExtToolBoxControl
()
Svx
ColorExtToolBoxControl
::~
Svx
ColorExtToolBoxControl
()
{
delete
pBtnUpdater
;
}
// -----------------------------------------------------------------------
SfxPopupWindowType
Svx
Font
ColorExtToolBoxControl
::
GetPopupWindowType
()
const
SfxPopupWindowType
SvxColorExtToolBoxControl
::
GetPopupWindowType
()
const
{
return
SFX_POPUPWINDOW_ONTIMEOUT
;
}
// -----------------------------------------------------------------------
SfxPopupWindow
*
Svx
Font
ColorExtToolBoxControl
::
CreatePopupWindow
()
SfxPopupWindow
*
SvxColorExtToolBoxControl
::
CreatePopupWindow
()
{
SvxColorWindow_Impl
*
pColorWin
=
new
SvxColorWindow_Impl
(
...
...
@@ -2288,8 +2298,16 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
&
GetToolBox
(),
mLastColor
);
if
(
GetSlotId
()
==
SID_ATTR_CHAR_COLOR_BACKGROUND
)
pColorWin
->
SetText
(
SVX_RESSTR
(
RID_SVXSTR_EXTRAS_CHARBACKGROUND
)
);
switch
(
GetSlotId
()
)
{
case
SID_ATTR_CHAR_COLOR_BACKGROUND
:
pColorWin
->
SetText
(
SVX_RESSTR
(
RID_SVXSTR_EXTRAS_CHARBACKGROUND
)
);
break
;
case
SID_BACKGROUND_COLOR
:
pColorWin
->
SetText
(
SVX_RESSTR
(
RID_SVXSTR_BACKGROUND
)
);
break
;
}
pColorWin
->
StartPopupMode
(
&
GetToolBox
(),
FLOATWIN_POPUPMODE_GRABFOCUS
|
FLOATWIN_POPUPMODE_ALLOWTEAROFF
);
...
...
@@ -2301,7 +2319,7 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
// -----------------------------------------------------------------------
void
Svx
Font
ColorExtToolBoxControl
::
StateChanged
(
void
SvxColorExtToolBoxControl
::
StateChanged
(
sal_uInt16
nSID
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
...
...
@@ -2312,53 +2330,58 @@ void SvxFontColorExtToolBoxControl::StateChanged(
if
(
bChoiceFromPalette
)
{
bChoiceFromPalette
=
sal_False
;
if
(
nSID
==
SID_ATTR_CHAR_COLOR_EXT
||
nSID
==
SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
)
{
if
(
SFX_ITEM_DONTCARE
!=
eState
)
{
const
SfxBoolItem
*
pBool
=
PTR_CAST
(
SfxBoolItem
,
pState
);
rTbx
.
CheckItem
(
nId
,
pBool
&&
pBool
->
GetValue
());
}
rTbx
.
EnableItem
(
nId
,
SFX_ITEM_DISABLED
!=
eState
);
}
else
switch
(
nSID
)
{
if
(
SFX_ITEM_DONTCARE
!=
eState
)
pItem
=
PTR_CAST
(
SvxColorItem
,
pState
);
case
SID_ATTR_CHAR_COLOR_EXT
:
case
SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
:
if
(
SFX_ITEM_DONTCARE
!=
eState
)
{
const
SfxBoolItem
*
pBool
=
PTR_CAST
(
SfxBoolItem
,
pState
);
rTbx
.
CheckItem
(
nId
,
pBool
&&
pBool
->
GetValue
());
}
rTbx
.
EnableItem
(
nId
,
SFX_ITEM_DISABLED
!=
eState
);
break
;
if
(
pItem
)
{
pBtnUpdater
->
Update
(
pItem
->
GetValue
()
);
mLastColor
=
pItem
->
GetValue
();
}
case
SID_ATTR_CHAR_COLOR2
:
case
SID_ATTR_CHAR_COLOR_BACKGROUND
:
case
SID_BACKGROUND_COLOR
:
if
(
SFX_ITEM_DONTCARE
!=
eState
)
pItem
=
PTR_CAST
(
SvxColorItem
,
pState
);
if
(
pItem
)
{
pBtnUpdater
->
Update
(
pItem
->
GetValue
()
);
mLastColor
=
pItem
->
GetValue
();
}
break
;
}
}
}
// -----------------------------------------------------------------------
void
Svx
Font
ColorExtToolBoxControl
::
Select
(
sal_Bool
)
void
SvxColorExtToolBoxControl
::
Select
(
sal_Bool
)
{
OUString
aCommand
;
OUString
aParamName
;
if
(
SID_ATTR_CHAR_COLOR2
==
GetSlotId
()
||
SID_ATTR_CHAR_COLOR
==
GetSlotId
()
)
{
aCommand
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharColorExt"
));
aParamName
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"CharColorExt"
));
}
else
switch
(
GetSlotId
()
)
{
if
(
SID_BACKGROUND_COLOR
==
GetSlotId
()
)
{
case
SID_ATTR_CHAR_COLOR2
:
case
SID_ATTR_CHAR_COLOR
:
aCommand
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharColorExt"
));
aParamName
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"CharColorExt"
));
break
;
case
SID_BACKGROUND_COLOR
:
aCommand
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:BackgroundColor"
));
aParamName
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"BackgroundColor"
));
}
else
{
break
;
case
SID_ATTR_CHAR_COLOR_BACKGROUND
:
aCommand
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:CharBackgroundExt"
));
aParamName
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"CharBackgroundExt"
));
}
break
;
}
Sequence
<
PropertyValue
>
aArgs
(
1
);
...
...
sw/source/ui/app/swmodule.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -349,10 +349,10 @@ void SwDLL::RegisterControls()
SvxFontNameToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_FONT
,
pMod
);
SvxFontColorToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR
,
pMod
);
Svx
Font
ColorExtToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR2
,
pMod
);
Svx
Font
ColorExtToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR_BACKGROUND
,
pMod
);
SvxColorExtToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR2
,
pMod
);
SvxColorExtToolBoxControl
::
RegisterControl
(
SID_ATTR_CHAR_COLOR_BACKGROUND
,
pMod
);
SvxStyleToolBoxControl
::
RegisterControl
(
SID_STYLE_APPLY
,
pMod
);
SvxColor
ToolBoxControl
::
RegisterControl
(
SID_BACKGROUND_COLOR
,
pMod
);
SvxColor
ExtToolBoxControl
::
RegisterControl
(
SID_BACKGROUND_COLOR
,
pMod
);
SvxFrameToolBoxControl
::
RegisterControl
(
SID_ATTR_BORDER
,
pMod
);
SvxFrameLineStyleToolBoxControl
::
RegisterControl
(
SID_FRAME_LINESTYLE
,
pMod
);
SvxFrameLineColorToolBoxControl
::
RegisterControl
(
SID_FRAME_LINECOLOR
,
pMod
);
...
...
sw/source/ui/inc/basesh.hxx
Dosyayı görüntüle @
836d9864
...
...
@@ -35,6 +35,7 @@
#include <sfx2/module.hxx>
#include <sfx2/shell.hxx>
#include <svl/svstdarr.hxx>
#include <viewopt.hxx>
#include <mdiexp.hxx>
#include <set>
...
...
@@ -49,6 +50,7 @@ struct DBTextStruct_Impl;
class
SwBaseShell
:
public
SfxShell
{
SwView
&
rView
;
static
Color
mBackgroundColor
;
// DragMode
static
FlyMode
eFrameMode
;
...
...
@@ -119,7 +121,8 @@ public:
static
void
SetFrmMode
(
FlyMode
eMode
,
SwWrtShell
*
pShell
);
// with update!
static
void
_SetFrmMode
(
FlyMode
eMode
)
{
eFrameMode
=
eMode
;
}
static
FlyMode
GetFrmMode
()
{
return
eFrameMode
;
}
Color
GetBackgroundColor
()
{
return
mBackgroundColor
;
}
void
SetBackgroundColor
(
const
Color
&
clr
)
{
mBackgroundColor
=
clr
;
}
};
...
...
sw/source/ui/shells/basesh.cxx
Dosyayı görüntüle @
836d9864
...
...
@@ -1927,6 +1927,10 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
/*--------------------------------------------------------------------
Beschreibung: Ctor
--------------------------------------------------------------------*/
// STATIC DATA -----------------------------------------------------------
Color
SwBaseShell
::
mBackgroundColor
=
COL_TRANSPARENT
;
// -----------------------------------------------------------
SwBaseShell
::
SwBaseShell
(
SwView
&
rVw
)
:
SfxShell
(
&
rVw
),
rView
(
rVw
),
...
...
@@ -2260,13 +2264,15 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
pArgs
->
Get
(
SID_BACKGROUND_COLOR
);
const
Color
&
rNewColor
=
rNewColorItem
.
GetValue
();
aBrushItem
.
SetColor
(
rNewColor
);
SetBackgroundColor
(
rNewColor
);
GetView
().
GetViewFrame
()
->
GetBindings
().
SetState
(
rNewColorItem
);
}
else
{
aBrushItem
.
SetColor
(
COL_TRANSPARENT
);
rReq
.
AppendItem
(
SvxColorItem
(
Color
(
COL_TRANSPARENT
),
nSlot
)
);
}
// call without arguments, use last used background color
aBrushItem
.
SetColor
(
GetBackgroundColor
()
);
rReq
.
AppendItem
(
SvxColorItem
(
GetBackgroundColor
(),
nSlot
)
);
}
}
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