Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,145 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+#include "ParaBulletsControl.hxx"
+#include "ParaPropertyPanel.hrc"
+#include <sfx2/sidebar/propertypanel.hrc>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
+#include <unotools/viewoptions.hxx>
+#include <editeng/kernitem.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/Theme.hxx>
+#include <svtools/unitconv.hxx>
+#include <svx/nbdtmg.hxx>
+#include <svx/nbdtmgfact.hxx>
+
+namespace svx { namespace sidebar {
+
+ParaBulletsControl::ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel):
+ PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_BULLETS)),
+ mrParaPropertyPanel(rPanel),
+ mpBindings(NULL),
+ maBulletsVS(this,SVX_RES(VS_VALUES)),
+ maFISep(this,SVX_RES(IMG_SEPERATOR_BULLET)),
+ maMoreButton(this,SVX_RES(CB_BULLET_MORE))
+{
+ FreeResource();
+ mpBindings = mrParaPropertyPanel.GetBindings();
+ maBulletsVS.SetColCount(3);
+ maBulletsVS.SetLineCount(3);
+ maBulletsVS.SetStyle( maBulletsVS.GetStyle() | WB_ITEMBORDER |WB_NO_DIRECTSELECT);
+ maBulletsVS.SetExtraSpacing(BULLET_IMAGE_SPACING);
+ if(GetSettings().GetStyleSettings().GetHighContrastMode())
+ maBulletsVS.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
+ else
+ maBulletsVS.SetBackground(Color(244,245,249));
+
+ maBulletsVS.SetItemWidth(BULLET_IMAGE_WIDTH);
+ maBulletsVS.SetItemHeight(BULLET_IMAGE_HEIGHT);
+ maBulletsVS.InsertItem( DEFAULT_NONE );
+ for( sal_uInt16 nVSIdx = 1; nVSIdx <= DEFAULT_BULLET_TYPES; ++nVSIdx )
+ {
+ maBulletsVS.InsertItem( nVSIdx );
+ }
+
+ maBulletsVS.SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE ));
+ NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ for( sal_uInt16 nIndex = 0; nIndex < DEFAULT_BULLET_TYPES; ++nIndex )
+ {
+ maBulletsVS.SetItemText( nIndex + 1, pBullets->GetDescription(nIndex) );
+ }
+ }
+
+ maBulletsVS.Show();
+ maBulletsVS.SetSelectHdl(LINK(this, ParaBulletsControl, BulletSelectHdl_Impl));
+
+ /*maMoreButton.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for high contract
+ maMoreButton.SetHoverBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );//Color( 93, 120, 163 )
+ maMoreButton.SetHoverTxtColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_PanelTitleFont ) );//Color( 255, 255, 255 )
+ maMoreButton.SetIcoPosX( 2);*/
+ maBulletsVS.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ maBulletsVS.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+
+ maMoreButton.SetClickHdl(LINK(this, ParaBulletsControl, MoreButtonClickHdl_Impl));
+
+}
+
+ParaBulletsControl::~ParaBulletsControl()
+{
+
+}
+
+void ParaBulletsControl::UpdateValueSet()
+{
+ maBulletsVS.StateChanged(STATE_CHANGE_STYLE);
+ maBulletsVS.StateChanged(STATE_CHANGE_INITSHOW);
+}
+void ParaBulletsControl::ToGetFocus()
+{
+ sal_uInt16 nTypeIndex = (sal_uInt16)0xFFFF;
+ mrParaPropertyPanel.GetBulletTypeIndex();
+ if ( nTypeIndex != (sal_uInt16)0xFFFF )
+ maBulletsVS.SelectItem( nTypeIndex );
+ else
+ {
+ maBulletsVS.SelectItem(0);
+ }
+ maMoreButton.GrabFocus();
+}
+
+IMPL_LINK(ParaBulletsControl, BulletSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ sal_uInt16 nIdx = maBulletsVS.GetSelectItemId();
+ SfxUInt16Item aItem(FN_SVX_SET_BULLET, nIdx);
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( FN_SVX_SET_BULLET, SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ mrParaPropertyPanel.EndBulletsPopupMode();
+
+ return 0;
+}
+
+IMPL_LINK(ParaBulletsControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
+{
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET, SFX_CALLMODE_ASYNCHRON );
+
+ mrParaPropertyPanel.EndBulletsPopupMode();
+
+ return 0;
+}
+
+}} // end of namespace sidebar
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,61 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef _SVX_SIDEBAR_BULLETS_CONTROL_HXX_
+#define _SVX_SIDEBAR_BULLETS_CONTROL_HXX_
+
+#include "svx/sidebar/PopupControl.hxx"
+#include "svx/sidebar/ValueSetWithTextControl.hxx"
+#include <sfx2/bindings.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/ctrltool.hxx>
+#include "ParaPropertyPanel.hxx"
+#include <vcl/fixed.hxx>
+#include <svl/poolitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <vcl/button.hxx>
+
+
+namespace svx { namespace sidebar {
+
+class ParaBulletsControl:public svx::sidebar::PopupControl
+{
+private:
+ SvxNumValueSet3 maBulletsVS;
+ FixedImage maFISep;
+ PushButton maMoreButton;
+ ParaPropertyPanel& mrParaPropertyPanel;
+ SfxBindings* mpBindings;
+
+ DECL_LINK(BulletSelectHdl_Impl, ValueSet*);
+ DECL_LINK(MoreButtonClickHdl_Impl, void*);
+
+public:
+ ParaBulletsControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
+ ~ParaBulletsControl();
+ void ToGetFocus();
+ void UpdateValueSet();
+};
+
+}}
+
+#endif
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,63 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "ParaBulletsPopup.hxx"
+#include "ParaBulletsControl.hxx"
+#include <boost/bind.hpp>
+#include <unotools/viewoptions.hxx>
+
+namespace svx { namespace sidebar {
+
+ParaBulletsPopup::ParaBulletsPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator)
+ : Popup(
+ pParent,
+ rControlCreator,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Paragraph Bullets")))
+{
+}
+
+
+
+
+ParaBulletsPopup::~ParaBulletsPopup (void)
+{
+}
+
+
+
+
+void ParaBulletsPopup::UpdateValueSet ()
+{
+ ProvideContainerAndControl();
+
+ ParaBulletsControl* pControl = dynamic_cast<ParaBulletsControl*>(mpControl.get());
+ if (pControl != NULL)
+ pControl->UpdateValueSet();
+}
+
+
+
+} } // end of namespace svx::sidebar
+
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,53 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_BULLETS_POPUP_HXX_
+#define _SVX_SIDEBAR_BULLETS_POPUP_HXX_
+
+#include "svx/sidebar/Popup.hxx"
+
+#include <boost/function.hpp>
+#include <svl/poolitem.hxx>
+#include <tools/fldunit.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+
+namespace svx { namespace sidebar {
+
+class ParaBulletsPopup
+ : public Popup
+{
+public :
+ ParaBulletsPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator);
+ ~ParaBulletsPopup (void);
+
+ void UpdateValueSet ();
+//private:
+ //void PopupModeEndCallback (void);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif
+
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,814 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+#include "ParaLineSpacingControl.hxx"
+#include "ParaPropertyPanel.hrc"
+#include <sfx2/sidebar/propertypanel.hrc>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
+#include <unotools/viewoptions.hxx>
+#include <editeng/kernitem.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/Theme.hxx>
+#include <svtools/unitconv.hxx>
+
+#define _DEFAULT_LINE_SPACING 200
+#define FIX_DIST_DEF 283
+#define LINESPACE_1 100
+#define LINESPACE_15 150
+#define LINESPACE_2 200
+#define LINESPACE_115 115
+
+#define LLINESPACE_1 0
+#define LLINESPACE_15 1
+#define LLINESPACE_2 2
+#define LLINESPACE_PROP 3
+#define LLINESPACE_MIN 4
+#define LLINESPACE_DURCH 5
+#define LLINESPACE_FIX 6
+
+#define DO_NOT_CUSTOM 0
+#define USE_CUSTOM 1
+
+namespace svx { namespace sidebar {
+
+
+ParaLineSpacingControl::ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel)
+: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_LINESPACING))
+, mrParaPropertyPanel(rPanel)
+, mpBindings(NULL)
+,aLineDist ( this, SVX_RES( LB_LINE_SPACING )),
+aLineDistAtPercentBox ( this, SVX_RES( ED_SBINDE_LINEDISTPERCENT ) ),
+aLineDistAtMetricBox ( this, SVX_RES( ED_SBINDE_LINEDISTPOINT ) ),
+maCustomFT ( this, SVX_RES( FT_CUSTOM ) ),
+maLSpacingFT ( this, SVX_RES( FT_LINE_SPACING ) ),
+maOfFT ( this, SVX_RES( FT_OF ) ),
+maSpacing1 (SVX_RES(IMG_SPACING1)),
+maSpacing115 (SVX_RES(IMG_SPACING115)),
+maSpacing15 (SVX_RES(IMG_SPACING15)),
+maSpacing2 (SVX_RES(IMG_SPACING2)),
+maLPCustom (SVX_RES(IMG_SPACINGLCUSTOM)),
+maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)),
+maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)),
+maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)),
+maSelSpacing2 (SVX_RES(IMG_SEL_SPACING2)),
+maImgCusGrey (SVX_RES(IMG_CUSTOM_GRAY)),
+maImgCus (SVX_RES(IMG_CUSTOM)),
+maStrCus (SVX_RES(STR_LCVALUE)),
+pActLineDistFld ( &aLineDistAtPercentBox ),
+nMinFixDist ( BEGIN_VALUE ),
+maValue ( 0 ),
+maPos ( 0 ),
+maLineSpacing (ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES( LINE_SPACING ) ),
+mpImg (NULL),
+mpImgSel (NULL),
+mpStr (NULL),
+mpStrTip (NULL),
+maLine (SVX_RES(STR_LSPACING)),
+maOf (SVX_RES(STR_LS_OF))
+, mbUseLineSPCustom (0)
+, mbLineSPDisable (0)
+{
+ initial();
+ FreeResource();
+ mpBindings = mrParaPropertyPanel.GetBindings();
+// m_eLNSpaceUnit = mrParaPropertyPanel.maLNSpaceControl.GetCoreMetric();
+ m_eLNSpaceUnit = SFX_MAPUNIT_100TH_MM;
+}
+ParaLineSpacingControl::~ParaLineSpacingControl()
+{
+ delete[] mpImg;
+ delete[] mpImgSel;
+ delete[] mpStr;
+ delete[] mpStrTip;
+}
+
+void ParaLineSpacingControl::initial()
+{
+ //maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
+ //maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor());
+ //maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetMenuColor());
+ //maLineSpacing.SetMinFont();
+
+ maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ maLineSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ //maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ //GetSettings().GetStyleSettings().GetMenuColor():
+ //sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ //maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ //GetSettings().GetStyleSettings().GetMenuColor():
+ //sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+
+ mpImg = new Image[4];
+ mpImg[0] = maSpacing1;
+ mpImg[1] = maSpacing115;
+ mpImg[2] = maSpacing15;
+ mpImg[3] = maSpacing2;
+
+ mpImgSel = new Image[4];
+ mpImgSel[0] = maSelSpacing1;
+ mpImgSel[1] = maSelSpacing115;
+ mpImgSel[2] = maSelSpacing15;
+ mpImgSel[3] = maSelSpacing2;
+
+ mpStr = new XubString[4];
+ mpStr[0] = XubString(SVX_RES(STR_SPACING1));
+ mpStr[1] = XubString(SVX_RES(STR_SPACING115));
+ mpStr[2] = XubString(SVX_RES(STR_SPACING15));
+ mpStr[3] = XubString(SVX_RES(STR_SPACING2));
+
+ mpStrTip = new XubString[4];
+ mpStrTip[0] = XubString(SVX_RES(STR_LS_SINGLE));
+ mpStrTip[1] = XubString(SVX_RES(STR_LS_115));
+ mpStrTip[2] = XubString(SVX_RES(STR_LS_15));
+ mpStrTip[3] = XubString(SVX_RES(STR_LS_DOUBLE));
+ for (int i=0;i<4;i++)
+ maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
+
+ maLineSpacing.InsertCustom(maImgCus, maImgCusGrey, maStrCus);
+ maLineSpacing.SetCustomTip(maStrCus); //Add
+
+ SetAllNoSel();
+ Link aLink = LINK(this, ParaLineSpacingControl,VSSelHdl );
+ maLineSpacing.SetSelectHdl(aLink);
+ maLineSpacing.StartSelection();
+ maLineSpacing.Show();
+
+ aLink = LINK( this, ParaLineSpacingControl, LineSPDistHdl_Impl );
+ aLineDist.SetSelectHdl(aLink);
+ aLineDist.SelectEntryPos( LLINESPACE_1 ) ;
+ aLink = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl );
+ aLineDistAtPercentBox.SetModifyHdl( aLink );
+ aLineDistAtMetricBox.SetModifyHdl( aLink );
+}
+void ParaLineSpacingControl::ToGetFocus(bool bType)
+{
+ if(!bType)
+ aLineDist.GrabFocus();
+ else
+ maLineSpacing.GrabFocus(); //wj
+}
+
+void ParaLineSpacingControl::PopupModeEndCallback()
+{
+ if( mbUseLineSPCustom )
+ {
+ //maLinePos = mpLineSPPage->maPos;
+ //maLineValue = mpLineSPPage->maValue;
+
+ SvtViewOptions aWinOpt( E_WINDOW, LSP_POS_GLOBAL_VALUE );
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1);
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("maLinePos") );
+ aSeq[0].Value <<= ::rtl::OUString( String::CreateFromInt64( maPos ));
+ aWinOpt.SetUserData( aSeq );
+
+ SvtViewOptions aWinOpt2( E_WINDOW, LSP_LV_GLOBAL_VALUE );
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("maLineValue") );
+ aSeq[0].Value <<= ::rtl::OUString( String::CreateFromInt64( maValue ));
+ aWinOpt2.SetUserData( aSeq );
+ }
+}
+
+void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext)
+{
+ SvtViewOptions aWinOpt( E_WINDOW, LSP_POS_GLOBAL_VALUE );
+ if ( aWinOpt.Exists() )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq = aWinOpt.GetUserData();
+ ::rtl::OUString aTmp;
+ if ( aSeq.getLength())
+ aSeq[0].Value >>= aTmp;
+
+ String aWinData( aTmp );
+ maPos = (sal_uInt16)aWinData.ToInt32();
+ }
+
+ SvtViewOptions aWinOpt2( E_WINDOW, LSP_LV_GLOBAL_VALUE );
+ if ( aWinOpt2.Exists() )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq = aWinOpt2.GetUserData();
+ ::rtl::OUString aTmp;
+ if ( aSeq.getLength())
+ aSeq[0].Value >>= aTmp;
+
+ String aWinData( aTmp );
+ maValue = (sal_uInt16)aWinData.ToInt32();
+ }
+ String sHelpText;
+ switch(maPos)
+ {
+ case LLINESPACE_1:
+ sHelpText += mpStrTip[0];
+ break;
+ case LLINESPACE_15:
+ sHelpText += mpStrTip[2];
+ break;
+ case LLINESPACE_2:
+ sHelpText += mpStrTip[3];
+ break;
+ case LLINESPACE_PROP:
+ sHelpText +=maLine;
+ sHelpText.Append(String("Proportion: ", 12, RTL_TEXTENCODING_ASCII_US));
+ sHelpText += maOf;
+ sHelpText.Append( String::CreateFromInt64( maValue ));
+ break;
+ case LLINESPACE_MIN:
+ sHelpText += maLine;
+ sHelpText.Append(String("At Least: ", 10, RTL_TEXTENCODING_ASCII_US));
+ sHelpText += maOf;
+ sHelpText.Append( String::CreateFromInt64( maValue ));
+ break;
+ case LLINESPACE_DURCH:
+ sHelpText += maLine;
+ sHelpText.Append(String("Leading: ", 9, RTL_TEXTENCODING_ASCII_US));
+ sHelpText += maOf;
+ sHelpText.Append( String::CreateFromInt64( maValue ));
+ break;
+ case LLINESPACE_FIX:
+ sHelpText += maLine;
+ sHelpText.Append(String("Fixed: ", 7, RTL_TEXTENCODING_ASCII_US));
+ sHelpText += maOf;
+ sHelpText.Append( String::CreateFromInt64( maValue ));
+ break;
+ }
+ if( !aWinOpt.Exists() && !aWinOpt2.Exists() )
+ mbLineSPDisable = sal_True;
+ else
+ mbLineSPDisable = sal_False;
+
+ if( mbLineSPDisable )
+ maLineSpacing.SetCusEnable(0);
+ else
+ {
+ maLineSpacing.SetCusEnable(1);
+ maLineSpacing.SetCustomTip(sHelpText,sal_True);//Modify for Sym2_7266
+ }
+
+ SfxItemState eState = currSPState;
+
+ SetFieldUnit( aLineDistAtMetricBox, currMetricUnit );
+
+// mpLineSPPage->SetAllNoSel();
+ aLineDist.Enable();
+ pActLineDistFld->Enable();
+ pActLineDistFld->SetText( String() );
+ bool bValueSetFocus = sal_False; //wj
+
+ if( eState >= SFX_ITEM_AVAILABLE )
+ {
+ // SfxMapUnit eUnit = maLNSpaceControl.GetCoreMetric();
+ SfxMapUnit eUnit = SFX_MAPUNIT_100TH_MM;
+ m_eLNSpaceUnit = eUnit;
+
+ switch( currSPItem->GetLineSpaceRule() )
+ {
+ case SVX_LINE_SPACE_AUTO:
+ {
+ SvxInterLineSpace eInter = currSPItem->GetInterLineSpaceRule();
+
+ switch( eInter )
+ {
+ case SVX_INTER_LINE_SPACE_OFF:
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_1 );
+ pActLineDistFld->Disable();
+ pActLineDistFld->SetText( String() );
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ if ( LINESPACE_1 == currSPItem->GetPropLineSpace() )
+ {
+ maLineSpacing.SetSelItem(1);
+ bValueSetFocus = sal_True; //wj
+ }
+ }
+ break;
+
+ case SVX_INTER_LINE_SPACE_PROP:
+ {
+ if ( LINESPACE_1 == currSPItem->GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_1 );
+ pActLineDistFld->Disable();
+ pActLineDistFld->SetText( String() );
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ maLineSpacing.SetSelItem(1);
+ bValueSetFocus = sal_True; //wj
+ break;
+ }
+ if ( LINESPACE_15 == currSPItem->GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_15 );
+ pActLineDistFld->Disable();
+ pActLineDistFld->SetText( String() );
+
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ maLineSpacing.SetSelItem(3);
+ bValueSetFocus = sal_True; //wj
+ break;
+ }
+ if ( LINESPACE_2 == currSPItem->GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_2 );
+ pActLineDistFld->Disable();
+ pActLineDistFld->SetText( String() );
+
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ maLineSpacing.SetSelItem(4);
+ bValueSetFocus = sal_True; //wj
+ break;
+ }
+
+ aLineDist.SelectEntryPos( LLINESPACE_PROP );
+ if(pActLineDistFld != &(aLineDistAtPercentBox))
+ {
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtPercentBox);
+ }
+ else
+ {
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtPercentBox);
+ }
+ pActLineDistFld->Enable();
+ pActLineDistFld->Show();
+ aLineDistAtPercentBox.
+ SetValue( aLineDistAtPercentBox.Normalize(
+ currSPItem->GetPropLineSpace() ) );
+
+ if( currSPItem->GetPropLineSpace() == LINESPACE_115 )
+ {
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ maLineSpacing.SetSelItem(2);
+ bValueSetFocus = sal_True; //wj
+ }
+ else
+ {
+ mbUseLineSPCustom = USE_CUSTOM;
+ maLineSpacing.SetSelItem(0);
+ }
+ }
+ break;
+
+ case SVX_INTER_LINE_SPACE_FIX:
+ {
+ if(pActLineDistFld != &(aLineDistAtMetricBox))
+ {
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ else
+ {
+ pActLineDistFld = &(aLineDistAtPercentBox);
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ pActLineDistFld->Enable();
+ pActLineDistFld->Show();
+ maLineSpacing.SetSelItem(0);
+
+ SetMetricValue( aLineDistAtMetricBox,
+ currSPItem->GetInterLineSpace(), eUnit );
+ aLineDist.SelectEntryPos( LLINESPACE_DURCH );
+
+ mbUseLineSPCustom = USE_CUSTOM;
+ }
+ break;
+ }
+ }
+ break;
+ case SVX_LINE_SPACE_FIX:
+ {
+ if(pActLineDistFld != &(aLineDistAtMetricBox))
+ {
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ else
+ {
+ pActLineDistFld = &(aLineDistAtPercentBox);
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ pActLineDistFld->Enable();
+ pActLineDistFld->Show();
+ maLineSpacing.SetSelItem(0);
+
+ SetMetricValue(aLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit);
+ aLineDist.SelectEntryPos( LLINESPACE_FIX );
+
+ mbUseLineSPCustom = USE_CUSTOM;
+ }
+ break;
+
+ case SVX_LINE_SPACE_MIN:
+ {
+ if(pActLineDistFld != &(aLineDistAtMetricBox))
+ {
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ else
+ {
+ pActLineDistFld = &(aLineDistAtPercentBox);
+ pActLineDistFld->Disable();
+ pActLineDistFld->Hide();
+ pActLineDistFld = &(aLineDistAtMetricBox);
+ }
+ pActLineDistFld->Enable();
+ pActLineDistFld->Show();
+ maLineSpacing.SetSelItem(0);
+
+ SetMetricValue(aLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit);
+ aLineDist.SelectEntryPos( LLINESPACE_MIN );
+ mbUseLineSPCustom = USE_CUSTOM;
+ }
+ break;
+ }
+ }
+ else if( eState == SFX_ITEM_DISABLED )
+ {
+ aLineDist.Disable();
+ pActLineDistFld->Enable(sal_False);
+ pActLineDistFld->SetText( String() );
+ maLineSpacing.SetSelItem(0);
+
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ }
+ else
+ {
+ pActLineDistFld->Enable(sal_False);
+ pActLineDistFld->SetText( String() );
+ aLineDist.SetNoSelection();
+ maLineSpacing.SetSelItem(0);
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ }
+
+ aLineDist.SaveValue();
+
+ /*sal_uInt16 nID = pBox->GetCurItemId();
+ pBox->SetItemDown(nID, sal_True);
+
+ Size aFloatSz = GetOutputSizePixel();
+
+ GetLineSPFloatWin()->SetSizePixel( aFloatSz );
+
+ Point aPos=maLineSPTbx->GetPosPixel();
+ aPos.setX(aPos.getX());
+ aPos = OutputToScreenPixel( aPos );
+ Size aSize = maLineSPTbx->GetSizePixel();
+ Rectangle aRect( aPos, aSize );
+
+ GetLineSPFloatWin()->StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_NOFOCUSCLOSE);
+ GetLineSPFloatWin()->SetPopupModeFlags(GetLineSPFloatWin()->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
+
+ pLineSPPage->ToGetFocus(bValueSetFocus);
+ */
+ sal_uInt16 uCount = aLineDist.GetEntryCount();
+ if( uCount == LLINESPACE_FIX + 1 )
+ {
+ switch (currentContext.GetCombinedContext())
+ {
+ case CombinedEnumContext(Application_Impress, Context_Table):
+ case CombinedEnumContext(Application_Draw, Context_Table):
+ case CombinedEnumContext(Application_Writer, Context_DrawText):
+ case CombinedEnumContext(Application_Calc, Context_DrawText):
+ case CombinedEnumContext(Application_Draw, Context_DrawText):
+ case CombinedEnumContext(Application_Impress, Context_DrawText):
+ case CombinedEnumContext(Application_Writer, Context_Annotation):
+ case CombinedEnumContext(Application_Draw, Context_Draw):
+ case CombinedEnumContext(Application_Draw, Context_TextObject):
+ case CombinedEnumContext(Application_Draw, Context_Graphic):
+ case CombinedEnumContext(Application_Impress, Context_Draw):
+ case CombinedEnumContext(Application_Impress, Context_TextObject):
+ case CombinedEnumContext(Application_Impress, Context_Graphic):
+ {
+ aLineDist.RemoveEntry(LLINESPACE_FIX);
+ }
+ }
+ }
+ else if( uCount == LLINESPACE_FIX)
+ {
+ switch (currentContext.GetCombinedContext())
+ {
+ case CombinedEnumContext(Application_Writer, Context_Default):
+ case CombinedEnumContext(Application_Writer, Context_Text):
+ case CombinedEnumContext(Application_Writer, Context_Table):
+ {
+ aLineDist.InsertEntry(String::CreateFromAscii("Fixed"), LLINESPACE_FIX);
+ }
+ }
+ }
+ maLineSpacing.Format();
+ maLineSpacing.StartSelection();
+}
+
+void ParaLineSpacingControl::SetAllNoSel()
+{
+ maLineSpacing.SelectItem(1); //modified by wj for sym2_5397
+ maLineSpacing.SetNoSelection();
+}
+
+IMPL_LINK( ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox*, pBox )
+{
+ maLineSpacing.SetNoSelection();
+ maLineSpacing.SetSelItem(0);
+ maLineSpacing.Format();
+ maLineSpacing.StartSelection();
+
+ switch( pBox->GetSelectEntryPos() )
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ pActLineDistFld->Enable(sal_False);
+ pActLineDistFld->SetText( String() );
+ break;
+
+ case LLINESPACE_DURCH:
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ aLineDistAtMetricBox.SetMin(0);
+
+
+ if ( !aLineDistAtMetricBox.GetText().Len() )
+ aLineDistAtMetricBox.SetValue(
+ aLineDistAtMetricBox.Normalize( 0 ) );
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ break;
+
+ case LLINESPACE_MIN:
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ aLineDistAtMetricBox.SetMin(0);
+
+ if ( !aLineDistAtMetricBox.GetText().Len() )
+ aLineDistAtMetricBox.SetValue(
+ aLineDistAtMetricBox.Normalize( 0 ), FUNIT_TWIP );
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ break;
+
+ case LLINESPACE_PROP:
+ aLineDistAtMetricBox.Hide();
+ pActLineDistFld = &aLineDistAtPercentBox;
+
+ if ( !aLineDistAtPercentBox.GetText().Len() )
+ aLineDistAtPercentBox.SetValue(
+ aLineDistAtPercentBox.Normalize( 100 ), FUNIT_TWIP );
+ aLineDistAtMetricBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ break;
+ case LLINESPACE_FIX:
+ {
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ sal_Int64 nTemp = aLineDistAtMetricBox.GetValue();
+ aLineDistAtMetricBox.SetMin(aLineDistAtMetricBox.Normalize(nMinFixDist), FUNIT_TWIP);
+
+ if ( aLineDistAtMetricBox.GetValue() != nTemp )
+ SetMetricValue( aLineDistAtMetricBox,
+ FIX_DIST_DEF, SFX_MAPUNIT_TWIP );
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ }
+ break;
+ }
+ ExecuteLineSpace();
+ return 0;
+}
+
+IMPL_LINK( ParaLineSpacingControl, LineSPDistAtHdl_Impl, MetricField*, pBox )
+{
+ ExecuteLineSpace();
+ return (0L);
+}
+
+void ParaLineSpacingControl::ExecuteLineSpace()
+{
+ aLineDist.SaveValue();
+ maLineSpacing.SetNoSelection();
+
+ SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE);
+ sal_uInt16 nPos = aLineDist.GetSelectEntryPos();
+
+ switch ( nPos )
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ {
+ SetLineSpace( aSpacing, nPos );
+ maPos = nPos;
+ }
+ break;
+
+ case LLINESPACE_PROP:
+ {
+ SetLineSpace( aSpacing, nPos,
+ aLineDistAtPercentBox.Denormalize(
+ (long)aLineDistAtPercentBox.GetValue() ) );
+ maPos = nPos;
+ maValue =aLineDistAtPercentBox.GetValue();
+ }
+ break;
+
+ case LLINESPACE_MIN:
+ case LLINESPACE_DURCH:
+ case LLINESPACE_FIX:
+ {
+ SetLineSpace( aSpacing, nPos,
+ GetCoreValue( aLineDistAtMetricBox, m_eLNSpaceUnit ) );
+ maPos = nPos;
+ maValue = GetCoreValue( aLineDistAtMetricBox, m_eLNSpaceUnit );
+ }
+ break;
+
+ default:
+ DBG_ERROR( "error!!" );
+ break;
+ }
+
+ mpBindings->GetDispatcher()->Execute(
+ SID_ATTR_PARA_LINESPACE, SFX_CALLMODE_RECORD, &aSpacing, 0L);
+
+ mbUseLineSPCustom = USE_CUSTOM;
+}
+
+void ParaLineSpacingControl::SetLineSpace( SvxLineSpacingItem& rLineSpace,
+ int eSpace, long lValue )
+{
+ switch ( eSpace )
+ {
+ case LLINESPACE_1:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+
+ case LLINESPACE_15:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( LINESPACE_15 );
+ break;
+
+ case LLINESPACE_2:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( LINESPACE_2 );
+ break;
+
+ case LLINESPACE_PROP:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( (sal_uInt8)lValue );
+ break;
+
+ case LLINESPACE_MIN:
+ rLineSpace.SetLineHeight( (sal_uInt16)lValue );
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+
+ case LLINESPACE_DURCH:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetInterLineSpace( (sal_uInt16)lValue );
+ break;
+
+ case LLINESPACE_FIX:
+ rLineSpace.SetLineHeight((sal_uInt16)lValue);
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_FIX;
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+ }
+}
+
+IMPL_LINK(ParaLineSpacingControl, VSSelHdl, void *, pControl)
+{
+ maLineSpacing.SetNoSelection();
+ bool bClosePop = true;
+ if(pControl == &maLineSpacing)
+ {
+ sal_uInt16 iPos = maLineSpacing.GetSelectItemId();
+ short nKern = 0;
+ long nVal = 0;
+ switch ( iPos )
+ {
+ case 1:
+ ExecuteLineSpacing( 0, 0 );
+ break;
+ case 2:
+ ExecuteLineSpacing( 0, 3 );
+ break;
+ case 3:
+ ExecuteLineSpacing( 0, 1 );
+ break;
+ case 4:
+ ExecuteLineSpacing( 0, 2 );
+ break;
+ case 5:
+ {
+ if(!(mbLineSPDisable))
+ {
+ //maPos = mrParaPropertyPanel.maLinePos;
+ aLineDist.SelectEntryPos( maPos ) ;
+ aLineDist.SaveValue();
+ //maValue = mrParaPropertyPanel.maLineValue;
+
+ SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE);
+ switch(maPos)
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ SetLineSpace( aSpacing, maPos );
+ break;
+
+ case LLINESPACE_PROP:
+ SetLineSpace( aSpacing, maPos,
+ aLineDistAtPercentBox.Denormalize( (long)maValue ) );
+ break;
+
+ case LLINESPACE_MIN:
+ case LLINESPACE_DURCH:
+ case LLINESPACE_FIX:
+ SetLineSpace( aSpacing, maPos, (long)maValue );
+ break;
+ }
+
+ mpBindings->GetDispatcher()->Execute(
+ SID_ATTR_PARA_LINESPACE, SFX_CALLMODE_RECORD, &aSpacing, 0L);
+
+ ExecuteLineSpacing( USE_CUSTOM, 0 );
+ }
+ else
+ bClosePop = sal_False;
+ }
+ break;
+ }
+ }
+ if(bClosePop)
+ mrParaPropertyPanel.EndSpacingPopupMode();
+ return 0;
+}
+
+void ParaLineSpacingControl::ExecuteLineSpacing( sal_uInt16 aIsCustom, sal_uInt16 aEntry )
+{
+ if( !aIsCustom )
+ {
+ aLineDist.SelectEntryPos( aEntry ) ;
+ aLineDist.SaveValue();
+ SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE);
+ sal_uInt16 nPos = aEntry;
+ if( aEntry == LLINESPACE_PROP )
+ SetLineSpace( aSpacing, nPos, aLineDistAtPercentBox.Denormalize( (long)115 ) );
+ else
+ SetLineSpace( aSpacing, nPos );
+
+ mpBindings->GetDispatcher()->Execute(
+ SID_ATTR_PARA_LINESPACE, SFX_CALLMODE_RECORD, &aSpacing, 0L);
+ }
+
+ if( !aIsCustom )
+ {
+ mbUseLineSPCustom = DO_NOT_CUSTOM;
+ mrParaPropertyPanel.EndSpacingPopupMode();
+ }
+ maLineSpacing.SetNoSelection();
+}
+
+}} // end of namespace sidebar
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,116 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef _SVX_SIDEBAR_LINE_SPACING_CONTROL_HXX_
+#define _SVX_SIDEBAR_LINE_SPACING_CONTROL_HXX_
+
+#include "svx/sidebar/PopupControl.hxx"
+#include "svx/sidebar/ValueSetWithTextControl.hxx"
+#include <sfx2/bindings.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/ctrltool.hxx>
+#include "ParaPropertyPanel.hxx"
+#include <vcl/fixed.hxx>
+#include <svl/poolitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+
+
+namespace svx { namespace sidebar {
+
+#define LSP_POS_GLOBAL_VALUE String("Line_Spacing_Pos", 16, RTL_TEXTENCODING_ASCII_US)
+#define LSP_LV_GLOBAL_VALUE String("Line_Spacing_Lv", 15, RTL_TEXTENCODING_ASCII_US)
+#define BEGIN_VALUE 28
+class ParaLineSpacingControl:public svx::sidebar::PopupControl
+{
+public:
+ ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
+ ~ParaLineSpacingControl();
+ void ToGetFocus(bool bType);
+ void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext);
+ //virtual void Paint(const Rectangle& rect);
+
+ //add
+ short GetLastCustomState();
+ long GetLastCustomValue();
+ //add end
+
+ void ExecuteLineSpace();
+ void SetLineSpace( SvxLineSpacingItem& rLineSpace,
+ int eSpace, long lValue = 0 );
+
+ void ExecuteLineSpacing( sal_uInt16 aIsCustom, sal_uInt16 aEntry );
+ void SetAllNoSel();
+ void PopupModeEndCallback();
+
+private:
+ bool mbUseLineSPCustom;
+ bool mbLineSPDisable;
+ SfxMapUnit m_eLNSpaceUnit;
+ ParaPropertyPanel& mrParaPropertyPanel;
+ SfxBindings* mpBindings;
+
+ long nMinFixDist;
+ Edit* pActLineDistFld;
+
+ ValueSetWithTextControl maLineSpacing;
+
+ FixedText maCustomFT;
+ FixedText maLSpacingFT;
+ ListBox aLineDist;
+
+ FixedText maOfFT;
+ MetricField aLineDistAtPercentBox;
+ MetricField aLineDistAtMetricBox;
+
+ Image maSpacing1;
+ Image maSpacing115;
+ Image maSpacing15;
+ Image maSpacing2;
+ Image maLPCustom;
+
+ Image maSelSpacing1;
+ Image maSelSpacing115;
+ Image maSelSpacing15;
+ Image maSelSpacing2;
+ Image maSelSelHanging;
+ Image maImgCus;
+ Image maImgCusGrey;
+ XubString maStrCus;
+
+ Image* mpImg;
+ Image* mpImgSel;
+ XubString* mpStr;
+ XubString* mpStrTip;
+ String maLine;
+ String maOf;
+
+ sal_Int64 maValue;
+ sal_uInt16 maPos;
+private:
+ void initial();
+ DECL_LINK(LineSPDistHdl_Impl, ListBox*);
+ DECL_LINK(LineSPDistAtHdl_Impl, MetricField*);
+ DECL_LINK(VSSelHdl, void*);
+};
+}}
+
+#endif
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,82 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "ParaLineSpacingPopup.hxx"
+#include "ParaLineSpacingControl.hxx"
+#include <boost/bind.hpp>
+#include <unotools/viewoptions.hxx>
+
+namespace svx { namespace sidebar {
+
+ParaLineSpacingPopup::ParaLineSpacingPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator)
+ : Popup(
+ pParent,
+ rControlCreator,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Paragraph Line Spacing")))
+{
+ SetPopupModeEndHandler(::boost::bind(&ParaLineSpacingPopup::PopupModeEndCallback, this));
+}
+
+
+
+
+ParaLineSpacingPopup::~ParaLineSpacingPopup (void)
+{
+}
+
+
+
+
+void ParaLineSpacingPopup::Rearrange (SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext)
+{
+ ProvideContainerAndControl();
+
+ ParaLineSpacingControl* pControl = dynamic_cast<ParaLineSpacingControl*>(mpControl.get());
+ if (pControl != NULL)
+ pControl->Rearrange(currSPState,currMetricUnit, currSPItem,currentContext);
+}
+
+void ParaLineSpacingPopup::PopupModeEndCallback (void)
+{
+ ProvideContainerAndControl();
+ ParaLineSpacingControl* pControl = dynamic_cast<ParaLineSpacingControl*>(mpControl.get());
+ if (pControl == NULL)
+ return;
+
+ pControl->PopupModeEndCallback();
+
+ /*if( pControl->GetLastCustomState() == SPACING_CLOSE_BY_CUS_EDIT)
+ {
+ SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE );
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1);
+ aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Spacing") );
+ aSeq[0].Value <<= ::rtl::OUString( String::CreateFromInt32( pControl->GetLastCustomValue() ));
+ aWinOpt.SetUserData( aSeq );
+
+ }*/
+}
+
+
+} } // end of namespace svx::sidebar
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,53 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_LINE_SPACING_POPUP_HXX_
+#define _SVX_SIDEBAR_LINE_SPACING_POPUP_HXX_
+
+#include "svx/sidebar/Popup.hxx"
+
+#include <boost/function.hpp>
+#include <svl/poolitem.hxx>
+#include <tools/fldunit.hxx>
+#include <editeng/lspcitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+
+namespace svx { namespace sidebar {
+
+class ParaLineSpacingPopup
+ : public Popup
+{
+public :
+ ParaLineSpacingPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator);
+ ~ParaLineSpacingPopup (void);
+
+ void Rearrange (SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem ,const ::sfx2::sidebar::EnumContext currentContext);
+private:
+ void PopupModeEndCallback (void);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,171 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+#include "ParaNumberingControl.hxx"
+#include "ParaPropertyPanel.hrc"
+#include <sfx2/sidebar/propertypanel.hrc>
+#include <svx/dialogs.hrc>
+#include <svx/dialmgr.hxx>
+#include <unotools/viewoptions.hxx>
+#include <editeng/kernitem.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/Theme.hxx>
+#include <svtools/unitconv.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
+#include <com/sun/star/text/XNumberingFormatter.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <comphelper/processfactory.hxx>
+#include <svx/nbdtmg.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <editeng/unolingu.hxx>
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::text;
+
+namespace svx { namespace sidebar {
+
+Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider()
+{
+ Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ Reference < XInterface > xI = xMSF->createInstance(
+ ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) );
+ Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
+// DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"")
+
+ return xRet;
+}
+
+ParaNumberingControl::ParaNumberingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel):
+ PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_NUMBERING)),
+ maNumberVS(this,SVX_RES(VS_NUMBERING)),
+ maFISep(this,SVX_RES(IMG_SEPERATOR_NUMBERING)),
+ maMoreButton(this,SVX_RES(CB_NUMBERING_MORE) ),
+ mrParaPropertyPanel(rPanel),
+ mpBindings(NULL)
+{
+ FreeResource();
+ mpBindings = mrParaPropertyPanel.GetBindings();
+
+ maNumberVS.SetStyle(maNumberVS.GetStyle() | WB_NO_DIRECTSELECT);
+ maNumberVS.SetExtraSpacing(NUM_IMAGE_SPACING);
+ //add by wj for sym2_7246 high contrast
+ if(GetSettings().GetStyleSettings().GetHighContrastMode())
+ maNumberVS.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
+ else
+ maNumberVS.SetBackground(Color(244,245,249));
+
+ maNumberVS.SetItemWidth(NUM_IMAGE_WIDTH);
+ maNumberVS.SetItemHeight(NUM_IMAGE_HEIGHT);
+
+ Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider();
+ if(xDefNum.is())
+ {
+ Sequence< Sequence< PropertyValue > > aNumberings;
+ LanguageType eLang = GetSettings().GetLanguage();
+ Locale aLocale = SvxCreateLocale(eLang);
+ try
+ {
+ aNumberings =
+ xDefNum->getDefaultContinuousNumberingLevels( aLocale );
+ }
+ catch(Exception&)
+ {
+ }
+ Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
+ maNumberVS.SetNumberingSettings(aNumberings, xFormat, aLocale);
+ }
+
+ maNumberVS.Show();
+ maNumberVS.SetSelectHdl(LINK(this, ParaNumberingControl, NumSelectHdl_Impl));
+
+ /*maMoreButton.SetDefBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_DropDownBackground ));//Color(244,245,249)//for high contract
+ maMoreButton.SetHoverBkColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ) );//Color( 93, 120, 163 )
+ maMoreButton.SetHoverTxtColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_PanelTitleFont ) );//Color( 255, 255, 255 )
+ maMoreButton.SetIcoPosX( 2);*/
+ maNumberVS.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+ maNumberVS.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ GetSettings().GetStyleSettings().GetMenuColor():
+ sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+
+ maMoreButton.SetClickHdl(LINK(this, ParaNumberingControl, MoreButtonClickHdl_Impl));
+
+}
+
+ParaNumberingControl::~ParaNumberingControl()
+{
+}
+
+
+IMPL_LINK(ParaNumberingControl, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ sal_uInt16 nIdx = maNumberVS.GetSelectItemId();
+ SfxUInt16Item aItem(FN_SVX_SET_NUMBER, nIdx);
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( FN_SVX_SET_NUMBER, SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ mrParaPropertyPanel.EndNumberingPopupMode();
+
+ return 0;
+}
+
+IMPL_LINK(ParaNumberingControl, MoreButtonClickHdl_Impl, void*, EMPTYARG)
+{
+ if (mpBindings)
+ mpBindings->GetDispatcher()->Execute( SID_OUTLINE_BULLET, SFX_CALLMODE_ASYNCHRON );
+
+ mrParaPropertyPanel.EndNumberingPopupMode();
+
+ return 0;
+}
+
+void ParaNumberingControl::UpdateValueSet()
+{
+ maNumberVS.StateChanged(STATE_CHANGE_STYLE);
+ maNumberVS.StateChanged(STATE_CHANGE_INITSHOW);
+}
+
+void ParaNumberingControl::ToGetFocus()
+{
+ sal_uInt16 nTypeIndex = mrParaPropertyPanel.GetNumTypeIndex();
+ if ( nTypeIndex != (sal_uInt16)0xFFFF )
+ maNumberVS.SelectItem( nTypeIndex );
+ else
+ {
+ maNumberVS.SelectItem(0);
+ }
+ maMoreButton.GrabFocus();
+}
+
+}} // end of namespace sidebar
+
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,65 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef _SVX_SIDEBAR_NUMBERING_CONTROL_HXX_
+#define _SVX_SIDEBAR_NUMBERING_CONTROL_HXX_
+
+
+#include "svx/sidebar/PopupControl.hxx"
+#include "svx/sidebar/ValueSetWithTextControl.hxx"
+#include <sfx2/bindings.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/ctrltool.hxx>
+#include "ParaPropertyPanel.hxx"
+#include <vcl/fixed.hxx>
+#include <svl/poolitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <vcl/button.hxx>
+
+
+namespace svx { namespace sidebar {
+
+
+class ParaNumberingControl:public svx::sidebar::PopupControl
+{
+private:
+ SvxNumValueSet2 maNumberVS;
+ FixedImage maFISep;
+ PushButton maMoreButton;
+ ParaPropertyPanel& mrParaPropertyPanel;
+ SfxBindings* mpBindings;
+
+ DECL_LINK(NumSelectHdl_Impl, ValueSet*);
+ DECL_LINK(MoreButtonClickHdl_Impl, void*);
+
+public:
+ ParaNumberingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
+ ~ParaNumberingControl();
+ void ToGetFocus();
+ void UpdateValueSet();
+
+};
+
+
+}}
+
+#endif
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,64 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "ParaNumberingPopup.hxx"
+#include "ParaNumberingControl.hxx"
+#include <boost/bind.hpp>
+#include <unotools/viewoptions.hxx>
+
+namespace svx { namespace sidebar {
+
+ParaNumberingPopup::ParaNumberingPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator)
+ : Popup(
+ pParent,
+ rControlCreator,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Paragraph Numbering")))
+{
+}
+
+
+
+
+ParaNumberingPopup::~ParaNumberingPopup (void)
+{
+}
+
+
+
+
+void ParaNumberingPopup::UpdateValueSet ()
+{
+ ProvideContainerAndControl();
+
+ ParaNumberingControl* pControl = dynamic_cast<ParaNumberingControl*>(mpControl.get());
+ if (pControl != NULL)
+ pControl->UpdateValueSet();
+}
+
+
+
+} } // end of namespace svx::sidebar
+
+
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx?rev=1463154&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx Mon Apr 1 14:43:34 2013
@@ -0,0 +1,54 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_NUMBERING_POPUP_HXX_
+#define _SVX_SIDEBAR_NUMBERING_POPUP_HXX_
+
+#include "svx/sidebar/Popup.hxx"
+
+#include <boost/function.hpp>
+#include <svl/poolitem.hxx>
+#include <tools/fldunit.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+
+namespace svx { namespace sidebar {
+
+class ParaNumberingPopup
+ : public Popup
+{
+public :
+ ParaNumberingPopup (
+ Window* pParent,
+ const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator);
+ ~ParaNumberingPopup (void);
+
+ void UpdateValueSet ();
+//private:
+ //void PopupModeEndCallback (void);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif
+
+
+
+
Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx
------------------------------------------------------------------------------
svn:executable = *
|