[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 12 commits - drawinglayer/source filter/source officecfg/registry sc/source sdext/source sd/source solenv/inc svx/source vcl/source
Ariel Constenla-Haile
arielch at apache.org
Wed Apr 24 17:31:56 PDT 2013
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 29
filter/source/svg/svgwriter.cxx | 154 +
officecfg/registry/schema/org/openoffice/Office/Impress.xcs | 7
sc/source/ui/drawfunc/drawsh2.cxx | 17
sd/source/ui/app/optsitem.cxx | 15
sd/source/ui/dlg/tpoption.cxx | 11
sd/source/ui/dlg/tpoption.src | 10
sd/source/ui/inc/DrawController.hxx | 5
sd/source/ui/inc/optsitem.hxx | 3
sd/source/ui/inc/tpoption.hrc | 2
sd/source/ui/inc/tpoption.hxx | 1
sd/source/ui/sidebar/LayoutMenu.cxx | 67
sd/source/ui/sidebar/LayoutMenu.hxx | 12
sd/source/ui/unoidl/DrawController.cxx | 49
sd/source/ui/view/drviews1.cxx | 2
sd/source/ui/view/drviews2.cxx | 128 -
sdext/source/minimizer/PresentationMinimizer.component | 4
sdext/source/minimizer/basic.txt | 2
sdext/source/minimizer/helpid.hrc | 8
sdext/source/minimizer/optimizerdialog.cxx | 10
sdext/source/minimizer/pppoptimizer.cxx | 13
sdext/source/presenter/Jobs.xcu | 6
sdext/source/presenter/PresenterProtocolHandler.cxx | 4
sdext/source/presenter/PresenterScreen.component | 6
sdext/source/presenter/PresenterScreen.cxx | 88 -
sdext/source/presenter/ProtocolHandler.xcu | 4
solenv/inc/lldb4aoo.py | 3
svx/source/sidebar/area/AreaPropertyPanel.cxx | 1030 ++++++------
svx/source/sidebar/area/AreaPropertyPanel.hxx | 5
svx/source/sidebar/graphic/GraphicPropertyPanel.cxx | 344 ++--
svx/source/sidebar/line/LinePropertyPanel.cxx | 4
svx/source/sidebar/paragraph/ParaBulletsControl.cxx | 62
svx/source/sidebar/paragraph/ParaBulletsControl.hxx | 8
svx/source/sidebar/paragraph/ParaNumberingControl.cxx | 67
svx/source/sidebar/paragraph/ParaNumberingControl.hxx | 11
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 88 -
svx/source/sidebar/paragraph/ParaPropertyPanel.hrc | 2
svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 2
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 78
svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 15
svx/source/sidebar/text/TextPropertyPanel.cxx | 2
svx/source/sidebar/text/TextPropertyPanel.hxx | 2
svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 10
svx/source/svdraw/svdedtv1.cxx | 42
vcl/source/gdi/metaact.cxx | 14
45 files changed, 1272 insertions(+), 1174 deletions(-)
New commits:
commit 1b3f31a807d008f378487aa717daaed3ea49f3a6
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Wed Apr 24 19:09:18 2013 +0000
i121872 - Small fixes to Presentation Minimizer Online Help
diff --git a/sdext/source/minimizer/helpid.hrc b/sdext/source/minimizer/helpid.hrc
index f8b9b00..72ea121 100644
--- a/sdext/source/minimizer/helpid.hrc
+++ b/sdext/source/minimizer/helpid.hrc
@@ -33,7 +33,7 @@
#define HID_SDEXT_MINIMIZER_WIZ_STEP2_LB_CUSTOMSHOW "sdext:Minimizer:Wizard:Step2:LBCustomShow"
#define HID_SDEXT_MINIMIZER_WIZ_STEP3 "sdext:Minimizer:Wizard:Step3"
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_CROP "sdext:Minimizer:Wizard:Step3:CBCrop"
-#define HID_SDEXT_MINIMIZER_WIZ_STEP3_LB_DPI "sdext:Minimizer:Wizard:Step3:LBDPI" // TODO change in help
+#define HID_SDEXT_MINIMIZER_WIZ_STEP3_LB_DPI "sdext:Minimizer:Wizard:Step3:LBDPI"
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_LINKS "sdext:Minimizer:Wizard:Step3:CBLinks"
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_MF_QUALITY "sdext:Minimizer:Wizard:Step3:MFQuality"
#define HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_JPEG "sdext:Minimizer:Wizard:Step3:RBJPEG"
@@ -45,9 +45,9 @@
#define HID_SDEXT_MINIMIZER_WIZ_STEP5 "sdext:Minimizer:Wizard:Step5"
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_CURDOC "sdext:Minimizer:Wizard:Step5:RBCurDoc"
#define HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_NEWDOC "sdext:Minimizer:Wizard:Step5:RBNewDoc"
-#define HID_SDEXT_MINIMIZER_WIZ_STEP5_CB_SAVESETTINGS "sdext:Minimizer:Wizard:Step5:CBSaveSetts" // TODO ADD to help
-#define HID_SDEXT_MINIMIZER_WIZ_STEP5_LB_SETTINGSNAME "sdext:Minimizer:Wizard:Step5:LBSettsName" // TODO ADD to help
-#define HID_SDEXT_MINIMIZER_WIZ_PB_HELP "sdext:Minimizer:Wizard:PBHelp" // TODO ADD to help
+#define HID_SDEXT_MINIMIZER_WIZ_STEP5_CB_SAVESETTINGS "sdext:Minimizer:Wizard:Step5:CBSaveSetts"
+#define HID_SDEXT_MINIMIZER_WIZ_STEP5_LB_SETTINGSNAME "sdext:Minimizer:Wizard:Step5:LBSettsName"
+#define HID_SDEXT_MINIMIZER_WIZ_PB_HELP "sdext:Minimizer:Wizard:PBHelp"
#define HID_SDEXT_MINIMIZER_WIZ_PB_BACK "sdext:Minimizer:Wizard:PBBack"
#define HID_SDEXT_MINIMIZER_WIZ_PB_NEXT "sdext:Minimizer:Wizard:PBNext"
#define HID_SDEXT_MINIMIZER_WIZ_PB_FINISH "sdext:Minimizer:Wizard:PBFinish"
commit 1eb66b9730e16f1dd1be426c7d0901b41c300b34
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Wed Apr 24 19:09:04 2013 +0000
i121873 - Add option to disable starting the Presenter Screen together with the presentation
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index 7a88c7e..a527053 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -728,6 +728,13 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="PresenterScreen" oor:type="xs:boolean">
+ <info>
+ <desc>Indicates whether to start the Presenter Screen together with the presentation, in a multiple monitor configuration.</desc>
+ <label>With Presenter Screen</label>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="Compatibility">
<info>
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 7175370..b85315c 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -498,6 +498,7 @@ SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
bDoubleClickTextEdit( sal_True ),
bClickChangeRotation( sal_False ),
bStartWithActualPage( sal_False ),
+ bStartWithPresenterScreen( sal_True ), // default: Enable the Presenter Screen
bSolidDragging( sal_True ),
bSolidMarkHdl( sal_True ), // default: Use nice handles
bSummationOfParagraphs( sal_False ),
@@ -535,6 +536,7 @@ sal_Bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
IsDoubleClickTextEdit() == rOpt.IsDoubleClickTextEdit() &&
IsClickChangeRotation() == rOpt.IsClickChangeRotation() &&
IsStartWithActualPage() == rOpt.IsStartWithActualPage() &&
+ IsStartWithPresenterScreen() == rOpt.IsStartWithPresenterScreen() &&
IsSummationOfParagraphs() == rOpt.IsSummationOfParagraphs() &&
IsSolidDragging() == rOpt.IsSolidDragging() &&
IsSolidMarkHdl() == rOpt.IsSolidMarkHdl() &&
@@ -597,10 +599,12 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount )
"Display",
"PenColor",
- "PenWidth"
+ "PenWidth",
+
+ "Start/PresenterScreen"
};
- rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 27 : 16 );
+ rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 28 : 16 );
ppNames = aPropNames;
}
@@ -661,6 +665,9 @@ sal_Bool SdOptionsMisc::ReadData( const Any* pValues )
if( pValues[26].hasValue() )
SetPresentationPenWidth( getSafeValue< double >( pValues[ 26 ] ) );
+
+ if( pValues[27].hasValue() )
+ SetStartWithPresenterScreen( *(sal_Bool*) pValues[ 27 ].getValue() );
}
return sal_True;
@@ -707,6 +714,8 @@ sal_Bool SdOptionsMisc::WriteData( Any* pValues ) const
pValues[ 25 ] <<= GetPresentationPenColor();
pValues[ 26 ] <<= GetPresentationPenWidth();
+
+ pValues[ 27 ] <<= IsStartWithPresenterScreen();
}
return sal_True;
@@ -734,6 +743,7 @@ SdOptionsMiscItem::SdOptionsMiscItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd
{
maOptionsMisc.SetStartWithTemplate( pOpts->IsStartWithTemplate() );
maOptionsMisc.SetStartWithActualPage( pOpts->IsStartWithActualPage() );
+ maOptionsMisc.SetStartWithPresenterScreen( pOpts->IsStartWithPresenterScreen() );
maOptionsMisc.SetSummationOfParagraphs( pOpts->IsSummationOfParagraphs() );
// #90356#
maOptionsMisc.SetShowUndoDeleteWarning( pOpts->IsShowUndoDeleteWarning() );
@@ -823,6 +833,7 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const
pOpts->SetDoubleClickTextEdit( maOptionsMisc.IsDoubleClickTextEdit() );
pOpts->SetClickChangeRotation( maOptionsMisc.IsClickChangeRotation() );
pOpts->SetStartWithActualPage( maOptionsMisc.IsStartWithActualPage() );
+ pOpts->SetStartWithPresenterScreen( maOptionsMisc.IsStartWithPresenterScreen() );
pOpts->SetSummationOfParagraphs( maOptionsMisc.IsSummationOfParagraphs() );
pOpts->SetSolidDragging( maOptionsMisc.IsSolidDragging() );
pOpts->SetSolidMarkHdl( maOptionsMisc.IsSolidMarkHdl() );
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 527fcb8..002e177 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -261,6 +261,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
aMtrFldTabstop ( this, SdResId( MTR_FLD_TABSTOP ) ),
aCbxStartWithActualPage ( this, SdResId( CBX_START_WITH_ACTUAL_PAGE ) ),
+ aCbxStartWithPresenterScreen( this, SdResId( CBX_START_WITH_PRESENTER_SCREEN ) ),
aGrpStartWithActualPage ( this, SdResId( GRP_START_WITH_ACTUAL_PAGE ) ),
aTxtCompatibility ( this, SdResId( FT_COMPATIBILITY ) ),
aCbxUsePrinterMetrics ( this, SdResId( CB_USE_PRINTER_METRICS ) ),
@@ -427,6 +428,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
aCbxMasterPageCache.GetSavedValue() != aCbxMasterPageCache.IsChecked() ||
aCbxCopy.GetSavedValue() != aCbxCopy.IsChecked() ||
aCbxStartWithActualPage.GetSavedValue() != aCbxStartWithActualPage.IsChecked() ||
+ aCbxStartWithPresenterScreen.GetSavedValue() != aCbxStartWithPresenterScreen.IsChecked() ||
aCbxCompatibility.GetSavedValue() != aCbxCompatibility.IsChecked() ||
aCbxUsePrinterMetrics.GetSavedValue() != aCbxUsePrinterMetrics.IsChecked() )
{
@@ -440,6 +442,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
aOptsItem.GetOptionsMisc().SetMasterPagePaintCaching( aCbxMasterPageCache.IsChecked() );
aOptsItem.GetOptionsMisc().SetDragWithCopy( aCbxCopy.IsChecked() );
aOptsItem.GetOptionsMisc().SetStartWithActualPage( aCbxStartWithActualPage.IsChecked() );
+ aOptsItem.GetOptionsMisc().SetStartWithPresenterScreen( aCbxStartWithPresenterScreen.IsChecked() );
aOptsItem.GetOptionsMisc().SetSummationOfParagraphs( aCbxCompatibility.IsChecked() );
aOptsItem.GetOptionsMisc().SetPrinterIndependentLayout (
aCbxUsePrinterMetrics.IsChecked()
@@ -497,6 +500,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxMasterPageCache.Check( aOptsItem.GetOptionsMisc().IsMasterPagePaintCaching() );
aCbxCopy.Check( aOptsItem.GetOptionsMisc().IsDragWithCopy() );
aCbxStartWithActualPage.Check( aOptsItem.GetOptionsMisc().IsStartWithActualPage() );
+ aCbxStartWithPresenterScreen.Check( aOptsItem.GetOptionsMisc().IsStartWithPresenterScreen() );
aCbxCompatibility.Check( aOptsItem.GetOptionsMisc().IsSummationOfParagraphs() );
aCbxUsePrinterMetrics.Check( aOptsItem.GetOptionsMisc().GetPrinterIndependentLayout()==1 );
aCbxStartWithTemplate.SaveValue();
@@ -508,6 +512,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxMasterPageCache.SaveValue();
aCbxCopy.SaveValue();
aCbxStartWithActualPage.SaveValue();
+ aCbxStartWithPresenterScreen.SaveValue();
aCbxCompatibility.SaveValue();
aCbxUsePrinterMetrics.SaveValue();
@@ -634,6 +639,11 @@ void SdTpOptionsMisc::SetImpressMode (void)
lcl_MoveWin (aMtrFldTabstop, -nLineHeight);
lcl_MoveWin (aGrpStartWithActualPage, -nLineHeight);
lcl_MoveWin (aCbxStartWithActualPage, -nLineHeight);
+
+ lcl_MoveWin (aCbxStartWithPresenterScreen,
+ nDialogWidth/2 - aCbxStartWithPresenterScreen.GetPosPixel().X(),
+ -nLineHeight);
+
lcl_MoveWin (aTxtCompatibility, -nLineHeight);
// Move the printer-independent-metrics check box up two lines to change
@@ -646,6 +656,7 @@ void SdTpOptionsMisc::SetDrawMode()
aCbxStartWithTemplate.Hide();
aGrpProgramStart.Hide();
aCbxStartWithActualPage.Hide();
+ aCbxStartWithPresenterScreen.Hide();
aCbxCompatibility.Hide();
aGrpStartWithActualPage.Hide();
aCbxCrookNoContortion.Show();
diff --git a/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
index b814f0d..090c3be 100644
--- a/sd/source/ui/dlg/tpoption.src
+++ b/sd/source/ui/dlg/tpoption.src
@@ -203,10 +203,18 @@ TabPage TP_OPTIONS_MISC
{
HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE";
Pos = MAP_APPFONT ( 12 , 145 ) ;
- Size = MAP_APPFONT ( 242 , 10 ) ;
+ Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Always with current page" ;
};
+ CheckBox CBX_START_WITH_PRESENTER_SCREEN
+ {
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_PRESENTER_SCREEN";
+ Pos = MAP_APPFONT ( 12 , 145 ) ;
+ Size = MAP_APPFONT ( 116 , 10 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "With Presenter Screen" ;
+ };
FixedLine FT_COMPATIBILITY
{
Pos = MAP_APPFONT ( 6 , 160 ) ;
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 704aabc..1348c89 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -260,6 +260,7 @@ private:
sal_Bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit
sal_Bool bClickChangeRotation : 1; // Misc/RotateClick
sal_Bool bStartWithActualPage : 1; // Misc/Start/CurrentPage
+ sal_Bool bStartWithPresenterScreen : 1; // Misc/Start/PresenterScreen
sal_Bool bSolidDragging : 1; // Misc/ModifyWithAttributes
sal_Bool bSolidMarkHdl : 1; // /Misc/SimpleHandles
sal_Bool bSummationOfParagraphs : 1; // misc/SummationOfParagraphs
@@ -311,6 +312,7 @@ public:
sal_Bool IsDoubleClickTextEdit() const { Init(); return (sal_Bool) bDoubleClickTextEdit; }
sal_Bool IsClickChangeRotation() const { Init(); return (sal_Bool) bClickChangeRotation; }
sal_Bool IsStartWithActualPage() const { Init(); return (sal_Bool) bStartWithActualPage; }
+ sal_Bool IsStartWithPresenterScreen() const { Init(); return (sal_Bool) bStartWithPresenterScreen; }
sal_Bool IsSolidDragging() const { Init(); return (sal_Bool) bSolidDragging; }
sal_Bool IsSolidMarkHdl() const { Init(); return (sal_Bool) bSolidMarkHdl; }
sal_Bool IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
@@ -353,6 +355,7 @@ public:
void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
void SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
void SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
+ void SetStartWithPresenterScreen( sal_Bool bOn = sal_True ) { if( bStartWithPresenterScreen != bOn ) { OptionsChanged(); bStartWithPresenterScreen = bOn; } }
void SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
/** Set the printer independent layout mode.
@param nOn
diff --git a/sd/source/ui/inc/tpoption.hrc b/sd/source/ui/inc/tpoption.hrc
index dd0bff0..de86397 100644
--- a/sd/source/ui/inc/tpoption.hrc
+++ b/sd/source/ui/inc/tpoption.hrc
@@ -89,3 +89,5 @@
#define FT_SCALE 39
#define CB_USE_PRINTER_METRICS 40
+
+#define CBX_START_WITH_PRESENTER_SCREEN 41
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 47f7de9..2be900b 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -117,6 +117,7 @@ private:
MetricField aMtrFldTabstop;
CheckBox aCbxStartWithActualPage;
+ CheckBox aCbxStartWithPresenterScreen;
FixedLine aGrpStartWithActualPage;
FixedLine aTxtCompatibility;
CheckBox aCbxUsePrinterMetrics;
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index d4f13d7..99fa57b 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -60,6 +60,25 @@ using ::rtl::OUString;
namespace sdext { namespace presenter {
namespace {
+
+ static sal_Bool lcl_IsPresenterEnabled(
+ const css::uno::Reference< css::uno::XComponentContext > &rxContext )
+ {
+ sal_Bool bEnabled( sal_True );
+ PresenterConfigurationAccess aConfig(
+ rxContext,
+ A2S( "/org.openoffice.Office.Impress" ),
+ PresenterConfigurationAccess::READ_ONLY );
+ if ( aConfig.IsValid() )
+ {
+ sal_Bool bVal( sal_False );
+ if ( ( aConfig.GetConfigurationNode(
+ A2S( "Misc/Start/PresenterScreen" )) >>= bVal ) )
+ bEnabled = bVal;
+ }
+ return bEnabled;
+ }
+
typedef ::cppu::WeakComponentImplHelper1 <
css::document::XEventListener
> PresenterScreenListenerInterfaceBase;
@@ -168,7 +187,7 @@ Any SAL_CALL PresenterScreenJob::execute(
const beans::NamedValue* p = Arguments.getConstArray();
for (i=0; i<c; ++i)
{
- if (p[i].Name.equalsAscii("Environment"))
+ if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Environment")))
{
p[i].Value >>= lEnv;
break;
@@ -180,7 +199,7 @@ Any SAL_CALL PresenterScreenJob::execute(
p = lEnv.getConstArray();
for (i=0; i<c; ++i)
{
- if (p[i].Name.equalsAscii("Model"))
+ if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model")))
{
p[i].Value >>= xModel;
break;
@@ -188,14 +207,15 @@ Any SAL_CALL PresenterScreenJob::execute(
}
Reference< XServiceInfo > xInfo( xModel, UNO_QUERY );
- if( xInfo.is() && xInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) )
- {
- // Create a new listener that waits for the full screen presentation
- // to start and to end. It takes care of its own lifetime.
- ::rtl::Reference<PresenterScreenListener> pListener (
- new PresenterScreenListener(mxComponentContext, xModel));
- pListener->Initialize();
- }
+ if( !xInfo.is() || !xInfo->supportsService(
+ A2S( "com.sun.star.presentation.PresentationDocument" ) ) )
+ return Any();
+
+ // Create a new listener that waits for the full screen presentation
+ // to start and to end. It takes care of its own lifetime.
+ ::rtl::Reference<PresenterScreenListener> pListener (
+ new PresenterScreenListener(mxComponentContext, xModel));
+ pListener->Initialize();
return Any();
}
@@ -304,8 +324,7 @@ void PresenterScreenListener::ThrowIfDisposed (void) const throw (
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "PresenterScreenListener object has already been disposed")),
+ A2S("PresenterScreenListener object has already been disposed"),
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
@@ -388,6 +407,11 @@ void PresenterScreen::InitializePresenterScreen (void)
try
{
Reference<XComponentContext> xContext (mxContextWeak);
+
+ // Check if disabled by configuration
+ if (!lcl_IsPresenterEnabled(xContext) )
+ return;
+
mpPaneContainer =
new PresenterPaneContainer(Reference<XComponentContext>(xContext));
@@ -541,11 +565,11 @@ sal_Int32 PresenterScreen::GetScreenNumber (
// is set.
PresenterConfigurationAccess aConfiguration (
xContext,
- OUString::createFromAscii("/org.openoffice.Office.PresenterScreen/"),
+ A2S("/org.openoffice.Office.PresenterScreen/"),
PresenterConfigurationAccess::READ_ONLY);
bool bStartAlways (false);
if (aConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/StartAlways")) >>= bStartAlways)
+ A2S("Presenter/StartAlways")) >>= bStartAlways)
{
if (bStartAlways)
return nScreenNumber;
@@ -704,13 +728,13 @@ void PresenterScreen::SetupConfiguration (
{
PresenterConfigurationAccess aConfiguration (
rxContext,
- OUString::createFromAscii("org.openoffice.Office.PresenterScreen"),
+ A2S("org.openoffice.Office.PresenterScreen"),
PresenterConfigurationAccess::READ_ONLY);
maViewDescriptors.clear();
ProcessViewDescriptions(aConfiguration);
- OUString sLayoutName (OUString::createFromAscii("DefaultLayout"));
+ OUString sLayoutName (RTL_CONSTASCII_USTRINGPARAM("DefaultLayout"));
aConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/CurrentLayout")) >>= sLayoutName;
+ A2S("Presenter/CurrentLayout")) >>= sLayoutName;
ProcessLayout(aConfiguration, sLayoutName, rxContext, rxAnchorId);
}
catch (RuntimeException&)
@@ -731,14 +755,14 @@ void PresenterScreen::ProcessLayout (
{
Reference<container::XHierarchicalNameAccess> xLayoutNode (
rConfiguration.GetConfigurationNode(
- OUString::createFromAscii("Presenter/Layouts/")+rsLayoutName),
+ A2S("Presenter/Layouts/") + rsLayoutName),
UNO_QUERY_THROW);
// Read the parent layout first, if one is referenced.
OUString sParentLayout;
rConfiguration.GetConfigurationNode(
xLayoutNode,
- OUString::createFromAscii("ParentLayout")) >>= sParentLayout;
+ A2S("ParentLayout")) >>= sParentLayout;
if (sParentLayout.getLength() > 0)
{
// Prevent infinite recursion.
@@ -750,16 +774,16 @@ void PresenterScreen::ProcessLayout (
Reference<container::XNameAccess> xList (
rConfiguration.GetConfigurationNode(
xLayoutNode,
- OUString::createFromAscii("Layout")),
+ A2S("Layout")),
UNO_QUERY_THROW);
::std::vector<rtl::OUString> aProperties (6);
- aProperties[0] = OUString::createFromAscii("PaneURL");
- aProperties[1] = OUString::createFromAscii("ViewURL");
- aProperties[2] = OUString::createFromAscii("RelativeX");
- aProperties[3] = OUString::createFromAscii("RelativeY");
- aProperties[4] = OUString::createFromAscii("RelativeWidth");
- aProperties[5] = OUString::createFromAscii("RelativeHeight");
+ aProperties[0] = A2S("PaneURL");
+ aProperties[1] = A2S("ViewURL");
+ aProperties[2] = A2S("RelativeX");
+ aProperties[3] = A2S("RelativeY");
+ aProperties[4] = A2S("RelativeWidth");
+ aProperties[5] = A2S("RelativeHeight");
mnComponentIndex = 1;
PresenterConfigurationAccess::ForAll(
xList,
@@ -788,10 +812,10 @@ void PresenterScreen::ProcessViewDescriptions (
UNO_QUERY_THROW);
::std::vector<rtl::OUString> aProperties (4);
- aProperties[0] = OUString::createFromAscii("ViewURL");
- aProperties[1] = OUString::createFromAscii("Title");
- aProperties[2] = OUString::createFromAscii("AccessibleTitle");
- aProperties[3] = OUString::createFromAscii("IsOpaque");
+ aProperties[0] = A2S("ViewURL");
+ aProperties[1] = A2S("Title");
+ aProperties[2] = A2S("AccessibleTitle");
+ aProperties[3] = A2S("IsOpaque");
mnComponentIndex = 1;
PresenterConfigurationAccess::ForAll(
xViewDescriptionsNode,
commit 452d3dfb0eea34aee17d9613e5566fea3be178f1
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Wed Apr 24 19:08:34 2013 +0000
i121873 - Modify service and implementation names to prevent name clashes with the extension
diff --git a/sdext/source/presenter/Jobs.xcu b/sdext/source/presenter/Jobs.xcu
index 99c830b..8bdf0ff 100644
--- a/sdext/source/presenter/Jobs.xcu
+++ b/sdext/source/presenter/Jobs.xcu
@@ -22,9 +22,9 @@
<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="Jobs">
- <node oor:name="onDocumentOpenedJob" oor:op="replace">
+ <node oor:name="com.sun.star.presentation.PresenterScreenJob" oor:op="replace">
<prop oor:name="Service">
- <value>com.sun.star.comp.Draw.framework.PresenterScreenJob</value>
+ <value>com.sun.star.comp.presentation.PresenterScreenJob</value>
</prop>
<prop oor:name="Context">
<value>com.sun.star.presentation.PresentationDocument</value>
@@ -34,7 +34,7 @@
<node oor:name="Events">
<node oor:name="onDocumentOpened" oor:op="fuse">
<node oor:name="JobList">
- <node oor:name="onDocumentOpenedJob" oor:op="replace"/>
+ <node oor:name="com.sun.star.presentation.PresenterScreenJob" oor:op="replace"/>
</node>
</node>
</node>
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index f069d95..a3c851c 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -56,7 +56,7 @@ using ::rtl::OUString;
namespace sdext { namespace presenter {
namespace {
- const static OUString gsProtocol (A2S("vnd.com.sun.star.comp.PresenterScreen:"));
+ const static OUString gsProtocol (A2S("vnd.com.sun.star.presentation.PresenterScreen:"));
class Command
{
@@ -249,7 +249,7 @@ private:
OUString PresenterProtocolHandler::getImplementationName_static (void)
{
- return A2S("vnd.sun.star.sdext.presenter.PresenterProtocolHandler");
+ return A2S("com.sun.star.comp.presentation.PresenterProtocolHandler");
}
diff --git a/sdext/source/presenter/PresenterScreen.component b/sdext/source/presenter/PresenterScreen.component
index ce05881..c7e08cf 100644
--- a/sdext/source/presenter/PresenterScreen.component
+++ b/sdext/source/presenter/PresenterScreen.component
@@ -21,10 +21,10 @@
***********************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.Draw.framework.PresenterScreenJob">
- <service name="com.sun.star.drawing.framework.PresenterScreenJob"/>
+ <implementation name="com.sun.star.comp.presentation.PresenterScreenJob">
+ <service name="com.sun.star.presentation.PresenterScreenJob"/>
</implementation>
- <implementation name="vnd.sun.star.sdext.presenter.PresenterProtocolHandler">
+ <implementation name="com.sun.star.comp.presentation.PresenterProtocolHandler">
<service name="com.sun.star.frame.ProtocolHandler"/>
</implementation>
</component>
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index ebdd2da..d4f13d7 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -104,7 +104,7 @@ namespace {
OUString PresenterScreenJob::getImplementationName_static (void)
{
- return A2S("com.sun.star.comp.Draw.framework.PresenterScreenJob");
+ return A2S("com.sun.star.comp.presentation.PresenterScreenJob");
}
@@ -113,7 +113,7 @@ OUString PresenterScreenJob::getImplementationName_static (void)
Sequence<OUString> PresenterScreenJob::getSupportedServiceNames_static (void)
{
static const ::rtl::OUString sServiceName(
- A2S("com.sun.star.drawing.framework.PresenterScreenJob"));
+ A2S("com.sun.star.presentation.PresenterScreenJob"));
return Sequence<rtl::OUString>(&sServiceName, 1);
}
diff --git a/sdext/source/presenter/ProtocolHandler.xcu b/sdext/source/presenter/ProtocolHandler.xcu
index 6b9ca6c..82b85ba 100644
--- a/sdext/source/presenter/ProtocolHandler.xcu
+++ b/sdext/source/presenter/ProtocolHandler.xcu
@@ -22,9 +22,9 @@
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="ProtocolHandler" oor:package="org.openoffice.Office">
<node oor:name="HandlerSet">
- <node oor:name="vnd.sun.star.sdext.presenter.PresenterProtocolHandler" oor:op="replace">
+ <node oor:name="com.sun.star.comp.presentation.PresenterProtocolHandler" oor:op="replace">
<prop oor:name="Protocols">
- <value>vnd.com.sun.star.comp.PresenterScreen:*</value>
+ <value>vnd.com.sun.star.presentation.PresenterScreen:*</value>
</prop>
</node>
</node>
commit 437add44fdb1ad58673356859fbaa55dc4559845
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Wed Apr 24 19:08:24 2013 +0000
i121872 - Modify service and implementation names to prevent name clashes with the extension
diff --git a/sdext/source/minimizer/PresentationMinimizer.component b/sdext/source/minimizer/PresentationMinimizer.component
index 2a243c2..56a1618 100644
--- a/sdext/source/minimizer/PresentationMinimizer.component
+++ b/sdext/source/minimizer/PresentationMinimizer.component
@@ -21,8 +21,8 @@
***********************************************************-->
<component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.PPPOptimizerImp">
- <service name="com.sun.star.comp.PPPOptimizer"/>
+ <implementation name="com.sun.star.comp.presentation.PresentationOptimizer">
+ <service name="com.sun.star.presentation.PresentationOptimizer"/>
</implementation>
<implementation name="com.sun.star.comp.ui.dialogs.PresentationMinimizerDialog">
<service name="com.sun.star.ui.dialogs.PresentationMinimizerDialog"/>
diff --git a/sdext/source/minimizer/basic.txt b/sdext/source/minimizer/basic.txt
index a5d009b..982236f 100644
--- a/sdext/source/minimizer/basic.txt
+++ b/sdext/source/minimizer/basic.txt
@@ -101,7 +101,7 @@ oDoc = oDesk.loadComponentFromURL( url, "_blank", 0, FileProperties() )
Dim oInitialization( 0 ) as Object
oInitialization(0) = oDoc.getCurrentController.getFrame
-oPPPOptimizerDialog = createUNOservice("com.sun.star.comp.PPPOptimizerImp")
+oPPPOptimizerDialog = createUNOservice("com.sun.star.comp.presentation.PresentationOptimizer")
oPPPOptimizerDialog.initialize( oInitialization )
oPPPOptimizerDialog.dispatch(oURL, oArg)
odoc.dispose
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index c546141..5228513 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -632,11 +632,15 @@ void OptimizerDialog::actionPerformed( const ActionEvent& rEvent )
Sequence< Any > aArgs( 1 );
aArgs[ 0 ] <<= mxFrame;
- Reference < XDispatch > xDispatch( mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- OUString::createFromAscii( "com.sun.star.comp.PPPOptimizer" ), aArgs, mxContext ), UNO_QUERY );
+ Reference < XDispatch > xDispatch(
+ mxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.presentation.PresentationOptimizer" ) ),
+ aArgs, mxContext ),
+ UNO_QUERY );
URL aURL;
- aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.PPPOptimizer:" ) );
+ aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.presentation.PresentationOptimizer:" ) );
aURL.Path = OUString( RTL_CONSTASCII_USTRINGPARAM( "optimize" ) );
Sequence< PropertyValue > lArguments( 3 );
diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx
index 1918675..60121ec 100644
--- a/sdext/source/minimizer/pppoptimizer.cxx
+++ b/sdext/source/minimizer/pppoptimizer.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#define SERVICE_NAME "com.sun.star.comp.PPPOptimizer"
+#define SERVICE_NAME "com.sun.star.presentation.PresentationOptimizer"
using namespace ::com::sun::star::uno;
@@ -105,7 +105,8 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizer::queryDispat
const URL& aURL, const ::rtl::OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
{
Reference < XDispatch > xRet;
- if ( aURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 )
+ if ( aURL.Protocol.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
+ "vnd.com.sun.star.presentation.PresentationOptimizer:" ) ) )
{
// if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
xRet = this;
@@ -136,9 +137,11 @@ void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyV
throw( RuntimeException )
{
OSL_TRACE("PPPOptimizer::dispatch");
- if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 ) )
+ if ( mxController.is() && rURL.Protocol.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM(
+ "vnd.com.sun.star.presentation.PresentationOptimizer:" )))
{
- if ( rURL.Path.compareToAscii( "optimize" ) == 0 )
+ if ( rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("optimize") ) )
{
Reference< XModel > xModel( mxController->getModel() );
if ( xModel.is() )
@@ -193,7 +196,7 @@ sal_Int64 PPPOptimizer::GetFileSize( const rtl::OUString& rURL )
OUString PPPOptimizer_getImplementationName()
{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.PPPOptimizerImp" ) );
+ return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.presentation.PresentationOptimizer" ) );
}
Sequence< OUString > PPPOptimizer_getSupportedServiceNames()
commit 3454d18694e0ddcf9bc71661bf48c37450fa1fab
Author: Armin Le Grand <alg at apache.org>
Date: Wed Apr 24 16:26:20 2013 +0000
i122132 Some simple extensions to exporter
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 2c60a01..abdb992 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -370,6 +370,7 @@ namespace drawinglayer
if(rB2DPolygon.count() && !mnSvtGraphicStrokeCount)
{
+ basegfx::B2DPolygon aLocalPolygon(rB2DPolygon);
basegfx::BColor aStrokeColor;
basegfx::B2DPolyPolygon aStartArrow;
basegfx::B2DPolyPolygon aEndArrow;
@@ -387,29 +388,37 @@ namespace drawinglayer
// SvtGraphicStroke has NO entry for stroke color(!)
mpOutputDevice->SetLineColor(Color(aStrokeColor));
- if(!rB2DPolygon.isClosed())
+ if(!aLocalPolygon.isClosed())
{
double fPolyLength(0.0);
+ double fStart(0.0);
+ double fEnd(0.0);
if(pStart && pStart->isActive())
{
- fPolyLength = basegfx::tools::getLength(rB2DPolygon);
+ fPolyLength = basegfx::tools::getLength(aLocalPolygon);
aStartArrow = basegfx::tools::createAreaGeometryForLineStartEnd(
- rB2DPolygon, pStart->getB2DPolyPolygon(), true, pStart->getWidth(),
- fPolyLength, pStart->isCentered() ? 0.5 : 0.0, 0);
+ aLocalPolygon, pStart->getB2DPolyPolygon(), true, pStart->getWidth(),
+ fPolyLength, pStart->isCentered() ? 0.5 : 0.0, &fStart);
}
if(pEnd && pEnd->isActive())
{
if(basegfx::fTools::equalZero(fPolyLength))
{
- fPolyLength = basegfx::tools::getLength(rB2DPolygon);
+ fPolyLength = basegfx::tools::getLength(aLocalPolygon);
}
aEndArrow = basegfx::tools::createAreaGeometryForLineStartEnd(
- rB2DPolygon, pEnd->getB2DPolyPolygon(), false, pEnd->getWidth(),
- fPolyLength, pEnd->isCentered() ? 0.5 : 0.0, 0);
+ aLocalPolygon, pEnd->getB2DPolyPolygon(), false, pEnd->getWidth(),
+ fPolyLength, pEnd->isCentered() ? 0.5 : 0.0, &fEnd);
+ }
+
+ if(0.0 != fStart || 0.0 != fEnd)
+ {
+ // build new poly, consume something from old poly
+ aLocalPolygon = basegfx::tools::getSnippetAbsolute(aLocalPolygon, fStart, fPolyLength - fEnd, fPolyLength);
}
}
@@ -490,14 +499,12 @@ namespace drawinglayer
// concept of PDF export and SvtGraphicStroke usage does simply not
// allow handling such definitions. The only clean way would be to
// add the transformation to SvtGraphicStroke and to handle it there
- basegfx::B2DPolygon aB2DPolygon(rB2DPolygon);
-
- aB2DPolygon.transform(maCurrentTransformation);
+ aLocalPolygon.transform(maCurrentTransformation);
aStartArrow.transform(maCurrentTransformation);
aEndArrow.transform(maCurrentTransformation);
pRetval = new SvtGraphicStroke(
- Polygon(aB2DPolygon),
+ Polygon(aLocalPolygon),
PolyPolygon(aStartArrow),
PolyPolygon(aEndArrow),
mfCurrentUnifiedTransparence,
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 27dc8bf..416020c 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1280,6 +1280,14 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( rPoly.GetSize() )
{
+ const LineInfo& rLineInfo = pA->GetLineInfo();
+
+ if(rLineInfo.GetWidth())
+ {
+ sal_Int32 nStrokeWidth = ImplMap(rLineInfo.GetWidth());
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStrokeWidth, ::rtl::OUString::valueOf( nStrokeWidth ) );
+ }
+
mpContext->AddPaintAttr( mpVDev->GetLineColor(), Color( COL_TRANSPARENT ) );
ImplWritePolyPolygon( rPoly, sal_True );
}
@@ -1550,83 +1558,109 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
aStroke.getEndArrow( aEndArrow );
// Currently no support for strokes with start/end arrow(s)
- sal_Bool bSkip = ( !aStartArrow.Count() && !aEndArrow.Count() );
+ // added that support
+ Polygon aPoly;
- if( bSkip )
+ aStroke.getPath(aPoly);
+
+ if(mapCurShape.get())
{
- Polygon aPoly;
+ if(1 != mapCurShape->maShapePolyPoly.Count()
+ || !mapCurShape->maShapePolyPoly[0].IsEqual(aPoly))
+ {
+ // this path action is not covering the same path than the already existing
+ // fill polypolygon, so write out the fill polygon
+ ImplWriteShape( *mapCurShape );
+ mapCurShape.reset();
+ }
+ }
- aStroke.getPath(aPoly);
+ if( !mapCurShape.get() )
+ {
- if(mapCurShape.get())
+ mapCurShape.reset( new SVGShapeDescriptor );
+
+ if( pElementId )
{
- if(1 != mapCurShape->maShapePolyPoly.Count()
- || !mapCurShape->maShapePolyPoly[0].IsEqual(aPoly))
- {
- // this path action is not covering the same path than the already existing
- // fill polypolygon, so write out the fill polygon
- ImplWriteShape( *mapCurShape );
- mapCurShape.reset();
- }
+ mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
}
- if( !mapCurShape.get() )
- {
+ mapCurShape->maShapePolyPoly = aPoly;
+ }
- mapCurShape.reset( new SVGShapeDescriptor );
+ mapCurShape->maShapeLineColor = mpVDev->GetLineColor();
+ mapCurShape->maShapeLineColor.SetTransparency( (sal_uInt8) FRound( aStroke.getTransparency() * 255.0 ) );
+ mapCurShape->mnStrokeWidth = FRound( aStroke.getStrokeWidth() );
+ aStroke.getDashArray( mapCurShape->maDashArray );
- if( pElementId )
- {
- mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
- }
+ // added support for LineJoin
+ switch(aStroke.getJoinType())
+ {
+ default: /* SvtGraphicStroke::joinMiter, SvtGraphicStroke::joinNone */
+ {
+ mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER;
+ break;
+ }
+ case SvtGraphicStroke::joinRound:
+ {
+ mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_ROUND;
+ break;
+ }
+ case SvtGraphicStroke::joinBevel:
+ {
+ mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_BEVEL;
+ break;
+ }
+ }
- mapCurShape->maShapePolyPoly = aPoly;
+ // added support for LineCap
+ switch(aStroke.getCapType())
+ {
+ default: /* SvtGraphicStroke::capButt */
+ {
+ mapCurShape->maLineCap = com::sun::star::drawing::LineCap_BUTT;
+ break;
+ }
+ case SvtGraphicStroke::capRound:
+ {
+ mapCurShape->maLineCap = com::sun::star::drawing::LineCap_ROUND;
+ break;
+ }
+ case SvtGraphicStroke::capSquare:
+ {
+ mapCurShape->maLineCap = com::sun::star::drawing::LineCap_SQUARE;
+ break;
}
+ }
+
+ if(mapCurShape.get() &&(aStartArrow.Count() || aEndArrow.Count()))
+ {
+ ImplWriteShape( *mapCurShape );
- mapCurShape->maShapeLineColor = mpVDev->GetLineColor();
- mapCurShape->maShapeLineColor.SetTransparency( (sal_uInt8) FRound( aStroke.getTransparency() * 255.0 ) );
- mapCurShape->mnStrokeWidth = FRound( aStroke.getStrokeWidth() );
- aStroke.getDashArray( mapCurShape->maDashArray );
+ mapCurShape->maShapeFillColor = mapCurShape->maShapeLineColor;
+ mapCurShape->maShapeLineColor = Color(COL_TRANSPARENT);
+ mapCurShape->mnStrokeWidth = 0;
+ mapCurShape->maDashArray.clear();
+ mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER;
+ mapCurShape->maLineCap = com::sun::star::drawing::LineCap_BUTT;
- // added support for LineJoin
- switch(aStroke.getJoinType())
+ if(aStartArrow.Count())
{
- default: /* SvtGraphicStroke::joinMiter, SvtGraphicStroke::joinNone */
- {
- mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_MITER;
- break;
- }
- case SvtGraphicStroke::joinRound:
- {
- mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_ROUND;
- break;
- }
- case SvtGraphicStroke::joinBevel:
- {
- mapCurShape->maLineJoin = basegfx::B2DLINEJOIN_BEVEL;
- break;
- }
+ mapCurShape->maShapePolyPoly = aStartArrow;
+ mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
+
+ ImplWriteShape( *mapCurShape );
}
- // added support for LineCap
- switch(aStroke.getCapType())
+ if(aEndArrow.Count())
{
- default: /* SvtGraphicStroke::capButt */
- {
- mapCurShape->maLineCap = com::sun::star::drawing::LineCap_BUTT;
- break;
- }
- case SvtGraphicStroke::capRound:
- {
- mapCurShape->maLineCap = com::sun::star::drawing::LineCap_ROUND;
- break;
- }
- case SvtGraphicStroke::capSquare:
- {
- mapCurShape->maLineCap = com::sun::star::drawing::LineCap_SQUARE;
- break;
- }
+ mapCurShape->maShapePolyPoly = aEndArrow;
+ mapCurShape->maId = *pElementId + B2UCONST("_") + ::rtl::OUString::valueOf(nEntryCount++);
+
+ ImplWriteShape( *mapCurShape );
}
+
+ mapCurShape.reset();
}
// write open shape in every case
@@ -1637,6 +1671,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
// skip rest of comment
+ sal_Bool bSkip = true;
+
while( bSkip && ( ++nCurAction < nCount ) )
{
pAction = rMtf.GetAction( nCurAction );
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index b1e9497..56bccb1 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -4104,20 +4104,34 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
{
SvtGraphicStroke aStroke;
aMemStm >> aStroke;
+
Polygon aPath;
aStroke.getPath( aPath );
aPath.Move( nXMove, nYMove );
aStroke.setPath( aPath );
+
+ PolyPolygon aStartArrow;
+ aStroke.getStartArrow(aStartArrow);
+ aStartArrow.Move(nXMove, nYMove);
+ aStroke.setStartArrow(aStartArrow);
+
+ PolyPolygon aEndArrow;
+ aStroke.getEndArrow(aEndArrow);
+ aEndArrow.Move(nXMove, nYMove);
+ aStroke.setEndArrow(aEndArrow);
+
aDest << aStroke;
}
else
{
SvtGraphicFill aFill;
aMemStm >> aFill;
+
PolyPolygon aPath;
aFill.getPath( aPath );
aPath.Move( nXMove, nYMove );
aFill.setPath( aPath );
+
aDest << aFill;
}
delete[] mpData;
commit cc9eaeaaa2ab279db0bf9a8fa63034333dbdaae3
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Wed Apr 24 14:24:02 2013 +0000
122074: paragraph property panel - correct enable/disable of indentation increase/descrease controls
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 5de6fba..a9276ab 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -1292,9 +1292,9 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
maTbxIndent_IncDec->Enable();
maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_True);
- if(maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text)
- && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default)
- && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table))
+ if ( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text)
+ && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default)
+ && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table) )
{
maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_True);
maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_True);
@@ -1419,27 +1419,20 @@ void ParaPropertyPanel::StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eS
void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- if (nSID==SID_INC_INDENT)
+ if ( ( maContext.GetCombinedContext() == CombinedEnumContext(Application_Writer, Context_Text)
+ || maContext.GetCombinedContext() == CombinedEnumContext(Application_Writer, Context_Default)
+ || maContext.GetCombinedContext() == CombinedEnumContext(Application_Writer, Context_Table) )
+ && ( nSID == SID_INC_INDENT || nSID == SID_DEC_INDENT ) )
{
- if( pState && eState == SFX_ITEM_UNKNOWN )
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_True);
- else
- if( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text) &&
- maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default) &&
- maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table) )
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_False);
- }
- if (nSID==SID_DEC_INDENT)
- {
- if( pState && eState == SFX_ITEM_UNKNOWN )
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_True);
- else
- if( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text) &&
- maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default) &&
- maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table) )
- maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_False);
+ // Writer's text shell is the only one which provides reasonable states for Slots SID_INC_INDENT and SID_DEC_INDENT
+ // - namely SFX_ITEM_UNKNOWN and SFX_ITEM_DISABLED
+ maTbxIndent_IncDec->EnableItem(
+ nSID == SID_INC_INDENT ? BT_TBX_INDENT_INC : BT_TBX_INDENT_DEC,
+ ( pState && eState == SFX_ITEM_UNKNOWN ) ? sal_True : sal_False );
}
}
+
+
// Add toggle state for numbering and bullet icons
void ParaPropertyPanel::StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
commit 81e9ede3e748a40555e87efd1af19521dab5261d
Author: Armin Le Grand <alg at apache.org>
Date: Wed Apr 24 14:18:22 2013 +0000
i122121 moded automatic StartEnd adaption to svx
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cea20a0..5c8467e 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -174,135 +174,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( rReq.GetArgs() )
{
- sal_Bool bMergeUndo = sal_False;
- ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
-
- // Anpassungen Start/EndWidth #63083#
- if(nSId == SID_ATTR_LINE_WIDTH)
- {
- SdrObject* pObj = NULL;
- const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- sal_uLong nCount = rMarkList.GetMarkCount();
- const sal_Int32 nNewLineWidth(((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue());
- const bool bUndo(mpDrawView->IsUndoEnabled());
-
- for (sal_uLong i=0; i<nCount; i++)
- {
- SfxItemSet aAttr(GetDoc()->GetPool());
- pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
- aAttr.Put(pObj->GetMergedItemSet());
-
- sal_Int32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
-
- if(nActLineWidth != nNewLineWidth)
- {
- sal_Bool bSetItemSet(sal_False);
-
- // #86265# do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET
- if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINESTARTWIDTH))
- {
- sal_Int32 nValAct = ((const XLineStartWidthItem&)aAttr.Get(XATTR_LINESTARTWIDTH)).GetValue();
- sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
- if(nValNew < 0)
- nValNew = 0;
- bSetItemSet = sal_True;
- aAttr.Put(XLineStartWidthItem(nValNew));
- }
-
- // #86265# do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET
- if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINEENDWIDTH))
- {
- sal_Int32 nValAct = ((const XLineEndWidthItem&)aAttr.Get(XATTR_LINEENDWIDTH)).GetValue();
- sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
- if(nValNew < 0)
- nValNew = 0;
- bSetItemSet = sal_True;
- aAttr.Put(XLineEndWidthItem(nValNew));
- }
-
- if(bSetItemSet)
- {
- if(bUndo)
- {
- if(!bMergeUndo)
- {
- pUndoManager->EnterListAction( String(), String() );
- mpDrawView->BegUndo();
- bMergeUndo = sal_True;
- }
-
- mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
- }
-
- pObj->SetMergedItemSet(aAttr);
- }
- }
- }
-
- if(bMergeUndo)
- {
- mpDrawView->EndUndo();
- }
- }
-
- if (nSId == SID_ATTR_FILL_SHADOW)
- {
- // Ggf. werden transparente Objekte wei?gefuellt
- SdrObject* pObj = NULL;
- const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- sal_uLong nCount = rMarkList.GetMarkCount();
- const bool bUndo = mpDrawView->IsUndoEnabled();
-
- for (sal_uLong i=0; i<nCount; i++)
- {
- SfxItemSet aAttr(GetDoc()->GetPool());
- pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
-
- // #i25616#
- if(!pObj->ISA(SdrGrafObj))
- {
- aAttr.Put(pObj->GetMergedItemSet());
-
- const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE);
- const XLineStyleItem& rLineStyle = (const XLineStyleItem&) aAttr.Get(XATTR_LINESTYLE);
-
- if(XFILL_NONE == rFillStyle.GetValue() && XLINE_NONE == rLineStyle.GetValue())
- {
- if( bUndo )
- {
- // Vorlage hat keine Fuellung,
- // daher hart attributieren: Fuellung setzen
- if (!bMergeUndo)
- {
- bMergeUndo = sal_True;
- pUndoManager->EnterListAction( String(), String() );
- mpDrawView->BegUndo();
- }
-
- mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
- }
-
- aAttr.Put(XFillStyleItem(XFILL_SOLID));
- aAttr.Put(XFillColorItem(String(), COL_WHITE));
-
- pObj->SetMergedItemSet(aAttr);
- }
- }
- }
-
- if (bMergeUndo)
- {
- mpDrawView->EndUndo();
- }
- }
-
mpDrawView->SetAttributes(*rReq.GetArgs());
-
- if (bMergeUndo)
- {
- pUndoManager->LeaveListAction();
- }
-
rReq.Done();
}
else
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 4d7e66c..00f9d95 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -58,6 +58,9 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <svx/AffineMatrixItem.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <svx/xlnwtit.hxx>
+#include <svx/xlnstwit.hxx>
+#include <svx/xlnedwit.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1053,6 +1056,16 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
// #i38135#
bool bResetAnimationTimer(false);
+ // check if LineWidth is part of the change
+ const bool bLineWidthChange(SFX_ITEM_SET == aAttr.GetItemState(XATTR_LINEWIDTH));
+ sal_Int32 nNewLineWidth(0);
+ sal_Int32 nOldLineWidth(0);
+
+ if(bLineWidthChange)
+ {
+ nNewLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
+ }
+
for (sal_uIntPtr nm=0; nm<nMarkAnz; nm++)
{
SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -1097,9 +1110,38 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
}
+ if(bLineWidthChange)
+ {
+ nOldLineWidth = ((const XLineWidthItem&)pObj->GetMergedItem(XATTR_LINEWIDTH)).GetValue();
+ }
+
// set attributes at object
pObj->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
+ if(bLineWidthChange)
+ {
+ const SfxItemSet& rSet = pObj->GetMergedItemSet();
+
+ if(nOldLineWidth != nNewLineWidth)
+ {
+ if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINESTARTWIDTH))
+ {
+ const sal_Int32 nValAct(((const XLineStartWidthItem&)rSet.Get(XATTR_LINESTARTWIDTH)).GetValue());
+ const sal_Int32 nValNewStart(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
+
+ pObj->SetMergedItem(XLineStartWidthItem(nValNewStart));
+ }
+
+ if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINEENDWIDTH))
+ {
+ const sal_Int32 nValAct(((const XLineEndWidthItem&)rSet.Get(XATTR_LINEENDWIDTH)).GetValue());
+ const sal_Int32 nValNewEnd(std::max((sal_Int32)0, nValAct + (((nNewLineWidth - nOldLineWidth) * 15) / 10)));
+
+ pObj->SetMergedItem(XLineEndWidthItem(nValNewEnd));
+ }
+ }
+ }
+
if(pObj->ISA(SdrTextObj))
{
SdrTextObj* pTextObj = ((SdrTextObj*)pObj);
commit 8120312665d94223a1e506fb6f46d2e0e9bc30ad
Author: Armin Le Grand <alg at apache.org>
Date: Wed Apr 24 12:03:20 2013 +0000
i122121 Adapted ScDrawShell::GetDrawAttrState
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index a7414af..d697b79 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -307,23 +307,12 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
if( bHasMarked )
{
- rSet.Put( pDrView->GetAttrFromMarked(sal_False) );
-
- // Wenn die View selektierte Objekte besitzt, muessen entspr. Items
- // von SFX_ITEM_DEFAULT (_ON) auf SFX_ITEM_DISABLED geaendert werden
-
- SfxWhichIter aIter( rSet, XATTR_LINE_FIRST, XATTR_FILL_LAST );
- sal_uInt16 nWhich = aIter.FirstWhich();
- while( nWhich )
- {
- if( SFX_ITEM_DEFAULT == rSet.GetItemState( nWhich ) )
- rSet.DisableItem( nWhich );
-
- nWhich = aIter.NextWhich();
- }
+ rSet.Put( pDrView->GetAttrFromMarked(sal_False), false );
}
else
+ {
rSet.Put( pDrView->GetDefaultAttr() );
+ }
SdrPageView* pPV = pDrView->GetSdrPageView();
if ( pPV )
commit 76e55d0f6effee49090d1e931c372671ec184123
Author: Armin Le Grand <alg at apache.org>
Date: Wed Apr 24 09:50:54 2013 +0000
i122111 Adapted pState usages in NotifyItemUpdate methods; adapted control positioning in PosSizePanel
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index e926438..9d95c4c 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -97,10 +97,6 @@ AreaPropertyPanel::AreaPropertyPanel(
mpFillGradientItem(),
mpHatchItem(),
mpBitmapItem(),
- mpColorTableItem(),
- mpGradientListItem(),
- mpHatchListItem(),
- mpBitmapListItem(),
maStyleControl(SID_ATTR_FILL_STYLE, *pBindings, *this),
maColorControl(SID_ATTR_FILL_COLOR, *pBindings, *this),
maGradientControl(SID_ATTR_FILL_GRADIENT, *pBindings, *this),
@@ -134,7 +130,6 @@ AreaPropertyPanel::AreaPropertyPanel(
mpTransparanceItem(),
mxFrame(rxFrame),
mpBindings(pBindings),
- mbTBShow(true),
mbColorAvail(true)
{
Initialize();
@@ -280,151 +275,156 @@ void AreaPropertyPanel::Initialize()
IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
- XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
+ const XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
- if( (XFillStyle) meLastXFS != eXFS )
+ if((XFillStyle)meLastXFS != eXFS)
{
- mpLbFillAttr->Clear();
- SfxObjectShell* pSh = SfxObjectShell::Current();
- XFillStyleItem aXFillStyleItem( eXFS );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
+ mpLbFillAttr->Clear();
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ const XFillStyleItem aXFillStyleItem(eXFS);
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
- switch( eXFS )
- {
+ switch( eXFS )
+ {
case XFILL_NONE:
- {
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- mpLbFillType->Selected();
- mpLbFillAttr->Disable();
- }
+ {
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+ mpLbFillType->Selected();
+ mpLbFillAttr->Disable();
break;
-
+ }
case XFILL_SOLID:
- {
- mpLbFillAttr->Hide();
- mpToolBoxColor->Show();
- mbTBShow = true;
- String aTmpStr;
- Color aColor = maLastColor;
- XFillColorItem aXFillColorItem( aTmpStr, aColor );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
- }
+ {
+ mpLbFillAttr->Hide();
+ mpToolBoxColor->Show();
+ const String aTmpStr;
+ const Color aColor = maLastColor;
+ const XFillColorItem aXFillColorItem( aTmpStr, aColor );
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
break;
-
+ }
case XFILL_GRADIENT:
+ {
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(pSh && pSh->GetItem(SID_GRADIENT_LIST))
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if ( pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+ if(!mpLbFillAttr->GetEntryCount())
{
- if(mpLbFillAttr->GetEntryCount() == 0)
- {
- SvxGradientListItem aItem( *(const SvxGradientListItem*)(
- pSh->GetItem( SID_GRADIENT_LIST ) ) );
- mpLbFillAttr->Enable();
- mpLbFillAttr->Clear();
- mpLbFillAttr->Fill( aItem.GetGradientList() );
- }
+ const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+ mpLbFillAttr->Enable();
+ mpLbFillAttr->Clear();
+ mpLbFillAttr->Fill(aItem.GetGradientList());
+ }
+
+ mpLbFillAttr->AdaptDropDownLineCountToMaximum();
- mpLbFillAttr->AdaptDropDownLineCountToMaximum();
+ if(LISTBOX_ENTRY_NOTFOUND != mnLastPosGradient)
+ {
+ const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
- if ( mnLastPosGradient != LISTBOX_ENTRY_NOTFOUND)
+ if(mnLastPosGradient < aItem.GetGradientList()->Count())
{
- SvxGradientListItem aItem( *(const SvxGradientListItem*)( pSh->GetItem( SID_GRADIENT_LIST ) ) );
- if ( mnLastPosGradient < aItem.GetGradientList()->Count() )
- {
- XGradient aGradient = aItem.GetGradientList()->GetGradient( mnLastPosGradient )->GetGradient();
- XFillGradientItem aXFillGradientItem( mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
- mpLbFillAttr->SelectEntryPos(mnLastPosGradient); //add
- }
+ const XGradient aGradient = aItem.GetGradientList()->GetGradient(mnLastPosGradient)->GetGradient();
+ const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient);
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+ mpLbFillAttr->SelectEntryPos(mnLastPosGradient);
}
}
- else
- mpLbFillAttr->Disable();
+ }
+ else
+ {
+ mpLbFillAttr->Disable();
}
break;
-
+ }
case XFILL_HATCH:
+ {
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(pSh && pSh->GetItem(SID_HATCH_LIST))
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if ( pSh && pSh->GetItem( SID_HATCH_LIST ) )
+ if(!mpLbFillAttr->GetEntryCount())
{
- if(mpLbFillAttr->GetEntryCount() == 0)
- {
- SvxHatchListItem aItem( *(const SvxHatchListItem*)(
- pSh->GetItem( SID_HATCH_LIST ) ) );
- mpLbFillAttr->Enable();
- mpLbFillAttr->Clear();
- mpLbFillAttr->Fill( aItem.GetHatchList() );
- }
+ const SvxHatchListItem aItem( *(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+ mpLbFillAttr->Enable();
+ mpLbFillAttr->Clear();
+ mpLbFillAttr->Fill(aItem.GetHatchList());
+ }
- mpLbFillAttr->AdaptDropDownLineCountToMaximum();
+ mpLbFillAttr->AdaptDropDownLineCountToMaximum();
- if ( mnLastPosHatch != LISTBOX_ENTRY_NOTFOUND )
+ if(LISTBOX_ENTRY_NOTFOUND != mnLastPosHatch)
+ {
+ const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+
+ if(mnLastPosHatch < aItem.GetHatchList()->Count())
{
- SvxHatchListItem aItem( *(const SvxHatchListItem*)( pSh->GetItem( SID_HATCH_LIST ) ) );
- if ( mnLastPosHatch < aItem.GetHatchList()->Count() )
- {
- XHatch aHatch = aItem.GetHatchList()->GetHatch( mnLastPosHatch )->GetHatch();
- XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
- mpLbFillAttr->SelectEntryPos(mnLastPosHatch); //add
- }
+ const XHatch aHatch = aItem.GetHatchList()->GetHatch(mnLastPosHatch)->GetHatch();
+ const XFillHatchItem aXFillHatchItem(mpLbFillAttr->GetSelectEntry(), aHatch);
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+ mpLbFillAttr->SelectEntryPos(mnLastPosHatch);
}
}
- else
- mpLbFillAttr->Disable();
+ }
+ else
+ {
+ mpLbFillAttr->Disable();
}
break;
-
+ }
case XFILL_BITMAP:
+ {
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(pSh && pSh->GetItem(SID_BITMAP_LIST))
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if ( pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+ if(!mpLbFillAttr->GetEntryCount())
{
- if(mpLbFillAttr->GetEntryCount() == 0)
- {
- SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
- pSh->GetItem( SID_BITMAP_LIST ) ) );
- mpLbFillAttr->Enable();
- mpLbFillAttr->Clear();
- mpLbFillAttr->Fill( aItem.GetBitmapList() );
- }
+ const SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+ mpLbFillAttr->Enable();
+ mpLbFillAttr->Clear();
+ mpLbFillAttr->Fill(aItem.GetBitmapList());
+ }
- mpLbFillAttr->AdaptDropDownLineCountToMaximum();
+ mpLbFillAttr->AdaptDropDownLineCountToMaximum();
+
+ if(LISTBOX_ENTRY_NOTFOUND != mnLastPosBitmap)
+ {
+ const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
- if ( mnLastPosBitmap != LISTBOX_ENTRY_NOTFOUND )
+ if(mnLastPosBitmap < aItem.GetBitmapList()->Count())
{
- SvxBitmapListItem aItem( *(const SvxBitmapListItem*)( pSh->GetItem( SID_BITMAP_LIST ) ) );
- if ( mnLastPosBitmap < aItem.GetBitmapList()->Count() )
- {
- const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(mnLastPosBitmap);
- XFillBitmapItem aXFillBitmapItem( mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject() );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
- mpLbFillAttr->SelectEntryPos(mnLastPosBitmap); //add
- }
+ const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(mnLastPosBitmap);
+ const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+ mpLbFillAttr->SelectEntryPos(mnLastPosBitmap);
}
}
- else
- mpLbFillAttr->Disable();
+ }
+ else
+ {
+ mpLbFillAttr->Disable();
}
break;
}
- meLastXFS = (sal_uInt16)eXFS;
- if( eXFS != XFILL_NONE )
+ }
+
+ meLastXFS = (sal_uInt16)eXFS;
+
+ if(XFILL_NONE != eXFS)
+ {
+ if(pToolBox)
{
- if ( pToolBox )
- mpLbFillType->Selected();
+ mpLbFillType->Selected();
}
+ }
}
+
return 0;
}
@@ -432,20 +432,20 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
{
- XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
- XFillStyleItem aXFillStyleItem( eXFS );
+ const XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos();
+ const XFillStyleItem aXFillStyleItem(eXFS);
SfxObjectShell* pSh = SfxObjectShell::Current();
if(pToolBox)
{
- if( (XFillStyle) meLastXFS != eXFS )
+ if((XFillStyle) meLastXFS != eXFS)
{
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L); //Added 20090909
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
}
- switch( eXFS )
+ switch(eXFS)
{
- case XFILL_SOLID:
+ case XFILL_SOLID:
//{
// //String aTmpStr = mpLbFillAttr->GetSelectEntry();
// //Color aColor = mpLbFillAttr->GetSelectEntryColor();
@@ -458,88 +458,111 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
//}
break;
- case XFILL_GRADIENT:
+ case XFILL_GRADIENT:
{
sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
- if( nPos == LISTBOX_ENTRY_NOTFOUND )
+
+ if(LISTBOX_ENTRY_NOTFOUND == nPos)
+ {
nPos = mnLastPosGradient;
+ }
- if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+ if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_GRADIENT_LIST))
{
- SvxGradientListItem aItem( *(const SvxGradientListItem*)( pSh->GetItem( SID_GRADIENT_LIST ) ) );
- if ( nPos < aItem.GetGradientList()->Count() )
+ const SvxGradientListItem aItem(*(const SvxGradientListItem*)(pSh->GetItem(SID_GRADIENT_LIST)));
+
+ if(nPos < aItem.GetGradientList()->Count())
{
- XGradient aGradient = aItem.GetGradientList()->GetGradient( nPos )->GetGradient();
- XFillGradientItem aXFillGradientItem( mpLbFillAttr->GetSelectEntry(), aGradient );
+ const XGradient aGradient = aItem.GetGradientList()->GetGradient(nPos)->GetGradient();
+ const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient);
GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
}
}
- if(nPos != LISTBOX_ENTRY_NOTFOUND)
+
+ if(LISTBOX_ENTRY_NOTFOUND != nPos)
+ {
mnLastPosGradient = nPos;
+ }
+ break;
}
- break;
-
- case XFILL_HATCH:
+ case XFILL_HATCH:
{
sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
- if( nPos == LISTBOX_ENTRY_NOTFOUND )
+
+ if(LISTBOX_ENTRY_NOTFOUND == nPos)
+ {
nPos = mnLastPosHatch;
- if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_HATCH_LIST ) )
+ }
+
+ if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_HATCH_LIST))
{
- SvxHatchListItem aItem( *(const SvxHatchListItem*)( pSh->GetItem( SID_HATCH_LIST ) ) );
- if ( nPos < aItem.GetHatchList()->Count() )
+ const SvxHatchListItem aItem(*(const SvxHatchListItem*)(pSh->GetItem(SID_HATCH_LIST)));
+
+ if(nPos < aItem.GetHatchList()->Count())
{
- XHatch aHatch = aItem.GetHatchList()->GetHatch( nPos )->GetHatch();
- XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch );
+ const XHatch aHatch = aItem.GetHatchList()->GetHatch(nPos)->GetHatch();
+ const XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch);
GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
}
}
- if(nPos != LISTBOX_ENTRY_NOTFOUND)
+
+ if(LISTBOX_ENTRY_NOTFOUND != nPos)
+ {
mnLastPosHatch = nPos;
+ }
+ break;
}
- break;
-
- case XFILL_BITMAP:
+ case XFILL_BITMAP:
{
sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
- if( nPos == LISTBOX_ENTRY_NOTFOUND )
+
+ if(LISTBOX_ENTRY_NOTFOUND == nPos)
+ {
nPos = mnLastPosBitmap;
- if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+ }
+
+ if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_BITMAP_LIST))
{
- SvxBitmapListItem aItem( *(const SvxBitmapListItem*)( pSh->GetItem( SID_BITMAP_LIST ) ) );
- if ( nPos < aItem.GetBitmapList()->Count() )
+ const SvxBitmapListItem aItem(*(const SvxBitmapListItem*)(pSh->GetItem(SID_BITMAP_LIST)));
+
+ if(nPos < aItem.GetBitmapList()->Count())
{
const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos);
- XFillBitmapItem aXFillBitmapItem( mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject() );
+ const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
}
}
- if(nPos != LISTBOX_ENTRY_NOTFOUND)
+
+ if(LISTBOX_ENTRY_NOTFOUND != nPos)
+ {
mnLastPosBitmap = nPos;
+ }
+ break;
}
- break;
-
- default:
- break;
+ default: break;
}
}
+
return 0;
}
-//add for color picker
-
IMPL_LINK(AreaPropertyPanel, ToolBoxColorDropHdl, ToolBox*, pToolBox)
{
- sal_uInt16 nId = pToolBox->GetCurItemId();
+ const sal_uInt16 nId = pToolBox->GetCurItemId();
- if(nId == TBI_COLOR)
+ if(TBI_COLOR == nId)
{
maColorPopup.Show(*pToolBox);
+
if (mpColorItem)
+ {
maColorPopup.SetCurrentColor(mpColorItem->GetColorValue(), mbColorAvail);
+ }
else
+ {
maColorPopup.SetCurrentColor(COL_WHITE, false);
+ }
}
return 0;
@@ -551,7 +574,7 @@ void AreaPropertyPanel::SetColor (
const String& rsColorName,
const Color aColor)
{
- XFillColorItem aXFillColorItem (rsColorName, aColor);
+ const XFillColorItem aXFillColorItem(rsColorName, aColor);
mpBindings->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
maLastColor = aColor;
}
@@ -629,7 +652,7 @@ void AreaPropertyPanel::DataChanged(
void AreaPropertyPanel::ImpUpdateTransparencies()
{
- if(mpTransparanceItem.get() || mpFloatTransparenceItem.get())
+ if(mpTransparanceItem.get() && mpFloatTransparenceItem.get())
{
bool bZeroValue(false);
@@ -751,313 +774,338 @@ void AreaPropertyPanel::NotifyItemUpdate(
const bool bIsEnabled)
{
(void)bIsEnabled;
+ const bool bDisabled(SFX_ITEM_DISABLED == eState);
- XFillStyle eXFS;
- SfxObjectShell* pSh = SfxObjectShell::Current();
- bool bFillTransparenceChanged(false);
-
- if(SID_ATTR_FILL_TRANSPARENCE == nSID)
+ switch(nSID)
{
- bFillTransparenceChanged = true;
-
- if(eState >= SFX_ITEM_AVAILABLE)
+ case SID_ATTR_FILL_TRANSPARENCE:
+ case SID_ATTR_FILL_FLOATTRANSPARENCE:
{
- const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState);
+ bool bFillTransparenceChanged(false);
- if(pItem && (!mpTransparanceItem || *pItem != *mpTransparanceItem))
+ if(SID_ATTR_FILL_TRANSPARENCE == nSID)
{
- mpTransparanceItem.reset((SfxUInt16Item*)pItem->Clone());
+ bFillTransparenceChanged = true;
+
+ if(eState >= SFX_ITEM_AVAILABLE)
+ {
+ const SfxUInt16Item* pItem = dynamic_cast< const SfxUInt16Item* >(pState);
+
+ if(pItem && (!mpTransparanceItem || *pItem != *mpTransparanceItem))
+ {
+ mpTransparanceItem.reset((SfxUInt16Item*)pItem->Clone());
+ }
+ else
+ {
+ mpTransparanceItem.reset();
+ }
+ }
+ else
+ {
+ mpTransparanceItem.reset();
+ }
}
- else
+ else // if(SID_ATTR_FILL_FLOATTRANSPARENCE == nSID)
{
- mpTransparanceItem.reset();
- }
- }
- else
- {
- mpTransparanceItem.reset();
- }
- }
- else if(SID_ATTR_FILL_FLOATTRANSPARENCE == nSID)
- {
- bFillTransparenceChanged = true;
+ bFillTransparenceChanged = true;
- if(eState >= SFX_ITEM_AVAILABLE)
- {
- const XFillFloatTransparenceItem* pItem = dynamic_cast< const XFillFloatTransparenceItem* >(pState);
+ if(eState >= SFX_ITEM_AVAILABLE)
+ {
+ const XFillFloatTransparenceItem* pItem = dynamic_cast< const XFillFloatTransparenceItem* >(pState);
- if(pItem && (!mpFloatTransparenceItem || *pItem != *mpFloatTransparenceItem))
- {
- mpFloatTransparenceItem.reset((XFillFloatTransparenceItem*)pItem->Clone());
+ if(pItem && (!mpFloatTransparenceItem || *pItem != *mpFloatTransparenceItem))
+ {
+ mpFloatTransparenceItem.reset((XFillFloatTransparenceItem*)pItem->Clone());
+ }
+ else
+ {
+ mpFloatTransparenceItem.reset();
+ }
+ }
+ else
+ {
+ mpFloatTransparenceItem.reset();
+ }
}
- else
+
+ if(bFillTransparenceChanged)
{
- mpFloatTransparenceItem.reset();
+ // update transparency settings dependent of mpTransparanceItem and mpFloatTransparenceItem
+ ImpUpdateTransparencies();
}
+ break;
}
- else
- {
- mpFloatTransparenceItem.reset();
- }
- }
-
- if(bFillTransparenceChanged)
- {
- // update transparency settings dependent of mpTransparanceItem and mpFloatTransparenceItem
- ImpUpdateTransparencies();
- }
-
- if (nSID == SID_ATTR_FILL_STYLE )
- {
- if( eState == SFX_ITEM_DISABLED )
- {
- mpLbFillType->Disable();
- mpLbFillType->SetNoSelection();
- mpLbFillAttr->Show();
- mpLbFillAttr->Disable();
- mpLbFillAttr->SetNoSelection();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- meLastXFS = -1;
- mpStyleItem.reset();
- }
- else if( SFX_ITEM_AVAILABLE == eState )
+ case SID_ATTR_FILL_STYLE:
{
- mpStyleItem.reset(pState ? (XFillStyleItem*)pState->Clone() : 0);
- mpLbFillType->Enable();
-
- eXFS = (XFillStyle)mpStyleItem->GetValue();
- meLastXFS = eXFS;
- mpLbFillType->SelectEntryPos(
- sal::static_int_cast< sal_uInt16 >( eXFS ) );
- //Added for select invisable
- if(eXFS == XFILL_NONE)
+ if(bDisabled)
{
- mpLbFillAttr->SetNoSelection();
+ mpLbFillType->Disable();
+ mpLbFillType->SetNoSelection();
+ mpLbFillAttr->Show();
mpLbFillAttr->Disable();
+ mpLbFillAttr->SetNoSelection();
+ mpToolBoxColor->Hide();
+ meLastXFS = -1;
+ mpStyleItem.reset();
}
- //else
- // mpLbFillAttr->Enable();
- Update();
- //SelectFillTypeHdl( NULL );
- }
- else
- {
+
+ if(eState >= SFX_ITEM_AVAILABLE)
+ {
+ const XFillStyleItem* pItem = dynamic_cast< const XFillStyleItem* >(pState);
+
+ if(pItem)
+ {
+ mpStyleItem.reset(dynamic_cast< XFillStyleItem* >(pItem->Clone()));
+ mpLbFillType->Enable();
+ XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue();
+ meLastXFS = eXFS;
+ mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXFS));
+
+ if(XFILL_NONE == eXFS)
+ {
+ mpLbFillAttr->SetNoSelection();
+ mpLbFillAttr->Disable();
+ }
+
+ Update();
+ break;
+ }
+ }
+
mpLbFillType->SetNoSelection();
mpLbFillAttr->Show();
mpLbFillAttr->Disable();
mpLbFillAttr->SetNoSelection();
mpToolBoxColor->Hide();
- mbTBShow = false;
- meLastXFS = -1; //Added
+ meLastXFS = -1;
mpStyleItem.reset();
+ break;
}
- }
- else if(nSID == SID_ATTR_FILL_COLOR)
- {
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0);
- }
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_SOLID)
+ case SID_ATTR_FILL_COLOR:
{
- mpLbFillAttr->Hide();
- mpToolBoxColor->Show();
- mbTBShow = true;
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpToolBoxColor->Enable();
- mbColorAvail = true; //
- // maLastColor = mpColorItem->GetColorValue();
- Update();
- }
- else if(SFX_ITEM_DISABLED == eState )
+ if(SFX_ITEM_AVAILABLE == eState)
{
- mpToolBoxColor->Disable();
- mbColorAvail = false; //
- mpColorUpdater->Update(COL_WHITE);
+ mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0);
}
- else
+
+ if(mpStyleItem && XFILL_SOLID == (XFillStyle)mpStyleItem->GetValue())
{
- mbColorAvail = false; //
- mpColorUpdater->Update(COL_WHITE);
+ mpLbFillAttr->Hide();
+ mpToolBoxColor->Show();
+
+ if(SFX_ITEM_AVAILABLE == eState)
+ {
+ mpToolBoxColor->Enable();
+ mbColorAvail = true;
+ // maLastColor = mpColorItem->GetColorValue();
+ Update();
+ }
+ else if(SFX_ITEM_DISABLED == eState)
+ {
+ mpToolBoxColor->Disable();
+ mbColorAvail = false;
+ mpColorUpdater->Update(COL_WHITE);
+ }
+ else
+ {
+ mbColorAvail = false;
+ mpColorUpdater->Update(COL_WHITE);
+ }
}
+ break;
}
- }
- else if(nSID == SID_ATTR_FILL_GRADIENT)
- {
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0);
- }
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_GRADIENT )
+ case SID_ATTR_FILL_GRADIENT:
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if( SFX_ITEM_AVAILABLE == eState)
+ if(SFX_ITEM_AVAILABLE == eState)
{
- mpLbFillAttr->Enable();
- Update();
+ mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0);
}
- else if(SFX_ITEM_DISABLED == eState )
+ if(mpStyleItem && XFILL_GRADIENT == (XFillStyle)mpStyleItem->GetValue())
{
- mpLbFillAttr->Disable();
- mpLbFillAttr->SetNoSelection();
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(SFX_ITEM_AVAILABLE == eState)
+ {
+ mpLbFillAttr->Enable();
+ Update();
+ }
+ else if(SFX_ITEM_DISABLED == eState )
+ {
+ mpLbFillAttr->Disable();
+ mpLbFillAttr->SetNoSelection();
+ }
+ else
+ {
+ mpLbFillAttr->SetNoSelection();
+ }
}
- else
- mpLbFillAttr->SetNoSelection();
- }
- }
- else if(nSID == SID_ATTR_FILL_HATCH)
- {
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0);
+ break;
}
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_HATCH )
+ case SID_ATTR_FILL_HATCH:
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if( SFX_ITEM_AVAILABLE == eState)
+ if(SFX_ITEM_AVAILABLE == eState)
{
- mpLbFillAttr->Enable();
- Update();
+ mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0);
}
- else if(SFX_ITEM_DISABLED == eState )
+
+ if(mpStyleItem && XFILL_HATCH == (XFillStyle)mpStyleItem->GetValue())
{
- mpLbFillAttr->Disable();
- mpLbFillAttr->SetNoSelection();
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(SFX_ITEM_AVAILABLE == eState)
+ {
+ mpLbFillAttr->Enable();
+ Update();
+ }
+ else if(SFX_ITEM_DISABLED == eState )
+ {
+ mpLbFillAttr->Disable();
+ mpLbFillAttr->SetNoSelection();
+ }
+ else
+ {
+ mpLbFillAttr->SetNoSelection();
+ }
}
- else
- mpLbFillAttr->SetNoSelection();
- }
- }
- else if(nSID == SID_ATTR_FILL_BITMAP)
- {
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0);
+ break;
}
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_BITMAP )
+ case SID_ATTR_FILL_BITMAP:
{
- mpLbFillAttr->Show();
- mpToolBoxColor->Hide();
- mbTBShow = false;
- if( SFX_ITEM_AVAILABLE == eState)
+ if(SFX_ITEM_AVAILABLE == eState)
{
- mpLbFillAttr->Enable();
- Update();
+ mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0);
}
- else if(SFX_ITEM_DISABLED == eState )
- {
- mpLbFillAttr->Disable();
- mpLbFillAttr->SetNoSelection();
- }
- else
- mpLbFillAttr->SetNoSelection();
- }
- }
- else if(nSID == SID_COLOR_TABLE)
- {
- if( SFX_ITEM_AVAILABLE == eState)
- {
- mpColorTableItem.reset(pState ? (SvxColorTableItem*)pState->Clone() : 0);
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue()== XFILL_SOLID)
+ if(mpStyleItem && XFILL_BITMAP == (XFillStyle)mpStyleItem->GetValue())
{
- if ( mpColorItem )
+ mpLbFillAttr->Show();
+ mpToolBoxColor->Hide();
+
+ if(SFX_ITEM_AVAILABLE == eState)
{
- String aString( mpColorItem->GetName() );
- Color aColor = mpColorItem->GetColorValue();
- mpLbFillAttr->Clear();
- SvxColorTableItem aItem( *(const SvxColorTableItem*)(
- pSh->GetItem( SID_COLOR_TABLE ) ) );
mpLbFillAttr->Enable();
- mpLbFillAttr->Fill( aItem.GetColorTable() );
- mpLbFillAttr->SelectEntry( aColor );
+ Update();
+ }
+ else if(SFX_ITEM_DISABLED == eState )
+ {
+ mpLbFillAttr->Disable();
+ mpLbFillAttr->SetNoSelection();
}
else
+ {
mpLbFillAttr->SetNoSelection();
+ }
}
+ break;
}
- }
- else if(nSID == SID_GRADIENT_LIST)
- {
- if( SFX_ITEM_AVAILABLE == eState)
+ case SID_COLOR_TABLE:
{
- mpGradientListItem.reset(pState ? (SvxGradientListItem*)pState->Clone() : 0);
-
- if( mpStyleItem && (XFillStyle)mpStyleItem->GetValue() == XFILL_GRADIENT)
+ if(SFX_ITEM_AVAILABLE == eState)
{
- if ( mpFillGradientItem )
+ if(mpStyleItem && XFILL_SOLID == (XFillStyle)mpStyleItem->GetValue())
{
- String aString( mpFillGradientItem->GetName() );
- mpLbFillAttr->Clear();
- SvxGradientListItem aItem( *(const SvxGradientListItem*)(
- pSh->GetItem( SID_GRADIENT_LIST ) ) );
- mpLbFillAttr->Enable();
- mpLbFillAttr->Fill( aItem.GetGradientList() );
- mpLbFillAttr->SelectEntry( aString );
+ if(mpColorItem)
+ {
+ const Color aColor = mpColorItem->GetColorValue();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list