[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-10-12 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   21 +++-
 cui/source/tabpages/tabarea.cxx |   61 --
 cui/uiconfig/ui/areadialog.ui   |   70 
 3 files changed, 21 insertions(+), 131 deletions(-)

New commits:
commit d19ec9a9bd371248afd7c3ca091a54b1782fddf7
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Aug 4 13:42:24 2016 +0530

[GSoC] Remove fill style tabs from area fill dialog

Change-Id: I7409118cbbab1350dda169d5bdfef51b7354de9f
Reviewed-on: https://gerrit.libreoffice.org/27864
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 7f1decb..2d612b3 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -106,11 +106,6 @@ class SvxAreaTabDialog : public SfxTabDialog
 sal_uInt16m_nAreaTabPage;
 sal_uInt16m_nShadowTabPage;
 sal_uInt16m_nTransparenceTabPage;
-sal_uInt16m_nColorTabPage;
-sal_uInt16m_nGradientTabPage;
-sal_uInt16m_nHatchTabPage;
-sal_uInt16m_nBitmapTabPage;
-sal_uInt16m_nPatternTabPage;
 
 private:
 SdrModel*   mpDrawModel;
@@ -134,7 +129,9 @@ private:
 ChangeType  mnGradientListState;
 ChangeType  mnHatchingListState;
 
-sal_Int32   mnPos;
+sal_Int16   mnPos;
+PageTypemnPageType;
+boolmbAreaTP;
 
 virtual voidPageCreated( sal_uInt16 nId, SfxTabPage  ) 
override;
 
@@ -255,12 +252,12 @@ private:
 VclPtr m_pBtnPattern;
 ButtonBox  maBox;
 
-SdrModel*   mpDrawModel;
 XColorListRef m_pColorList;
 XGradientListRef  m_pGradientList;
 XHatchListRef m_pHatchingList;
 XBitmapListRefm_pBitmapList;
 XPatternListRef   m_pPatternList;
+SdrModel* mpDrawModel;
 
 // Placeholders for pointer-based entries; these will be inited
 // to point to these so that the page is usable without that
@@ -274,7 +271,11 @@ private:
 ChangeType* m_pnGradientListState;
 ChangeType* m_pnHatchingListState;
 
+PageTypem_nPageType;
 sal_Int32   m_nPos;
+sal_uInt16  m_nDlgType;
+bool*   m_pbAreaTP;
+
 XFillAttrSetItemm_aXFillAttr;
 SfxItemSet& m_rXFSet;
 
@@ -308,13 +309,17 @@ public:
 voidSetBitmapList( XBitmapListRef const & pBmpLst) { m_pBitmapList = 
pBmpLst; }
 voidSetPatternList( XPatternListRef const  ) { m_pPatternList 
= pPtrnLst; }
 voidSetDrawModel( SdrModel* pModel ) { mpDrawModel = pModel; }
-
+voidSetPageType( PageType nInType ) { m_nPageType = nInType; }
+voidSetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
+voidSetPos( sal_uInt16 nInPos ) { m_nPos = nInPos; }
+voidSetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
 virtual void PageCreated(const SfxAllItemSet& aSet) override;
 voidCreatePage(sal_Int32 nId, SfxTabPage& pTab);
 voidSetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
 voidSetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
 voidSetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
 voidSetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
+voidSetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
 };
 
 
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 06acf58..bc88c7d 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -49,12 +49,6 @@ SvxAreaTabDialog::SvxAreaTabDialog
 , m_nAreaTabPage(0)
 , m_nShadowTabPage(0)
 , m_nTransparenceTabPage(0)
-, m_nColorTabPage(0)
-, m_nGradientTabPage(0)
-, m_nHatchTabPage(0)
-//, m_nBitmapTabPage(0)
-, m_nPatternTabPage(0)
-
 , mpDrawModel  ( pModel ),
 mpColorList  ( pModel->GetColorList() ),
 mpNewColorList   ( pModel->GetColorList() ),
@@ -87,11 +81,6 @@ SvxAreaTabDialog::SvxAreaTabDialog
 }
 
 m_nTransparenceTabPage = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", 
SvxTransparenceTabPage::Create,  nullptr);
-m_nColorTabPage = AddTabPage( "RID_SVXPAGE_COLOR", 
SvxColorTabPage::Create, nullptr );
-m_nGradientTabPage = AddTabPage( "RID_SVXPAGE_GRADIENT", 
SvxGradientTabPage::Create, nullptr );
-m_nHatchTabPage = AddTabPage( "RID_SVXPAGE_HATCH", 
SvxHatchTabPage::Create, nullptr );
-m_nBitmapTabPage = AddTabPage( "RID_SVXPAGE_BITMAP", 
SvxBitmapTabPage::Create, SvxBitmapTabPage::GetRanges );
-m_nPatternTabPage = AddTabPage( "RID_SVXPAGE_PATTERN", 
SvxPatte

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-10-12 Thread Rishabh Kumar
 cui/source/dialogs/sdrcelldlg.cxx |4 
 cui/source/inc/cuitabarea.hxx |  181 +++
 cui/source/tabpages/tabarea.cxx   |   34 -
 cui/source/tabpages/tparea.cxx|  971 +-
 cui/source/tabpages/tpbitmap.cxx  |  148 ++---
 cui/source/tabpages/tpcolor.cxx   |  108 ++--
 cui/source/tabpages/tpgradnt.cxx  |  222 +---
 cui/source/tabpages/tphatch.cxx   |  161 ++
 cui/source/tabpages/tppattern.cxx |  205 +++-
 cui/uiconfig/ui/areatabpage.ui|  283 +++
 10 files changed, 873 insertions(+), 1444 deletions(-)

New commits:
commit 686349476e03f951f4a9ff9755b9f71951b64ea5
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Mon Aug 22 16:48:05 2016 +0530

[GSoC] Move all fill style tabs inside area tab

Change-Id: I89e84b7b3c7075ad4107e7bc444ea5c07bc90795
Reviewed-on: https://gerrit.libreoffice.org/27866
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/dialogs/sdrcelldlg.cxx 
b/cui/source/dialogs/sdrcelldlg.cxx
index 3fd53db..d6e9244 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -51,10 +51,6 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage  )
 rAreaPage.SetGradientList( mpGradientList );
 rAreaPage.SetHatchingList( mpHatchingList );
 rAreaPage.SetBitmapList( mpBitmapList );
-rAreaPage.SetPageType( PageType::Area );
-rAreaPage.SetDlgType( 1 );
-rAreaPage.SetPos( 0 );
-rAreaPage.Construct();
 rAreaPage.ActivatePage( mrOutAttrs );
 }
 else if (nId == m_nBorderPageId)
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 0c103cc..7f1decb 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -35,9 +35,60 @@
 #include 
 #include 
 
+#define NO_BUTTON_SELECTED -1
+
 class SdrModel;
 class SvxBitmapCtl;
 
+//
+class ButtonBox
+{
+private:
+sal_Int32 mnCurrentButton;
+std::vector< VclPtr > maButtonList;
+std::map< VclPtr, sal_Int32 > maButtonToPos;
+void SelectButtonImpl( sal_Int32 nPos )
+{
+if(mnCurrentButton != NO_BUTTON_SELECTED)
+{
+maButtonList[mnCurrentButton]->SetPressed(false);
+}
+mnCurrentButton = nPos;
+maButtonList[mnCurrentButton]->SetPressed(true);
+};
+public:
+ButtonBox()
+{
+mnCurrentButton = NO_BUTTON_SELECTED;
+};
+~ButtonBox() {};
+void AddButton(VclPtr pButton)
+{
+maButtonList.push_back(pButton);
+maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() 
- 1) );
+}
+sal_Int32 GetCurrentButtonPos() { return mnCurrentButton; }
+sal_Int32 GetButtonPos( VclPtr pButton )
+{
+std::map< VclPtr, sal_Int32 >::const_iterator aBtnPos 
= maButtonToPos.find(pButton);
+if(aBtnPos != maButtonToPos.end())
+return aBtnPos->second;
+else
+return -1;
+}
+void SelectButton( VclPtr pButton)
+{
+sal_Int32 nPos = GetButtonPos(pButton);
+if(nPos != -1)
+SelectButtonImpl(nPos);
+}
+void clear()
+{
+mnCurrentButton = NO_BUTTON_SELECTED;
+maButtonList.clear();
+};
+};
+
 enum class PageType
 {
 Area,
@@ -47,12 +98,9 @@ enum class PageType
 Color,
 Shadow,
 Transparence,
-Unknown = 0x
+Unknown = 0xFFF
 };
 
-
-//
-
 class SvxAreaTabDialog : public SfxTabDialog
 {
 sal_uInt16m_nAreaTabPage;
@@ -86,9 +134,7 @@ private:
 ChangeType  mnGradientListState;
 ChangeType  mnHatchingListState;
 
-PageTypemnPageType;
 sal_Int32   mnPos;
-boolmbAreaTP;
 
 virtual voidPageCreated( sal_uInt16 nId, SfxTabPage  ) 
override;
 
@@ -199,74 +245,57 @@ class SvxAreaTabPage : public SvxTabPage
 using TabPage::DeactivatePage;
 static const sal_uInt16 pAreaRanges[];
 private:
-VclPtrm_pTypeLB;
-
-VclPtr m_pFillLB;
-VclPtrm_pLbColor;
-VclPtr m_pLbGradient;
-VclPtr m_pLbHatching;
-VclPtr   m_pLbBitmap;
-VclPtrm_pCtlBitmapPreview;
-VclPtrm_pCtlXRectPreview;
-
-const SfxItemSet&   m_rOutAttrs;
+ScopedVclPtr   m_pFillTabPage;
+VclPtr m_pFillTab;
+VclPtr m_pBtnNone;
+VclPtr m_pBtnColor;
+VclPtr m_pBtnGradient;
+VclPtr m_pBtnHatch;
+VclPtr m_pBtnBitmap;

[Libreoffice-commits] core.git: cui/source

2016-08-26 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |6 --
 cui/source/tabpages/tpcolor.cxx   |   39 ---
 cui/source/tabpages/tpgradnt.cxx  |   95 +-
 cui/source/tabpages/tphatch.cxx   |   76 --
 cui/source/tabpages/tppattern.cxx |   50 
 5 files changed, 26 insertions(+), 240 deletions(-)

New commits:
commit 2c2f0eaf6ae6f8b0e235e848b25959301d0941bd
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 23 04:07:24 2016 +0530

[GSoC] Remove popup confirmation dialog in fill style tabs

Enable users to apply custom values without adding it to the preset list

Change-Id: Ida00c6eeb06e717a8aed30f4d230ab616c5b03dd
Reviewed-on: https://gerrit.libreoffice.org/28333
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Yousuf Philips <philip...@hotmail.com>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 0d65c26..ed510c0 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -413,7 +413,6 @@ private:
 DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 
-long CheckChanges_Impl();
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
 sal_Int32 SearchGradientList(const OUString& rGradientName);
 
@@ -496,7 +495,6 @@ private:
 DECL_LINK_TYPED( ClickRenameHdl_Impl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 
-long CheckChanges_Impl();
 sal_Int32 SearchHatchList(const OUString& rHatchName);
 
 public:
@@ -667,8 +665,6 @@ private:
 DECL_LINK_TYPED( ClickRenameHdl_Impl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 
-long CheckChanges_Impl();
-
 public:
 SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
 virtual ~SvxPatternTabPage();
@@ -799,8 +795,6 @@ private:
 static sal_Int32 SearchColorList(OUString const & aColorName);
 DECL_LINK_TYPED( ModifiedHdl_Impl, Edit&, void );
 
-long CheckChanges_Impl();
-
 void UpdateModified();
 css::uno::Reference< css::uno::XComponentContext > m_context;
 public:
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 9571073..696379c 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -303,9 +303,6 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 
 DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
-if ( CheckChanges_Impl() == -1L )
-return DeactivateRC::KeepPage;
-
 if( _pSet )
 FillItemSet( _pSet );
 
@@ -313,42 +310,6 @@ DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* 
_pSet )
 }
 
 
-long SvxColorTabPage::CheckChanges_Impl()
-{
-if( ColorToPercent_Impl( aCurrentColor.GetRed() ) != ColorToPercent_Impl( 
aPreviousColor.GetRed() ) ||
-ColorToPercent_Impl( aCurrentColor.GetGreen() ) != 
ColorToPercent_Impl( aPreviousColor.GetGreen() ) ||
-ColorToPercent_Impl( aCurrentColor.GetBlue() ) != ColorToPercent_Impl( 
aPreviousColor.GetBlue() ) )
-{
-ResMgr& rMgr = CUI_MGR();
-Image aWarningBoxImage = WarningBox::GetStandardImage();
-ScopedVclPtrInstance aMessDlg( GetParentDialog(),
-SVX_RESSTR( RID_SVXSTR_COLOR ),
-ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ),
- );
-aMessDlg->SetButtonText( SvxMessDialogButton::N1,
-ResId( RID_SVXSTR_CHANGE, rMgr ) );
-aMessDlg->SetButtonText( SvxMessDialogButton::N2,
-ResId( RID_SVXSTR_ADD, rMgr ) );
-aMessDlg->DisableButton( SvxMessDialogButton::N1 );
-
-short nRet = aMessDlg->Execute();
-
-switch( nRet )
-{
-case RET_BTN_2:
-{
-ClickAddHdl_Impl( nullptr );
-}
-break;
-
-case RET_CANCEL:
-break;
-}
-}
-return 0;
-}
-
-
 bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
 {
 if( ( nDlgType != 0 ) ||
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index bb62b55..12cc67d 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -254,9 +254,6 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet&  )
 
 DeactivateRC SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
-if( CheckChanges_Impl() == -1L )
-return DeactivateRC::KeepPage;
-
 if( _pSet )
 FillItemSet( _pSet );
 
@@ -264,94 +261,28 @@ DeactivateRC SvxGradientTabPage::DeactivatePage( 
SfxItemSet* _pSet )
 }
 
 
-long SvxGradientT

[Libreoffice-commits] core.git: cui/source

2016-08-25 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |2 -
 cui/source/inc/treeopt.hxx  |4 --
 cui/source/options/treeopt.cxx  |   56 +++-
 cui/source/options/treeopt.src  |1 
 cui/source/tabpages/tpcolor.cxx |   48 --
 5 files changed, 5 insertions(+), 106 deletions(-)

New commits:
commit 28da3aed71a4850f47156d717b6a18fce98154e9
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 23 01:08:41 2016 +0530

[GSoC]Remove Colors entry from Options dialog

Change-Id: I6865bd159659d2386bf32876f5c65ac533522fbc
Reviewed-on: https://gerrit.libreoffice.org/28330
Tested-by: Jenkins <c...@libreoffice.org>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 1c2afd7..0d65c26 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -821,8 +821,6 @@ public:
 
 voidSetColorList( const XColorListRef& pColList );
 const XColorListRef& GetColorList() { return pColorList; }
-voidSaveToViewFrame( SfxViewFrame *pViewFrame );
-voidSetupForViewFrame( SfxViewFrame *pViewFrame );
 
 voidSetPageType( PageType* pInType ) { pPageType = pInType; }
 voidSetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 35bff4e..27c8510 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -137,10 +137,6 @@ private:
 OUString   sTitle;
 OUString   sNotLoadedError;
 
-// for the ColorTabPage
-SfxItemSet*pColorPageItemSet;
-VclPtr mpColorPage;
-
 bool   bForgetSelection;
 bool   bIsFromExtensionManager;
 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 4c4c62f..bab5d94 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -121,8 +121,6 @@ LastPageSaver* OfaTreeOptionsDialog::pLastPageSaver = 
nullptr;
 static const sal_Char*  pViewOptDataName = "page data";
 #define VIEWOPT_DATANAMEOUString::createFromAscii( pViewOptDataName )
 
-static XOutdevItemPool* mpStaticXOutdevItemPool = nullptr;
-
 static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& 
rData )
 {
 rOpt.SetUserItem( VIEWOPT_DATANAME, makeAny( OUString( rData ) ) );
@@ -298,7 +296,6 @@ VclPtr CreateGeneralTabPage( sal_uInt16 nId, 
vcl::Window* pParent, c
 case RID_SFXPAGE_PRINTOPTIONS:  fnCreate = 
::Create; break;
 case OFA_TP_LANGUAGES:  fnCreate = 
::Create; break;
 case RID_SFXPAGE_LINGU: fnCreate = 
::Create; break;
-case RID_SVXPAGE_COLOR: fnCreate = 
::Create; break;
 case OFA_TP_VIEW:   fnCreate = 
::Create; break;
 case OFA_TP_MISC:   fnCreate = 
::Create; break;
 case OFA_TP_MEMORY: fnCreate = 
::Create; break;
@@ -349,7 +346,6 @@ static OptionsMapping_Impl const OptionsMap_Impl[] =
 { "ProductName","View", OFA_TP_VIEW },
 { "ProductName","Print",RID_SFXPAGE_PRINTOPTIONS },
 { "ProductName","Paths",RID_SFXPAGE_PATH },
-{ "ProductName","Colors",   RID_SVXPAGE_COLOR },
 { "ProductName","Fonts",RID_SVX_FONT_SUBSTITUTION 
},
 { "ProductName","Security", RID_SVXPAGE_INET_SECURITY 
},
 { "ProductName","Personalization",  
RID_SVXPAGE_PERSONALIZATION },
@@ -492,8 +488,6 @@ struct OptionsGroupInfo
 pCurrentPageEntry   ( nullptr ),\
 sTitle  ( GetText() ),\
 sNotLoadedError (   CUI_RES( RID_SVXSTR_LOAD_ERROR ) ),\
-pColorPageItemSet   ( nullptr ),\
-mpColorPage ( nullptr ),\
 bForgetSelection( false ),\
 bIsFromExtensionManager( false ), \
 bIsForSetDocumentLanguage( false )
@@ -604,14 +598,11 @@ void OfaTreeOptionsDialog::dispose()
 }
 pEntry = pTreeLB->Next(pEntry);
 }
-delete pColorPageItemSet;
-pColorPageItemSet = nullptr;
 deleteGroupNames();
 pOkPB.clear();
 pBackPB.clear();
 pTreeLB.clear();
 pTabBox.clear();
-mpColorPage.clear();
 SfxModalDialog::dispose();
 }
 
@@ -661,10 +652,7 @@ IMPL_LINK_NOARG_TYPED(OfaTreeOptionsDialog, BackHdl_Impl, 
Button*, void)
 {
 OptionsGroupInfo* pGroupInfo =
 static_cast<OptionsGroupInfo*>(pTreeLB->GetParent( 
pCurrentPageEntry )->GetUserDat

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-08-23 Thread Rishabh Kumar
 cui/source/tabpages/tpbitmap.cxx  |6 --
 cui/source/tabpages/tpgradnt.cxx  |2 ++
 cui/source/tabpages/tphatch.cxx   |2 ++
 cui/source/tabpages/tppattern.cxx |2 ++
 cui/uiconfig/ui/bitmaptabpage.ui  |2 +-
 cui/uiconfig/ui/gradientpage.ui   |2 +-
 cui/uiconfig/ui/hatchpage.ui  |4 ++--
 cui/uiconfig/ui/patterntabpage.ui |5 ++---
 8 files changed, 16 insertions(+), 9 deletions(-)

New commits:
commit 32abc402ee108b5980ed47a6c3132c4fdbc069aa
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 23 02:56:06 2016 +0530

[GSoC] Keep the column width constant in fill style tabs

Change-Id: I55c182a31aa862a4683304f2e45d0cacf603
Reviewed-on: https://gerrit.libreoffice.org/28332
Tested-by: Jenkins <c...@libreoffice.org>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index b173550..9776eda 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -41,7 +41,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -132,7 +132,9 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, 
const SfxItemSet& rInA
 m_pBtnImport->SetClickHdl( LINK(this, SvxBitmapTabPage, ClickImportHdl) );
 
 // Calculate size of display boxes
-Size aSize = LogicToPixel(Size(90, 42), MAP_APPFONT);
+Size aSize = getDrawPreviewOptimalSize(this);
+m_pBitmapLB->set_width_request(aSize.Width());
+m_pBitmapLB->set_height_request(aSize.Height());
 m_pCtlBitmapPreview->set_width_request(aSize.Width());
 m_pCtlBitmapPreview->set_height_request(aSize.Height());
 
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index f63877b..bb62b55 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -86,6 +86,8 @@ SvxGradientTabPage::SvxGradientTabPage
 get(m_pGradientLB, "gradientpresetlist");
 get(m_pCtlPreview, "previewctl");
 Size aSize = getDrawPreviewOptimalSize(this);
+m_pGradientLB->set_width_request(aSize.Width());
+m_pGradientLB->set_height_request(aSize.Height());
 m_pCtlPreview->set_width_request(aSize.Width());
 m_pCtlPreview->set_height_request(aSize.Height());
 get(m_pBtnAdd, "add");
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 7c8a6f7..a536aaf 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -79,6 +79,8 @@ SvxHatchTabPage::SvxHatchTabPage
 get(m_pHatchLB , "hatchpresetlist");
 get(m_pCtlPreview, "previewctl");
 Size aSize = getDrawPreviewOptimalSize(this);
+m_pHatchLB->set_width_request(aSize.Width());
+m_pHatchLB->set_height_request(aSize.Height());
 m_pCtlPreview->set_width_request(aSize.Width());
 m_pCtlPreview->set_height_request(aSize.Height());
 get(m_pBtnAdd, "add");
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 8c1a3f8..f76b04a 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -113,6 +113,8 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* 
pParent, const SfxItemSet& r
 
 // size of the bitmap display
 Size aSize = getDrawPreviewOptimalSize(this);
+m_pPatternLB->set_width_request(aSize.Width());
+m_pPatternLB->set_height_request(aSize.Height());
 m_pCtlPreview->set_width_request(aSize.Width());
 m_pCtlPreview->set_height_request(aSize.Height());
 
diff --git a/cui/uiconfig/ui/bitmaptabpage.ui b/cui/uiconfig/ui/bitmaptabpage.ui
index 1022dde..7b7148f 100644
--- a/cui/uiconfig/ui/bitmaptabpage.ui
+++ b/cui/uiconfig/ui/bitmaptabpage.ui
@@ -63,7 +63,7 @@
 True
 False
 0
-Fill
+Bitmap
 
   
 
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 93bdafb..8ab982b 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -21,7 +21,7 @@
 True
 False
 6
-12
+6
 
   
 True
diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index ea97e8b..fd12b3e 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -23,7 +23,7 @@
 True
 True
 6
-12
+6
 
   
 True
@@ -50,7 +50,7 @@
 True
   
   
-False
+True
 True
 0
   
diff --git a/cui/uiconfig/ui/patterntabpage.ui 
b/cui/uiconfig/ui/patterntabpage.ui
index ffd943a..03bfe52 100644
--- a/cui/uicon

[Libreoffice-commits] core.git: cui/uiconfig

2016-08-22 Thread Rishabh Kumar
 cui/uiconfig/ui/gradientpage.ui |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit fc185fd35360a84136dd834bfdcd2e522350999a
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 23 00:40:10 2016 +0530

Add spacing between listbox and spin box in gradient tab

Change-Id: Ib0e3ec686681ea71f24ccc52fbc408c091bdb270
Reviewed-on: https://gerrit.libreoffice.org/28328
Reviewed-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>

diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index c592f5c..93bdafb 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -467,6 +467,7 @@
   
 True
 True
+6
 ●
 percentadjustment
   
@@ -482,7 +483,7 @@
 
   
   
-False
+True
 True
 5
   
@@ -512,6 +513,7 @@
   
 True
 True
+6
 ●
 percentadjustment
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-08-17 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   37 ++-
 cui/source/tabpages/tabarea.cxx  |2 
 cui/source/tabpages/tpbitmap.cxx |  469 ++-
 cui/uiconfig/ui/bitmaptabpage.ui |  387 
 4 files changed, 885 insertions(+), 10 deletions(-)

New commits:
commit 0e867bc4cba66c14d543e111ea8ab89dc2444ee0
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Aug 12 04:22:28 2016 +0530

[GSoC] Add new Bitmap controls to bitmap tab

Change-Id: I0eb59e5082da1efa52dcb3b85f6e4129aad3e676
Reviewed-on: https://gerrit.libreoffice.org/26402
Tested-by: Jenkins <c...@libreoffice.org>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 25c0924..2d4935f 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -33,9 +33,9 @@
 #include 
 #include 
 #include 
+#include 
 
 class SdrModel;
-class SdrView;
 class SvxBitmapCtl;
 
 //
@@ -534,9 +534,23 @@ class SvxBitmapTabPage : public SvxTabPage
 {
 using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
+static const sal_uInt16 pBitmapRanges[];
 private:
 
 VclPtr   m_pBitmapLB;
+VclPtrm_pBitmapStyleLB;
+VclPtr m_pSizeBox;
+VclPtr   m_pTsbScale;
+VclPtrm_pBitmapWidth;
+VclPtrm_pBitmapHeight;
+VclPtr m_pPositionBox;
+VclPtrm_pPositionLB;
+VclPtr m_pPositionOffBox;
+VclPtrm_pPositionOffX;
+VclPtrm_pPositionOffY;
+VclPtr m_pTileOffBox;
+VclPtrm_pTileOffLB;
+VclPtrm_pTileOffset;
 VclPtr m_pBtnImport;
 VclPtrm_pCtlBitmapPreview;
 
@@ -547,6 +561,8 @@ private:
 XFillStyleItem m_aXFStyleItem;
 XFillBitmapItemm_aXBitmapItem;
 
+double m_fObjectWidth;
+double m_fObjectHeight;
 sal_uInt16*m_nPageType;
 sal_uInt16 m_nDlgType;
 sal_Int32* m_nPos;
@@ -555,12 +571,28 @@ private:
 
 XFillAttrSetItem   m_aXFillAttr;
 SfxItemSet&m_rXFSet;
-
+const SdrView* mpView;
+SfxMapUnit mePoolUnit;
+FieldUnit  meDlgUnit;
+Size   rBitmapSize;
+Size   rFilledSize;
+Size   rZoomedSize;
+sal_Int64  nFilledWidthPercent;
+sal_Int64  nFilledHeightPercent;
+sal_Int64  nZoomedWidthPercent;
+sal_Int64  nZoomedHeightPercent;
 DECL_LINK_TYPED( ModifyBitmapHdl, ValueSet*, void );
+DECL_LINK_TYPED( ClickScaleHdl, Button*, void );
+DECL_LINK_TYPED( ModifyBitmapStyleHdl, ListBox&, void );
+DECL_LINK_TYPED( ModifyBitmapSizeHdl, Edit&, void );
+DECL_LINK_TYPED( ModifyBitmapPositionHdl, ListBox&, void );
+DECL_LINK_TYPED( ModifyPositionOffsetHdl, Edit&, void );
+DECL_LINK_TYPED( ModifyTileOffsetHdl, Edit&, void );
 DECL_LINK_TYPED( ClickRenameHdl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ClickDeleteHdl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ClickImportHdl, Button*, void );
 void ClickBitmapHdl_Impl();
+void CalculateBitmapPresetSize();
 sal_Int32 SearchBitmapList(const OUString& rBitmapName);
 
 public:
@@ -571,6 +603,7 @@ public:
 voidConstruct();
 
 static VclPtr Create( vcl::Window*, const SfxItemSet* );
+static const sal_uInt16* GetRanges() { return pBitmapRanges; }
 
 virtual bool FillItemSet( SfxItemSet* ) override;
 virtual void Reset( const SfxItemSet * ) override;
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 1b9edb6..e403d45 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -92,7 +92,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
 m_nColorTabPage = AddTabPage( "RID_SVXPAGE_COLOR", 
SvxColorTabPage::Create, nullptr );
 m_nGradientTabPage = AddTabPage( "RID_SVXPAGE_GRADIENT", 
SvxGradientTabPage::Create, nullptr );
 m_nHatchTabPage = AddTabPage( "RID_SVXPAGE_HATCH", 
SvxHatchTabPage::Create, nullptr );
-m_nBitmapTabPage = AddTabPage( "RID_SVXPAGE_BITMAP", 
SvxBitmapTabPage::Create, nullptr );
+m_nBitmapTabPage = AddTabPage( "RID_SVXPAGE_BITMAP", 
SvxBitmapTabPage::Create, SvxBitmapTabPage::GetRanges );
 m_nPatternTabPage = AddTabPage( "RID_SVXPAGE_PATTERN", 
SvxPatternTabPage::Create,  nullptr);
 
 SetCurPageId( "RID_SVXPAGE_AREA" );
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap

[Libreoffice-commits] core.git: sd/source sd/uiconfig

2016-08-05 Thread Rishabh Kumar
 sd/source/ui/dlg/dlgpage.cxx   |   10 ++
 sd/source/ui/inc/dlgpage.hxx   |2 +-
 sd/uiconfig/sdraw/ui/drawpagedialog.ui |   15 +++
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 5693ee7a41fbe4de337cef3b10294edd670be804
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Aug 5 17:57:49 2016 +0530

[GSoC] Add Transparency tab to background dialog

Change-Id: I33dffe2435c44116842240e4b481947415317b5b
Reviewed-on: https://gerrit.libreoffice.org/27906
Reviewed-by: Yousuf Philips <philip...@hotmail.com>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index bba44fd..e23b832 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -62,9 +62,13 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, vcl::Window* 
pParent, const SfxIte
 
 mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_PAGE ), nullptr );
 mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_AREA ), nullptr );
+mnTransparence = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", 
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr );
 
 if(!bAreaPage)  // I have to add the page before I remove it !
+{
 RemoveTabPage( "RID_SVXPAGE_AREA" );
+RemoveTabPage( "RID_SVXPAGE_TRANSPARENCE" );
+}
 }
 
 void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
@@ -89,6 +93,12 @@ void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& 
rPage)
 aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
 rPage.PageCreated(aSet);
 }
+else if (nId == mnTransparence)
+{
+aSet.Put(SfxUInt16Item(SID_PAGE_TYPE,0));
+aSet.Put(SfxUInt16Item(SID_DLG_TYPE,1));
+rPage.PageCreated(aSet);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx
index c624ecb..4818c66 100644
--- a/sd/source/ui/inc/dlgpage.hxx
+++ b/sd/source/ui/inc/dlgpage.hxx
@@ -40,7 +40,7 @@ private:
 XPatternListRef   mpPatternList;
 sal_uInt16mnArea;
 sal_uInt16mnPage;
-
+sal_uInt16mnTransparence;
 public:
 
 SdPageDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SfxItemSet* 
pAttr, bool bAreaPage = true );
diff --git a/sd/uiconfig/sdraw/ui/drawpagedialog.ui 
b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
index f43e406..087cc4b 100644
--- a/sd/uiconfig/sdraw/ui/drawpagedialog.ui
+++ b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
@@ -99,6 +99,7 @@
 Page
   
   
+0
 False
   
 
@@ -116,6 +117,20 @@
 False
   
 
+
+  
+
+
+  
+True
+False
+Transparency
+  
+  
+2
+False
+  
+
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2016-08-05 Thread Rishabh Kumar
 cui/source/tabpages/tabarea.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 755a4838054050111f2118d0957041120831f5df
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Aug 5 15:01:56 2016 +0530

Don't save the color list

Color list can't be modified, so no need to save the list

Change-Id: Idb11343f7812e1a30df9a5c0d26b6f22bd92c107
Reviewed-on: https://gerrit.libreoffice.org/27899
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index a1b7c8d..1b9edb6 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -224,9 +224,6 @@ void SvxAreaTabDialog::SavePalettes()
 
 if (mnColorListState & ChangeType::MODIFIED && mpColorList.is())
 {
-mpColorList->SetPath( aPath );
-mpColorList->Save();
-
 SvxColorListItem aItem( mpColorList, SID_COLOR_TABLE );
 // ToolBoxControls are informed:
 if ( pShell )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx officecfg/registry svx/source

2016-08-03 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx  |   35 
 cui/source/tabpages/tpcolor.cxx|  650 +-
 cui/uiconfig/ui/colorpage.ui   | 1348 ++---
 include/svx/Palette.hxx|   10 
 include/svx/PaletteManager.hxx |6 
 include/svx/dialogs.hrc|2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   21 
 svx/source/tbxctrls/PaletteManager.cxx |   54 
 svx/source/tbxctrls/tbcontrl.cxx   |5 
 svx/source/tbxctrls/tbcontrl.src   |4 
 10 files changed, 926 insertions(+), 1209 deletions(-)

New commits:
commit 571866eaba914742a48938abb6c8495e97868bf1
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 2 23:53:38 2016 +0530

[GSoC] Rework of color tab

New Features -

1. Multiple Palettes in color tab.
2. Remember the selected palette.
3. Recent colors.
4. Custom colors.

Change-Id: I36a438a0c282059ddcbda35f934fcd90337fd451
Reviewed-on: https://gerrit.libreoffice.org/26868
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Yousuf Philips <philip...@hotmail.com>
Tested-by: Yousuf Philips <philip...@hotmail.com>
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 8eb92b9..25c0924 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 class SdrModel;
 class SdrView;
@@ -671,28 +673,16 @@ class SvxColorTabPage : public SfxTabPage
 using TabPage::DeactivatePage;
 
 private:
-static const XPropertyListType meType = XCOLOR_LIST;
+XPropertyListType   meType;
 
 VclPtr mpTopDlg;
-VclPtr   m_pBoxEmbed;
-VclPtr m_pBtnLoad;
-VclPtr m_pBtnSave;
-VclPtr  m_pTableName;
-
-DECL_LINK_TYPED( EmbedToggleHdl_Impl, CheckBox&, void );
-DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void  );
-
-XPropertyListRef GetList();
-bool GetEmbed();
-void SetEmbed( bool bEmbed );
-void UpdateTableName();
-void EnableSave( bool bCanSave );
 
 SvxColorTabPageShadow *pShadow;
-VclPtrm_pLbColor;
 
+PaletteManager maPaletteManager;
+VclPtrm_pSelectPalette;
 VclPtr   m_pValSetColorList;
+VclPtr   m_pValSetRecentList;
 
 VclPtrm_pCtlPreviewOld;
 VclPtrm_pCtlPreviewNew;
@@ -723,9 +713,8 @@ private:
 VclPtrm_pKpreset;
 
 VclPtr m_pBtnAdd;
-VclPtr m_pBtnModify;
-VclPtr m_pBtnWorkOn;
 VclPtr m_pBtnDelete;
+VclPtr m_pBtnWorkOn;
 
 const SfxItemSet&   rOutAttrs;
 
@@ -754,26 +743,26 @@ private:
 sal_uInt16  PercentToColor_Impl( sal_uInt16 nPercent );
 
 void ImpColorCountChanged();
-
+void FillPaletteLB();
 
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickWorkOnHdl_Impl, Button*, void );
+DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
 
-DECL_LINK_TYPED( SelectColorLBHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( SelectPaletteLBHdl, ListBox&, void );
 DECL_LINK_TYPED( SelectValSetHdl_Impl, ValueSet*, void );
 DECL_LINK_TYPED( SelectColorModeHdl_Impl, RadioButton&, void );
 void ChangeColor(const Color );
 void SetColorModel(ColorModel eModel);
 void ChangeColorModel();
 void UpdateColorValues();
-sal_Int32 SearchColorList(OUString const & aColorName);
+static sal_Int32 SearchColorList(OUString const & aColorName);
 DECL_LINK_TYPED( ModifiedHdl_Impl, Edit&, void );
 
 long CheckChanges_Impl();
 
 void UpdateModified();
+css::uno::Reference< css::uno::XComponentContext > m_context;
 public:
 SvxColorTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
 virtual ~SvxColorTabPage();
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 82599b0..4c70df8 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -45,243 +45,13 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
-XPropertyListRef SvxColorTabPage::GetList()
-{
-SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( 
mpTopDlg.get() );
-SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( 
mpTopDlg.get() );
-
-XColorListRef pList;
-if( pArea )
-pList = pArea->GetNewColorList();
-if( pLine )
-

[Libreoffice-commits] core.git: cui/source

2016-08-01 Thread Rishabh Kumar
 cui/source/dialogs/dlgname.cxx |   13 +
 cui/source/inc/dlgname.hxx |1 +
 2 files changed, 14 insertions(+)

New commits:
commit 55859becb87816aac0170f0f22d5d748fc022612
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sat Jul 30 15:13:02 2016 +0530

[GSoC] Add functionality to disable buttons in SvxMessDialog

Change-Id: Ib25b65a6d1fd760d2a8535c1a97cfbb889d7a824
Reviewed-on: https://gerrit.libreoffice.org/27715
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 6772f44..71bd359 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -202,6 +202,19 @@ IMPL_LINK_NOARG_TYPED(SvxMessDialog, Button2Hdl, Button*, 
void)
 
 /*/
 
+void SvxMessDialog::DisableButton( SvxMessDialogButton nBtnId )
+{
+switch( nBtnId )
+{
+case SvxMessDialogButton::N1:
+pBtn1->Disable();
+break;
+case SvxMessDialogButton::N2:
+pBtn2->Disable();
+break;
+}
+}
+
 void SvxMessDialog::SetButtonText( SvxMessDialogButton nBtnId, const OUString& 
rNewTxt )
 {
 switch ( nBtnId )
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index ac183a8..4b28ed5 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -145,6 +145,7 @@ public:
 SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const 
OUString& rDesc, Image* pImg = nullptr );
 virtual ~SvxMessDialog();
 virtual void dispose() override;
+void DisableButton( SvxMessDialogButton nBtnId);
 
 voidSetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt 
);
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2016-07-30 Thread Rishabh Kumar
 svx/source/tbxctrls/PaletteManager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 47f8170e5b7dfd959e1fe77599289f280f30bbd4
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sat Jul 30 22:17:50 2016 +0530

Change data type of loop variant to size_type

Change-Id: I7ec187defb51362caddef3439a1a09257ef9f4dc
Reviewed-on: https://gerrit.libreoffice.org/27729
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 74a87f7..e1da1d7 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -228,7 +228,7 @@ void PaletteManager::AddRecentColor(const Color& 
rRecentColor)
 if( maRecentColors.size() > mnMaxRecentColors )
 maRecentColors.pop_back();
 css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
-for(sal_uInt32 i = 0;i < maRecentColors.size();i++)
+for(std::deque::size_type i = 0;i < maRecentColors.size();i++)
 {
 aColorList[i] = static_cast(maRecentColors[i].GetColor());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2016-07-29 Thread Rishabh Kumar
 svx/source/tbxctrls/PaletteManager.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 74a017e27d04be13f072d03cab3a623a6b6d43ae
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sat Jul 30 09:22:45 2016 +0530

Use static_cast for type casting and fix loop variant size

Change-Id: Icc41693730ec8a68e3f3d68adff57fee02b7a689
Reviewed-on: https://gerrit.libreoffice.org/27714
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index e14c172..74a87f7 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -228,9 +228,9 @@ void PaletteManager::AddRecentColor(const Color& 
rRecentColor)
 if( maRecentColors.size() > mnMaxRecentColors )
 maRecentColors.pop_back();
 css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
-for(sal_uInt16 i = 0;i < maRecentColors.size();i++)
+for(sal_uInt32 i = 0;i < maRecentColors.size();i++)
 {
-aColorList[i] = (int)maRecentColors[i].GetColor();
+aColorList[i] = static_cast(maRecentColors[i].GetColor());
 }
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create(m_context));
 officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx officecfg/registry svx/source

2016-07-29 Thread Rishabh Kumar
 include/svx/PaletteManager.hxx |2 -
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 ++
 svx/source/tbxctrls/PaletteManager.cxx |   20 -
 3 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 7f262a41017685709c288b57c8f03244e8c6149e
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Jul 29 18:39:46 2016 +0530

[GSoC] Fix recent colors in color popup widget

Save recent colors in user configuration.

Change-Id: I1637e9fe3150bd1892f72ff9df06dc2a7c3e1e9e
Reviewed-on: https://gerrit.libreoffice.org/27688
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 09adc36..c8eb922 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -52,7 +52,7 @@ class PaletteManager
 std::vector<std::unique_ptr> m_Palettes;
 
 std::function<void(const OUString&, const Color&)> maColorSelectFunction;
-
+css::uno::Reference < css::uno::XComponentContext > m_context;
 public:
 PaletteManager();
 ~PaletteManager();
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 2d9ea8c..5edc96c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3406,6 +3406,16 @@
 
   
 
+
+  
+Contains recent colors and custom colors
+  
+  
+
+  List of Recent colors
+
+   
  
+
 
   
 Contains settings that specify the common help settings.
diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 55123aa..e14c172 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -30,6 +30,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 PaletteManager::PaletteManager() :
 
mnMaxRecentColors(Application::GetSettings().GetStyleSettings().GetColorValueSetColumnCount()),
@@ -38,7 +40,8 @@ PaletteManager::PaletteManager() :
 mnColorCount(0),
 mpBtnUpdater(nullptr),
 mLastColor(COL_AUTO),
-maColorSelectFunction(PaletteManager::DispatchColorCommand)
+maColorSelectFunction(PaletteManager::DispatchColorCommand),
+m_context(comphelper::getProcessComponentContext())
 {
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 if(pDocSh)
@@ -134,6 +137,13 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet 
)
 
 void PaletteManager::ReloadRecentColorSet(SvxColorValueSet& rColorSet)
 {
+maRecentColors.clear();
+css::uno::Sequence< sal_Int32 > 
Colorlist(officecfg::Office::Common::UserColors::RecentColor::get());
+for(int i = 0;i < Colorlist.getLength();i++)
+{
+Color aColor( Colorlist[i] );
+maRecentColors.push_back( aColor );
+}
 rColorSet.Clear();
 int nIx = 1;
 for(std::deque::const_iterator it = maRecentColors.begin();
@@ -217,6 +227,14 @@ void PaletteManager::AddRecentColor(const Color& 
rRecentColor)
 maRecentColors.push_front( rRecentColor );
 if( maRecentColors.size() > mnMaxRecentColors )
 maRecentColors.pop_back();
+css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
+for(sal_uInt16 i = 0;i < maRecentColors.size();i++)
+{
+aColorList[i] = (int)maRecentColors[i].GetColor();
+}
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create(m_context));
+officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch);
+batch->commit();
 }
 
 void PaletteManager::SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2016-07-27 Thread Rishabh Kumar
 cui/source/tabpages/tpbitmap.cxx |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 5e0b0de0af07d3d8415370f1dea4dd61e811eed0
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 27 16:53:30 2016 +0530

Bug fix: Fill bitmap item set only when bitmap tab is selected

Change-Id: I9bb7bdeecfcd51e8191f82c649585af8458f1001
Reviewed-on: https://gerrit.libreoffice.org/27578
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 51668d12..09012bb 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -137,20 +137,22 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
 bool bModified = false;
 if( m_nDlgType == 0 && !*m_pbAreaTP )
 {
-rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
-size_t nPos = m_pBitmapLB->GetSelectItemPos();
-if(VALUESET_ITEM_NOTFOUND != nPos)
+if(PT_BITMAP == *m_nPageType)
 {
-const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( 
static_cast(nPos) );
-const OUString aString(m_pBitmapLB->GetItemText( 
m_pBitmapLB->GetSelectItemId() ));
-rAttrs->Put(XFillBitmapItem(aString, 
pXBitmapEntry->GetGraphicObject()));
-bModified = true;
-}
+rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
+size_t nPos = m_pBitmapLB->GetSelectItemPos();
+if(VALUESET_ITEM_NOTFOUND != nPos)
+{
+const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( 
static_cast(nPos) );
+const OUString aString(m_pBitmapLB->GetItemText( 
m_pBitmapLB->GetSelectItemId() ));
+rAttrs->Put(XFillBitmapItem(aString, 
pXBitmapEntry->GetGraphicObject()));
+bModified = true;
+}
 
-rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
-rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
+rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+}
 }
-
 return bModified;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2016-07-27 Thread Rishabh Kumar
 cui/uiconfig/ui/patterntabpage.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 706b76d1d561ee628cec1cc13a8b4fd52f91ae4d
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 27 13:40:03 2016 +0530

Align pattern preview correctly

Change-Id: I7513934e3195297bc6b68ff7149e9fd78922dcdc
Reviewed-on: https://gerrit.libreoffice.org/27562
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/uiconfig/ui/patterntabpage.ui 
b/cui/uiconfig/ui/patterntabpage.ui
index 430e54d..ffd943a 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -321,6 +321,7 @@
   
 False
 False
+end
 2
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-26 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx  |   25 -
 cui/source/tabpages/tparea.cxx |  796 -
 cui/uiconfig/ui/areatabpage.ui |  521 --
 3 files changed, 2 insertions(+), 1340 deletions(-)

New commits:
commit 7438bc1f0c4fd42420460a144cc074bfb8091705
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Jul 8 02:48:42 2016 +0530

[GSoC] Remove bitmap controls from area tab

Change-Id: Ie8d62b42c9b5ce9a4d087d809e7c395b8c71e667
Reviewed-on: https://gerrit.libreoffice.org/27024
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 54bd78b..82676af 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -203,31 +203,6 @@ private:
 VclPtr m_pLbHatching;
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
-
-VclPtr m_pBxBitmap;
-
-VclPtr   m_pFlSize;
-VclPtrm_pTsbOriginal;
-VclPtrm_pTsbScale;
-VclPtrm_pGridX_Y;
-VclPtr  m_pFtXSize;
-VclPtrm_pMtrFldXSize;
-VclPtr  m_pFtYSize;
-VclPtrm_pMtrFldYSize;
-
-VclPtr   m_pFlPosition;
-VclPtr m_pCtlPosition;
-VclPtrm_pGridOffset;
-VclPtrm_pMtrFldXOffset;
-VclPtrm_pMtrFldYOffset;
-VclPtr m_pBxTile;
-VclPtrm_pTsbTile;
-VclPtrm_pTsbStretch;
-VclPtr   m_pFlOffset;
-VclPtrm_pRbtRow;
-VclPtrm_pRbtColumn;
-VclPtrm_pMtrFldOffset;
-
 VclPtrm_pCtlXRectPreview;
 
 const SfxItemSet&   m_rOutAttrs;
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 6f42552..c9f5cae 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -97,15 +97,7 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 m_pbAreaTP(_sal_Bool),
 
 m_aXFillAttr  ( rInAttrs.GetPool() ),
-m_rXFSet  ( m_aXFillAttr.GetItemSet() ),
-
-m_ePoolUnit(SFX_MAPUNIT_100TH_MM),
-m_eFUnit(FUNIT_NONE),
-
-//
-mbOfferImportButton(false),
-mbDirectGraphicSet(false),
-maDirectGraphic()
+m_rXFSet  ( m_aXFillAttr.GetItemSet() )
 {
 get(m_pTypeLB,"LB_AREA_TYPE");
 get(m_pFillLB,"boxLB_FILL");
@@ -114,70 +106,16 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbHatching,"LB_HATCHING");
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
-
-get(m_pBxBitmap,"boxBITMAP");
-
-get(m_pFlSize,"FL_SIZE");
-get(m_pGridX_Y,"gridX_Y");
-get(m_pTsbOriginal,"TSB_ORIGINAL");
-get(m_pTsbScale,"TSB_SCALE");
-get(m_pFtXSize,"FT_X_SIZE");
-get(m_pMtrFldXSize,"MTR_FLD_X_SIZE");
-get(m_pFtYSize,"FT_Y_SIZE");
-get(m_pMtrFldYSize,"MTR_FLD_Y_SIZE");
-
-get(m_pFlPosition,"framePOSITION");
-get(m_pCtlPosition,"CTL_POSITION");
-get(m_pGridOffset,"gridOFFSET");
-get(m_pMtrFldXOffset,"MTR_FLD_X_OFFSET");
-get(m_pMtrFldYOffset,"MTR_FLD_Y_OFFSET");
-get(m_pBxTile,"boxTILE");
-get(m_pTsbTile,"TSB_TILE");
-get(m_pTsbStretch,"TSB_STRETCH");
-
-get(m_pFlOffset,"FL_OFFSET");
-get(m_pRbtRow,"RBT_ROW");
-get(m_pRbtColumn,"RBT_COLUMN");
-get(m_pBtnImport, "btnimport");
-get(m_pMtrFldOffset,"MTR_FLD_OFFSET");
-
 get(m_pCtlXRectPreview,"CTL_COLOR_PREVIEW");
 
-//so that even for "none" the size requested is the largest
-//size required for any of the areas which might be selected
-//later, so that there's sufficient space
-VclContainer *pMainFrame = get("mainframe");
-Size aBitmapSize(m_pBxBitmap->get_preferred_size());
-Size aMainFrame(aBitmapSize.Width(),aBitmapSize.Height());
-pMainFrame->set_width_request(aMainFrame.Width());
-pMainFrame->set_height_request(aMainFrame.Height());
-
 
 // groups that overlay each other
 m_pLbBitmap->Hide();
 m_pCtlBitmapPreview->Hide();
 
-m_pBxBitmap->Hide();
-
-m_pTsbOriginal->EnableTriState( false );
-
 // this page needs ExchangeSupport
 SetExchangeSupport();
 
-// set Metrics
-m_eFUnit = GetModuleFieldUnit( rInAttrs );
-
-switch ( m_eFUnit )
-{
-case FUNIT_M:
-case FUNIT_KM:
-m_eFUnit = FUNIT_MM;
-break;
-default: ;//prevent warning
-}
-SetFieldUnit( *m_pMtrFldXSize, m_eFUnit, true );
-SetFiel

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk

2016-07-26 Thread Rishabh Kumar
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/source/inc/cuitabarea.hxx|   61 +-
 cui/source/tabpages/tabarea.cxx  |   11 +
 cui/source/tabpages/tpbitmap.cxx |  396 +++
 cui/uiconfig/ui/areadialog.ui|   18 +
 cui/uiconfig/ui/bitmaptabpage.ui |  142 +
 7 files changed, 627 insertions(+), 3 deletions(-)

New commits:
commit a44a0690da6d7cdc173fffea2b87ca899eb41ecd
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Jul 26 22:54:24 2016 +0530

[GSoC] Add Bitmap tab to area dialog

Change-Id: I6549e7eb4efd24d035b0383a750698a4c3f16cf7
Reviewed-on: https://gerrit.libreoffice.org/27546
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index c81ef962..2196201 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -197,6 +197,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
 cui/source/tabpages/tparea \
+cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
 cui/source/tabpages/tpgradnt \
 cui/source/tabpages/tphatch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 60c8d18..df494ce 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/baselinksdialog \
+   cui/uiconfig/ui/bitmaptabpage \
cui/uiconfig/ui/blackorwhitelistentrydialog \
cui/uiconfig/ui/borderareatransparencydialog \
cui/uiconfig/ui/borderbackgrounddialog \
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 46cb922..54bd78b 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -46,7 +46,7 @@ class SvxAreaTabDialog : public SfxTabDialog
 sal_uInt16m_nColorTabPage;
 sal_uInt16m_nGradientTabPage;
 sal_uInt16m_nHatchTabPage;
-//sal_uInt16m_nBitmapTabPage;
+sal_uInt16m_nBitmapTabPage;
 sal_uInt16m_nPatternTabPage;
 
 private:
@@ -553,6 +553,65 @@ public:
 
 //
 
+class SvxBitmapTabPage : public SvxTabPage
+{
+using TabPage::ActivatePage;
+using TabPage::DeactivatePage;
+private:
+
+VclPtr   m_pBitmapLB;
+VclPtr m_pBtnImport;
+VclPtrm_pCtlBitmapPreview;
+
+const SfxItemSet&  m_rOutAttrs;
+
+XBitmapListRef m_pBitmapList;
+ChangeType*m_pnBitmapListState;
+XFillStyleItem m_aXFStyleItem;
+XFillBitmapItemm_aXBitmapItem;
+
+sal_uInt16*m_nPageType;
+sal_uInt16 m_nDlgType;
+sal_Int32* m_nPos;
+
+bool*  m_pbAreaTP;
+
+XFillAttrSetItem   m_aXFillAttr;
+SfxItemSet&m_rXFSet;
+
+DECL_LINK_TYPED( ModifyBitmapHdl, ValueSet*, void );
+DECL_LINK_TYPED( ClickRenameHdl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickDeleteHdl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickImportHdl, Button*, void );
+void ClickBitmapHdl_Impl();
+sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+
+public:
+SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+virtual ~SvxBitmapTabPage();
+virtual void dispose() override;
+
+voidConstruct();
+
+static VclPtr Create( vcl::Window*, const SfxItemSet* );
+
+virtual bool FillItemSet( SfxItemSet* ) override;
+virtual void Reset( const SfxItemSet * ) override;
+virtual void ActivatePage( const SfxItemSet& rSet ) override;
+virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
+virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
+
+voidSetBitmapList( XBitmapListRef pBmpLst) { m_pBitmapList = pBmpLst; }
+
+voidSetPageType( sal_uInt16* pInType ) { m_nPageType = pInType; }
+voidSetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
+voidSetPos( sal_Int32* pInPos ) { m_nPos = pInPos; }
+voidSetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
+voidSetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
+};
+
+//
+
 class SvxPatternTabPage : public SvxTabPage
 {
 using TabPage::ActivatePage;
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index e6b9ae6..a1b7c8d 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -92,6 +92,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
 m_nColorTabPage = AddTabPage(

[Libreoffice-commits] core.git: include/svx svx/source

2016-07-25 Thread Rishabh Kumar
 include/svx/Palette.hxx|4 +
 include/svx/PaletteManager.hxx |2 
 svx/source/tbxctrls/Palette.cxx|   15 +++
 svx/source/tbxctrls/PaletteManager.cxx |   67 +
 svx/source/tbxctrls/tbcontrl.cxx   |3 -
 5 files changed, 59 insertions(+), 32 deletions(-)

New commits:
commit db8ee318293da8967a8294dc558ffae898ba8e6b
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sun Jul 24 17:23:40 2016 +0530

[GSoC] Fix palette selection in sidebar/toolbar color widget

Remember palette selection after the popup is destroyed

Change-Id: Iecd7fd4aa89cf9d2d6842c5b544d037df6818aaf
Reviewed-on: https://gerrit.libreoffice.org/27474
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index fa2c179..1cbb83e 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -35,6 +35,7 @@ public:
 virtual ~Palette();
 
 virtual const OUString& GetName() = 0;
+virtual const OUString& GetPath() = 0;
 virtual voidLoadColorSet( SvxColorValueSet& rColorSet ) = 
0;
 
 virtual boolIsValid() = 0;
@@ -55,6 +56,7 @@ public:
 virtual ~PaletteASE();
 
 virtual const OUString& GetName() override;
+virtual const OUString& GetPath() override;
 virtual voidLoadColorSet( SvxColorValueSet& rColorSet ) 
override;
 
 virtual boolIsValid() override;
@@ -79,6 +81,7 @@ public:
 virtual ~PaletteGPL();
 
 virtual const OUString& GetName() override;
+virtual const OUString& GetPath() override;
 virtual voidLoadColorSet( SvxColorValueSet& rColorSet ) 
override;
 
 virtual boolIsValid() override;
@@ -97,6 +100,7 @@ public:
 virtual ~PaletteSOC();
 
 virtual const OUString& GetName() override;
+virtual const OUString& GetPath() override;
 virtual voidLoadColorSet( SvxColorValueSet& rColorSet ) 
override;
 
 virtual boolIsValid() override;
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 2d4c528..09adc36 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -46,6 +46,7 @@ class PaletteManager
 longmnColorCount;
 svx::ToolboxButtonColorUpdater* mpBtnUpdater;
 
+XColorListRef   pColorList;
 Color   mLastColor;
 std::deque   maRecentColors;
 std::vector<std::unique_ptr> m_Palettes;
@@ -61,6 +62,7 @@ public:
 std::vector GetPaletteList();
 voidSetPalette( sal_Int32 nPos );
 sal_Int32   GetPalette();
+OUStringGetPaletteName();
 
 longGetColorCount();
 longGetRecentColorCount();
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index 9a5c76a..82789e9 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -53,6 +53,11 @@ const OUString& PaletteASE::GetName()
 return maASEPaletteName;
 }
 
+const OUString& PaletteASE::GetPath()
+{
+return maFPath;
+}
+
 bool PaletteASE::IsValid()
 {
 return mbValidPalette;
@@ -186,6 +191,11 @@ const OUString& PaletteGPL::GetName()
 return maGPLPaletteName;
 }
 
+const OUString& PaletteGPL::GetPath()
+{
+return maFPath;
+}
+
 void PaletteGPL::LoadColorSet( SvxColorValueSet& rColorSet )
 {
 LoadPalette();
@@ -327,6 +337,11 @@ const OUString& PaletteSOC::GetName()
 return maSOCPaletteName;
 }
 
+const OUString& PaletteSOC::GetPath()
+{
+return maFPath;
+}
+
 void PaletteSOC::LoadColorSet( SvxColorValueSet& rColorSet )
 {
 if( !mbLoadedPalette )
diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 535134f..55123aa 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -33,13 +33,22 @@
 
 PaletteManager::PaletteManager() :
 
mnMaxRecentColors(Application::GetSettings().GetStyleSettings().GetColorValueSetColumnCount()),
-mnNumOfPalettes(2),
+mnNumOfPalettes(1),
 mnCurrentPalette(0),
 mnColorCount(0),
 mpBtnUpdater(nullptr),
 mLastColor(COL_AUTO),
 maColorSelectFunction(PaletteManager::DispatchColorCommand)
 {
+SfxObjectShell* pDocSh = SfxObjectShell::Current();
+if(pDocSh)
+{
+const SfxPoolItem* pItem = nullptr;
+if( nullptr != ( pItem = pDocSh->GetItem(SID_COLOR_TABLE) ) )
+pColorList = static_cast(pItem)->GetColorList();
+}
+if(!pColorList.is())
+pColorList = XColorList::CreateStdColorList();
 LoadPalettes();
 mnNumOfPalettes += m_Palettes.size();
 }
@@ -82,

[Libreoffice-commits] core.git: cui/uiconfig

2016-07-21 Thread Rishabh Kumar
 cui/uiconfig/ui/gradientpage.ui |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit e543f5cfc3a83f2d17901ca02646c3dcc8ed17b3
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jul 21 22:11:49 2016 +0530

Keep spacing between widgets consistent in gradient tab

Change-Id: Ida726439644c0b06d1562f82c8ba037dc7399e15
Reviewed-on: https://gerrit.libreoffice.org/27391
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 0be7fbd..c592f5c 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -188,7 +188,7 @@
 False
 start
 3
-3
+6
 
   
 True
@@ -268,7 +268,7 @@
 False
 start
 3
-3
+6
 
   
 True
@@ -370,7 +370,7 @@
 False
 start
 3
-3
+6
 
   
 True
@@ -433,7 +433,7 @@
 False
 start
 3
-3
+6
 
   
 True
@@ -493,7 +493,7 @@
 False
 start
 3
-3
+6
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2016-07-21 Thread Rishabh Kumar
 cui/uiconfig/ui/hatchpage.ui |  278 ---
 1 file changed, 132 insertions(+), 146 deletions(-)

New commits:
commit 63a7e84cfc64ee1dfa5cd70d39bdd52ca306b76f
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jul 21 22:09:22 2016 +0530

Remove unnecessary container in hatch tab

Change-Id: I49f513a6c78a68403b4275ba480add0ca71c4244
Reviewed-on: https://gerrit.libreoffice.org/27390
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index 9552a9e..ea97e8b 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -135,185 +135,171 @@
 6
 12
 
-  
+  
 True
 False
-True
-True
-12
+vertical
+6
+
+  
+True
+False
+0
+_Spacing:
+True
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+True
+●
+distanceadjustment
+  
+  
+False
+True
+1
+  
+
+
+  
+True
+False
+0
+A_ngle:
+True
+  
+  
+False
+True
+2
+  
+
 
-  
+  
 True
 False
-vertical
 6
 
-  
+  
 True
-False
-0
-_Spacing:
-True
+True
+True
+adjustment1
+1
+False
   
   
-False
+True
 True
 0
   
 
 
-  
+  
 True
 True
 ●
-distanceadjustment
+angleadjustment
   
   
 False
-True
+False
 1
   
 
-
-  
-True
-False
-0
-A_ngle:
-True
-  
-  
-False
-True
-2
-  
-
-
-  
-True
-False
-6
-
-  
-True
-True
-True
-adjustment1
-1
-False
-  
-  
-True
-True
-0
-  
-
-
-  
-True
-True
-●
-angleadjustment
-  
-  
-False
-False
-1
-  
-
-  
-  
-False
-True
-3
-  
-
-
-  
-True
-False
-0
-_Line 
type:
-  

[Libreoffice-commits] core.git: cui/source svx/source

2016-07-21 Thread Rishabh Kumar
 cui/source/tabpages/tpgradnt.cxx |2 ++
 cui/source/tabpages/tphatch.cxx  |2 ++
 cui/source/tabpages/tppattern.cxx|2 ++
 svx/source/tbxctrls/SvxPresetListBox.cxx |   10 --
 4 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 6f2b129a8e327f4226314944bc86eca78e5b1797
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jul 21 21:57:26 2016 +0530

Minor UI changes for SvxPresetListBox

1. Reduced item icon size.
2. Add slider depending on the number of entries.

Change-Id: I1fad15861438952664c2afe89fffa08051f6
Reviewed-on: https://gerrit.libreoffice.org/27389
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 0f3d0f5..7e9eba6 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -520,6 +520,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickAddHdl_Impl, 
Button*, void)
 Bitmap aBitmap = m_pGradientList->GetBitmapForPreview( nCount, 
m_pGradientLB->GetIconSize() );
 m_pGradientLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pGradientLB->SelectItem( nId + 1 );
+m_pGradientLB->Resize();
 
 *m_pnGradientListState |= ChangeType::MODIFIED;
 
@@ -579,6 +580,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickDeleteHdl_Impl, SvxPresetListBox*
 m_pGradientLB->RemoveItem( nId );
 nId = m_pGradientLB->GetItemId( 0 );
 m_pGradientLB->SelectItem( nId );
+m_pGradientLB->Resize();
 
 m_pCtlPreview->Invalidate();
 
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 941fe25..33eb0d3 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -584,6 +584,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, 
Button*, void)
 // Insert the new entry at the next ID
 m_pHatchLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pHatchLB->SelectItem( nId + 1 );
+m_pHatchLB->Resize();
 
 *m_pnHatchingListState |= ChangeType::MODIFIED;
 
@@ -640,6 +641,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickDeleteHdl_Impl, 
SvxPresetListBox*, v
 m_pHatchLB->RemoveItem( nId );
 nId = m_pHatchLB->GetItemId(0);
 m_pHatchLB->SelectItem( nId );
+m_pHatchLB->Resize();
 
 m_pCtlPreview->Invalidate();
 
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 48560ce6..4b2570b 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -552,6 +552,7 @@ IMPL_LINK_NOARG_TYPED(SvxPatternTabPage, ClickAddHdl_Impl, 
Button*, void)
 Bitmap aBitmap = m_pPatternList->GetBitmapForPreview( nCount, 
m_pPatternLB->GetIconSize() );
 m_pPatternLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pPatternLB->SelectItem( nId + 1 );
+m_pPatternLB->Resize();
 
 *m_pnPatternListState |= ChangeType::MODIFIED;
 
@@ -672,6 +673,7 @@ IMPL_LINK_NOARG_TYPED(SvxPatternTabPage, 
ClickDeleteHdl_Impl, SvxPresetListBox*,
 m_pPatternLB->RemoveItem( nId );
 nId = m_pPatternLB->GetItemId(0);
 m_pPatternLB->SelectItem( nId );
+m_pPatternLB->Resize();
 
 m_pCtlPreview->Invalidate();
 m_pCtlPixel->Invalidate();
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx 
b/svx/source/tbxctrls/SvxPresetListBox.cxx
index c93f969..1f73a4c 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -32,7 +32,7 @@ SvxPresetListBox::SvxPresetListBox(vcl::Window* pParent, 
WinBits nWinStyle)
 : ValueSet(pParent, nWinStyle),
   nColCount(2),
   nRowCount(5),
-  aIconSize( Size(100,60) )
+  aIconSize( Size(80,60) )
 {
 SetEdgeBlending(true);
 SetExtraSpacing(4);
@@ -45,13 +45,19 @@ VCL_BUILDER_DECL_FACTORY(SvxPresetListBox)
 OString sBorder = VclBuilder::extractCustomProperty(rMap);
 if(!sBorder.isEmpty())
 nWinBits |= WB_BORDER;
-nWinBits |= (WB_ITEMBORDER| WB_3DLOOK|WB_OWNERDRAWDECORATION|WB_VSCROLL);
+nWinBits |= (WB_ITEMBORDER| WB_3DLOOK|WB_OWNERDRAWDECORATION);
 rRet = VclPtr::Create(pParent, nWinBits);
 }
 
 void SvxPresetListBox::Resize()
 {
 DrawLayout();
+WinBits aWinBits(GetStyle());
+if( nColCount*nRowCount <  static_cast(GetItemCount()) )
+aWinBits |= WB_VSCROLL;
+else
+aWinBits &= ~WB_VSCROLL;
+SetStyle(aWinBits);
 ValueSet::Resize();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC week 8: Area Fill dialog

2016-07-21 Thread Rishabh Kumar
Hi,

This week, I completed the following tasks -

1. Redesign of Pattern tab
  - https://gerrit.libreoffice.org/#/c/27323/
  - https://gerrit.libreoffice.org/#/c/27324/
  - https://gerrit.libreoffice.org/#/c/27352/
  - https://gerrit.libreoffice.org/#/c/27353/

2. Color tab - https://gerrit.libreoffice.org/#/c/26868/
 - Requires minor bugfix
 - Received feedback from UX mentors
 - Functionality and workflow for custom color user.soc expected to be
finalized at the design session

3. Bitmap tab - https://gerrit.libreoffice.org/26402
- Almost complete, minor bugfix needed

4. Regressions fixed
- Gradient step count in gradient tab:
https://gerrit.libreoffice.org/#/c/27269/
- Hatch background in hatch tab:
https://gerrit.libreoffice.org/#/c/27258/

5. Reverted the commits of unfinished project features which introduced
regression in LO 5.2

Goals for the next week :
1. Merge Bitmap and color tab.
2. Move all the fillstyle tabs inside area tab.

Warm regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: svx/source

2016-07-21 Thread Rishabh Kumar
 svx/source/xoutdev/xtabptrn.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b4f6abd4ba8c3a65216af3910a32cb1dc089ef5f
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jul 21 12:06:55 2016 +0530

Use assert() instead of OSL_ENSURE()

Change-Id: Ide1e8982b1623c10d8447ad32d2b8cb8ee2451af
Reviewed-on: https://gerrit.libreoffice.org/27358
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx
index 9cbda46..aaa343d 100644
--- a/svx/source/xoutdev/xtabptrn.cxx
+++ b/svx/source/xoutdev/xtabptrn.cxx
@@ -88,7 +88,7 @@ bool XPatternList::Create()
 
 Bitmap XPatternList::CreateBitmap( long nIndex, const Size& rSize ) const
 {
-OSL_ENSURE( nIndex < Count(), "Access out of range" );
+assert( nIndex < Count() );
 
 if(nIndex < Count())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source extras/source include/svx svx/source

2016-07-21 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx  |1 
 extras/source/glade/libreoffice-catalog.xml.in |   11 --
 include/svx/dlgctrl.hxx|   18 ---
 svx/source/dialog/dlgctrl.cxx  |  133 -
 4 files changed, 163 deletions(-)

New commits:
commit 45e9ccb69909fab6934f62b439962814ffa9d827
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 23:03:37 2016 +0530

Remove PatternLB dead code

PatternLB is replaced by SvxPresetListBox in tppattern.cxx

Change-Id: Ie4ec100963b714e07807f8b600cca2e165fb4641
Reviewed-on: https://gerrit.libreoffice.org/27353
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 881568a..46cb922 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -563,7 +563,6 @@ private:
 VclPtrm_pCtlPixel;
 VclPtrm_pLbColor;
 VclPtrm_pLbBackgroundColor;
-VclPtr  m_pLbPatterns;
 VclPtr   m_pPatternLB;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 4be35f2..10b3d02 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -150,17 +150,6 @@
 
   
 
-
-  
-
-  
-GParamBoolean
-  
-
-  
-
 
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 92b656c..e32bfc1 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -270,24 +270,6 @@ private:
 
 //
 
-class SAL_WARN_UNUSED SVX_DLLPUBLIC PatternLB : public ListBox
-{
-public:
-explicit PatternLB(vcl::Window* pParent, WinBits aWB);
-
-void Fill(const XPatternListRef );
-
-void Append(const Size& rSize, const XBitmapEntry& rEntry);
-void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_Int32 nPos);
-
-private:
-BitmapExmaBitmapEx;
-
-XPatternListRef  mpList;
-};
-
-//
-
 class SAL_WARN_UNUSED SVX_DLLPUBLIC FillAttrLB : public ColorListBox
 {
 private:
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index cefcb4c..a864a0a 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1490,139 +1490,6 @@ void BitmapLB::Modify(const Size& rSize, const 
XBitmapEntry& rEntry, sal_Int32 n
 }
 }
 
-// BitmapLB Constructor
-
-PatternLB::PatternLB( vcl::Window* pParent, WinBits aWB)
-:   ListBox( pParent, aWB ),
-maBitmapEx(),
-mpList(nullptr)
-{
-SetEdgeBlending(true);
-}
-
-VCL_BUILDER_DECL_FACTORY(PatternLB)
-{
-WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-nWinStyle |= WB_BORDER;
-VclPtrInstance pListBox(pParent, nWinStyle);
-pListBox->EnableAutoSize(true);
-rRet = pListBox;
-}
-
-namespace
-{
-void formatPatternExToSize(BitmapEx& rBitmapEx, const Size& rSize)
-{
-if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height() > 0)
-{
-ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
-pVirtualDevice->SetOutputSizePixel(rSize);
-
-if(rBitmapEx.IsTransparent())
-{
-const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-
-if(rStyleSettings.GetPreviewUsesCheckeredBackground())
-{
-const Point aNull(0, 0);
-static const sal_uInt32 nLen(8);
-static const Color aW(COL_WHITE);
-static const Color aG(0xef, 0xef, 0xef);
-
-pVirtualDevice->DrawCheckered(aNull, rSize, nLen, aW, aG);
-}
-else
-{
-
pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
-pVirtualDevice->Erase();
-}
-}
-
-if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && 
rBitmapEx.GetSizePixel().Height() >= rSize.Height())
-{
-rBitmapEx.Scale(rSize);
-pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmapEx);
-}
-else
-{
-const Size aBitmapSize(rBitmapEx.GetSizePixel());
-
-for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
-{
-for(long x(0); x &l

[Libreoffice-commits] core.git: include/svx svx/source

2016-07-20 Thread Rishabh Kumar
 include/svx/xtable.hxx  |5 ++
 svx/source/xoutdev/xtabptrn.cxx |   69 ++--
 2 files changed, 71 insertions(+), 3 deletions(-)

New commits:
commit b0db1f4c79e12b4fc96f82b362b332d9ffb6e87c
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 00:59:13 2016 +0530

Make pattern preset preview resizeable

Change-Id: I24e46ca08993cb359eddade72cd9bc4fda4512ff
Reviewed-on: https://gerrit.libreoffice.org/27323
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index e17a0227..a692f39 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -397,6 +397,9 @@ public:
 
 class SVX_DLLPUBLIC XPatternList : public XPropertyList
 {
+private:
+Bitmap CreateBitmap( long nIndex, const Size& rSize ) const;
+
 protected:
 virtual Bitmap CreateBitmapForUI(long nIndex) override;
 
@@ -406,9 +409,9 @@ public:
 
 using XPropertyList::Replace;
 using XPropertyList::Remove;
-
 XBitmapEntry* Remove(long nIndex);
 XBitmapEntry* GetBitmap(long nIndex) const;
+Bitmap GetBitmapForPreview(long nIndex, const Size& rSize);
 
 virtual css::uno::Reference< css::container::XNameContainer > 
createInstance() override;
 virtual bool Create() override;
diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx
index 6fcfec9..9cbda46 100644
--- a/svx/source/xoutdev/xtabptrn.cxx
+++ b/svx/source/xoutdev/xtabptrn.cxx
@@ -27,6 +27,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
@@ -84,9 +86,72 @@ bool XPatternList::Create()
 return true;
 }
 
-Bitmap XPatternList::CreateBitmapForUI( long /*nIndex*/ )
+Bitmap XPatternList::CreateBitmap( long nIndex, const Size& rSize ) const
 {
-return Bitmap();
+OSL_ENSURE( nIndex < Count(), "Access out of range" );
+
+if(nIndex < Count())
+{
+BitmapEx rBitmapEx = GetBitmap( nIndex 
)->GetGraphicObject().GetGraphic().GetBitmapEx();
+ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
+pVirtualDevice->SetOutputSizePixel(rSize);
+
+if(rBitmapEx.IsTransparent())
+{
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+
+if(rStyleSettings.GetPreviewUsesCheckeredBackground())
+{
+const Point aNull(0, 0);
+static const sal_uInt32 nLen(8);
+static const Color aW(COL_WHITE);
+static const Color aG(0xef, 0xef, 0xef);
+
+pVirtualDevice->DrawCheckered(aNull, rSize, nLen, aW, aG);
+}
+else
+{
+pVirtualDevice->SetBackground(rStyleSettings.GetFieldColor());
+pVirtualDevice->Erase();
+}
+}
+
+if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && 
rBitmapEx.GetSizePixel().Height() >= rSize.Height())
+{
+rBitmapEx.Scale(rSize);
+pVirtualDevice->DrawBitmapEx(Point(0, 0), rBitmapEx);
+}
+else
+{
+const Size aBitmapSize(rBitmapEx.GetSizePixel());
+
+for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
+{
+for(long x(0); x < rSize.Width(); x += aBitmapSize.Width())
+{
+pVirtualDevice->DrawBitmapEx(
+Point(x, y),
+rBitmapEx);
+}
+}
+}
+rBitmapEx = pVirtualDevice->GetBitmap(Point(0, 0), rSize);
+return rBitmapEx.GetBitmap();
+}
+else
+return Bitmap();
+}
+
+Bitmap XPatternList::CreateBitmapForUI( long nIndex )
+{
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+return CreateBitmap(nIndex, rSize);
+}
+
+Bitmap XPatternList::GetBitmapForPreview( long nIndex, const Size& rSize )
+{
+return CreateBitmap(nIndex, rSize);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |   10 -
 cui/source/tabpages/tppattern.cxx |  326 
 cui/uiconfig/ui/patterntabpage.ui |  344 +++---
 3 files changed, 261 insertions(+), 419 deletions(-)

New commits:
commit 74aa685bf35358202efb9e17901be9a232845c2b
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 22:51:49 2016 +0530

[GSoC] Redesign of Pattern tab

1. New Pattern Listbox for presets.
2. Context menu for Rename and Delete.
3. Rearrangement of controls.
4. Remove Save and Load buttons.

Change-Id: I7edaf2496837443967711a307c01cdba284270d0
Reviewed-on: https://gerrit.libreoffice.org/27352
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index fac2bb1..881568a 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -564,12 +564,11 @@ private:
 VclPtrm_pLbColor;
 VclPtrm_pLbBackgroundColor;
 VclPtr  m_pLbPatterns;
+VclPtr   m_pPatternLB;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
 VclPtr m_pBtnDelete;
-VclPtr m_pBtnLoad;
-VclPtr m_pBtnSave;
 
 SvxBitmapCtl*   m_pBitmapCtl;
 
@@ -594,11 +593,10 @@ private:
 
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ChangePatternHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ChangePatternHdl_Impl, ValueSet*, void );
 DECL_LINK_TYPED( ChangeColorHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
+DECL_LINK_TYPED( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 
 long CheckChanges_Impl();
 
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index b967c75..3c1e155 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -101,27 +101,18 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* 
pParent, const SfxItemSet& r
 m_aXFillAttr  ( rInAttrs.GetPool() ),
 m_rXFSet  ( m_aXFillAttr.GetItemSet() )
 {
-get(m_pBxPixelEditor,"maingrid");
 get(m_pCtlPixel,"CTL_PIXEL");
 get(m_pLbColor,"LB_COLOR");
 get(m_pLbBackgroundColor,"LB_BACKGROUND_COLOR");
 get(m_pCtlPreview,"CTL_PREVIEW");
-get(m_pLbPatterns,"LB_PATTERN");
+get(m_pPatternLB, "patternpresetlist");
 get(m_pBtnAdd,"BTN_ADD");
 get(m_pBtnModify,"BTN_MODIFY");
-get(m_pBtnDelete,"BTN_DELETE");
-get(m_pBtnLoad,"BTN_LOAD");
-get(m_pBtnSave,"BTN_SAVE");
-
-// size of the bitmap listbox
-Size aSize = getDrawListBoxOptimalSize(this);
-m_pLbPatterns->set_width_request(aSize.Width());
-m_pLbPatterns->set_height_request(aSize.Height());
 
 // size of the bitmap display
-Size aSize2 = getDrawPreviewOptimalSize(this);
-m_pCtlPreview->set_width_request(aSize2.Width());
-m_pCtlPreview->set_height_request(aSize2.Height());
+Size aSize = getDrawPreviewOptimalSize(this);
+m_pCtlPreview->set_width_request(aSize.Width());
+m_pCtlPreview->set_height_request(aSize.Height());
 
 m_pBitmapCtl = new SvxBitmapCtl;
 
@@ -134,11 +125,10 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* 
pParent, const SfxItemSet& r
 
 m_pBtnAdd->SetClickHdl( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) 
);
 m_pBtnModify->SetClickHdl( LINK( this, SvxPatternTabPage, 
ClickModifyHdl_Impl ) );
-m_pBtnDelete->SetClickHdl( LINK( this, SvxPatternTabPage, 
ClickDeleteHdl_Impl ) );
-m_pBtnLoad->SetClickHdl( LINK( this, SvxPatternTabPage, ClickLoadHdl_Impl 
) );
-m_pBtnSave->SetClickHdl( LINK( this, SvxPatternTabPage, ClickSaveHdl_Impl 
) );
 
-m_pLbPatterns->SetSelectHdl( LINK( this, SvxPatternTabPage, 
ChangePatternHdl_Impl ) );
+m_pPatternLB->SetSelectHdl( LINK( this, SvxPatternTabPage, 
ChangePatternHdl_Impl ) );
+m_pPatternLB->SetRenameHdl( LINK( this, SvxPatternTabPage, 
ClickRenameHdl_Impl ) );
+m_pPatternLB->SetDeleteHdl( LINK( this, SvxPatternTabPage, 
ClickDeleteHdl_Impl ) );
 m_pLbColor->SetSelectHdl( LINK( this, SvxPatternTabPage, 
ChangeColorHdl_Impl ) );
 m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxPatternTabPage, 
ChangeColorHdl_Impl ) );
 
@@ -154,17 +144,12 @@ void SvxPatternTabPage::dispose()
 {
 delete m_pBitmapCtl;
 m_pBitmapCtl = nullptr;
-m_pBxPixel

[Libreoffice-commits] core.git: include/svx svx/source

2016-07-20 Thread Rishabh Kumar
 include/svx/SvxPresetListBox.hxx |1 +
 svx/source/tbxctrls/SvxPresetListBox.cxx |5 +
 2 files changed, 6 insertions(+)

New commits:
commit 83a0ba1207a66d423350846b3f9c2f148602edd4
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 01:01:19 2016 +0530

Add XPatternList to SvxPresetListBox

Change-Id: I39bbf28c4468123c853577f7d7e94d619ec7da3b
Reviewed-on: https://gerrit.libreoffice.org/27324
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/include/svx/SvxPresetListBox.hxx b/include/svx/SvxPresetListBox.hxx
index 17a9f94..84f2c4c 100644
--- a/include/svx/SvxPresetListBox.hxx
+++ b/include/svx/SvxPresetListBox.hxx
@@ -63,6 +63,7 @@ public:
 void FillPresetListBox(XGradientList& pList, sal_uInt32 nStartIndex = 1);
 void FillPresetListBox(XHatchList& pList, sal_uInt32 nStartIndex = 1);
 void FillPresetListBox(XBitmapList& pList, sal_uInt32 nStartIndex = 1);
+void FillPresetListBox(XPatternList& pList, sal_uInt32 nStartIndex = 1);
 void DrawLayout();
 
 };
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx 
b/svx/source/tbxctrls/SvxPresetListBox.cxx
index df85e1f..c93f969 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -116,6 +116,11 @@ void SvxPresetListBox::FillPresetListBox(XBitmapList& 
pList, sal_uInt32 nStartIn
 FillPresetListBoxImpl< XBitmapList, XBitmapEntry >( pList, nStartIndex );
 }
 
+void SvxPresetListBox::FillPresetListBox(XPatternList& pList, sal_uInt32 
nStartIndex)
+{
+FillPresetListBoxImpl< XPatternList, XBitmapEntry >( pList, nStartIndex );
+}
+
 IMPL_LINK_TYPED(SvxPresetListBox, OnMenuItemSelected, Menu*, pMenu, bool)
 {
 if( pMenu == nullptr )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   15 +-
 cui/source/tabpages/tparea.cxx   |  136 --
 cui/source/tabpages/tpgradnt.cxx |   56 ++
 cui/uiconfig/ui/areatabpage.ui   |   96 +-
 cui/uiconfig/ui/gradientpage.ui  |  199 ---
 5 files changed, 283 insertions(+), 219 deletions(-)

New commits:
commit 4587fcaa9e3645232a862c10167a22b84306d0b9
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 15:19:55 2016 +0530

Revert "Addition of new controls and their rearrangement in gradient tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d.

Change-Id: Ic1a9e2d7279e0b06e19b5d1020b37b44d28060b4
Reviewed-on: https://gerrit.libreoffice.org/27338
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index c8235fe..dfffa39 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -193,6 +192,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtrm_pTsbStepCount;
+VclPtr   m_pFlStepCount;
+VclPtr   m_pNumFldStepCount;
+
 VclPtr   m_pFlHatchBckgrd;
 VclPtr   m_pCbxHatchBckgrd;
 VclPtrm_pLbHatchBckgrdColor;
@@ -269,6 +272,8 @@ private:
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyStepCountEditHdl_Impl, Edit&, void );
+DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
 void ModifyStepCountHdl_Impl(void*);
 
 //
@@ -385,26 +390,25 @@ class SvxGradientTabPage : public SfxTabPage
 
 private:
 VclPtrm_pLbGradientType;
-VclPtr  m_pFtCenter;
+VclPtr  m_pFtCenterX;
 VclPtrm_pMtrCenterX;
+VclPtr  m_pFtCenterY;
 VclPtrm_pMtrCenterY;
 VclPtr  m_pFtAngle;
 VclPtrm_pMtrAngle;
 VclPtrm_pMtrBorder;
-VclPtr m_pSliderBorder;
 VclPtrm_pLbColorFrom;
 VclPtrm_pMtrColorFrom;
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
-VclPtrm_pMtrIncrement;
-VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
 VclPtr m_pBtnDelete;
 VclPtr m_pBtnLoad;
 VclPtr m_pBtnSave;
+
 const SfxItemSet&   m_rOutAttrs;
 
 XColorListRef m_pColorList;
@@ -428,7 +432,6 @@ private:
 DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4b0faa3..4ab7c8e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -44,8 +44,6 @@
 #include "sfx2/opengrf.hxx"
 #include 
 
-#define DEFAULT_GRADIENTSTEP 64
-
 using namespace com::sun::star;
 
 // static 
@@ -115,6 +113,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pTsbStepCount,"TSB_STEPCOUNT");
+get(m_pFlStepCount,"FL_STEPCOUNT");
+get(m_pNumFldStepCount,"NUM_FLD_STEPCOUNT");
+
 get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
 get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
 get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
@@ -151,11 +153,12 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aIncrementsSize(m_pFlStepCount->get_preferred_size());
 Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap-

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   11 +
 cui/source/tabpages/tparea.cxx  |  136 +--
 cui/source/tabpages/tphatch.cxx |  110 
 cui/uiconfig/ui/areatabpage.ui  |   78 +++
 cui/uiconfig/ui/hatchpage.ui|  274 ++--
 5 files changed, 335 insertions(+), 274 deletions(-)

New commits:
commit 525c326d9d3d1b6defa22589e0af60c9cc884a5c
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 14:57:11 2016 +0530

Revert "Addition of new controls and their rearrangement in hatch tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit 7a4bd998e900c7f7a28f9068b97707ef76c99b85.

Change-Id: I94c24b252983732161b8f2f0de51780a4d5c13bd
Reviewed-on: https://gerrit.libreoffice.org/27337
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>
Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 79d1f33..c8235fe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -193,6 +193,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtr   m_pFlHatchBckgrd;
+VclPtr   m_pCbxHatchBckgrd;
+VclPtrm_pLbHatchBckgrdColor;
+
 VclPtr m_pBxBitmap;
 
 VclPtr   m_pFlSize;
@@ -260,8 +264,10 @@ private:
 
 DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void);
 DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyHatchBckgrdColorHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
 void ModifyStepCountHdl_Impl(void*);
 
@@ -467,10 +473,9 @@ class SvxHatchTabPage : public SvxTabPage
 private:
 VclPtrm_pMtrDistance;
 VclPtrm_pMtrAngle;
-VclPtr m_pSliderAngle;
+VclPtr m_pCtlAngle;
 VclPtrm_pLbLineType;
 VclPtrm_pLbLineColor;
-VclPtrm_pLbBackgroundColor;
 VclPtr m_pLbHatchings;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
@@ -501,8 +506,6 @@ private:
 DECL_LINK_TYPED( ChangeHatchHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 29b3470..4b0faa3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -115,6 +115,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
+get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
+get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
+
 get(m_pBxBitmap,"boxBITMAP");
 
 get(m_pFlSize,"FL_SIZE");
@@ -147,8 +151,11 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
-Size aMainFrame(aBitmapSize.Width(),aBitmapSize.Height());
+Size aMainFrame(
+std::max(aHatchSize.Width(), aBitmapSize.Width()),
+std::max(aHatchSize.Height(), aBitmapSize.Height()));
 pMainFrame->set_width_request(aMainFrame.Width());
 pMainFrame->set_height_request(aMainFrame.Height());
 
@@ -159,6 +166,9 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 
 m_pBxBitmap->Hide();
 
+// Controls for Hatch-Background
+m_pFlHatchBckgrd->Hide();
+
 m_pTsbOriginal->EnableTriState( false );
 
 // this page needs ExchangeSupport
@@ -190,6 +200,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 
 m_pLb

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   15 +-
 cui/source/tabpages/tparea.cxx   |  136 --
 cui/source/tabpages/tpgradnt.cxx |   56 ++
 cui/uiconfig/ui/areatabpage.ui   |   96 +-
 cui/uiconfig/ui/gradientpage.ui  |  199 ---
 5 files changed, 283 insertions(+), 219 deletions(-)

New commits:
commit 10b701f36d7455e76b66822cc42d2017bb3d65d1
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 15:19:55 2016 +0530

Revert "Addition of new controls and their rearrangement in gradient tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d.

Change-Id: Ic1a9e2d7279e0b06e19b5d1020b37b44d28060b4
Reviewed-on: https://gerrit.libreoffice.org/27336
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index c8235fe..dfffa39 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -193,6 +192,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtrm_pTsbStepCount;
+VclPtr   m_pFlStepCount;
+VclPtr   m_pNumFldStepCount;
+
 VclPtr   m_pFlHatchBckgrd;
 VclPtr   m_pCbxHatchBckgrd;
 VclPtrm_pLbHatchBckgrdColor;
@@ -269,6 +272,8 @@ private:
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyStepCountEditHdl_Impl, Edit&, void );
+DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
 void ModifyStepCountHdl_Impl(void*);
 
 //
@@ -385,26 +390,25 @@ class SvxGradientTabPage : public SfxTabPage
 
 private:
 VclPtrm_pLbGradientType;
-VclPtr  m_pFtCenter;
+VclPtr  m_pFtCenterX;
 VclPtrm_pMtrCenterX;
+VclPtr  m_pFtCenterY;
 VclPtrm_pMtrCenterY;
 VclPtr  m_pFtAngle;
 VclPtrm_pMtrAngle;
 VclPtrm_pMtrBorder;
-VclPtr m_pSliderBorder;
 VclPtrm_pLbColorFrom;
 VclPtrm_pMtrColorFrom;
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
-VclPtrm_pMtrIncrement;
-VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
 VclPtr m_pBtnDelete;
 VclPtr m_pBtnLoad;
 VclPtr m_pBtnSave;
+
 const SfxItemSet&   m_rOutAttrs;
 
 XColorListRef m_pColorList;
@@ -428,7 +432,6 @@ private:
 DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4b0faa3..4ab7c8e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -44,8 +44,6 @@
 #include "sfx2/opengrf.hxx"
 #include 
 
-#define DEFAULT_GRADIENTSTEP 64
-
 using namespace com::sun::star;
 
 // static 
@@ -115,6 +113,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pTsbStepCount,"TSB_STEPCOUNT");
+get(m_pFlStepCount,"FL_STEPCOUNT");
+get(m_pNumFldStepCount,"NUM_FLD_STEPCOUNT");
+
 get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
 get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
 get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
@@ -151,11 +153,12 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aIncrementsSize(m_pFlStepCount->get_preferred_size());
 Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
 Size 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - cui/source cui/uiconfig

2016-07-20 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   11 +
 cui/source/tabpages/tparea.cxx  |  136 +--
 cui/source/tabpages/tphatch.cxx |  110 
 cui/uiconfig/ui/areatabpage.ui  |   78 +++
 cui/uiconfig/ui/hatchpage.ui|  274 ++--
 5 files changed, 335 insertions(+), 274 deletions(-)

New commits:
commit 5df8024dc8a53c657d756dbe0ae6eb27185c1272
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 20 14:57:11 2016 +0530

Revert "Addition of new controls and their rearrangement in hatch tab"

Unfinished GSoC: Area Fill project feature.
Introduces regression in LibreOffice-5-2.

This reverts commit 7a4bd998e900c7f7a28f9068b97707ef76c99b85.

Change-Id: I94c24b252983732161b8f2f0de51780a4d5c13bd
Reviewed-on: https://gerrit.libreoffice.org/27331
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 79d1f33..c8235fe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -193,6 +193,10 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
+VclPtr   m_pFlHatchBckgrd;
+VclPtr   m_pCbxHatchBckgrd;
+VclPtrm_pLbHatchBckgrdColor;
+
 VclPtr m_pBxBitmap;
 
 VclPtr   m_pFlSize;
@@ -260,8 +264,10 @@ private:
 
 DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void);
 DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifyHatchBckgrdColorHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
 void ModifyStepCountHdl_Impl(void*);
 
@@ -467,10 +473,9 @@ class SvxHatchTabPage : public SvxTabPage
 private:
 VclPtrm_pMtrDistance;
 VclPtrm_pMtrAngle;
-VclPtr m_pSliderAngle;
+VclPtr m_pCtlAngle;
 VclPtrm_pLbLineType;
 VclPtrm_pLbLineColor;
-VclPtrm_pLbBackgroundColor;
 VclPtr m_pLbHatchings;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
@@ -501,8 +506,6 @@ private:
 DECL_LINK_TYPED( ChangeHatchHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 29b3470..4b0faa3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -115,6 +115,10 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
+get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
+get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
+get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
+
 get(m_pBxBitmap,"boxBITMAP");
 
 get(m_pFlSize,"FL_SIZE");
@@ -147,8 +151,11 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
+Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
-Size aMainFrame(aBitmapSize.Width(),aBitmapSize.Height());
+Size aMainFrame(
+std::max(aHatchSize.Width(), aBitmapSize.Width()),
+std::max(aHatchSize.Height(), aBitmapSize.Height()));
 pMainFrame->set_width_request(aMainFrame.Width());
 pMainFrame->set_height_request(aMainFrame.Height());
 
@@ -159,6 +166,9 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 
 m_pBxBitmap->Hide();
 
+// Controls for Hatch-Background
+m_pFlHatchBckgrd->Hide();
+
 m_pTsbOriginal->EnableTriState( false );
 
 // this page needs ExchangeSupport
@@ -190,6 +200,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 
 m_pLbColor->SetSelectHdl( LINK( this, SvxAreaTabPa

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-19 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |2 
 cui/source/tabpages/tphatch.cxx |   85 
 cui/uiconfig/ui/hatchpage.ui|8 ++-
 3 files changed, 67 insertions(+), 28 deletions(-)

New commits:
commit ea96d97020322052a8d65e6e9bf521682819eb8e
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sun Jul 17 02:20:13 2016 +0530

tdf#100907: Cannot set white background for hatching

Change-Id: Id10cb4d90a19717b44d02064eb69981c69a421de
Reviewed-on: https://gerrit.libreoffice.org/27258
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2fa662d..835efd5 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -479,6 +479,7 @@ private:
 VclPtr m_pSliderAngle;
 VclPtrm_pLbLineType;
 VclPtrm_pLbLineColor;
+VclPtr   m_pCbBackgroundColor;
 VclPtrm_pLbBackgroundColor;
 VclPtr   m_pHatchLB;
 VclPtrm_pCtlPreview;
@@ -508,6 +509,7 @@ private:
 void ChangeHatchHdl_Impl();
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ToggleHatchBackgroundColor_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 81bb046..b8a8dd9 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -73,6 +73,7 @@ SvxHatchTabPage::SvxHatchTabPage
 get(m_pSliderAngle, "angleslider");
 get(m_pLbLineType, "linetypelb");
 get(m_pLbLineColor, "linecolorlb");
+get(m_pCbBackgroundColor, "backgroundcolor");
 get(m_pLbBackgroundColor, "backgroundcolorlb");
 get(m_pHatchLB , "hatchpresetlist");
 Size aSize = getDrawListBoxOptimalSize(this);
@@ -119,6 +120,7 @@ SvxHatchTabPage::SvxHatchTabPage
 m_pSliderAngle->SetSlideHdl( LINK( this, SvxHatchTabPage, 
ModifiedSliderHdl_Impl ) );
 m_pLbLineType->SetSelectHdl( aLink2 );
 m_pLbLineColor->SetSelectHdl( aLink2 );
+m_pCbBackgroundColor->SetToggleHdl( LINK( this, SvxHatchTabPage, 
ToggleHatchBackgroundColor_Impl ) );
 m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxHatchTabPage, 
ModifiedBackgroundHdl_Impl ) );
 
 m_pBtnAdd->SetClickHdl( LINK( this, SvxHatchTabPage, ClickAddHdl_Impl ) );
@@ -221,19 +223,28 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& 
rSet )
 }
 
 XFillBackgroundItem aBckItem( static_cast(rSet.Get(XATTR_FILLBACKGROUND)));
-XFillColorItem aColorItem( static_cast(rSet.Get(XATTR_FILLCOLOR)) );
-Color aColor(COL_WHITE);
+m_rXFSet.Put( aBckItem );
+
 if(aBckItem.GetValue())
-aColor = aColorItem.GetColorValue();
-m_pLbBackgroundColor->SelectEntry(aColor);
-if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
 {
-m_pLbBackgroundColor->InsertEntry( aColor , OUString() );
-m_pLbBackgroundColor->SelectEntry( aColor );
-}
+m_pCbBackgroundColor->SetState(TRISTATE_TRUE);
+XFillColorItem aColorItem( static_cast(rSet.Get(XATTR_FILLCOLOR)) );
+Color aColor(aColorItem.GetColorValue());
+m_pLbBackgroundColor->Enable();
+m_pLbBackgroundColor->SelectEntry(aColor);
 
-m_rXFSet.Put( aBckItem );
-m_rXFSet.Put( aColorItem );
+if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
+{
+m_pLbBackgroundColor->InsertEntry( aColor , OUString() );
+m_pLbBackgroundColor->SelectEntry( aColor );
+}
+m_rXFSet.Put( aColorItem );
+}
+else
+{
+m_pCbBackgroundColor->SetState(TRISTATE_FALSE);
+m_pLbBackgroundColor->Disable();
+}
 
 m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 m_pCtlPreview->Invalidate();
@@ -344,12 +355,10 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put( XFillStyleItem( drawing::FillStyle_HATCH ) );
 rSet->Put( XFillHatchItem( aString, *pXHatch ) );
 
-sal_uInt32 nPosBckColor = 
m_pLbBackgroundColor->GetSelectEntryPos();
-XFillBackgroundItem aItem( 
m_pLbBackgroundColor->GetSelectEntryColor() != COL_WHITE );
-aItem.SetWhich( XATTR_FILLBACKGROUND );
-rSet->Put( aItem );
-if(aItem.GetValue())
+rSet->Put( XFillBackgroundItem( m_pCbBackgroundColor->IsChecked() 
) );
+if(m_pCbBackgroundColor->IsChecked())
 {
+sal_uInt32 nPosBckColor = 
m_pLbBackgroundColor->

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-19 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|2 +
 cui/source/tabpages/tpgradnt.cxx |   52 +--
 cui/uiconfig/ui/gradientpage.ui  |   52 +--
 3 files changed, 86 insertions(+), 20 deletions(-)

New commits:
commit 1d602088136828cdf1114901587beeec95afea2c
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sun Jul 17 21:39:52 2016 +0530

Fix regression : Automatic gradient steps in gradient tab

Adds a checkbox for enabling/disabling automatic gradient steps.

Change-Id: I223279ec0f23f20f3ff544072cc7fd8662946296
Reviewed-on: https://gerrit.libreoffice.org/27269
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 38b85eb..2fa662d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -401,6 +401,7 @@ private:
 VclPtr m_pLbGradients;
 VclPtr   m_pGradientLB;
 VclPtr   m_pMtrIncrement;
+VclPtr   m_pCbIncrement;
 VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
@@ -430,6 +431,7 @@ private:
 DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ChangeAutoStepHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 71c71b5..0f3d0f5 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -66,6 +66,7 @@ SvxGradientTabPage::SvxGradientTabPage
 m_aXFillAttr  ( rInAttrs.GetPool() ),
 m_rXFSet  ( m_aXFillAttr.GetItemSet() )
 {
+get(m_pCbIncrement,"autoincrement");
 get(m_pMtrIncrement,   "incrementmtr");
 get(m_pSliderIncrement,"incrementslider");
 get(m_pLbGradientType, "gradienttypelb");
@@ -113,8 +114,9 @@ SvxGradientTabPage::SvxGradientTabPage
 Link<Edit&,void> aLink = LINK( this, SvxGradientTabPage, 
ModifiedEditHdl_Impl );
 Link<ListBox&,void> aLink2 = LINK( this, SvxGradientTabPage, 
ModifiedListBoxHdl_Impl );
 m_pLbGradientType->SetSelectHdl( aLink2 );
+m_pCbIncrement->SetToggleHdl( LINK( this, SvxGradientTabPage, 
ChangeAutoStepHdl_Impl ) );
 m_pMtrIncrement->SetModifyHdl( aLink );
-m_pSliderIncrement->SetSlideHdl( LINK( this, SvxGradientTabPage, 
ModifiedSliderHdl_Impl )  );
+m_pSliderIncrement->SetSlideHdl( LINK( this, SvxGradientTabPage, 
ModifiedSliderHdl_Impl ) );
 m_pMtrCenterX->SetModifyHdl( aLink );
 m_pMtrCenterY->SetModifyHdl( aLink );
 m_pMtrAngle->SetModifyHdl( aLink );
@@ -138,6 +140,7 @@ SvxGradientTabPage::~SvxGradientTabPage()
 
 void SvxGradientTabPage::dispose()
 {
+m_pCbIncrement.clear();
 m_pMtrIncrement.clear();
 m_pSliderIncrement.clear();
 m_pLbGradientType.clear();
@@ -329,7 +332,6 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 std::unique_ptr pXGradient;
 OUString  aString;
 size_tnPos = m_pGradientLB->GetSelectItemPos();
-sal_uInt16 nValue = m_pMtrIncrement->GetValue();
 if( nPos != VALUESET_ITEM_NOTFOUND )
 {
 pXGradient.reset(new XGradient( m_pGradientList->GetGradient( 
static_cast(nPos) )->GetGradient() ));
@@ -348,6 +350,11 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 (sal_uInt16) m_pMtrColorFrom->GetValue(),
 (sal_uInt16) m_pMtrColorTo->GetValue() ));
 }
+
+sal_uInt16 nValue = 0;
+if( !m_pCbIncrement->IsChecked() )
+nValue = m_pMtrIncrement->GetValue();
+
 assert( pXGradient && "XGradient could not be created" );
 rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
 rSet->Put( XFillGradientItem( aString, *pXGradient ) );
@@ -359,6 +366,8 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 
 void SvxGradientTabPage::Reset( const SfxItemSet* )
 {
+m_pMtrIncrement->SetValue(DEFAULT_GRADIENTSTEP);
+m_pSliderIncrement->SetThumbPos(DEFAULT_GRADIENTSTEP);
 ChangeGradientHdl_Impl();
 
 // determine state of the buttons
@@ -380,14 +389,32 @@ IMPL_LINK_TYPED( SvxGradientTabPage, 
ModifiedListBoxHdl_Impl, ListBox&, rListBox
 {
 ModifiedHdl_Impl();
 }
+
 IMPL_LINK_TYPED( SvxGradientTabPage, ModifiedEditHdl_Impl, Edit&, rBox, void )
 {
 ModifiedHdl_Impl();
 }
+
 IMPL_LINK_TYPED( SvxGradientTabPage, ModifiedSliderHdl_Impl, Slider*, rSlider, 
void )
 {
 ModifiedHdl_Impl(

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-19 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   12 
 cui/source/tabpages/tpgradnt.cxx |  376 ++
 cui/uiconfig/ui/gradientpage.ui  |  553 +--
 3 files changed, 395 insertions(+), 546 deletions(-)

New commits:
commit da4c58551ce1bdad3467b8f9bc1da5df78757b61
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Jul 5 18:39:36 2016 +0530

[GSoC] Redesign of Gradient tab

1. New Gradient Listbox for presets.
2. Context menu for rename and delete.
3. Rearrangement of controls.
4. Remove Save and Load buttons.

Change-Id: Id6aa0daa7c9304bb6a383ce0db95a4a7a060695e
Reviewed-on: https://gerrit.libreoffice.org/26954
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 5d6083d..38b85eb 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -399,14 +399,12 @@ private:
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
+VclPtr   m_pGradientLB;
 VclPtr   m_pMtrIncrement;
 VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
-VclPtr m_pBtnDelete;
-VclPtr m_pBtnLoad;
-VclPtr m_pBtnSave;
 const SfxItemSet&   m_rOutAttrs;
 
 XColorListRef m_pColorList;
@@ -426,13 +424,13 @@ private:
 
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickDeleteHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ChangeGradientHdl, ValueSet*, void );
+void ChangeGradientHdl_Impl();
+DECL_LINK_TYPED( ClickRenameHdl_Impl, SvxPresetListBox*, void );
+DECL_LINK_TYPED( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
-DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
-DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 void ModifiedHdl_Impl(void*);
 
 long CheckChanges_Impl();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index a5aad0a..71c71b5 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -80,23 +80,13 @@ SvxGradientTabPage::SvxGradientTabPage
 get(m_pMtrColorFrom,   "colorfrommtr");
 get(m_pLbColorTo,  "colortolb");
 get(m_pMtrColorTo, "colortomtr");
-get(m_pLbGradients,"gradientslb");
-Size aSize = getDrawListBoxOptimalSize(this);
-m_pLbGradients->set_width_request(aSize.Width());
-m_pLbGradients->set_height_request(aSize.Height());
+get(m_pGradientLB, "gradientpresetlist");
 get(m_pCtlPreview, "previewctl");
-aSize = getDrawPreviewOptimalSize(this);
+Size aSize = getDrawPreviewOptimalSize(this);
 m_pCtlPreview->set_width_request(aSize.Width());
 m_pCtlPreview->set_height_request(aSize.Height());
 get(m_pBtnAdd, "add");
 get(m_pBtnModify,  "modify");
-get(m_pBtnDelete,  "delete");
-get(m_pBtnLoad,"load");
-get(m_pBtnSave,"save");
-
-m_pLbGradients->SetAccessibleName(GetText());
-
-
 // this page needs ExchangeSupport
 SetExchangeSupport();
 
@@ -113,13 +103,12 @@ SvxGradientTabPage::SvxGradientTabPage
 m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 
 // set handler
-m_pLbGradients->SetSelectHdl(
-LINK( this, SvxGradientTabPage, ChangeGradientHdl_Impl ) );
+m_pGradientLB->SetSelectHdl( LINK( this, SvxGradientTabPage, 
ChangeGradientHdl ) );
+m_pGradientLB->SetRenameHdl( LINK( this, SvxGradientTabPage, 
ClickRenameHdl_Impl ) );
+m_pGradientLB->SetDeleteHdl( LINK( this, SvxGradientTabPage, 
ClickDeleteHdl_Impl ) );
 m_pBtnAdd->SetClickHdl( LINK( this, SvxGradientTabPage, ClickAddHdl_Impl ) 
);
 m_pBtnModify->SetClickHdl(
 LINK( this, SvxGradientTabPage, ClickModifyHdl_Impl ) );
-m_pBtnDelete->SetClickHdl(
-LINK( this, SvxGradientTabPage, ClickDeleteHdl_Impl ) );
 
 Link<Edit&,void> aLink = LINK( this, SvxGradientTabPage, 
ModifiedEditHdl_Impl );
 Link<ListBox&,void> aLink2 = LINK( this, SvxGradientTabPage, 
ModifiedListBoxHdl_Impl );
@@ -136,11 +125,6 @@ SvxGradientTabPage::SvxGradientTabPage
 m_pMtrColorTo->SetModifyHdl( aLink );
 m_pLbColorTo->SetSelectHdl( aLink2 );
 
-m_pBtnLoad->SetClickHdl(
-LINK( this, SvxGradient

[Libreoffice-commits] core.git: cui/source include/svtools include/svx svx/source

2016-07-14 Thread Rishabh Kumar
 cui/source/tabpages/tphatch.cxx  |   83 ---
 include/svtools/valueset.hxx |4 +
 include/svx/SvxPresetListBox.hxx |7 +-
 svx/source/tbxctrls/SvxPresetListBox.cxx |7 +-
 4 files changed, 58 insertions(+), 43 deletions(-)

New commits:
commit be95afad421230784f0ea1ec2054974c4359b9fa
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jul 13 00:31:28 2016 +0530

[GSoC] Avoid reload of preset list in hatch tab

Change-Id: If2acb6df3c046de63b6b4069474e19fb87222a11
Reviewed-on: https://gerrit.libreoffice.org/27167
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 2c733ad..81bb046 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -209,7 +209,8 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
 
 if( *m_pPageType == PT_HATCH && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
 {
-m_pHatchLB->SelectItem( *m_pPos );
+sal_uInt16 nId = m_pHatchLB->GetItemId( static_cast( 
*m_pPos ) );
+m_pHatchLB->SelectItem( nId );
 }
 // colors could have been deleted
 ChangeHatchHdl_Impl();
@@ -292,9 +293,9 @@ long SvxHatchTabPage::CheckChanges_Impl()
 }
 }
 
-sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
-if( nPos != 0 )
-*m_pPos = nPos - 1;
+size_t nPos = m_pHatchLB->GetSelectItemPos();
+if( nPos != VALUESET_ITEM_NOTFOUND )
+*m_pPos = static_cast(nPos);
 return 0L;
 }
 
@@ -325,10 +326,10 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
 
 std::unique_ptr pXHatch;
 OUString  aString;
-sal_Int32  nPos = m_pHatchLB->GetSelectItemId();
-if( nPos != 0 )
+size_t nPos = m_pHatchLB->GetSelectItemPos();
+if( nPos != VALUESET_ITEM_NOTFOUND )
 {
-pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 
)->GetHatch() ));
+pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( 
static_cast(nPos) )->GetHatch() ));
 aString = m_pHatchLB->GetItemText( 
m_pHatchLB->GetSelectItemId() );
 }
 // gradient has been (unidentifiedly) passed
@@ -429,10 +430,10 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ChangeHatchHdl, 
ValueSet*, void)
 void SvxHatchTabPage::ChangeHatchHdl_Impl()
 {
 std::unique_ptr pHatch;
-int nPos = m_pHatchLB->GetSelectItemId();
+size_t nPos = m_pHatchLB->GetSelectItemPos();
 
-if( nPos != 0 )
-pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 
)->GetHatch() ));
+if( nPos != VALUESET_ITEM_NOTFOUND )
+pHatch.reset(new XHatch( m_pHatchingList->GetHatch( 
static_cast(nPos) )->GetHatch() ));
 else
 {
 const SfxPoolItem* pPoolItem = nullptr;
@@ -446,10 +447,10 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl()
 }
 if( !pHatch )
 {
-m_pHatchLB->SelectItem( 1 );
-nPos = m_pHatchLB->GetSelectItemId();
-if( nPos != 0 )
-pHatch.reset(new XHatch( m_pHatchingList->GetHatch( nPos - 1 
)->GetHatch() ));
+sal_uInt16 nPosition = m_pHatchLB->GetItemId( 0 );
+m_pHatchLB->SelectItem( nPosition );
+if( nPosition != 0 )
+pHatch.reset( new XHatch( m_pHatchingList->GetHatch( 0 
)->GetHatch() ) );
 }
 }
 if( pHatch )
@@ -542,9 +543,11 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, 
Button*, void)
 
 m_pHatchingList->Insert( pEntry, nCount );
 
-m_pHatchLB->Clear();
-m_pHatchLB->FillPresetListBox( *m_pHatchingList );
-m_pHatchLB->SelectItem( nCount + 1 );
+sal_Int32 nId = m_pHatchLB->GetItemId(nCount - 1); // calculate the 
last ID
+Bitmap aBitmap = m_pHatchingList->GetBitmapForPreview( nCount, 
m_pHatchLB->GetIconSize() );
+// Insert the new entry at the next ID
+m_pHatchLB->InsertItem( nId + 1, Image(aBitmap), aName );
+m_pHatchLB->SelectItem( nId + 1 );
 
 *m_pnHatchingListState |= ChangeType::MODIFIED;
 
@@ -554,11 +557,12 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, 
Button*, void)
 
 IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
 {
-sal_Int32 nPos = m_pHatchLB->GetSelectItemId();
+sal_uInt16 nId = m_pHatchLB->GetSelectItemId();
+size_t nPos = m_pHatchLB->GetSelectItemPos();
 
-if( nPos != 0 )
+if( nPos != VALUESET_ITEM_NOTFOUND )
 {
-OUString aName( m_pHatchingList->GetHatch( nPos - 1 )->GetName() );
+OUString aName( m_pHatchingList->GetHa

GSoC week 7 : Area Fill

2016-07-13 Thread Rishabh Kumar
Hi,

Last week, I worked on the bitmaps tab and color tab.

1. Bitmap tab - http://i.imgur.com/cA1N9UY.png : we finalized the design
and the behavior of new functionalities. I expect to complete it this week

2. Color tab - I have included the functionality of multiple palettes in
the tab and made the selection of palette consistent across the color
widget. Currently I am working on the new custom widget to replace the
legacy color drop down listbox.

Goals for this week : Complete the bitmap tab and color tab work.

Warm Regards

Thank you
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


GSoC week 6 : Area Fill

2016-07-06 Thread Rishabh Kumar
Hi,

Last week, I completed the new preset listbox widget and sent in commits
for redesigning hatch and gradient tab.

1. Hatch tab - http://imgur.com/88IYimV
2. Gradient tab - http://imgur.com/3hKan1k


Bitmap tab is complete but requires minor UI tweaks -
https://gerrit.libreoffice.org/#/c/26402/

Color tab work is in progress but some workflows require discussion during
the weekly design meeting - https://gerrit.libreoffice.org/#/c/26868/

Goals for this week -
1. Complete redesigning work for all tabs.
2. Merge Bitmap tab.
3. Send in a preliminary commit to move all fillstyle tabs inside area tab.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/svx svx/source

2016-07-04 Thread Rishabh Kumar
 include/svx/xtable.hxx  |4 +++-
 svx/source/xoutdev/xtabhtch.cxx |   16 ++--
 2 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit d92b41ce9c87547fde5c43b3bea05b3be79a63f6
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Mon Jul 4 14:52:00 2016 +0530

Make hatch UI bitmap resizable

Change-Id: I34e1db1f462c87d7b3a2ff9531189bea189b2ce8
Reviewed-on: https://gerrit.libreoffice.org/26894
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index d9a9070..586b2e5 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -331,9 +331,10 @@ public:
 
 class SVX_DLLPUBLIC XHatchList : public XPropertyList
 {
+private:
+Bitmap CreateBitmap(long nIndex, const Size& rSize) const;
 protected:
 virtual Bitmap CreateBitmapForUI(long nIndex) override;
-
 public:
 XHatchList(const OUString& rPath, const OUString& rReferer);
 virtual ~XHatchList();
@@ -343,6 +344,7 @@ public:
 using XPropertyList::Remove;
 XHatchEntry* Remove(long nIndex);
 XHatchEntry* GetHatch(long nIndex) const;
+Bitmap GetBitmapForPreview(long nIndex, const Size& rSize);
 
 virtual css::uno::Reference< css::container::XNameContainer > 
createInstance() override;
 virtual bool Create() override;
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index bb66f70..78869c8 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -80,7 +80,7 @@ bool XHatchList::Create()
 return true;
 }
 
-Bitmap XHatchList::CreateBitmapForUI( long nIndex )
+Bitmap XHatchList::CreateBitmap( long nIndex, const Size& rSize) const
 {
 Bitmap aRetval;
 OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
@@ -88,7 +88,6 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
 if(nIndex < Count())
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
 
 // prepare polygon geometry for rectangle
 const basegfx::B2DPolygon aRectangle(
@@ -186,4 +185,17 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
 return aRetval;
 }
 
+Bitmap XHatchList::CreateBitmapForUI(long nIndex)
+{
+const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+Bitmap aRetVal = CreateBitmap(nIndex, rSize);
+return aRetVal;
+}
+
+Bitmap XHatchList::GetBitmapForPreview(long nIndex, const Size& rSize)
+{
+return CreateBitmap(nIndex, rSize);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2016-07-03 Thread Rishabh Kumar
 svx/source/dialog/dlgctrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c89294233b6a9ffc1bd75e6e9226ad723b7d5538
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Mon Jul 4 03:30:41 2016 +0530

Grid line color change for SvxPixelCtl

Change-Id: I0a7c0f2f8da9323a341fe378dcb7ef596aa133af
Reviewed-on: https://gerrit.libreoffice.org/26884
Reviewed-by: Heiko Tietze <tietze.he...@googlemail.com>
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 3eb447b..fc8cf66 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -808,7 +808,7 @@ SvxPixelCtl::SvxPixelCtl(vcl::Window* pParent, sal_uInt16 
nNumber)
 assert(nLines); // can't have no lines
 SetPixelColor( Color( COL_BLACK ) );
 SetBackgroundColor( Color( COL_WHITE ) );
-SetLineColor( 
Application::GetSettings().GetStyleSettings().GetShadowColor() );
+SetLineColor( Color( COL_LIGHTGRAY ) );
 
 nSquares = nLines * nLines;
 pPixel = new sal_uInt16[ nSquares ];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2016-07-02 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |1 -
 cui/source/tabpages/tppattern.cxx |2 --
 svx/source/dialog/dlgctrl.cxx |2 +-
 3 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 527b88efbd9175e4fe376aa3617533f75ef99393
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sat Jul 2 19:20:12 2016 +0530

tdf#100728: Crash when area dialog is opened

Change-Id: I2246c5bf3a1d33e7a08fa9062e568a4c95fef571
Reviewed-on: https://gerrit.libreoffice.org/26875
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index f0eee65..e3b8c9e 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -563,7 +563,6 @@ private:
 VclPtrm_pCtlPixel;
 VclPtrm_pLbColor;
 VclPtrm_pLbBackgroundColor;
-VclPtr  m_pLbPatternsHidden;
 VclPtr  m_pLbPatterns;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 3080d33..47dad34 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -77,7 +77,6 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* pParent, 
const SfxItemSet& r
 get(m_pLbBackgroundColor,"LB_BACKGROUND_COLOR");
 get(m_pCtlPreview,"CTL_PREVIEW");
 get(m_pLbPatterns,"LB_PATTERN");
-get(m_pLbPatternsHidden,"FT_BITMAPS_HIDDEN");
 get(m_pBtnAdd,"BTN_ADD");
 get(m_pBtnModify,"BTN_MODIFY");
 get(m_pBtnDelete,"BTN_DELETE");
@@ -129,7 +128,6 @@ void SvxPatternTabPage::dispose()
 m_pCtlPixel.clear();
 m_pLbColor.clear();
 m_pLbBackgroundColor.clear();
-m_pLbPatternsHidden.clear();
 m_pLbPatterns.clear();
 m_pCtlPreview.clear();
 m_pBtnAdd.clear();
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 9c75ffa..3eb447b 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1527,7 +1527,7 @@ VCL_BUILDER_DECL_FACTORY(PatternLB)
 OString sBorder = VclBuilder::extractCustomProperty(rMap);
 if (!sBorder.isEmpty())
 nWinStyle |= WB_BORDER;
-VclPtrInstance pListBox(pParent, nWinStyle);
+VclPtrInstance pListBox(pParent, nWinStyle);
 pListBox->EnableAutoSize(true);
 rRet = pListBox;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-07-01 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |9 -
 cui/source/tabpages/tppattern.cxx |9 -
 cui/uiconfig/ui/patterntabpage.ui |8 
 3 files changed, 4 insertions(+), 22 deletions(-)

New commits:
commit a2c09913d87127230cfc6944dc7454088f966165
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Jul 1 19:49:32 2016 +0530

Remove unused controls in Pattern tab

Change-Id: Ie53dbbe652413c1ce098d1690d68ae8acc491ca4
Reviewed-on: https://gerrit.libreoffice.org/26858
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 397f3bc..f0eee65 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -630,15 +630,6 @@ public:
 voidSetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
 voidSetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
 voidChangeColor_Impl();
-/** Return a label that is associated with the given control.  This
-label is used to the determine the name for the control.
-@param pLabeled
-The control for which to return a label.
-@return
-Return a label control that provides a name for the specified
-control.
-*/
-virtual vcl::Window* GetParentLabeledBy( const vcl::Window* pLabeled ) 
const override;
 };
 
 //
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index f28bc53..3080d33 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -864,13 +864,4 @@ void SvxPatternTabPage::PointChanged( vcl::Window* 
pWindow, RECT_POINT )
 }
 }
 
-
-vcl::Window* SvxPatternTabPage::GetParentLabeledBy( const vcl::Window* 
pLabeled ) const
-{
-if (pLabeled == m_pLbPatterns)
-return m_pLbPatternsHidden.get();
-else
-return SvxTabPage::GetParentLabeledBy (pLabeled);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/patterntabpage.ui 
b/cui/uiconfig/ui/patterntabpage.ui
index 8f6cc5f..26db14c 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -246,8 +246,8 @@
 True
 True
 True
-Load Bitmap List
-Load Bitmap List
+Load Pattern List
+Load Pattern List
 center
 True
 image1
@@ -265,8 +265,8 @@
 True
 True
 True
-Save Bitmap List
-Save Bitmap List
+Save Pattern List
+Save Pattern List
 center
 True
 image2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk extras/Package_palettes.mk extras/source include/svx scp2/source sc/sdi sc/source sd/sdi sd/source svx/Li

2016-06-28 Thread Rishabh Kumar
 cui/Library_cui.mk|2 
 cui/UIConfig_cui.mk   |2 
 cui/source/inc/cuires.hrc |2 
 cui/source/inc/cuitabarea.hxx |   41 
 cui/source/tabpages/strings.src   |8 
 cui/source/tabpages/tabarea.cxx   |   51 -
 cui/source/tabpages/tpbitmap.cxx  |  979 --
 cui/source/tabpages/tppattern.cxx |  876 +++
 cui/uiconfig/ui/areadialog.ui |4 
 cui/uiconfig/ui/bitmaptabpage.ui  |  347 ---
 cui/uiconfig/ui/patterntabpage.ui |  334 +++
 extras/Package_palettes.mk|1 
 extras/source/glade/libreoffice-catalog.xml.in|   11 
 extras/source/palettes/standard.sob   |binary
 extras/source/palettes/standard.sop   |binary
 include/svx/dialogs.hrc   |3 
 include/svx/dlgctrl.hxx   |   19 
 include/svx/drawitem.hxx  |   24 
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 
 include/svx/svdmodel.hxx  |1 
 include/svx/svxids.hrc|   39 
 include/svx/xtable.hxx|   26 
 sc/sdi/drawsh.sdi |1 
 sc/source/ui/docshell/docsh2.cxx  |1 
 scp2/source/ooo/registryitem_ooo.scp  |7 
 sd/sdi/_drvwsh.sdi|4 
 sd/source/ui/dlg/dlgpage.cxx  |4 
 sd/source/ui/dlg/prltempl.cxx |2 
 sd/source/ui/dlg/tabtempl.cxx |2 
 sd/source/ui/docshell/docshell.cxx|1 
 sd/source/ui/inc/dlgpage.hxx  |1 
 sd/source/ui/inc/prltempl.hxx |1 
 sd/source/ui/inc/tabtempl.hxx |1 
 sd/source/ui/sidebar/SlideBackground.cxx  |  156 ++-
 sd/source/ui/sidebar/SlideBackground.hxx  |1 
 svx/Library_svxcore.mk|1 
 svx/sdi/svx.sdi   |   16 
 svx/sdi/svxitems.sdi  |1 
 svx/source/dialog/dlgctrl.cxx |  155 +++
 svx/source/dialog/hdft.cxx|3 
 svx/source/dialog/sdstring.src|   10 
 svx/source/items/drawitem.cxx |   42 
 svx/source/sidebar/area/AreaPropertyPanel.cxx |2 
 svx/source/sidebar/area/AreaPropertyPanel.hxx |1 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |  567 +++-
 svx/source/xoutdev/xattrbmp.cxx   |5 
 svx/source/xoutdev/xtabbtmp.cxx   |   33 
 svx/source/xoutdev/xtable.cxx |6 
 svx/source/xoutdev/xtabptrn.cxx   |   92 ++
 svx/uiconfig/ui/sidebararea.ui|  170 +--
 sw/sdi/_frmsh.sdi |6 
 sw/sdi/drawsh.sdi |5 
 sw/source/core/draw/drawdoc.cxx   |1 
 sw/source/ui/chrdlg/pardlg.cxx|2 
 sw/source/ui/frmdlg/frmdlg.cxx|2 
 sw/source/uibase/app/docshdrw.cxx |1 
 sw/source/uibase/app/docst.cxx|1 
 sw/source/uibase/app/docstyle.cxx |3 
 sw/source/uibase/shells/frmsh.cxx |2 
 sw/source/uibase/shells/grfsh.cxx |3 
 sw/source/uibase/shells/textsh.cxx|2 
 sw/source/uibase/shells/textsh1.cxx   |4 
 62 files changed, 2302 insertions(+), 1788 deletions(-)

New commits:
commit 76585ae33f3ca75c05c0ccbf6a621b6e2d42bc00
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Jun 7 16:58:20 2016 +0530

Convert Bitmap tab to Pattern tab

Change-Id: I5cf02f1889090539f7adb826483c91a1ef3c3925
Reviewed-on: https://gerrit.libreoffice.org/26015
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 7bb181d..c81ef962 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -197,13 +197,13 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/textanim \
 cui/source/tabpages/textattr \
 cui/source/tabpages/tparea \
-cui/source/tabpages/tpbitmap \
 cui/source/tabpages/tpcolor \
 cui/source/tabpages/tpgradnt \
 cui/source/tabpages/tphatch \
 cui/source/tabpages/tpline \
 cui/source/tabpages/tplnedef \
 cui/source/tabpages/tplneend \
+cui/source/tabpages/tppattern \
 cui/source/tabpages/tpshadow \
 cui/source/tabpages/tptrans \
 cui/source/tabpages/transfrm \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index b0f72

[Libreoffice-commits] core.git: svx/source

2016-06-25 Thread Rishabh Kumar
 svx/source/sidebar/ColorPanel.hxx |   58 --
 1 file changed, 58 deletions(-)

New commits:
commit 59246096295ab94f9e2f47260100f83501fc1bc2
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Sat Jun 25 13:18:40 2016 +0530

Remove dead code

Change-Id: Ie4aaf3c64e827bafbd3c2477b47752dabd48ad1a
Reviewed-on: https://gerrit.libreoffice.org/26653
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+loger...@ok.de>

diff --git a/svx/source/sidebar/ColorPanel.hxx 
b/svx/source/sidebar/ColorPanel.hxx
deleted file mode 100644
index 3e7f085..000
--- a/svx/source/sidebar/ColorPanel.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_COLORPANEL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_COLORPANEL_HXX
-
-#include 
-#include 
-
-
-namespace svx { namespace sidebar {
-
-
-/** This demo panel shows the colors that are available from the
-StyleSettings.
-*/
-class ColorPanel
-: public ValueSet
-{
-public:
-ColorPanel (vcl::Window* pParent);
-virtual ~ColorPanel();
-
-// From vcl::Window
-virtual void Resize();
-virtual void DataChanged (const DataChangedEvent& rEvent);
-
-private:
-int mnPreferredColumnCount;
-
-/** Depending on the given number of columns and the item size
-calculate the number of rows that are necessary to display all
-items.
-*/
-int CalculateRowCount (const Size& rItemSize, int nColumnCount);
-void Fill();
-};
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Week 4 : Area Fill

2016-06-23 Thread Rishabh Kumar
Hi,

Last week I completed the following tasks -

1. Created a new pattern tab - http://imgur.com/Jjmuc35

2. Moved bitmap controls from Area tab - http://imgur.com/CWaK5pP

3. Multiple color palettes in color dialog - http://imgur.com/ZPsy9zO

Work planned for this week -

1. Make changes and merge the commits https://gerrit.libreoffice.org/26015 and
https://gerrit.libreoffice.org/26402 to master.

2. Move all the fill style tabs inside the area tab

Warm Regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: cui/source

2016-06-17 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|2 +
 cui/source/tabpages/tpgradnt.cxx |   66 ---
 cui/source/tabpages/tphatch.cxx  |   72 ++-
 3 files changed, 68 insertions(+), 72 deletions(-)

New commits:
commit 6b3eb4788f63602c0a446ad8f56539d3b65bb302
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jun 16 19:18:20 2016 +0530

Reduce duplicate code and remove DBG_ASSERT

Change-Id: I2abf050bd6627cda993ff03bdf1d1867e209bda5
Reviewed-on: https://gerrit.libreoffice.org/26392
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 9e1da38..98f2c32 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -429,6 +429,7 @@ private:
 
 long CheckChanges_Impl();
 void SetControlState_Impl( css::awt::GradientStyle eXGS );
+sal_Int32 SearchGradientList(OUString aGradientName);
 
 public:
 SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
@@ -511,6 +512,7 @@ private:
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 
 long CheckChanges_Impl();
+sal_Int32 SearchHatchList(OUString aHatchName);
 
 public:
 SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 8d87220..6ab4d12 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -240,7 +240,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet&  )
 INetURLObject   aURL( m_pGradientList->GetPath() );
 
 aURL.Append( m_pGradientList->GetName() );
-DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid 
URL" );
+SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, 
"cui.tabpages", "invalid URL" );
 
 if ( aURL.getBase().getLength() > 18 )
 {
@@ -302,7 +302,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
   SVX_RESSTR( 
RID_SVXSTR_GRADIENT ),
   CUI_RESSTR( 
RID_SVXSTR_ASK_CHANGE_GRADIENT ),
);
-DBG_ASSERT(aMessDlg, "Dialog creation failed!");
+assert(aMessDlg && "Dialog creation failed!");
 aMessDlg->SetButtonText( SvxMessDialogButton::N1,
 OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) 
) );
 aMessDlg->SetButtonText( SvxMessDialogButton::N2,
@@ -370,7 +370,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
 (sal_uInt16) m_pMtrColorFrom->GetValue(),
 (sal_uInt16) m_pMtrColorTo->GetValue() ));
 }
-DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" );
+assert( pXGradient && "XGradient could not be created" );
 rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
 rSet->Put( XFillGradientItem( aString, *pXGradient ) );
 rSet->Put( XGradientStepCountItem( nValue ) );
@@ -465,18 +465,12 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickAddHdl_Impl, Button*, void)
 
 long nCount = m_pGradientList->Count();
 long j = 1;
-bool bDifferent = false;
+bool bValidGradientName = false;
 
-while( !bDifferent )
+while( !bValidGradientName )
 {
-aName  = aNewName;
-aName += " ";
-aName += OUString::number( j++ );
-bDifferent = true;
-
-for( long i = 0; i < nCount && bDifferent; i++ )
-if( aName == m_pGradientList->GetGradient( i )->GetName() )
-bDifferent = false;
+aName  = aNewName + " " + OUString::number( j++ );
+bValidGradientName = (SearchGradientList(aName) == 
LISTBOX_ENTRY_NOTFOUND);
 }
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -488,15 +482,9 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickAddHdl_Impl, Button*, void)
 {
 pDlg->GetName( aName );
 
-bDifferent = true;
+bValidGradientName = (SearchGradientList(aName) == 
LISTBOX_ENTRY_NOTFOUND);
 
-for (long i = 0; i < nCount && bDifferent; ++i)
-{
-if( aName == m_pGradientList->GetGradient( i )->GetName() )
-bDifferent = false;
-}
-
-if (bDifferent)
+if (bValidGradientName)
 {
 nError = 0;
 break;
@@ -566,29 +554,21 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickModifyHdl_Impl, Button*, void)
 {
 OUString aDesc( CUI_RES( RID_SVXSTR_DE

[Libreoffice-commits] core.git: include/svx svx/source

2016-06-16 Thread Rishabh Kumar
 include/svx/xbtmpit.hxx |1 +
 svx/source/xoutdev/xattrbmp.cxx |6 ++
 2 files changed, 7 insertions(+)

New commits:
commit d9aa7006c0880bc16adb8de140b46cd47a7c8248
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jun 16 15:54:53 2016 +0530

[GSoC] Member function to identify Pattern

Change-Id: I72ca21204248bfe279445f01ab247f19ec958fb1
Reviewed-on: https://gerrit.libreoffice.org/26361
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Rishabh Kumar <kris.kr...@yahoo.in>

diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
index 5dd2d2c..24782f7 100644
--- a/include/svx/xbtmpit.hxx
+++ b/include/svx/xbtmpit.hxx
@@ -65,6 +65,7 @@ public:
 
 const GraphicObject& GetGraphicObject() const { return maGraphicObject;}
 void SetGraphicObject(const GraphicObject& rGraphicObject);
+bool isPattern() const;
 
 static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 
);
 XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 3e8dbf7..1d7572e 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -357,6 +357,12 @@ void XFillBitmapItem::SetGraphicObject(const 
GraphicObject& rGraphicObject)
 maGraphicObject = rGraphicObject;
 }
 
+bool XFillBitmapItem::isPattern() const
+{
+BitmapColor aBack, aFront;
+return isHistorical8x8(GetGraphicObject().GetGraphic().GetBitmap(), aBack, 
aFront);
+}
+
 sal_uInt16 XFillBitmapItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
 {
 return 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-06-16 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |2 
 cui/source/tabpages/tpcolor.cxx |  140 
 cui/uiconfig/ui/colorpage.ui|   36 --
 3 files changed, 61 insertions(+), 117 deletions(-)

New commits:
commit 886c35539b3a6d4da974fb91a697097c346b0016
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jun 9 14:44:52 2016 +0530

Remove color name field from color tab

Click on 'Modify' button to change the color name

Change-Id: I90397ae81edc3a9b5368f9fc2a9f2811a1e774e0
Reviewed-on: https://gerrit.libreoffice.org/26090
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index ef0e11c..f709766 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -664,7 +664,6 @@ private:
 void EnableSave( bool bCanSave );
 
 SvxColorTabPageShadow *pShadow;
-VclPtr   m_pEdtName;
 VclPtrm_pLbColor;
 
 VclPtr   m_pValSetColorList;
@@ -743,6 +742,7 @@ private:
 void SetColorModel(ColorModel eModel);
 void ChangeColorModel();
 void UpdateColorValues();
+sal_Int32 SearchColorList(OUString aColorName);
 DECL_LINK_TYPED( ModifiedHdl_Impl, Edit&, void );
 
 long CheckChanges_Impl();
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index ddb2644..fd51e15 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -215,7 +215,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickSaveHdl_Impl, 
Button*, void)
 while (nIndex >= 0);
 
 INetURLObject aFile(aLastDir);
-DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NotValid, "invalid URL" );
+SAL_WARN_IF( aFile.GetProtocol() == INetProtocol::NotValid, 
"cui.tabpages", "invalid URL" );
 
 XPropertyListRef pList = GetList();
 
@@ -326,7 +326,6 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
 get(m_pBtnSave, "save");
 get(m_pTableName, "colortableft");
 
-get(m_pEdtName, "name");
 get(m_pLbColor, "colorlb");
 get(m_pValSetColorList, "colorset");
 Size aSize = LogicToPixel(Size(94 , 117), MAP_APPFONT);
@@ -434,7 +433,6 @@ void SvxColorTabPage::dispose()
 m_pBtnLoad.clear();
 m_pBtnSave.clear();
 m_pTableName.clear();
-m_pEdtName.clear();
 m_pLbColor.clear();
 m_pValSetColorList.clear();
 m_pCtlPreviewOld.clear();
@@ -499,7 +497,6 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 {
 m_pLbColor->SelectEntryPos( *pPos );
 m_pValSetColorList->SelectItem( 
m_pLbColor->GetSelectEntryPos() + 1 );
-m_pEdtName->SetText( m_pLbColor->GetSelectEntry() );
 XColorEntry* pEntry = pColorList->GetColor( *pPos );
 aPreviousColor = pEntry->GetColor();
 ChangeColor(pEntry->GetColor());
@@ -515,7 +512,6 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 aPreviousColor = static_cast(pPoolItem)->GetColorValue();
 ChangeColor( aPreviousColor );
 
-m_pEdtName->SetText( static_cast( 
pPoolItem )->GetName() );
 
 m_pRcustom->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetRed() ) );
 m_pGcustom->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetGreen() ) );
@@ -557,15 +553,13 @@ long SvxColorTabPage::CheckChanges_Impl()
 if( nPos != LISTBOX_ENTRY_NOTFOUND )
 {
 Color aColor = pColorList->GetColor( nPos )->GetColor();
-OUString aString = m_pLbColor->GetSelectEntry();
 
 // aNewColor, because COL_USER != COL_something, even if RGB values 
are the same
 // Color aNewColor( aColor.GetRed(), aColor.GetGreen(), 
aColor.GetBlue() );
 
 if( ColorToPercent_Impl( aCurrentColor.GetRed() ) != 
ColorToPercent_Impl( aColor.GetRed() ) ||
 ColorToPercent_Impl( aCurrentColor.GetGreen() ) != 
ColorToPercent_Impl( aColor.GetGreen() ) ||
-ColorToPercent_Impl( aCurrentColor.GetBlue() ) != 
ColorToPercent_Impl( aColor.GetBlue() ) ||
-aString != m_pEdtName->GetText() )
+ColorToPercent_Impl( aCurrentColor.GetBlue() ) != 
ColorToPercent_Impl( aColor.GetBlue() ) )
 {
 ResMgr& rMgr = CUI_MGR();
 Image aWarningBoxImage = WarningBox::GetStandardImage();
@@ -661,7 +655,6 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 aNewColor = aColorItem.GetColorValue();
 m_pLbColor->SelectEntry(aNewColor);
 m_pValSetColorList->SelectItem( m_pLbColor->GetSelectEntryPos() + 1 );
-m_pEdtName->SetText( m_pLbColor->GetSelectEntry() );
 }
 
   

[Libreoffice-commits] core.git: extras/source svx/source

2016-06-16 Thread Rishabh Kumar
 extras/source/palettes/standard.sog |   12 ++--
 svx/source/dialog/sdstring.src  |   26 +-
 2 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit dabee9834be560c0b2ca174e88002f0eae1d155a
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jun 15 02:42:32 2016 +0530

tdf#94724: Make Gradient and Hatch preset names consistent

Change-Id: If191fe7dd5a3986a5f75e149d2d37c36c1256b04
Reviewed-on: https://gerrit.libreoffice.org/26277
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/extras/source/palettes/standard.sog 
b/extras/source/palettes/standard.sog
index a74b95c..eab2b15 100644
--- a/extras/source/palettes/standard.sog
+++ b/extras/source/palettes/standard.sog
@@ -90,8 +90,8 @@ draw:angle="300"
 draw:border="0%"/>
 
 
 
 
 
 
 https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2016-06-14 Thread Rishabh Kumar
 cui/source/tabpages/tpcolor.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 64bc2eff89f3214aa0c90a0becc39c6ac11879b1
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jun 9 11:50:12 2016 +0530

Minor bugfix for the Color tab

Bugs fixed:
1. Allow resizing of SvxColorValueSet on Addition and deletion of colors.
2. Refresh color in SvxColorValueSet on modifying the color.
3. Select the second last color on deleting the last color.

Change-Id: Id01a1347683ea183dfb9fbc5c14a4e101eeef9aa
Reviewed-on: https://gerrit.libreoffice.org/26084
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index ae40b60..ddb2644 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -787,6 +787,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickAddHdl_Impl, 
Button*, void)
 
 m_pLbColor->Append( *pEntry );
 m_pValSetColorList->InsertItem( m_pValSetColorList->GetItemCount() + 
1, pEntry->GetColor(), pEntry->GetName() );
+m_pValSetColorList->Resize();
 ImpColorCountChanged();
 
 m_pLbColor->SelectEntryPos( m_pLbColor->GetEntryCount() - 1 );
@@ -855,8 +856,9 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickModifyHdl_Impl, 
Button*, void)
 m_pLbColor->Modify( *pEntry, nPos );
 m_pLbColor->SelectEntryPos( nPos );
 
-m_pValSetColorList->SetItemColor( nPos + 1, pEntry->GetColor() );
-m_pValSetColorList->SetItemText( nPos + 1, pEntry->GetName() );
+m_pValSetColorList->Clear();
+m_pValSetColorList->addEntriesForXColorList( *pColorList );
+m_pValSetColorList->SelectItem( nPos + 1 );
 m_pEdtName->SetText( aName );
 
 m_pCtlPreviewOld->Invalidate();
@@ -907,11 +909,21 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, 
ClickDeleteHdl_Impl, Button*, void)
 m_pLbColor->RemoveEntry( nPos );
 m_pValSetColorList->Clear();
 m_pValSetColorList->addEntriesForXColorList(*pColorList);
+m_pValSetColorList->Resize();
 ImpColorCountChanged();
 //FillValueSet_Impl(*m_pValSetColorList);
 
 // positioning
-m_pLbColor->SelectEntryPos( nPos );
+long nColorCount = pColorList->Count();
+if( nColorCount != 0 )
+{
+if( nPos >= nColorCount  )
+nPos = nColorCount - 1;
+m_pLbColor->SelectEntryPos( nPos );
+}
+else
+m_pLbColor->SetNoSelection();
+
 SelectColorLBHdl_Impl( *m_pLbColor );
 
 m_pCtlPreviewOld->Invalidate();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig extras/source

2016-06-08 Thread Rishabh Kumar
 cui/uiconfig/ui/colorpage.ui   |2 +-
 cui/uiconfig/ui/colorpickerdialog.ui   |2 +-
 extras/source/glade/libreoffice-catalog.xml.in |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 58664b1d43c393bf92b3aafdb90b7fb9a2ba832b
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jun 8 14:58:23 2016 +0530

Fix widget's library name

Change-Id: I22c66a63bfc71971da87db00b364e56ec55f7222
Reviewed-on: https://gerrit.libreoffice.org/26052
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index fdc3156..b90d3be 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -361,7 +361,7 @@
   
 
 
-  
+  
 6
 True
 True
diff --git a/cui/uiconfig/ui/colorpickerdialog.ui 
b/cui/uiconfig/ui/colorpickerdialog.ui
index 5b4f79f..cbc5c66 100644
--- a/cui/uiconfig/ui/colorpickerdialog.ui
+++ b/cui/uiconfig/ui/colorpickerdialog.ui
@@ -342,7 +342,7 @@
   
 
 
-  
+  
 True
 True
 True
diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 58732b1..f79b89c 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -39,7 +39,7 @@
 
-
 https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-06-08 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   43 ++-
 cui/source/tabpages/tpcolor.cxx |  276 +--
 cui/uiconfig/ui/colorpage.ui|  477 ++--
 3 files changed, 599 insertions(+), 197 deletions(-)

New commits:
commit 7b186b14ba1c1bd983798e1a987fe6310cf1b749
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri May 27 16:16:12 2016 +0530

Addition of new controls and their rearrangement in color tab

1. Addition of RGB and CMYK fields for the previous/old color.
2. Removal of color mode(RGB/CMYK) listbox and replacement with 
RadioButtons.
3. Changing color mode should not change the previous selected color.
4. Hide CMYK controls and color mode RadioButtons.
5. Addition of Hexadecimal color values.

Change-Id: Iafc51e750e1f08345771edc9a733b91f6c771500
Reviewed-on: https://gerrit.libreoffice.org/25538
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index adba0ba..ef0e11c 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class SdrModel;
@@ -671,18 +672,30 @@ private:
 VclPtrm_pCtlPreviewOld;
 VclPtrm_pCtlPreviewNew;
 
-VclPtrm_pLbColorModel;
-
-VclPtr   m_pRGB;
-VclPtr   m_pR;
-VclPtr   m_pG;
-VclPtr   m_pB;
-
-VclPtr   m_pCMYK;
-VclPtrm_pC;
-VclPtrm_pY;
-VclPtrm_pM;
-VclPtrm_pK;
+VclPtrm_pRbRGB;
+VclPtrm_pRbCMYK;
+
+VclPtr   m_pRGBcustom;
+VclPtr   m_pRGBpreset;
+VclPtr   m_pRcustom;
+VclPtr   m_pRpreset;
+VclPtr   m_pGcustom;
+VclPtr   m_pGpreset;
+VclPtr   m_pBcustom;
+VclPtr   m_pBpreset;
+VclPtrm_pHexpreset;
+VclPtrm_pHexcustom;
+
+VclPtr   m_pCMYKcustom;
+VclPtr   m_pCMYKpreset;
+VclPtrm_pCcustom;
+VclPtrm_pCpreset;
+VclPtrm_pYcustom;
+VclPtrm_pYpreset;
+VclPtrm_pMcustom;
+VclPtrm_pMpreset;
+VclPtrm_pKcustom;
+VclPtrm_pKpreset;
 
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
@@ -706,6 +719,7 @@ private:
 
 ColorModel  eCM;
 
+Color   aPreviousColor;
 Color   aCurrentColor;
 
 static voidConvertColorValues (Color& rColor, ColorModel eModell);
@@ -724,8 +738,11 @@ private:
 
 DECL_LINK_TYPED( SelectColorLBHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( SelectValSetHdl_Impl, ValueSet*, void );
-DECL_LINK_TYPED( SelectColorModelHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( SelectColorModeHdl_Impl, RadioButton&, void );
 void ChangeColor(const Color );
+void SetColorModel(ColorModel eModel);
+void ChangeColorModel();
+void UpdateColorValues();
 DECL_LINK_TYPED( ModifiedHdl_Impl, Edit&, void );
 
 long CheckChanges_Impl();
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 93fbf9e..c3f4a1b 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -339,16 +339,28 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, 
const SfxItemSet& rInAttr
 m_pCtlPreviewOld->set_height_request(aSize.Height());
 m_pCtlPreviewNew->set_width_request(aSize.Width());
 m_pCtlPreviewNew->set_height_request(aSize.Height());
-get(m_pLbColorModel, "modellb");
-get(m_pRGB, "rgb");
-get(m_pR, "R");
-get(m_pG, "G");
-get(m_pB, "B");
-get(m_pCMYK, "cmyk");
-get(m_pC, "C");
-get(m_pY, "Y");
-get(m_pM, "M");
-get(m_pK, "K");
+get(m_pRbRGB, "RGB");
+get(m_pRbCMYK, "CMYK");
+get(m_pRGBcustom, "rgbcustom");
+get(m_pRGBpreset, "rgbpreset");
+get(m_pRcustom, "R_custom");
+get(m_pRpreset, "R_preset-nospin");
+get(m_pGcustom, "G_custom");
+get(m_pGpreset, "G_preset-nospin");
+get(m_pBcustom, "B_custom");
+get(m_pBpreset, "B_preset-nospin");
+get(m_pHexpreset, "hex_preset");
+get(m_pHexcustom, "hex_custom");
+get(m_pCMYKcustom, "cmykcustom");
+get(m_pCMYKpreset,  "cmykpreset");
+get(m_pCcustom, "C_custom");
+get(m_pCpreset, "C_preset-nospin");
+get(m_pYcustom, "Y_custom");
+get(m_pYpreset, "Y_preset-nospin");
+get(m_pMcustom, "M_custom");
+get(m_pMpreset, "M_preset-nospin");
+get(m_pKcustom, "K_custom");
+get(m_pKprese

GSoC Week 2 : Area Fill

2016-06-08 Thread Rishabh Kumar
Hi,


In the second week , I completed the color tab -
https://gerrit.libreoffice.org/#/c/25538/ . At the friday's design meeting,
it was decided to hide the CMYK color mode from the color tab and keep the
responsible code. I fixed some minor bugs/regression introduced by my
previous commits -


1. https://gerrit.libreoffice.org/#/c/25784/
2. https://gerrit.libreoffice.org/#/c/25797/


 I am currently working on Pattern tab and decided to break it down into 3
commits. The first one is up for the review -
https://gerrit.libreoffice.org/#/c/26015/ .


Goals for this week - Complete the Pattern tab.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: cui/source

2016-06-02 Thread Rishabh Kumar
 cui/source/tabpages/tphatch.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 9f5bb8cddd28be2c45ac5bdf438d4996337f6380
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jun 1 20:53:32 2016 +0530

Import custom Hatch background color

Change-Id: I36593afb557f9826f2b0117cd93d2712bc676cdd
Reviewed-on: https://gerrit.libreoffice.org/25784
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 78e5fa8..3b0afef 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -240,6 +240,12 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet 
)
 if(aBckItem.GetValue())
 aColor = aColorItem.GetColorValue();
 m_pLbBackgroundColor->SelectEntry(aColor);
+if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
+{
+m_pLbBackgroundColor->InsertEntry( aColor , OUString() );
+m_pLbBackgroundColor->SelectEntry( aColor );
+}
+
 m_rXFSet.Put( aBckItem );
 m_rXFSet.Put( aColorItem );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Week 1 : Area Fill

2016-06-02 Thread Rishabh Kumar
Hi,

I am working on the Area Fill dialog as my GSoC project. The first task of
the project is to move out the individual Fill style controls from the Area
tab of the dialog and move them to their respective tabs.


Tasks completed :

1. Refactored out transparency tab code from the Area tab code :
https://gerrit.libreoffice.org/#/c/24368/
2. Moved gradient controls from the Area tab to the Gradient tab :
https://gerrit.libreoffice.org/#/c/24910/
3. Moved Hatch controls from the Area tab to the Hatch tab :
https://gerrit.libreoffice.org/#/c/25147/
4. Made HexColorControl class global :
https://gerrit.libreoffice.org/#/c/25665/ (To be reused in Color Tab)


Work in progress:

1. Color Tab ( https://gerrit.libreoffice.org/#/c/25538/ ) : Awaiting UI
approval. Discussion on whether to remove the CMYK color representation
from the Color Tab
2. Refactoring the Bitmap code to create a new fill style - pattern


Warm Regards
Rishabh
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: cui/source

2016-06-02 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa8759400ef4adda2fe5570a9343960529786f39
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jun 2 00:28:00 2016 +0530

tdf#100121 : Assertion failed in Area fill of a text box inside a chart

Replace MetricField by NumericField

Change-Id: I4bde312b709aa6073908c21bc8ed33bcdb3a9b1f
Reviewed-on: https://gerrit.libreoffice.org/25797
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 9655799..22e2651 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -390,7 +390,7 @@ private:
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
-VclPtrm_pMtrIncrement;
+VclPtr   m_pMtrIncrement;
 VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source include/svx svx/Library_svxcore.mk svx/source

2016-06-01 Thread Rishabh Kumar
 cui/source/dialogs/colorpicker.cxx|  123 
 include/svx/hexcolorcontrol.hxx   |   50 +
 svx/Library_svxcore.mk|1 
 svx/source/dialog/hexcolorcontrol.cxx |  129 ++
 4 files changed, 181 insertions(+), 122 deletions(-)

New commits:
commit 00fbca564251368da34caaceb719164e34764e10
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed Jun 1 01:31:53 2016 +0530

Make class HexColorControl global

Change-Id: I755e5aab5425d5d136d5fe7c75706a93cf4559ae
Reviewed-on: https://gerrit.libreoffice.org/25665
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 7ba386e..1cc7782 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "dialmgr.hxx"
@@ -131,128 +132,6 @@ static void RGBtoCMYK( double dR, double dG, double dB, 
double& fCyan, double& f
 }
 }
 
-class HexColorControl : public Edit
-{
-public:
-HexColorControl( vcl::Window* pParent, WinBits nStyle );
-
-virtual bool PreNotify( NotifyEvent& rNEvt ) override;
-virtual void Paste() override;
-
-void SetColor( sal_Int32 nColor );
-sal_Int32 GetColor();
-
-private:
-static bool ImplProcessKeyInput( const KeyEvent& rKEv );
-};
-
-HexColorControl::HexColorControl( vcl::Window* pParent, WinBits nStyle )
-: Edit(pParent, nStyle)
-{
-SetMaxTextLen( 6 );
-}
-
-VCL_BUILDER_FACTORY_ARGS(HexColorControl, WB_BORDER)
-
-void HexColorControl::SetColor(sal_Int32 nColor)
-{
-OUStringBuffer aBuffer;
-sax::Converter::convertColor(aBuffer, nColor);
-SetText(aBuffer.makeStringAndClear().copy(1));
-}
-
-sal_Int32 HexColorControl::GetColor()
-{
-sal_Int32 nColor = -1;
-
-OUString aStr("#");
-aStr += GetText();
-sal_Int32 nLen = aStr.getLength();
-
-if (nLen < 7)
-{
-static const sal_Char* pNullStr = "00";
-aStr += OUString::createFromAscii( [nLen-1] );
-}
-
-sax::Converter::convertColor(nColor, aStr);
-
-if (nColor == -1)
-SetControlBackground(Color(COL_RED));
-else
-SetControlBackground();
-
-return nColor;
-}
-
-bool HexColorControl::PreNotify( NotifyEvent& rNEvt )
-{
-if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && 
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
-{
-if ( ImplProcessKeyInput( *rNEvt.GetKeyEvent() ) )
-return true;
-}
-
-return Edit::PreNotify( rNEvt );
-}
-
-void HexColorControl::Paste()
-{
-css::uno::Reference 
aClipboard(GetClipboard());
-if (aClipboard.is())
-{
-css::uno::Reference xDataObj;
-
-try
-{
-SolarMutexReleaser aReleaser;
-xDataObj = aClipboard->getContents();
-}
-catch (const css::uno::Exception&)
-{
-}
-
-if (xDataObj.is())
-{
-css::datatransfer::DataFlavor aFlavor;
-SotExchange::GetFormatDataFlavor(SotClipboardFormatId::STRING, 
aFlavor);
-try
-{
-css::uno::Any aData = xDataObj->getTransferData(aFlavor);
-OUString aText;
-aData >>= aText;
-
-if( !aText.isEmpty() && aText.startsWith( "#" ) )
-aText = aText.copy(1);
-
-if( aText.getLength() > 6 )
-aText = aText.copy( 0, 6 );
-
-SetText(aText);
-}
-catch(const css::uno::Exception&)
-{}
-}
-}
-}
-
-bool HexColorControl::ImplProcessKeyInput( const KeyEvent& rKEv )
-{
-const vcl::KeyCode& rKeyCode = rKEv.GetKeyCode();
-
-if( rKeyCode.GetGroup() == KEYGROUP_ALPHA && !rKeyCode.IsMod1() && 
!rKeyCode.IsMod2() )
-{
-if( (rKeyCode.GetCode() < KEY_A) || (rKeyCode.GetCode() > KEY_F) )
-return true;
-}
-else if( rKeyCode.GetGroup() == KEYGROUP_NUM )
-{
-if( rKeyCode.IsShift() )
-return true;
-}
-return false;
-}
-
 class ColorPreviewControl : public Control
 {
 public:
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
new file mode 100644
index 000..a9f9661
--- /dev/null
+++ b/include/svx/hexcolorcontrol.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.

[Libreoffice-commits] core.git: include/svx svx/source

2016-05-27 Thread Rishabh Kumar
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 +
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   31 ++
 2 files changed, 23 insertions(+), 10 deletions(-)

New commits:
commit e4358002ace626c20a9e4069b9417073d09d8140
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri May 27 03:44:15 2016 +0530

Fix gradient angle spinbox in Area sidebar tab

Regression introduced by commit - 3c99f8500f657ed84b316390d5175a6f5e56bc69

Change-Id: I65a56b44f851d374e0a6aac8b7c544f4156b67f2
Reviewed-on: https://gerrit.libreoffice.org/25524
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index e4ec0df..fc24c92 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -161,6 +161,7 @@ protected:
 
 DECL_LINK_TYPED(SelectFillTypeHdl, ListBox&, void );
 DECL_LINK_TYPED(SelectFillAttrHdl, ListBox&, void );
+DECL_LINK_TYPED(ChangeGradientAngle, Edit&, void);
 DECL_LINK_TYPED(ChangeTrgrTypeHdl_Impl, ListBox&, void);
 DECL_LINK_TYPED(ModifyTransparentHdl_Impl, Edit&, void);
 DECL_LINK_TYPED(ModifyTransSliderHdl, Slider*, void);
@@ -173,6 +174,7 @@ protected:
 void Update();
 void ImpUpdateTransparencies();
 void SetTransparency(sal_uInt16 nVal);
+void SelectFillAttrHdl_Impl();
 };
 
 } } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 5a7374f..350387b 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -161,6 +161,7 @@ void AreaPropertyPanelBase::Initialize()
 mpGradientStyle->SetSelectHdl( aLink );
 mpLbFillGradFrom->SetSelectHdl( aLink );
 mpLbFillGradTo->SetSelectHdl( aLink );
+mpMTRAngle->SetModifyHdl(LINK(this,AreaPropertyPanelBase, 
ChangeGradientAngle));
 
 mpLBTransType->SetSelectHdl(LINK(this, AreaPropertyPanelBase, 
ChangeTrgrTypeHdl_Impl));
 
@@ -398,6 +399,26 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, 
SelectFillTypeHdl, ListBox&, void)
 
 IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, SelectFillAttrHdl, ListBox&, void)
 {
+SelectFillAttrHdl_Impl();
+}
+
+IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ChangeGradientAngle, Edit&, void)
+{
+SelectFillAttrHdl_Impl();
+}
+
+VclPtr AreaPropertyPanelBase::CreateTransparencyGradientControl 
(PopupContainer* pParent)
+{
+return VclPtrInstance(pParent, *this);
+}
+
+void AreaPropertyPanelBase::DataChanged(
+const DataChangedEvent& /*rEvent*/)
+{
+}
+
+void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
+{
 const drawing::FillStyle eXFS = 
(drawing::FillStyle)mpLbFillType->GetSelectEntryPos();
 const XFillStyleItem aXFillStyleItem(eXFS);
 SfxObjectShell* pSh = SfxObjectShell::Current();
@@ -499,16 +520,6 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, 
SelectFillAttrHdl, ListBox&, void)
 mpSidebarController->NotifyResize();
 }
 
-VclPtr AreaPropertyPanelBase::CreateTransparencyGradientControl 
(PopupContainer* pParent)
-{
-return VclPtrInstance(pParent, *this);
-}
-
-void AreaPropertyPanelBase::DataChanged(
-const DataChangedEvent& /*rEvent*/)
-{
-}
-
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
 {
 if(mpTransparanceItem.get() || mpFloatTransparenceItem.get())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2016-05-26 Thread Rishabh Kumar
 cui/source/tabpages/tpcolor.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 3b9cf275138199c3f03ec1d331dfa4e8fb3500bd
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu May 26 19:27:43 2016 +0530

Update CMYK color field correctly

Change-Id: I90f19aa33d619d2177d81376bcdfac13d45e0ca9
Reviewed-on: https://gerrit.libreoffice.org/25324
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index de43664..8384d3e 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -835,7 +835,6 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickWorkOnHdl_Impl, 
Button*, void)
 
 if( pColorDlg->Execute() == RET_OK )
 {
-sal_uInt16 nK = 0;
 Color aPreviewColor = pColorDlg->GetColor();
 aCurrentColor = aPreviewColor;
 if (eCM != CM_RGB)
@@ -844,7 +843,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickWorkOnHdl_Impl, 
Button*, void)
 m_pC->SetValue( ColorToPercent_Impl( aCurrentColor.GetRed() ) );
 m_pY->SetValue( ColorToPercent_Impl( aCurrentColor.GetGreen() ) );
 m_pM->SetValue( ColorToPercent_Impl( aCurrentColor.GetBlue() ) );
-m_pK->SetValue( ColorToPercent_Impl( nK ) );
+m_pK->SetValue( ColorToPercent_Impl( 
aCurrentColor.GetTransparency() ) );
 ConvertColorValues (aCurrentColor, CM_RGB);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sw/Library_sw.mk sw/source sw/uiconfig sw/UIConfig_swriter.mk

2016-05-26 Thread Rishabh Kumar
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |  162 
 sw/Library_sw.mk |5 
 sw/UIConfig_swriter.mk   |5 
 sw/source/uibase/sidebar/PageFooterPanel.cxx |   92 
 sw/source/uibase/sidebar/PageFooterPanel.hxx |   92 
 sw/source/uibase/sidebar/PageFormatPanel.cxx |  102 +
 sw/source/uibase/sidebar/PageFormatPanel.hxx |   91 
 sw/source/uibase/sidebar/PageHeaderPanel.cxx |  137 +++
 sw/source/uibase/sidebar/PageHeaderPanel.hxx |   95 +
 sw/source/uibase/sidebar/PageMarginPanel.cxx |  207 +++
 sw/source/uibase/sidebar/PageMarginPanel.hxx |  113 ++
 sw/source/uibase/sidebar/PageStylesPanel.cxx |   92 
 sw/source/uibase/sidebar/PageStylesPanel.hxx |   92 
 sw/source/uibase/sidebar/SwPanelFactory.cxx  |   50 ++
 sw/uiconfig/swriter/ui/pagefooterpanel.ui|  164 
 sw/uiconfig/swriter/ui/pageformatpanel.ui|  115 ++
 sw/uiconfig/swriter/ui/pageheaderpanel.ui|  164 
 sw/uiconfig/swriter/ui/pagemarginpanel.ui|  114 ++
 sw/uiconfig/swriter/ui/pagestylespanel.ui|  127 ++
 19 files changed, 2019 insertions(+)

New commits:
commit 2060543586fa01d77ed17fd7904a903313b2251e
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Aug 21 18:24:28 2015 +0530

tdf#83830: Writer page sidebar deck

Change-Id: I6eb16a5a721fad28aa7822b0ca8d7c06a0c08541
Reviewed-on: https://gerrit.libreoffice.org/17904
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
Tested-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 80bfad7..776782e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -41,6 +41,28 @@
 
   
 
+  
+
+  Properties
+
+
+  WriterPageDeck
+
+
+  
private:graphicrepository/sfx2/res/symphony/sidebar-template-large.png
+
+
+  
+any, any, visible ;
+  
+
+
+  100
+
+
+  true
+
+  
   
 
   Gallery
@@ -357,6 +379,146 @@
 
   
 
+  
+
+  Styles
+
+
+  PageStylesPanel
+
+
+  WriterPageDeck
+
+
+  .uno:PageDialog
+
+
+  
+Writer, Table,visible ;
+Writer, Text, visible ;
+Writer, default,  visible ;
+  
+
+
+  
private:resource/toolpanel/SwPanelFactory/PageStylesPanel
+
+
+  200
+
+  
+
+  
+
+  Margin
+
+
+  PageMarginPanel
+
+
+  WriterPageDeck
+
+
+  .uno:PageDialog
+
+
+  
+Writer, Table,visible ;
+Writer, Text, visible ;
+Writer, default,  visible ;
+  
+
+
+  
private:resource/toolpanel/SwPanelFactory/PageMarginPanel
+
+
+  300
+
+  
+
+  
+
+  Format
+
+
+  PageFormatPanel
+
+
+  WriterPageDeck
+
+
+  .uno:PageDialog
+
+
+  
+Writer, Table,visible ;
+Writer, Text, visible ;
+Writer, default,  visible ;
+  
+
+
+  
private:resource/toolpanel/SwPanelFactory/PageFormatPanel
+
+
+  100
+
+  
+
+  
+
+  Header
+
+
+  PageHeaderPanel
+
+
+  WriterPageDeck
+
+
+  .uno:PageDialog
+
+
+  
+Writer, Table,hidden ;
+Writer, Text, hidden ;
+Writer, default,  hidden ;
+  
+
+
+  
private:resource/toolpanel/SwPanelFactory/PageHeaderPanel
+
+
+  400
+
+  
+
+  
+
+  Footer
+
+
+  PageFooterPanel
+
+
+  WriterPageDeck
+
+
+  .uno:PageDialog
+
+
+  
+Writer, Table,hidden ;
+Writer, Text, hidden ;
+Writer

[Libreoffice-commits] core.git: svx/source

2016-05-25 Thread Rishabh Kumar
 svx/source/sidebar/line/LinePropertyPanel.cxx |2 ++
 svx/source/sidebar/line/LinePropertyPanelBase.cxx |7 +++
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit f131e6ef72bcb778bef11a49bef099d9c4d9
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Wed May 25 17:19:56 2016 +0530

Disable line arrow heads when a shape is selected

Change-Id: Ib2a6056f9739dad5c3b7567ded6c2ba3aca63247
Reviewed-on: https://gerrit.libreoffice.org/25447
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 9659357..9670e74 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -199,6 +199,8 @@ void LinePropertyPanel::HandleContextChange(
 {
 case CombinedEnumContext(Application_Calc, Context_DrawLine):
 case CombinedEnumContext(Application_DrawImpress, Context_DrawLine):
+case CombinedEnumContext(Application_WriterVariants, Context_Draw):
+// TODO : Implement DrawLine context in Writer
 bShowArrows = true;
 break;
 }
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx 
b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 5bc9fb9..906a412 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -901,8 +901,8 @@ void LinePropertyPanelBase::ActivateControls()
 
 mpGridLineProps->Enable( bLineStyle );
 mpBoxArrowProps->Enable( bLineStyle );
-mpLBStart->Enable( bLineStyle );
-mpLBEnd->Enable( bLineStyle );
+mpLBStart->Enable( bLineStyle && mbArrowSupported );
+mpLBEnd->Enable( bLineStyle && mbArrowSupported );
 }
 
 void LinePropertyPanelBase::setMapUnit(SfxMapUnit eMapUnit)
@@ -913,8 +913,7 @@ void LinePropertyPanelBase::setMapUnit(SfxMapUnit eMapUnit)
 void LinePropertyPanelBase::disableArrowHead()
 {
 mbArrowSupported = false;
-mpLBStart->Hide();
-mpLBEnd->Hide();
+ActivateControls();
 }
 
 }} // end of namespace svx::sidebar
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-05-23 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx   |   11 -
 cui/source/tabpages/tparea.cxx  |  136 +--
 cui/source/tabpages/tphatch.cxx |  110 
 cui/uiconfig/ui/areatabpage.ui  |   78 ---
 cui/uiconfig/ui/hatchpage.ui|  274 +---
 5 files changed, 274 insertions(+), 335 deletions(-)

New commits:
commit 7a4bd998e900c7f7a28f9068b97707ef76c99b85
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu May 19 13:54:04 2016 +0530

Addition of new controls and their rearrangement in hatch tab

1. Removal of rectangle hatch angle dial widget
2. Addition of slider widget for changing angle in hatch tab.
3. Move hatch background color control from area tab to hatch tab.
4. Rearrangement of controls
5. Removal of hatch controls from Area tab

Change-Id: I596098b328fc183d2fdd5259e90013dbf74d9ad7
Reviewed-on: https://gerrit.libreoffice.org/25147
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index c8235fe..79d1f33 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -193,10 +193,6 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
-VclPtr   m_pFlHatchBckgrd;
-VclPtr   m_pCbxHatchBckgrd;
-VclPtrm_pLbHatchBckgrdColor;
-
 VclPtr m_pBxBitmap;
 
 VclPtr   m_pFlSize;
@@ -264,10 +260,8 @@ private:
 
 DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void);
 DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifyHatchBckgrdColorHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
 void ModifyStepCountHdl_Impl(void*);
 
@@ -473,9 +467,10 @@ class SvxHatchTabPage : public SvxTabPage
 private:
 VclPtrm_pMtrDistance;
 VclPtrm_pMtrAngle;
-VclPtr m_pCtlAngle;
+VclPtr m_pSliderAngle;
 VclPtrm_pLbLineType;
 VclPtrm_pLbLineColor;
+VclPtrm_pLbBackgroundColor;
 VclPtr m_pLbHatchings;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
@@ -506,6 +501,8 @@ private:
 DECL_LINK_TYPED( ChangeHatchHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifiedBackgroundHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 void ModifiedHdl_Impl(void*);
 DECL_LINK_TYPED( ClickAddHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickModifyHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4b0faa3..29b3470 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -115,10 +115,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
-get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
-get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
-get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
-
 get(m_pBxBitmap,"boxBITMAP");
 
 get(m_pFlSize,"FL_SIZE");
@@ -151,11 +147,8 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
-Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
-Size aMainFrame(
-std::max(aHatchSize.Width(), aBitmapSize.Width()),
-std::max(aHatchSize.Height(), aBitmapSize.Height()));
+Size aMainFrame(aBitmapSize.Width(),aBitmapSize.Height());
 pMainFrame->set_width_request(aMainFrame.Width());
 pMainFrame->set_height_request(aMainFrame.Height());
 
@@ -166,9 +159,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 
 m_pBxBitmap->Hide();
 
-// Controls for Hatch-Background
-m_pFlHatchBckgrd->Hide();
-
 m_pTsbOriginal->EnableTriState( false );
 
 // this page needs ExchangeSupport
@@ -200,8 +190,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const 
SfxItemSet& rInAttrs
 m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 
 m_pLbColor->SetSelectHdl( LINK( this, 

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2016-05-18 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx|   15 +-
 cui/source/tabpages/tparea.cxx   |  136 +-
 cui/source/tabpages/tpgradnt.cxx |   56 --
 cui/uiconfig/ui/areatabpage.ui   |   96 --
 cui/uiconfig/ui/gradientpage.ui  |  199 ++-
 5 files changed, 219 insertions(+), 283 deletions(-)

New commits:
commit fe3d9ac20b0f27b8beca7e54efa8ba571e76101d
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue May 17 18:00:35 2016 +0530

Addition of new controls and their rearrangement in gradient tab

1. Addition of increment spin box and slider in gradient tab.
2. Addition of slider for border controls in gradient tab.
3. Rearrangement of controls.
4. Removal of gradient controls from Area tab.

Change-Id: I56c3767a0d54990338982cd45ed10a10dd8a94c1
Reviewed-on: https://gerrit.libreoffice.org/24910
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index dfffa39..c8235fe 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -192,10 +193,6 @@ private:
 VclPtr   m_pLbBitmap;
 VclPtrm_pCtlBitmapPreview;
 
-VclPtrm_pTsbStepCount;
-VclPtr   m_pFlStepCount;
-VclPtr   m_pNumFldStepCount;
-
 VclPtr   m_pFlHatchBckgrd;
 VclPtr   m_pCbxHatchBckgrd;
 VclPtrm_pLbHatchBckgrdColor;
@@ -272,8 +269,6 @@ private:
 DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ToggleHatchBckgrdColorHdl_Impl, CheckBox&, void );
 DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void );
-DECL_LINK_TYPED( ModifyStepCountEditHdl_Impl, Edit&, void );
-DECL_LINK_TYPED( ModifyStepCountClickHdl_Impl, Button*, void );
 void ModifyStepCountHdl_Impl(void*);
 
 //
@@ -390,25 +385,26 @@ class SvxGradientTabPage : public SfxTabPage
 
 private:
 VclPtrm_pLbGradientType;
-VclPtr  m_pFtCenterX;
+VclPtr  m_pFtCenter;
 VclPtrm_pMtrCenterX;
-VclPtr  m_pFtCenterY;
 VclPtrm_pMtrCenterY;
 VclPtr  m_pFtAngle;
 VclPtrm_pMtrAngle;
 VclPtrm_pMtrBorder;
+VclPtr m_pSliderBorder;
 VclPtrm_pLbColorFrom;
 VclPtrm_pMtrColorFrom;
 VclPtrm_pLbColorTo;
 VclPtrm_pMtrColorTo;
 VclPtr m_pLbGradients;
+VclPtrm_pMtrIncrement;
+VclPtr m_pSliderIncrement;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
 VclPtr m_pBtnModify;
 VclPtr m_pBtnDelete;
 VclPtr m_pBtnLoad;
 VclPtr m_pBtnSave;
-
 const SfxItemSet&   m_rOutAttrs;
 
 XColorListRef m_pColorList;
@@ -432,6 +428,7 @@ private:
 DECL_LINK_TYPED( ChangeGradientHdl_Impl, ListBox&, void );
 DECL_LINK_TYPED( ModifiedEditHdl_Impl, Edit&, void );
 DECL_LINK_TYPED( ModifiedListBoxHdl_Impl, ListBox&, void );
+DECL_LINK_TYPED( ModifiedSliderHdl_Impl, Slider*, void );
 DECL_LINK_TYPED( ClickLoadHdl_Impl, Button*, void );
 DECL_LINK_TYPED( ClickSaveHdl_Impl, Button*, void );
 void ModifiedHdl_Impl(void*);
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 4ab7c8e..4b0faa3 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -44,6 +44,8 @@
 #include "sfx2/opengrf.hxx"
 #include 
 
+#define DEFAULT_GRADIENTSTEP 64
+
 using namespace com::sun::star;
 
 // static 
@@ -113,10 +115,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 get(m_pLbBitmap,"LB_BITMAP");
 get(m_pCtlBitmapPreview,"CTL_BITMAP_PREVIEW");
 
-get(m_pTsbStepCount,"TSB_STEPCOUNT");
-get(m_pFlStepCount,"FL_STEPCOUNT");
-get(m_pNumFldStepCount,"NUM_FLD_STEPCOUNT");
-
 get(m_pFlHatchBckgrd,"FL_HATCHCOLORS");
 get(m_pLbHatchBckgrdColor,"LB_HATCHBCKGRDCOLOR");
 get(m_pCbxHatchBckgrd,"CB_HATCHBCKGRD");
@@ -153,12 +151,11 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, 
const SfxItemSet& rInAttrs
 //size required for any of the areas which might be selected
 //later, so that there's sufficient space
 VclContainer *pMainFrame = get("mainframe");
-Size aIncrementsSize(m_pFlStepCount->get_preferred_size());
 Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size());
 Size aBitmapSize(m_pBxBitmap->get_preferred_size());
 Size aMainFrame(
-std::max(std::max(aIncrementsSiz

[Libreoffice-commits] core.git: include/svx officecfg/registry sd/Library_sd.mk sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk svx/sdi

2016-05-04 Thread Rishabh Kumar
 include/svx/svxids.hrc   |   10 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   30 
 sd/Library_sd.mk |1 
 sd/UIConfig_simpress.mk  |1 
 sd/sdi/_drvwsh.sdi   |   30 
 sd/source/ui/func/fupage.cxx |   13 
 sd/source/ui/sidebar/PanelFactory.cxx|3 
 sd/source/ui/sidebar/SlideBackground.cxx |  525 +++
 sd/source/ui/sidebar/SlideBackground.hxx |  119 ++
 sd/source/ui/view/drviews2.cxx   |7 
 sd/source/ui/view/drviews9.cxx   |   13 
 sd/source/ui/view/drviewsf.cxx   |5 
 sd/uiconfig/simpress/ui/sidebarslidebackground.ui|  245 +
 svx/sdi/svx.sdi  |   92 +
 14 files changed, 1089 insertions(+), 5 deletions(-)

New commits:
commit 93b4bf647a5899f54ef51f8b4bfed0faa66b466e
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Fri Jul 31 02:28:28 2015 +0530

tdf#89466: Slide Background tab

Change-Id: Ic3ba6b47a1e5fcaeec76c4e4ff0ba6128653af86
Reviewed-on: https://gerrit.libreoffice.org/17007
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 82c040d..bcdc8e9 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1015,9 +1015,15 @@
 #define SID_ATTR_SHADOW_XDISTANCE   ( SID_SVX_START + 1150 
)
 #define SID_ATTR_SHADOW_YDISTANCE   ( SID_SVX_START + 1151 
)
 
-#define SID_EDIT_POSTIT ( SID_SVX_START + 1152 
)
-
+#define SID_ATTR_PAGE_COLOR ( SID_SVX_START + 1152 
)
 // 1153 is used by editeng (SID_ATTR_CHAR_BACK_COLOR)
+#define SID_ATTR_PAGE_GRADIENT  ( SID_SVX_START + 1154 
)
+#define SID_ATTR_PAGE_HATCH ( SID_SVX_START + 1155 
)
+#define SID_ATTR_PAGE_BITMAP( SID_SVX_START + 1156 
)
+#define SID_ATTR_PAGE_FILLSTYLE ( SID_SVX_START + 1157 
)
+
+#define SID_EDIT_POSTIT ( SID_SVX_START + 1158 
)
+
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
 #define SID_SVX_FIRSTFREE   (SID_EDIT_POSTIT + 1)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 6982bb0..e92f01f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -588,7 +588,35 @@
   100
 
   
-
+  
+
+  SlideBackground
+
+
+  false
+
+
+  SlideBackgroundPanel
+
+
+  PropertyDeck
+
+
+  
+Impress, DrawPage,visible   ;
+Impress, default, visible   ;
+Impress, HandoutPage, visible   ;
+Impress, NotesPage,   visible   ;
+Impress, SlidesorterPage, visible   ;
+  
+
+
+  
private:resource/toolpanel/SdPanelFactory/SlideBackgroundPanel
+
+
+  100
+
+  
   
 
   Used in This Presentation
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index c54bd6d..76e35ae 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -341,6 +341,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/sidebar/RecentlyUsedMasterPages \
sd/source/ui/sidebar/RecentMasterPagesSelector \
sd/source/ui/sidebar/SlideTransitionPanel \
+   sd/source/ui/sidebar/SlideBackground \
sd/source/ui/sidebar/TableDesignPanel \
sd/source/ui/slideshow/PaneHider \
sd/source/ui/slideshow/SlideShowRestarter \
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 531175a..bcb6160 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -127,6 +127,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/publishingdialog \
sd/uiconfig/simpress/ui/remotedialog \
sd/uiconfig/simpress/ui/sdviewpage \
+   sd/uiconfig/simpress/ui/sidebarslidebackground \
sd/uiconfig/simpress/ui/slidedesigndialog \
sd/uiconfig/simpress/ui/slidetransitionspanel \
sd/uiconfig/simpress/ui/tabledesignpanel \
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index c8b3d53..e74034d 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2612,6 +2612,36 @@ interface DrawView
 ExecMe

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source

2016-04-29 Thread Rishabh Kumar
 cui/Library_cui.mk  |1 
 cui/source/tabpages/tparea.cxx  |  529 
 cui/source/tabpages/tptrans.cxx |  579 
 3 files changed, 580 insertions(+), 529 deletions(-)

New commits:
commit b1d4f658aa927ef0d62ffc387ab9593ad5dd8b3b
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Mon Apr 25 18:41:29 2016 +0530

Refactoring transparence tab code

Move transparence tab code out from Area tab code.

Change-Id: Ia7276aa3b1c438b6c8cff89ab5ca3752ff6bcc0e
Reviewed-on: https://gerrit.libreoffice.org/24368
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index f835797..7bb181d 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -205,6 +205,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/tabpages/tplnedef \
 cui/source/tabpages/tplneend \
 cui/source/tabpages/tpshadow \
+cui/source/tabpages/tptrans \
 cui/source/tabpages/transfrm \
 cui/source/uno/services \
 ))
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index a85632c..4ab7c8e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -57,535 +57,6 @@ const sal_uInt16 SvxAreaTabPage::pAreaRanges[] =
 0
 };
 
-const sal_uInt16 SvxTransparenceTabPage::pTransparenceRanges[] =
-{
-XATTR_FILLTRANSPARENCE,
-XATTR_FILLTRANSPARENCE,
-SDRATTR_SHADOWTRANSPARENCE,
-SDRATTR_SHADOWTRANSPARENCE,
-XATTR_FILLFLOATTRANSPARENCE,
-XATTR_FILLFLOATTRANSPARENCE,
-0
-};
-
-/*
-|*
-|*  Dialog for transparence
-|*
-\/
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransOffHdl_Impl, Button*, 
void)
-{
-// disable all other controls
-ActivateLinear(false);
-ActivateGradient(false);
-
-// Preview
-rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
-rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
-m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() );
-m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() );
-
-InvalidatePreview( false );
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, 
Button*, void)
-{
-// enable linear, disable other
-ActivateLinear(true);
-ActivateGradient(false);
-
-// preview
-rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
-ModifyTransparentHdl_Impl (*m_pMtrTransparent);
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, 
Button*, void)
-{
-// enable gradient, disable other
-ActivateLinear(false);
-ActivateGradient(true);
-
-// preview
-rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
-ModifiedTrgrHdl_Impl (nullptr);
-}
-
-SvxTransparenceTabPage::~SvxTransparenceTabPage()
-{
-disposeOnce();
-}
-
-void SvxTransparenceTabPage::dispose()
-{
-m_pRbtTransOff.clear();
-m_pRbtTransLinear.clear();
-m_pRbtTransGradient.clear();
-m_pMtrTransparent.clear();
-m_pGridGradient.clear();
-m_pLbTrgrGradientType.clear();
-m_pFtTrgrCenterX.clear();
-m_pMtrTrgrCenterX.clear();
-m_pFtTrgrCenterY.clear();
-m_pMtrTrgrCenterY.clear();
-m_pFtTrgrAngle.clear();
-m_pMtrTrgrAngle.clear();
-m_pMtrTrgrBorder.clear();
-m_pMtrTrgrStartValue.clear();
-m_pMtrTrgrEndValue.clear();
-m_pCtlBitmapPreview.clear();
-m_pCtlXRectPreview.clear();
-SvxTabPage::dispose();
-}
-
-void SvxTransparenceTabPage::ActivateLinear(bool bActivate)
-{
-m_pMtrTransparent->Enable(bActivate);
-}
-
-IMPL_LINK_NOARG_TYPED(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, 
Edit&, void)
-{
-sal_uInt16 nPos = (sal_uInt16)m_pMtrTransparent->GetValue();
-XFillTransparenceItem aItem(nPos);
-rXFSet.Put(XFillTransparenceItem(aItem));
-
-// preview
-InvalidatePreview();
-}
-
-IMPL_LINK_TYPED(SvxTransparenceTabPage, ModifiedTrgrListBoxHdl_Impl, ListBox&, 
rListBox, void)
-{
-ModifiedTrgrHdl_Impl();
-}
-IMPL_LINK_TYPED(SvxTransparenceTabPage, ModifiedTrgrEditHdl_Impl, Edit&, rBox, 
void)
-{
-ModifiedTrgrHdl_Impl();
-}
-void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void* pControl)
-{
-if(pControl == m_pLbTrgrGradientType || pControl == this)
-{
-css::awt::GradientStyle eXGS = 
(css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectEntryPos();
-SetControlState_Impl( eXGS );
-}
-
-// preview
-sal_uInt8 nStartCol = 
(sal_uInt8)(((sal_uInt16)m_pMtrTrgrStartValue->GetValue() * 255) / 100);
-sal_uInt8 nEndCol = 
(sal_uInt8)(((sal_uInt16)m_pMtrTrgrEndValue->GetValue() * 255) / 100);
-XGradient aTmpGradient(
-Color(nStartCol, nStartCol, nStartCol),
-Color(nEnd

[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - cui/source

2016-03-11 Thread Rishabh Kumar
 cui/source/customize/cfg.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6f3ac91fabe1faa664aecfc535b49ee31fcb9beb
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 18 03:11:53 2015 +0530

tdf#80758:empty values in button name not respected

In case of empty values , the accelerator character is passed
as the button name which avoids extra spacing.

Change-Id: I8a82f5226e17bf8977fb6a8fd59c99a244e59309
Reviewed-on: https://gerrit.libreoffice.org/14498
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com>
(cherry picked from commit b2e78fc73363d3ee43e3ee7bc90237d6d048aef7)
Reviewed-on: https://gerrit.libreoffice.org/20804
Reviewed-by: Caolán McNamara <caol...@redhat.com>
Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 4f9c706..018cf39 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3403,9 +3403,12 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, 
MenuButton *, pButton, vo
 if ( pNameDialog->Execute() == RET_OK ) {
 pNameDialog->GetName(aNewName);
 
-pEntry->SetName( aNewName );
-m_pContentsListBox->SetEntryText( pActEntry, aNewName );
+if( aNewName == "" ) //tdf#80758 - Accelerator character ("~") 
is passed as
+pEntry->SetName( "~" ); // the button name in case of 
empty values.
+else
+pEntry->SetName( aNewName );
 
+m_pContentsListBox->SetEntryText( pActEntry, aNewName );
 bNeedsApply = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC 2016: Area Fill

2016-03-10 Thread Rishabh Kumar
Hi,

My name is Rishabh Kumar , a third year student at IIT Roorkee majoring in
Applied Mathematics. I am interested in the project idea Improving the Area
Fill dialog for GSoC 2016.

Last summer, I have successfully completed the project of Review of the
sidebar and its functionalities with LibreOffice in 2015. All my previous
contributions can be viewed here
<https://gerrit.libreoffice.org/#/q/owner:%22Rishabh+Kumar+%253Ckris.kr296%2540gmail.com%253E%22>
.  I
feel that I will be a suitable fit for the project as in my previous GSoC
project I worked on moving some of the Area fill controls to the sidebar
tab and created the shadow sidebar tab,so I am familiar with the related
Area fill code and its dependency with sidebar and toolbar controls.

I have started working on the project proposal with the help of LibreOffice
design team and looking forward to work with LibreOffice community again
this year.

Warm Regards.

Contact Details -
Email - kris.kr...@gmail.com
IRC Nick- Rishabh
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


GSoC 2016 : Area Fill project

2016-03-10 Thread Rishabh Kumar
Hi,

My name is Rishabh Kumar , a third year student at IIT Roorkee majoring in
Applied Mathematics. I am interested in the project idea Improving the Area
Fill dialog
<http://t.sidekickopen46.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs7fKbwdW1q7sZd1p88MKW7gbMDs56dPlzf2VKWgd02?t=https%3A%2F%2Fwiki.documentfoundation.org%2FDevelopment%2FGSoC%2FIdeas%23Area_fill=5319549594894336=b745ea6a-507d-46be-e292-7d1b8c8c6f4b>
for
GSoC 2016.

Last summer, I have successfully completed the project of Review of the
sidebar and its functionalities with LibreOffice in 2015. All my previous
contributions can be viewed here
<http://t.sidekickopen46.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs7fKbwdW1q7sZd1p88MKW7gbMDs56dPlzf2VKWgd02?t=https%3A%2F%2Fgerrit.libreoffice.org%2F%23%2Fq%2Fowner%3A%2522Rishabh%2BKumar%2B%25253Ckris.kr296%252540gmail.com%25253E%2522=5319549594894336=b745ea6a-507d-46be-e292-7d1b8c8c6f4b>
.  I
feel that I will be a suitable fit for the project as in my previous GSoC
project I worked on moving some of the Area fill controls to the sidebar
tab and created the shadow sidebar tab,so I am familiar with the related
Area fill code and its dependency with sidebar and toolbar controls.

I have started working on the project proposal with the help of LibreOffice
design team and looking forward to work with LibreOffice community again
this year.

Warm Regards.

Contact Details -
Email - kris.kr...@gmail.com
IRC Nick- Rishabh
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sd/Library_sd.mk sd/source sd/uiconfig sd/UIConfig_simpress.mk

2016-02-04 Thread Rishabh Kumar
 sd/Library_sd.mk   |2 
 sd/UIConfig_simpress.mk|2 
 sd/source/ui/animations/CategoryListBox.cxx|   77 ++
 sd/source/ui/animations/CategoryListBox.hxx|   31 +
 sd/source/ui/animations/CustomAnimationPane.cxx|  499 +++--
 sd/source/ui/animations/CustomAnimationPane.hxx|   23 
 sd/uiconfig/simpress/ui/customanimationcreatedialog.ui |  161 -
 sd/uiconfig/simpress/ui/customanimationcreatetab.ui|   78 --
 sd/uiconfig/simpress/ui/customanimationspanel.ui   |  165 -
 9 files changed, 604 insertions(+), 434 deletions(-)

New commits:
commit e4aa4472f84dc9fcf0acaab80ede005603a4b93c
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Thu Jul 16 05:17:52 2015 +0530

tdf#87813: Moving effects list into the animation tab

Adding the animation effect -
1.Press the + button

Modifying the animation effect
1. Select the animation from the list of added animations
2. Select the animation style from the Listbox

Change-Id: I14f9242b9f04279622d879ae8c3e162ded6e3e3d
Reviewed-on: https://gerrit.libreoffice.org/17008
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>

diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 66dca43..c54bd6d 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -174,7 +174,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/accessibility/AccessibleSlideSorterView \
sd/source/ui/accessibility/AccessibleViewForwarder \
sd/source/ui/accessibility/SdShapeTypes \
-   sd/source/ui/animations/CustomAnimationCreateDialog \
+sd/source/ui/animations/CategoryListBox \
sd/source/ui/animations/CustomAnimationDialog \
sd/source/ui/animations/CustomAnimationList \
sd/source/ui/animations/CustomAnimationPane \
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index d42ef0a..a0d70e9 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -71,8 +71,6 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/simpress,\
 
 $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/assistentdialog \
-   sd/uiconfig/simpress/ui/customanimationcreatedialog \
-   sd/uiconfig/simpress/ui/customanimationcreatetab \
sd/uiconfig/simpress/ui/customanimationspanel \
sd/uiconfig/simpress/ui/customanimationproperties \
sd/uiconfig/simpress/ui/customanimationeffecttab \
diff --git a/sd/source/ui/animations/CategoryListBox.cxx 
b/sd/source/ui/animations/CategoryListBox.cxx
new file mode 100644
index 000..93364d4
--- /dev/null
+++ b/sd/source/ui/animations/CategoryListBox.cxx
@@ -0,0 +1,77 @@
+#include "CategoryListBox.hxx"
+
+namespace sd {
+
+CategoryListBox::CategoryListBox( vcl::Window* pParent )
+: ListBox( pParent, WB_TABSTOP | WB_BORDER )
+{
+EnableUserDraw( true );
+SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
+}
+
+VCL_BUILDER_FACTORY(CategoryListBox)
+
+CategoryListBox::~CategoryListBox()
+{
+}
+
+sal_Int32  CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32  
nPos /* = LISTBOX_APPEND */ )
+{
+sal_Int32  n = ListBox::InsertEntry( rStr, nPos );
+if( n != LISTBOX_ENTRY_NOTFOUND )
+ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | 
ListBoxEntryFlags::DisableSelection );
+
+return n;
+}
+
+void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
+{
+const sal_uInt16 nItem = rUDEvt.GetItemId();
+
+if( ListBox::GetEntryFlags(nItem) & ListBoxEntryFlags::DisableSelection )
+{
+Rectangle aOutRect( rUDEvt.GetRect() );
+vcl::RenderContext* pDev = rUDEvt.GetRenderContext();
+
+// fill the background
+Color aColor (GetSettings().GetStyleSettings().GetDialogColor());
+
+pDev->SetFillColor (aColor);
+pDev->SetLineColor ();
+pDev->DrawRect(aOutRect);
+
+// Erase the four corner pixels to make the rectangle appear rounded.
+pDev->SetLineColor( GetSettings().GetStyleSettings().GetWindowColor());
+pDev->DrawPixel( aOutRect.TopLeft());
+pDev->DrawPixel( Point(aOutRect.Right(), aOutRect.Top()));
+pDev->DrawPixel( Point(aOutRect.Left(), aOutRect.Bottom()));
+pDev->DrawPixel( Point(aOutRect.Right(), aOutRect.Bottom()));
+
+// draw the category title
+pDev->DrawText (aOutRect, GetEntry(nItem), DrawTextFlags::Center );
+}
+else
+{
+DrawEntry( rUDEvt, true, true );
+}
+}
+
+IMPL_LINK_NOARG_TYPED(CategoryListBox, implDoubleClickHdl, ListBox&, void)
+{
+CaptureMouse();
+}
+
+void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ReleaseMouse();
+if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) )
+

[Libreoffice-commits] core.git: cui/source

2015-12-18 Thread Rishabh Kumar
 cui/source/customize/cfg.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b2e78fc73363d3ee43e3ee7bc90237d6d048aef7
Author: Rishabh Kumar <kris.kr...@gmail.com>
Date:   Tue Aug 18 03:11:53 2015 +0530

tdf#80758:empty values in button name not respected

In case of empty values , the accelerator character is passed as the button 
name which avoids extra spacing.

Change-Id: I8a82f5226e17bf8977fb6a8fd59c99a244e59309
Reviewed-on: https://gerrit.libreoffice.org/14498
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2b1cd622..b1defa9 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3396,9 +3396,12 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, 
MenuButton *, pButton, vo
 if ( pNameDialog->Execute() == RET_OK ) {
 pNameDialog->GetName(aNewName);
 
-pEntry->SetName( aNewName );
-m_pContentsListBox->SetEntryText( pActEntry, aNewName );
+if( aNewName == "" ) //tdf#80758 - Accelerator character ("~") 
is passed as
+pEntry->SetName( "~" ); // the button name in case of 
empty values.
+else
+pEntry->SetName( aNewName );
 
+m_pContentsListBox->SetEntryText( pActEntry, aNewName );
 bNeedsApply = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source sw/uiconfig

2015-08-27 Thread Rishabh Kumar
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx |  163 ++---
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx |   25 +++
 sw/uiconfig/swriter/ui/sidebarwrap.ui  |  186 +
 3 files changed, 320 insertions(+), 54 deletions(-)

New commits:
commit 30c2ae28eecb3f1a4454784974c0c2bffc60334e
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Thu Aug 27 14:48:34 2015 +0530

Addition of new controls to Wrap sidebar tab in Writer

Addition of Enable Contour and Edit Contour button to the sidebar

Change-Id: I9cadbcc9643b9fc87b3dbe3a9a2355cd674d1e53
Reviewed-on: https://gerrit.libreoffice.org/17324
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Katarina Behrens katarina.behr...@cib.de

diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx 
b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index d312ced..00c6435 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -22,15 +22,18 @@
 
 #include cmdid.h
 #include swtypes.hxx
-
+#include svx/svxids.hrc
 #include sfx2/bindings.hxx
 #include sfx2/dispatch.hxx
 #include sfx2/sidebar/ControlFactory.hxx
 #include sfx2/imagemgr.hxx
 #include svl/eitem.hxx
 #include vcl/svapp.hxx
+#include vcl/lstbox.hxx
 #include vcl/settings.hxx
-
+#include editeng/lrspitem.hxx
+#include editeng/ulspitem.hxx
+#include hintids.hxx
 #include com/sun/star/lang/IllegalArgumentException.hpp
 
 const char UNO_WRAPOFF[] = .uno:WrapOff;
@@ -67,7 +70,13 @@ WrapPropertyPanel::WrapPropertyPanel(
 : PanelLayout(pParent, WrapPropertyPanel, 
modules/swriter/ui/sidebarwrap.ui, rxFrame)
 , mxFrame( rxFrame )
 , mpBindings(pBindings)
+// spacing
+, nTop(0)
+, nBottom(0)
+, nLeft(0)
+, nRight(0)
 // resources
+, aCustomEntry()
 , aWrapIL(6,2)
 // controller items
 , maSwNoWrapControl(FN_FRAME_NOWRAP, *pBindings, *this)
@@ -76,6 +85,9 @@ WrapPropertyPanel::WrapPropertyPanel(
 , maSwWrapParallelControl(FN_FRAME_WRAP_LEFT, *pBindings, *this)
 , maSwWrapThroughControl(FN_FRAME_WRAPTHRU, *pBindings, *this)
 , maSwWrapIdealControl(FN_FRAME_WRAP_IDEAL, *pBindings, *this)
+, maSwEnableContourControl(FN_FRAME_WRAP_CONTOUR, *pBindings, *this)
+, maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
+, maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
 {
 get(mpRBNoWrap, buttonnone);
 get(mpRBWrapLeft, buttonbefore);
@@ -83,6 +95,10 @@ WrapPropertyPanel::WrapPropertyPanel(
 get(mpRBWrapParallel, buttonparallel);
 get(mpRBWrapThrough, buttonthrough);
 get(mpRBIdealWrap, buttonoptimal);
+get(mpEnableContour, enablecontour);
+get(mpEditContour, editcontour);
+get(mpSpacingLB, spacingLB);
+get(mpCustomEntry, customlabel);
 
 Initialize();
 }
@@ -100,6 +116,10 @@ void WrapPropertyPanel::dispose()
 mpRBWrapParallel.clear();
 mpRBWrapThrough.clear();
 mpRBIdealWrap.clear();
+mpEnableContour.clear();
+mpEditContour.clear();
+mpSpacingLB.clear();
+mpCustomEntry.clear();
 
 maSwNoWrapControl.dispose();
 maSwWrapLeftControl.dispose();
@@ -107,6 +127,9 @@ void WrapPropertyPanel::dispose()
 maSwWrapParallelControl.dispose();
 maSwWrapThroughControl.dispose();
 maSwWrapIdealControl.dispose();
+maSwEnableContourControl.dispose();
+maSwLRSpacingControl.dispose();
+maSwULSpacingControl.dispose();
 
 PanelLayout::dispose();
 }
@@ -121,6 +144,12 @@ void WrapPropertyPanel::Initialize()
 mpRBWrapThrough-SetClickHdl(aLink);
 mpRBIdealWrap-SetClickHdl(aLink);
 
+LinkButton*,void EditContourLink = LINK(this, WrapPropertyPanel, 
EditContourHdl);
+mpEditContour-SetClickHdl(EditContourLink);
+LinkButton*, void EnableContourLink = LINK(this,WrapPropertyPanel, 
EnableContourHdl);
+mpEnableContour-SetClickHdl(EnableContourLink);
+mpSpacingLB-SetSelectHdl(LINK(this, WrapPropertyPanel, SpacingLBHdl));
+
 aWrapIL.AddImage( UNO_WRAPOFF,
   ::GetImage( mxFrame, UNO_WRAPOFF, false ) );
 aWrapIL.AddImage( UNO_WRAPLEFT,
@@ -149,6 +178,8 @@ void WrapPropertyPanel::Initialize()
 mpRBWrapThrough-SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPTHROUGH) );
 mpRBIdealWrap-SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPIDEAL) );
 
+aCustomEntry = mpCustomEntry-GetText();
+
 mpRBNoWrap-SetAccessibleName(mpRBNoWrap-GetQuickHelpText());
 mpRBWrapLeft-SetAccessibleName(mpRBWrapLeft-GetQuickHelpText());
 mpRBWrapRight-SetAccessibleName(mpRBWrapRight-GetQuickHelpText());
@@ -162,6 +193,56 @@ void WrapPropertyPanel::Initialize()
 mpBindings-Update( FN_FRAME_WRAP_LEFT );
 mpBindings-Update( FN_FRAME_WRAPTHRU );
 mpBindings-Update( FN_FRAME_WRAP_IDEAL );
+mpBindings-Update( FN_FRAME_WRAP_CONTOUR );
+mpBindings-Update( SID_ATTR_LRSPACE );
+mpBindings-Update( SID_ATTR_ULSPACE );
+
+}
+
+void WrapPropertyPanel::UpdateSpacingLB

[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig

2015-08-26 Thread Rishabh Kumar
 include/svx/sidebar/AreaPropertyPanelBase.hxx |   13 +
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |  223 +
 svx/uiconfig/ui/sidebararea.ui|  231 ++
 3 files changed, 344 insertions(+), 123 deletions(-)

New commits:
commit 489582458a03aaf25ddc83ae5e4416bbe236991d
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Sun Aug 23 00:34:17 2015 +0530

tdf#90078: Improve the Area section of the properties tab

Addition of new controls to gradient mode and area tab reorganisation

Change-Id: I5c122705c41e14cddc2eaaac2561c02df22574f2
Reviewed-on: https://gerrit.libreoffice.org/16965
Reviewed-by: Katarina Behrens katarina.behr...@cib.de
Tested-by: Katarina Behrens katarina.behr...@cib.de

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 24ebced..c12842f 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -23,6 +23,7 @@
 #include vcl/ctrl.hxx
 #include sfx2/sidebar/SidebarPanelBase.hxx
 #include sfx2/sidebar/ControllerItem.hxx
+#include sfx2/sidebar/SidebarController.hxx
 #include sfx2/sidebar/SidebarToolBox.hxx
 #include svx/xgrad.hxx
 #include svx/itemwin.hxx
@@ -35,6 +36,7 @@
 #include svx/sidebar/PanelLayout.hxx
 #include vcl/lstbox.hxx
 #include vcl/field.hxx
+#include vcl/slider.hxx
 #include vcl/fixed.hxx
 #include vcl/vclptr.hxx
 #include svl/intitem.hxx
@@ -125,11 +127,16 @@ protected:
 VclPtrFixedText  mpColorTextFT;
 VclPtrSvxFillTypeBox mpLbFillType;
 VclPtrSvxFillAttrBox mpLbFillAttr;
-VclPtrsfx2::sidebar::SidebarToolBox  
  mpToolBoxColor; // for new color picker
+VclPtrColorLB
mpLbFillGradFrom;
+VclPtrColorLBmpLbFillGradTo;
+VclPtrsfx2::sidebar::SidebarToolBox  mpToolBoxColor; 
// for new color picker
 VclPtrFixedText  mpTrspTextFT;
 VclPtrListBoxmpLBTransType;
 VclPtrMetricField
mpMTRTransparent;
+VclPtrSlider 
mpSldTransparent;
 VclPtrToolBoxmpBTNGradient;
+VclPtrMetricFieldmpMTRAngle;
+VclPtrListBoxmpGradientStyle;
 
 ::boost::scoped_ptr XFillStyleItemmpStyleItem;
 ::boost::scoped_ptr XFillColorItemmpColorItem;
@@ -151,10 +158,13 @@ protected:
 
 css::uno::Referencecss::frame::XFrame mxFrame;
 
+sfx2::sidebar::SidebarController* mpSidebarController;
+
 DECL_LINK(SelectFillTypeHdl, ListBox* );
 DECL_LINK(SelectFillAttrHdl, ListBox* );
 DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
 DECL_LINK(ModifyTransparentHdl_Impl, void*);
+DECL_LINK(ModifyTransSliderHdl, void*);
 
 // for transparency gradient
 VclPtrPopupControl CreateTransparencyGradientControl (PopupContainer* 
pParent);
@@ -163,6 +173,7 @@ protected:
 void Initialize();
 void Update();
 void ImpUpdateTransparencies();
+void SetTransparency(sal_uInt16 nVal);
 };
 
 
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index e21502b..46a057d 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -20,6 +20,7 @@
 #include AreaTransparencyGradientControl.hxx
 
 #include sfx2/sidebar/ResourceDefinitions.hrc
+#include sfx2/sidebar/SidebarController.hxx
 #include sfx2/sidebar/ControlFactory.hxx
 #include svx/sidebar/AreaPropertyPanelBase.hxx
 #include AreaPropertyPanel.hrc
@@ -84,7 +85,8 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
   maTrGrPopup(this, 
::boost::bind(AreaPropertyPanelBase::CreateTransparencyGradientControl, this, 
_1)),
   mpFloatTransparenceItem(),
   mpTransparanceItem(),
-  mxFrame(rxFrame)
+  mxFrame(rxFrame),
+  mpSidebarController()
 {
 get(mpColorTextFT,filllabel);
 get(mpLbFillType, fillstyle);
@@ -93,7 +95,12 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
 get(mpToolBoxColor,   selectcolor);
 get(mpLBTransType,transtype);
 get(mpMTRTransparent, settransparency);
+get(mpSldTransparent, transparencyslider);
 get(mpBTNGradient,selectgradient);
+get(mpMTRAngle, gradangle);
+get(mpLbFillGradFrom, fillgrad1);
+get(mpLbFillGradTo, fillgrad2);
+get(mpGradientStyle, gradientstyle);
 
 Initialize();
 }
@@ -112,7 +119,12 @@ void AreaPropertyPanelBase::dispose()
 mpTrspTextFT.clear

GSOC weekly report #11

2015-08-08 Thread Rishabh Kumar
This week, I have started working on the writer page tab
https://bugs.documentfoundation.org/show_bug.cgi?id=83830redirected_from=fdo

Out of the 5 mentioned sub-tabs, I have created the Margins, header and
footer tab and testing them for bug fixes.

Future plans - Completing the page tab during the last week of GSoC and
adding minor tweaks/bug fixes for my previous patch submissions.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sc/source sc/uiconfig

2015-07-29 Thread Rishabh Kumar
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx |   88 +++-
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx |   10 +
 sc/source/ui/view/formatsh.cxx  |1 
 sc/uiconfig/scalc/ui/sidebaralignment.ui|  131 
 4 files changed, 210 insertions(+), 20 deletions(-)

New commits:
commit b763f33f14ca7433370512a0d12307f2ff01e5d6
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Thu Jul 23 04:03:17 2015 +0530

tdf#91802: Add reference edge to text orientation

Addition of reference edge and vertically stacked checkbox to
the Alignment sidebar tab in Calc

Change-Id: I62ba4145a33cf637d1d5f1f08b3f3f01e4165571

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index d572ffd..66c5fc9 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -21,9 +21,11 @@
 #include editeng/justifyitem.hxx
 #include sc.hrc
 #include scresid.hxx
+#include scitems.hxx
 #include sfx2/bindings.hxx
 #include sfx2/dispatch.hxx
 #include svx/algitem.hxx
+#include svx/rotmodit.hxx
 #include svx/dlgutil.hxx
 #include vcl/toolbox.hxx
 #include svx/sidebar/SidebarDialControl.hxx
@@ -45,6 +47,8 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
   maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this),
   maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this),
   maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this),
+  maVrtStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this),
+  maRefEdgeControl(SID_ATTR_ALIGN_LOCKPOS, *pBindings, *this),
   mbMultiDisable(false),
   mxFrame(rxFrame),
   maContext(),
@@ -56,6 +60,11 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
 get(mpCBXMergeCell, mergecells);
 get(mpFtRotate, orientationlabel);
 get(mpMtrAngle, orientationdegrees);
+get(mpRefEdgeBottom, bottom);
+get(mpRefEdgeTop, top);
+get(mpRefEdgeStd, standard);
+get(mpCBStacked, stacked);
+get(mpTextOrientBox , textorientbox);
 
 Initialize();
 
@@ -76,12 +85,19 @@ void AlignmentPropertyPanel::dispose()
 mpCBXMergeCell.clear();
 mpFtRotate.clear();
 mpMtrAngle.clear();
+mpCBStacked.clear();
+mpRefEdgeBottom.clear();
+mpRefEdgeTop.clear();
+mpRefEdgeStd.clear();
+mpTextOrientBox.clear();
 
 maAlignHorControl.dispose();
 maLeftIndentControl.dispose();
 maMergeCellControl.dispose();
 maWrapTextControl.dispose();
 maAngleControl.dispose();
+maVrtStackControl.dispose();
+maRefEdgeControl.dispose();
 
 PanelLayout::dispose();
 }
@@ -100,14 +116,16 @@ void AlignmentPropertyPanel::Initialize()
 aLink = LINK(this, AlignmentPropertyPanel, CBOXWrapTextClkHdl);
 mpCBXWrapText-SetClickHdl ( aLink );
 
-//rotation control
-
 //rotation
 mpMtrAngle-SetAccessibleName(OUString( Text Orientation));   //wj acc
 mpMtrAngle-SetModifyHdl(LINK( this, AlignmentPropertyPanel, 
AngleModifiedHdl));
 mpMtrAngle-EnableAutocomplete( false );
+mpCBStacked-SetClickHdl(LINK(this, AlignmentPropertyPanel, 
ClickStackHdl));
 
-//Vertical stacked
+aLink = LINK(this, AlignmentPropertyPanel, ReferenceEdgeHdl);
+mpRefEdgeBottom-SetClickHdl(aLink);
+mpRefEdgeTop-SetClickHdl(aLink);
+mpRefEdgeStd-SetClickHdl(aLink);
 
 mpMtrAngle-InsertValue(0, FUNIT_CUSTOM);
 mpMtrAngle-InsertValue(45, FUNIT_CUSTOM);
@@ -123,6 +141,20 @@ void AlignmentPropertyPanel::Initialize()
 mpMtrAngle-SetAccessibleRelationLabeledBy(mpFtRotate);
 }
 
+IMPL_LINK( AlignmentPropertyPanel, ReferenceEdgeHdl, Control*, pControl )
+{
+SvxRotateMode eMode;
+if(pControl == mpRefEdgeBottom)
+eMode = SVX_ROTATE_MODE_BOTTOM;
+else if(pControl == mpRefEdgeTop)
+eMode = SVX_ROTATE_MODE_TOP;
+else
+eMode = SVX_ROTATE_MODE_STANDARD;
+SvxRotateModeItem aItem(eMode,ATTR_ROTATE_MODE);
+GetBindings()-GetDispatcher()-Execute(SID_ATTR_ALIGN_LOCKPOS, 
SfxCallMode::RECORD, aItem, 0l);
+return 0;
+}
+
 IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl )
 {
 OUString sTmp = mpMtrAngle-GetText();
@@ -161,6 +193,14 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl )
 SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, aAngleItem, 0L );
 return 0;
 }
+IMPL_LINK_NOARG( AlignmentPropertyPanel, ClickStackHdl )
+{
+bool bVertical = mpCBStacked-IsChecked();
+SfxBoolItem  aStackItem( SID_ATTR_ALIGN_STACKED, bVertical );
+GetBindings()-GetDispatcher()-Execute(
+SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, aStackItem, 0L );
+return 0;
+}
 IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl)
 {
 mpCBXWrapText-EnableTriState(false);
@@ -314,6 +354,48 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
 }
 }
 break;
+case SID_ATTR_ALIGN_STACKED:
+if (eState = SfxItemState::DEFAULT

[Libreoffice-commits] core.git: svx/source

2015-07-28 Thread Rishabh Kumar
 svx/source/sidebar/line/LinePropertyPanel.cxx |   46 +-
 svx/source/sidebar/line/LinePropertyPanel.hxx |3 +
 2 files changed, 48 insertions(+), 1 deletion(-)

New commits:
commit 618fd9d91a87113a1fbb5f829bd0d61207ff78af
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 8 11:54:52 2015 +0530

Line Controls are disabled when none entry is checked

Change-Id: Ie0ece4ca4b463642ea7b45bd3e27338fa5d3b9b8
Reviewed-on: https://gerrit.libreoffice.org/16146
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com
Reviewed-by: Katarina Behrens katarina.behr...@cib.de

diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index faa5477..7890bca 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -177,6 +177,8 @@ LinePropertyPanel::LinePropertyPanel(
 {
 get(mpFTWidth, widthlabel);
 get(mpTBWidth, width);
+get(mpFTColor, colorlabel);
+get(mpLBColor, color);
 get(mpFTStyle, stylelabel);
 get(mpLBStyle, linestyle);
 get(mpFTTransparency, translabel);
@@ -201,6 +203,8 @@ void LinePropertyPanel::dispose()
 {
 mpFTWidth.clear();
 mpTBWidth.clear();
+mpFTColor.clear();
+mpLBColor.clear();
 mpFTStyle.clear();
 mpLBStyle.clear();
 mpFTTransparency.clear();
@@ -285,6 +289,8 @@ void LinePropertyPanel::Initialize()
 aLink = LINK( this, LinePropertyPanel, ChangeCapStyleHdl );
 mpLBCapStyle-SetSelectHdl( aLink );
 mpLBCapStyle-SetAccessibleName(OUString(Cap Style));
+
+ActivateControls();
 }
 
 VclPtrvcl::Window LinePropertyPanel::Create (
@@ -611,6 +617,7 @@ void LinePropertyPanel::NotifyItemUpdate(
 break;
 }
 }
+ActivateControls();
 }
 
 IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
@@ -647,7 +654,7 @@ IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
 GetBindings()-GetDispatcher()-Execute(SID_ATTR_LINE_DASH, 
SfxCallMode::RECORD, aItemB, 0L);
 }
 }
-
+ActivateControls();
 return 0;
 }
 
@@ -773,6 +780,43 @@ VclPtrPopupControl 
LinePropertyPanel::CreateLineWidthPopupControl (PopupContai
 return VclPtrInstanceLineWidthControl(pParent, *this);
 }
 
+void LinePropertyPanel::ActivateControls()
+{
+const sal_Int32 nPos(mpLBStyle-GetSelectEntryPos());
+if( 0 == nPos )
+{
+mpFTWidth-Disable();
+mpTBWidth-Disable();
+mpFTColor-Disable();
+mpLBColor-Disable();
+mpFTTransparency-Disable();
+mpMFTransparent-Disable();
+mpFTArrow-Disable();
+mpLBStart-Disable();
+mpLBEnd-Disable();
+mpFTEdgeStyle-Disable();
+mpLBEdgeStyle-Disable();
+mpFTCapStyle-Disable();
+mpLBCapStyle-Disable();
+}
+else
+{
+mpFTWidth-Enable();
+mpTBWidth-Enable();
+mpFTColor-Enable();
+mpLBColor-Enable();
+mpFTTransparency-Enable();
+mpMFTransparent-Enable();
+mpFTArrow-Enable();
+mpLBStart-Enable();
+mpLBEnd-Enable();
+mpFTEdgeStyle-Enable();
+mpLBEdgeStyle-Enable();
+mpFTCapStyle-Enable();
+mpLBCapStyle-Enable();
+}
+}
+
 void LinePropertyPanel::EndLineWidthPopupMode()
 {
 maLineWidthPopup.Hide();
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx 
b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 6ef96e1..f86a205 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -95,6 +95,8 @@ private:
 //ui controls
 VclPtrFixedText   mpFTWidth;
 VclPtrToolBox mpTBWidth;
+VclPtrFixedText   mpFTColor;
+VclPtrListBox mpLBColor;
 VclPtrFixedText   mpFTStyle;
 VclPtrListBox mpLBStyle;
 VclPtrFixedText   mpFTTransparency;
@@ -150,6 +152,7 @@ private:
 void FillLineStyleList();
 void SelectEndStyle(bool bStart);
 void SelectLineStyle();
+void ActivateControls();
 
 DECL_LINK(ChangeLineStyleHdl, void*);
 DECL_LINK_TYPED(ToolboxWidthSelectHdl, ToolBox*, void);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/uiconfig

2015-07-16 Thread Rishabh Kumar
 sc/uiconfig/scalc/ui/sidebaralignment.ui|1 +
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui |1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b9e75a078306180a59011cc116cf179d24518ff
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Fri Jul 17 07:36:16 2015 +0530

Minor ui changes in calc sidebar

1. removal of ambiguous button width in sidebarnumberformat.ui
2. addition of spacing between indent label and indent buttons in 
sidebaralignment.ui

Change-Id: I41fc4f9bdfb2a1a1909d014f6039c73bbdfe9c4a
Reviewed-on: https://gerrit.libreoffice.org/17145
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com
Tested-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/sc/uiconfig/scalc/ui/sidebaralignment.ui 
b/sc/uiconfig/scalc/ui/sidebaralignment.ui
index 9f51829..09eefc4 100644
--- a/sc/uiconfig/scalc/ui/sidebaralignment.ui
+++ b/sc/uiconfig/scalc/ui/sidebaralignment.ui
@@ -157,6 +157,7 @@
   object class=GtkGrid id=grid2
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=column_spacing6/property
 child
   object class=sfxlo-SidebarToolBox id=indentbuttons
 property name=visibleTrue/property
diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui 
b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
index 79fb1ca..7f25b00 100644
--- a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
+++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
@@ -53,7 +53,6 @@
 child
   object class=GtkToolButton id=currency
 property name=use_action_appearanceFalse/property
-property name=width_request30/property
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property 
name=action_name.uno:NumberFormatCurrency/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Gsoc weekly report(Week #6)

2015-07-08 Thread Rishabh Kumar
This week I worked on -
1. Completed the task of SlideBackground tab: (Some minor bug fixing needed)
2. Completed the area tab work.
3. Moved the effects list to the animation tab (#87813) [work in progress]
4. Refactored the code for sidebar selection analyzer for writer as a
follow up for the commit https://gerrit.libreoffice.org/#/c/16165/ [work in
progress]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: cui/source include/svx officecfg/registry sc/sdi sc/source sd/sdi sd/source svx/Library_svx.mk svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk

2015-07-08 Thread Rishabh Kumar
 cui/source/tabpages/tpshadow.cxx |5 
 include/svx/svxids.hrc   |6 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   32 
 sc/sdi/drawsh.sdi|8 
 sc/source/ui/app/typemap.cxx |2 
 sc/source/ui/drawfunc/drawsh.cxx |9 
 sd/sdi/_drvwsh.sdi   |   20 
 sd/source/ui/view/drviews2.cxx   |8 
 sd/source/ui/view/drviewsf.cxx   |4 
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/sdi/svx.sdi  |  108 +++
 svx/sdi/svxitems.sdi |3 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx|  383 +++
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx|   97 ++
 svx/source/svdraw/svdattr.cxx|4 
 svx/uiconfig/ui/sidebarshadow.ui |  210 ++
 18 files changed, 903 insertions(+), 3 deletions(-)

New commits:
commit cc43153f466135b959605add37ccd9443852c185
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Fri Jun 19 18:55:43 2015 +0530

tdf#87702: Addition of Shadow sidebar tab

Change-Id: I75b368c0a8088926c765dbc46c6a4ce7c9d8b9f0
Reviewed-on: https://gerrit.libreoffice.org/16375
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 67abb5d..dd6db29 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -41,7 +41,10 @@ const sal_uInt16 SvxShadowTabPage::pShadowRanges[] =
 SDRATTR_SHADOWCOLOR,
 SDRATTR_SHADOWTRANSPARENCE,
 SID_ATTR_FILL_SHADOW,
-SID_ATTR_FILL_SHADOW,
+SID_ATTR_SHADOW_COLOR,
+SID_ATTR_SHADOW_TRANSPARENCE,
+SID_ATTR_SHADOW_XDISTANCE,
+SID_ATTR_SHADOW_YDISTANCE,
 0
 };
 
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 81cecff..f59e3e4 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1008,8 +1008,12 @@
 #define SID_PARASPACE_DECREASE  ( SID_SVX_START + 1146 
)
 
 #define SID_OBJECT_CROP ( SID_SVX_START + 1147 
)
+#define SID_ATTR_SHADOW_TRANSPARENCE( SID_SVX_START + 1148 
)
+#define SID_ATTR_SHADOW_COLOR   ( SID_SVX_START + 1149 
)
+#define SID_ATTR_SHADOW_XDISTANCE   ( SID_SVX_START + 1150 
)
+#define SID_ATTR_SHADOW_YDISTANCE   ( SID_SVX_START + 1151 
)
 
-#define SID_EDIT_POSTIT ( SID_SVX_START + 1148 
)
+#define SID_EDIT_POSTIT ( SID_SVX_START + 1152 
)
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
 #define SID_SVX_FIRSTFREE   (SID_EDIT_POSTIT + 1)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 653d826..e20b1b0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -368,6 +368,38 @@
 /prop
   /node
 
+  node oor:name=ShadowPropertyPanel oor:op=replace
+prop oor:name=Title oor:type=xs:string
+  value xml:lang=en-USShadow/value
+/prop
+prop oor:name=Id oor:type=xs:string
+  valueShadowPropertyPanel/value
+/prop
+prop oor:name=DeckId oor:type=xs:string
+  valuePropertyDeck/value
+/prop
+prop oor:name=DefaultMenuCommand
+  value.uno:FormatArea/value
+/prop
+prop oor:name=ContextList
+  value oor:separator=;
+Calc,   Draw,   visible ;
+Calc,   OLE,hidden  ;
+DrawImpress,3DObject,   visible ;
+DrawImpress,Draw,   visible ;
+DrawImpress,Graphic,hidden  ;
+DrawImpress,TextObject, hidden  ;
+DrawImpress,OLE,hidden  ;
+  /value
+/prop
+prop oor:name=ImplementationURL oor:type=xs:string
+  
valueprivate:resource/toolpanel/SvxPanelFactory/ShadowPropertyPanel/value
+/prop
+prop oor:name=OrderIndex oor:type=xs:int
+  value300/value
+/prop
+  /node
+
   node oor:name=LinePropertyPanel oor:op=replace
 prop oor:name=Title oor:type=xs:string
   value xml:lang=en-USLine/value
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index d4a1eec

Gsoc Weekly report (week #5)

2015-06-30 Thread Rishabh Kumar
This week was mostly focused on sidebar Area tab and Slide Background tab.

1. Area tab: Finished adding the controls. problem faced with the resizing
of the the tab as the new tab adds a new row.Tried experimenting with
the SidebarController::NotifyResize() but no results. Plan to write an
independent Resize function similar to the ones found in impress.

2. SlideBackground tab: Bug fixing and testing phase. Most likely to be
completed by the end of the week.

Minor fixes to some of the previous commits to merge them to the master -
1. https://gerrit.libreoffice.org/#/c/16165/
2. https://gerrit.libreoffice.org/#/c/16436/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sfx2/source svx/source

2015-06-29 Thread Rishabh Kumar
 include/sfx2/sidebar/EnumContext.hxx |1 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |3 +
 sfx2/source/sidebar/EnumContext.cxx  |1 
 svx/source/sidebar/SelectionAnalyzer.cxx |   24 ++-
 4 files changed, 19 insertions(+), 10 deletions(-)

New commits:
commit 7bb74f1a73b953ef2263f25b0df202e8a588307e
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Tue Jun 9 00:07:31 2015 +0530

tdf#84381: Improved sidebar selection analyser for Calc and Draw/Impress

Disables the area tab when a line is selected

Change-Id: Ib02a68fb548a7cc10f9af7e0d1b6191119f18915
Reviewed-on: https://gerrit.libreoffice.org/16165
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Katarina Behrens katarina.behr...@cib.de

diff --git a/include/sfx2/sidebar/EnumContext.hxx 
b/include/sfx2/sidebar/EnumContext.hxx
index 3fc5fda..3fd2670 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -68,6 +68,7 @@ public:
 Context_Cell,
 Context_Chart,
 Context_Draw,
+Context_DrawLine,
 Context_DrawPage,
 Context_DrawText,
 Context_EditCell,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 504bf3b..653d826 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -384,14 +384,17 @@
 prop oor:name=ContextList
   value oor:separator=;
 Calc,   Draw,   visible ;
+Calc,   DrawLine,   visible ;
 Calc,   Graphic,visible ;
 Calc,   OLE,hidden  ;
 DrawImpress,3DObject,   visible ;
 DrawImpress,Draw,   visible ;
+DrawImpress,DrawLine,   visible ;
 DrawImpress,Graphic,visible ;
 DrawImpress,TextObject, hidden  ;
 DrawImpress,OLE,hidden  ;
 WriterVariants, Draw,   visible ;
+WriterVariants, DrawLine,   visible ;
   /value
 /prop
 prop oor:name=ImplementationURL oor:type=xs:string
diff --git a/sfx2/source/sidebar/EnumContext.cxx 
b/sfx2/source/sidebar/EnumContext.cxx
index 9f8a630..4f9b75b 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -178,6 +178,7 @@ void EnumContext::ProvideContextContainers()
 AddContext(Chart);
 AddContext(Chart);
 AddContext(Draw);
+AddContext(DrawLine);
 AddContext(DrawPage);
 AddContext(DrawText);
 AddContext(EditCell);
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx 
b/svx/source/sidebar/SelectionAnalyzer.cxx
index 91611c2..e21eea0 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -209,11 +209,6 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
 case OBJ_OUTLINETEXT:
 case OBJ_TEXT:
 case OBJ_TEXTEXT:
-case OBJ_PATHLINE:
-case OBJ_PLIN:
-case OBJ_FREELINE:
-case OBJ_EDGE:
-case OBJ_LINE:
 case OBJ_MEASURE:
 case OBJ_RECT:
 case OBJ_CIRC:
@@ -227,6 +222,13 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
 case OBJ_GRUP:
 return EnumContext::Context_Draw;
 
+case OBJ_PLIN:
+case OBJ_PATHLINE:
+case OBJ_FREELINE:
+case OBJ_LINE:
+case OBJ_EDGE:
+return EnumContext::Context_DrawLine;
+
 case OBJ_GRAF:
 return EnumContext::Context_Graphic;
 
@@ -252,11 +254,6 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForObjectId_SD (
 switch (nObjectId)
 {
 case OBJ_CAPTION:
-case OBJ_PATHLINE:
-case OBJ_PLIN:
-case OBJ_FREELINE:
-case OBJ_EDGE:
-case OBJ_LINE:
 case OBJ_MEASURE:
 case OBJ_RECT:
 case OBJ_CIRC:
@@ -270,6 +267,13 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForObjectId_SD (
 case OBJ_GRUP:
 return EnumContext::Context_Draw;
 
+case OBJ_EDGE:
+case OBJ_PATHLINE:
+case OBJ_FREELINE:
+case OBJ_PLIN:
+case OBJ_LINE:
+return EnumContext::Context_DrawLine;
+
 case OBJ_TITLETEXT:
 case OBJ_OUTLINETEXT:
 case OBJ_TEXT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/uiconfig

2015-06-29 Thread Rishabh Kumar
 svx/uiconfig/ui/sidebarline.ui |  131 ++---
 1 file changed, 72 insertions(+), 59 deletions(-)

New commits:
commit 1584b6e876a26f701c93fdf03f4f1200058a13cb
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Wed Jun 24 03:07:41 2015 +0530

Hiding the line style label in sidebar

Fixes the cropped controls.

Change-Id: I08d59ccd40e745148f9f6a4d5f61e507697b3ce8
Reviewed-on: https://gerrit.libreoffice.org/16436
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/svx/uiconfig/ui/sidebarline.ui b/svx/uiconfig/ui/sidebarline.ui
index 6309198..e8506db 100644
--- a/svx/uiconfig/ui/sidebarline.ui
+++ b/svx/uiconfig/ui/sidebarline.ui
@@ -25,72 +25,78 @@
 property name=orientationvertical/property
 property name=spacing6/property
 child
-  object class=GtkGrid id=grid4
+  object class=GtkBox id=box1
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=hexpandTrue/property
-property name=row_spacing6/property
-property name=column_spacing6/property
 child
-  object class=GtkLabel id=translabel
-property name=visibleTrue/property
+  object class=GtkLabel id=stylelabel
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=label 
translatable=yes_Transparency:/property
+property name=label 
translatable=yes_Style:/property
 property name=use_underlineTrue/property
   /object
   packing
-property name=left_attach0/property
-property name=top_attach3/property
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
   /packing
 /child
 child
-  object class=GtkSpinButton id=linetransparency:0%
+  object class=GtkComboBoxText id=linestyle
 property name=visibleTrue/property
-property name=can_focusTrue/property
+property name=can_focusFalse/property
 property name=has_tooltipTrue/property
-property name=tooltip_markup translatable=yesSpecify 
the transparency of the line./property
-property name=tooltip_text translatable=yesSpecify 
the transparency of the line./property
+property name=tooltip_markup translatable=yesSelect 
the style of the line./property
+property name=tooltip_text translatable=yesSelect 
the style of the line./property
 property name=hexpandTrue/property
-property name=invisible_char•/property
-property name=adjustmentadjustment1/property
-property name=climb_rate5/property
   /object
   packing
-property name=left_attach1/property
-property name=top_attach3/property
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position1/property
   /packing
 /child
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
+  /packing
+/child
+child
+  object class=GtkGrid id=grid4
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=hexpandTrue/property
+property name=row_spacing6/property
+property name=column_spacing6/property
 child
-  object class=GtkLabel id=colorlabel
+  object class=GtkLabel id=widthlabel
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=label 
translatable=yes_Color:/property
+property name=label 
translatable=yes_Width:/property
 property name=use_underlineTrue/property
   /object
   packing
 property name=left_attach0/property
-property name=top_attach2/property
+property name

Rework of the sidebar(GSoC WR#4)

2015-06-23 Thread Rishabh Kumar
1. Completed the task of shadow tab.

2. Area property tab - problem faced while porting the Import button to the
sidebar. Bug report was filed.

3. Slide background tab(#89466) - New SIDs were added. work on Master slide
section is in progress. The other controls are working fine.

4.  Interaction section tab(#89667) - preliminary task of adding a  new tab
to the sidebar is completed.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - svx/uiconfig

2015-06-16 Thread Rishabh Kumar
 svx/uiconfig/ui/sidebararea.ui |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit f9bd17b3c1b2dd656c707512fd34a3bdec5d33c9
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 8 16:35:05 2015 +0530

tdf#88843 Set Maximum Value for Transparency spin button in area sidebar tab

Change-Id: Idb1c5051de5ddb0501b8d1440f8abe62074296bc
Reviewed-on: https://gerrit.libreoffice.org/16144
Reviewed-by: Katarina Behrens katarina.behr...@cib.de
Tested-by: Katarina Behrens katarina.behr...@cib.de
(cherry picked from commit c1692f620610621a139e54fb1f9d11d4c177608d)
Reviewed-on: https://gerrit.libreoffice.org/16204
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui
index adad038..708533c 100644
--- a/svx/uiconfig/ui/sidebararea.ui
+++ b/svx/uiconfig/ui/sidebararea.ui
@@ -3,6 +3,12 @@
 interface
   requires lib=gtk+ version=3.0/
   requires lib=LibreOffice version=1.0/
+  object class=GtkAdjustment id=adjustment1
+property name=lower0/property
+property name=upper100/property
+property name=step_increment1/property
+property name=page_increment10/property
+  /object
   object class=GtkGrid id=AreaPropertyPanel
 property name=visibleTrue/property
 property name=can_focusFalse/property
@@ -185,6 +191,7 @@
 property name=hexpandTrue/property
 property name=max_length100/property
 property name=invisible_char•/property
+property name=adjustmentadjustment1/property
 property 
name=secondary_icon_activatableFalse/property
 property name=climb_rate5/property
 property name=numericTrue/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - officecfg/registry svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk

2015-06-16 Thread Rishabh Kumar
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   29 ++
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/styles/StylesPropertyPanel.cxx|   55 +
 svx/source/sidebar/styles/StylesPropertyPanel.hxx|   52 
 svx/uiconfig/ui/sidebarstylespanel.ui|  118 +++
 7 files changed, 260 insertions(+), 1 deletion(-)

New commits:
commit 31fcd558a2fdf892e190d9738c224a0752997903
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 15 01:54:43 2015 +0530

tdf#73071: Styles tab addition to the sidebar for writer

Addition of .uno:StyleApply , .uno:StyleUpdateByExample and 
.uno:StyleNewByExample uno commands to the sidebar

Change-Id: Iab6f1fb465066fce523fd376038a059189f1b842
Reviewed-on: https://gerrit.libreoffice.org/16279
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com
(cherry picked from commit e436f31147c7eb75908a8750b0e4053c2efdca5b)
Reviewed-on: https://gerrit.libreoffice.org/16306
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 3f9e93e..9a40006 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -231,6 +231,33 @@
 /node
 node oor:name=PanelList
 
+  node oor:name=StylesPropertyPanel oor:op=replace
+prop oor:name=Title oor:type=xs:string
+  value xml:lang=en-USStyles/value
+/prop
+prop oor:name=Id oor:type=xs:string
+  valueStylesPropertyPanel/value
+/prop
+prop oor:name=DeckId oor:type=xs:string
+  valuePropertyDeck/value
+/prop
+prop oor:name=ContextList
+  value oor:separator=;
+WriterVariants,   Annotation, visible;
+WriterVariants,   DrawText,   visible;
+WriterVariants,   Table,  visible;
+WriterVariants,   Text,   visible;
+WriterVariants,   default,visible;
+  /value
+/prop
+prop oor:name=ImplementationURL oor:type=xs:string
+  
valueprivate:resource/toolpanel/SvxPanelFactory/StylesPropertyPanel/value
+/prop
+prop oor:name=OrderIndex oor:type=xs:int
+  value100/value
+/prop
+  /node
+
   node oor:name=TextPropertyPanel oor:op=replace
 prop oor:name=Title oor:type=xs:string
   value xml:lang=en-USCharacter/value
@@ -270,7 +297,7 @@
   
valueprivate:resource/toolpanel/SvxPanelFactory/TextPropertyPanel/value
 /prop
 prop oor:name=OrderIndex oor:type=xs:int
-  value100/value
+  value120/value
 /prop
   /node
 
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index db5ab90..7cc76cb 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -182,6 +182,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
 svx/source/sidebar/text/TextUnderlineControl \
 svx/source/sidebar/text/TextUnderlinePopup \
 svx/source/sidebar/text/TextPropertyPanel \
+svx/source/sidebar/styles/StylesPropertyPanel \
 svx/source/sidebar/paragraph/ParaLineSpacingControl \
 svx/source/sidebar/paragraph/ParaLineSpacingPopup \
 svx/source/sidebar/paragraph/ParaPropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index f4e1f9f..ba19a9c 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebarline \
svx/uiconfig/ui/sidebarparagraph \
svx/uiconfig/ui/sidebarpossize \
+svx/uiconfig/ui/sidebarstylespanel \
svx/uiconfig/ui/sidebartextpanel \
svx/uiconfig/ui/textcontrolchardialog \
svx/uiconfig/ui/textcontrolparadialog \
diff --git a/svx/source/sidebar/PanelFactory.cxx 
b/svx/source/sidebar/PanelFactory.cxx
index bab0a12..a89b9e0 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -18,6 +18,7 @@
  */
 
 #include text/TextPropertyPanel.hxx
+#include styles/StylesPropertyPanel.hxx
 #include paragraph/ParaPropertyPanel.hxx
 #include area/AreaPropertyPanel.hxx
 #include graphic/GraphicPropertyPanel.hxx
@@ -144,6 +145,10 @@ Referenceui::XUIElement SAL_CALL 
PanelFactory::createUIElement (
 {
 pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings, 
aContext

[Libreoffice-commits] core.git: svx/uiconfig

2015-06-16 Thread Rishabh Kumar
 svx/uiconfig/ui/sidebarline.ui |  204 -
 1 file changed, 81 insertions(+), 123 deletions(-)

New commits:
commit 4fb65441709d02946f4b24da7839dba7ec1e
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Sun Jun 14 16:28:42 2015 +0530

Line Section reorganisation

Arrow Style, Corner Style and Cap Style are hidden

Change-Id: I0bfab4b23219d01ebfdb3a9ff0dc36777a412ec5
Reviewed-on: https://gerrit.libreoffice.org/16264
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/uiconfig/ui/sidebarline.ui b/svx/uiconfig/ui/sidebarline.ui
index 5aa8431..6309198 100644
--- a/svx/uiconfig/ui/sidebarline.ui
+++ b/svx/uiconfig/ui/sidebarline.ui
@@ -1,6 +1,7 @@
 ?xml version=1.0 encoding=UTF-8?
+!-- Generated with glade 3.18.3 --
 interface
-  !-- interface-requires gtk+ 3.0 --
+  requires lib=gtk+ version=3.0/
   object class=GtkAdjustment id=adjustment1
 property name=upper100/property
 property name=step_increment5/property
@@ -31,47 +32,33 @@
 property name=row_spacing6/property
 property name=column_spacing6/property
 child
-  object class=GtkLabel id=widthlabel
+  object class=GtkLabel id=translabel
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=label 
translatable=yes_Width:/property
+property name=label 
translatable=yes_Transparency:/property
 property name=use_underlineTrue/property
   /object
   packing
 property name=left_attach0/property
-property name=top_attach0/property
-property name=width1/property
-property name=height1/property
+property name=top_attach3/property
   /packing
 /child
 child
-  object class=GtkToolbar id=width
-property name=width_request120/property
+  object class=GtkSpinButton id=linetransparency:0%
 property name=visibleTrue/property
-property name=can_focusFalse/property
+property name=can_focusTrue/property
 property name=has_tooltipTrue/property
-property name=tooltip_markup translatable=yesSelect 
the width of the line./property
-property name=tooltip_text translatable=yesSelect 
the width of the line./property
-child
-  object class=GtkMenuToolButton id=setwidth
-property name=width_request105/property
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property 
name=action_name.uno:SelectWidth/property
-property name=use_underlineTrue/property
-  /object
-  packing
-property name=expandTrue/property
-property name=homogeneousTrue/property
-  /packing
-/child
+property name=tooltip_markup translatable=yesSpecify 
the transparency of the line./property
+property name=tooltip_text translatable=yesSpecify 
the transparency of the line./property
+property name=hexpandTrue/property
+property name=invisible_char•/property
+property name=adjustmentadjustment1/property
+property name=climb_rate5/property
   /object
   packing
 property name=left_attach1/property
-property name=top_attach0/property
-property name=width1/property
-property name=height1/property
+property name=top_attach3/property
   /packing
 /child
 child
@@ -81,33 +68,10 @@
 property name=xalign0/property
 property name=label 
translatable=yes_Color:/property
 property name=use_underlineTrue/property
-property name=mnemonic_widgetcolor/property
   /object
   packing
 property name=left_attach0/property
-property name=top_attach1/property
-property name=width1/property
-property name=height1/property
-  /packing
-/child
-child
-  object class=GtkSpinButton id

[Libreoffice-commits] core.git: officecfg/registry svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk

2015-06-16 Thread Rishabh Kumar
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   29 ++
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/styles/StylesPropertyPanel.cxx|   55 +
 svx/source/sidebar/styles/StylesPropertyPanel.hxx|   52 
 svx/uiconfig/ui/sidebarstylespanel.ui|  118 +++
 7 files changed, 260 insertions(+), 1 deletion(-)

New commits:
commit e436f31147c7eb75908a8750b0e4053c2efdca5b
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 15 01:54:43 2015 +0530

tdf#73071:Styles tab addition to the sidebar for writer

Addition of .uno:StyleApply , .uno:StyleUpdateByExample and 
.uno:StyleNewByExample uno commands to the sidebar

Change-Id: Iab6f1fb465066fce523fd376038a059189f1b842
Reviewed-on: https://gerrit.libreoffice.org/16279
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 3f9e93e..9a40006 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -231,6 +231,33 @@
 /node
 node oor:name=PanelList
 
+  node oor:name=StylesPropertyPanel oor:op=replace
+prop oor:name=Title oor:type=xs:string
+  value xml:lang=en-USStyles/value
+/prop
+prop oor:name=Id oor:type=xs:string
+  valueStylesPropertyPanel/value
+/prop
+prop oor:name=DeckId oor:type=xs:string
+  valuePropertyDeck/value
+/prop
+prop oor:name=ContextList
+  value oor:separator=;
+WriterVariants,   Annotation, visible;
+WriterVariants,   DrawText,   visible;
+WriterVariants,   Table,  visible;
+WriterVariants,   Text,   visible;
+WriterVariants,   default,visible;
+  /value
+/prop
+prop oor:name=ImplementationURL oor:type=xs:string
+  
valueprivate:resource/toolpanel/SvxPanelFactory/StylesPropertyPanel/value
+/prop
+prop oor:name=OrderIndex oor:type=xs:int
+  value100/value
+/prop
+  /node
+
   node oor:name=TextPropertyPanel oor:op=replace
 prop oor:name=Title oor:type=xs:string
   value xml:lang=en-USCharacter/value
@@ -270,7 +297,7 @@
   
valueprivate:resource/toolpanel/SvxPanelFactory/TextPropertyPanel/value
 /prop
 prop oor:name=OrderIndex oor:type=xs:int
-  value100/value
+  value120/value
 /prop
   /node
 
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index db5ab90..7cc76cb 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -182,6 +182,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
 svx/source/sidebar/text/TextUnderlineControl \
 svx/source/sidebar/text/TextUnderlinePopup \
 svx/source/sidebar/text/TextPropertyPanel \
+svx/source/sidebar/styles/StylesPropertyPanel \
 svx/source/sidebar/paragraph/ParaLineSpacingControl \
 svx/source/sidebar/paragraph/ParaLineSpacingPopup \
 svx/source/sidebar/paragraph/ParaPropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index f4e1f9f..ba19a9c 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebarline \
svx/uiconfig/ui/sidebarparagraph \
svx/uiconfig/ui/sidebarpossize \
+svx/uiconfig/ui/sidebarstylespanel \
svx/uiconfig/ui/sidebartextpanel \
svx/uiconfig/ui/textcontrolchardialog \
svx/uiconfig/ui/textcontrolparadialog \
diff --git a/svx/source/sidebar/PanelFactory.cxx 
b/svx/source/sidebar/PanelFactory.cxx
index bab0a12..a89b9e0 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -18,6 +18,7 @@
  */
 
 #include text/TextPropertyPanel.hxx
+#include styles/StylesPropertyPanel.hxx
 #include paragraph/ParaPropertyPanel.hxx
 #include area/AreaPropertyPanel.hxx
 #include graphic/GraphicPropertyPanel.hxx
@@ -144,6 +145,10 @@ Referenceui::XUIElement SAL_CALL 
PanelFactory::createUIElement (
 {
 pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings, 
aContext);
 }
+else if (rsResourceURL.endsWith(/StylesPropertyPanel))
+{
+pControl = StylesPropertyPanel::Create(pParentWindow, xFrame, 
pBindings);
+}
 else if (rsResourceURL.endsWith(/ParaPropertyPanel))
 {
 pControl = ParaPropertyPanel::Create(pParentWindow

[GSOC] week 3 report

2015-06-16 Thread Rishabh Kumar
Week 3 was geared towards a lot of testing and minor tweaks for the
previous patches to get them merged for the next release. I prioritized
some of the enhancement requests -
1. Styles tab addition to the sidebar for writer -
https://gerrit.libreoffice.org/#/c/16279/
2. #91802

From the previous week, I have completed the work on sidebar PosSize
section but the design looked a bit ugly for the writer. So, currently I am
working on creating a different sidebar tab for writer.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/uiconfig

2015-06-08 Thread Rishabh Kumar
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 15ba43a052a5e5cc842feed221e8e1cb43575731
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 8 20:51:54 2015 +0530

tdf#91890:Impress Crash when click on Transition icon in sidebar

Change-Id: I8ea350b97fcbf914b60ba580a72df967fdcfadef
Reviewed-on: https://gerrit.libreoffice.org/16164
Reviewed-by: Philippe Jung phil.j...@free.fr
Tested-by: Philippe Jung phil.j...@free.fr

diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui 
b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 9e046fe..3870b74 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -20,16 +20,15 @@
 property name=orientationvertical/property
 property name=spacing12/property
 child
-  object class=GtkFrame id=frame3
+  object class=GtkBox id=box4
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=vexpandTrue/property
-property name=label_xalign0/property
-property name=shadow_typenone/property
 child
   object class=GtkAlignment id=alignment3
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
 property name=vexpandTrue/property
 child
   object class=GtkTreeView id=transitions_list:border
@@ -42,9 +41,11 @@
   /object
 /child
   /object
-/child
-child type=label_item
-  placeholder/
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
+  /packing
 /child
   /object
   packing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/uiconfig

2015-06-08 Thread Rishabh Kumar
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit f6eb112faae4ba79616a40f34a90eec13093cc05
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 8 20:51:54 2015 +0530

tdf#91890:Impress Crash when click on Transition icon in sidebar

Change-Id: I8ea350b97fcbf914b60ba580a72df967fdcfadef
Reviewed-on: https://gerrit.libreoffice.org/16163
Reviewed-by: Philippe Jung phil.j...@free.fr
Tested-by: Jenkins c...@libreoffice.org

diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui 
b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 9e046fe..3870b74 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -20,16 +20,15 @@
 property name=orientationvertical/property
 property name=spacing12/property
 child
-  object class=GtkFrame id=frame3
+  object class=GtkBox id=box4
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=vexpandTrue/property
-property name=label_xalign0/property
-property name=shadow_typenone/property
 child
   object class=GtkAlignment id=alignment3
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
 property name=vexpandTrue/property
 child
   object class=GtkTreeView id=transitions_list:border
@@ -42,9 +41,11 @@
   /object
 /child
   /object
-/child
-child type=label_item
-  placeholder/
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
+  /packing
 /child
   /object
   packing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSOC weekly report

2015-06-08 Thread Rishabh Kumar
Week 1:
worked on
1.  tdf#90888 https://bugs.documentfoundation.org/show_bug.cgi?id=90888:Shrink
the properties sidebar sections in Calc -
https://gerrit.libreoffice.org/#/c/15935/ (STATUS:MERGED)
2. tdf#87862 https://bugs.documentfoundation.org/show_bug.cgi?id=87862:
Rearranging the lower half of slide transition tab -
https://gerrit.libreoffice.org/#/c/15999/ (STATUS:MERGED)

3.Started writing some test code for adding shadow section to the sidebar-
#87702. (STATUS:PRELIMINARY STAGE)

4.Tried reducing the height of line section #89543 but some controls are
cropped off so a change in the design was considered. (STATUS:NEEDSINFO)

Week 2:
1.worked on improving the selection analyzer - the area section doesn't pop
up when a line is selected.(STATUS:COMPLETED)

2.work on line section. Decided to submit it in 3 commits -
commit #1 : modification in the .ui file and hiding some controls.
commit #2 : line controls should be disabled when the none entry is
selected.
commit #3 : Addition of sliders next to the spin fields.
(STATUS:COMPLETED)

3.Added enable contour and edit contour buttons to the WrapPropertyPanel in
writer. But the new controls introduced a bug. (fixing it).

4.Work on shadow section - Controls are working fine from the shadow tab
but the shadow attributes are not updated in the shadow tab when the values
are changed in the parent dialog. Work in progress.

5.Work on #90295 - minor tweaks are needed before the change can be
committed.(STATUS:COMPLETED)

6.Work on #87813- SIDEBAR: Incorporating the effects list into the
animation tab - started out with writing some test code but the work was
stopped due to the need of a better design.
(STATUS:NEEDSINFO)

Found 2 probable bugs:
1. Sidebar Area transparency spin field increases more than 100% . (Fix
submitted)
2. incoherence between Keep ratio checkbox in the Position and size sidebar
tab and the modeless dialog. (dismissed as a feature).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: svx/uiconfig

2015-06-08 Thread Rishabh Kumar
 svx/uiconfig/ui/sidebararea.ui |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c1692f620610621a139e54fb1f9d11d4c177608d
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Mon Jun 8 16:35:05 2015 +0530

Setting Maximum Value for Transparency spin button in area sidebar tab

Change-Id: Idb1c5051de5ddb0501b8d1440f8abe62074296bc
Reviewed-on: https://gerrit.libreoffice.org/16144
Reviewed-by: Katarina Behrens katarina.behr...@cib.de
Tested-by: Katarina Behrens katarina.behr...@cib.de

diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui
index adad038..708533c 100644
--- a/svx/uiconfig/ui/sidebararea.ui
+++ b/svx/uiconfig/ui/sidebararea.ui
@@ -3,6 +3,12 @@
 interface
   requires lib=gtk+ version=3.0/
   requires lib=LibreOffice version=1.0/
+  object class=GtkAdjustment id=adjustment1
+property name=lower0/property
+property name=upper100/property
+property name=step_increment1/property
+property name=page_increment10/property
+  /object
   object class=GtkGrid id=AreaPropertyPanel
 property name=visibleTrue/property
 property name=can_focusFalse/property
@@ -185,6 +191,7 @@
 property name=hexpandTrue/property
 property name=max_length100/property
 property name=invisible_char•/property
+property name=adjustmentadjustment1/property
 property 
name=secondary_icon_activatableFalse/property
 property name=climb_rate5/property
 property name=numericTrue/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sc/source sc/uiconfig

2015-06-07 Thread Rishabh Kumar
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |   55 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx  |3 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |   28 --
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx |2 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx   |6 
 sc/uiconfig/scalc/ui/sidebaralignment.ui |  179 +-
 sc/uiconfig/scalc/ui/sidebarcellappearance.ui|   47 
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui  |  187 +++
 8 files changed, 167 insertions(+), 340 deletions(-)

New commits:
commit 5e00e9ac78a61199337910e1b0cee19722c2eefe
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Thu May 28 01:37:00 2015 +0530

tdf#90888:Shrink the properties sidebar sections in Calc

Removal of less used controls

Change-Id: I2948e6582031db1f743af59fb1ae02c1a86467f4
Reviewed-on: https://gerrit.libreoffice.org/15935
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com
(cherry picked from commit 1c18deee371ae21088383b2a2ddc55c7a7fd41b7)
Reviewed-on: https://gerrit.libreoffice.org/16133
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Philippe Jung phil.j...@free.fr

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index c27d0e9..d572ffd 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -45,7 +45,6 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
   maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this),
   maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this),
   maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this),
-  maStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this),
   mbMultiDisable(false),
   mxFrame(rxFrame),
   maContext(),
@@ -56,9 +55,7 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
 get(mpCBXWrapText, wraptext);
 get(mpCBXMergeCell, mergecells);
 get(mpFtRotate, orientationlabel);
-get(mpCtrlDial, orientationcontrol);
 get(mpMtrAngle, orientationdegrees);
-get(mpCbStacked, verticallystacked);
 
 Initialize();
 
@@ -78,16 +75,13 @@ void AlignmentPropertyPanel::dispose()
 mpCBXWrapText.clear();
 mpCBXMergeCell.clear();
 mpFtRotate.clear();
-mpCtrlDial.clear();
 mpMtrAngle.clear();
-mpCbStacked.clear();
 
 maAlignHorControl.dispose();
 maLeftIndentControl.dispose();
 maMergeCellControl.dispose();
 maWrapTextControl.dispose();
 maAngleControl.dispose();
-maStackControl.dispose();
 
 PanelLayout::dispose();
 }
@@ -107,8 +101,6 @@ void AlignmentPropertyPanel::Initialize()
 mpCBXWrapText-SetClickHdl ( aLink );
 
 //rotation control
-mpCtrlDial-SetAccessibleName(OUString( Text Orientation));   //wj acc
-mpCtrlDial-SetModifyHdl(LINK( this, AlignmentPropertyPanel, RotationHdl));
 
 //rotation
 mpMtrAngle-SetAccessibleName(OUString( Text Orientation));   //wj acc
@@ -116,7 +108,6 @@ void AlignmentPropertyPanel::Initialize()
 mpMtrAngle-EnableAutocomplete( false );
 
 //Vertical stacked
-mpCbStacked-SetClickHdl( LINK( this, AlignmentPropertyPanel, 
ClickStackHdl ) );
 
 mpMtrAngle-InsertValue(0, FUNIT_CUSTOM);
 mpMtrAngle-InsertValue(45, FUNIT_CUSTOM);
@@ -170,27 +161,6 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl )
 SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, aAngleItem, 0L );
 return 0;
 }
-
-IMPL_LINK_NOARG( AlignmentPropertyPanel, RotationHdl )
-{
-sal_Int32 nTmp = mpCtrlDial-GetRotation();
-SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,(sal_uInt32) nTmp);
-
-GetBindings()-GetDispatcher()-Execute(
-SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, aAngleItem, 0L );
-
-return 0;
-}
-
-IMPL_LINK_NOARG( AlignmentPropertyPanel, ClickStackHdl )
-{
-bool bVertical = mpCbStacked-IsChecked();
-SfxBoolItem  aStackItem( SID_ATTR_ALIGN_STACKED, bVertical );
-GetBindings()-GetDispatcher()-Execute(
-SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, aStackItem, 0L );
-return 0;
-}
-
 IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl)
 {
 mpCBXWrapText-EnableTriState(false);
@@ -282,17 +252,14 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
 if( meHorAlignState == SVX_HOR_JUSTIFY_REPEAT )
 {
 mpFtRotate-Disable();
-mpCtrlDial-Disable();
 mpMtrAngle-Disable();
 }
 else
 {
 mpFtRotate-Enable(!mbMultiDisable);
-mpCtrlDial-Enable(!mbMultiDisable);
 mpMtrAngle-Enable(!mbMultiDisable);
 }
 
-mpCbStacked-Enable( meHorAlignState != SVX_HOR_JUSTIFY_REPEAT );
 mpFTLeftIndent-Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
 mpMFLeftIndent

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/source sd/uiconfig

2015-06-02 Thread Rishabh Kumar
 sd/source/ui/animations/SlideTransitionPane.cxx  |9 -
 sd/source/ui/animations/SlideTransitionPane.hxx  |2 
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui |  155 ++-
 3 files changed, 69 insertions(+), 97 deletions(-)

New commits:
commit 31407dc23c41fb7f07ed62e049a35b0da7ec9564
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Wed May 27 19:26:43 2015 +0530

tdf#87862: Rearranging the lower half of slide transition tab

Follow up commit for the minor tweaks

Change-Id: I9f274e38c7d0adfc431dc9a11000c3ce9fad3a3e
Reviewed-on: https://gerrit.libreoffice.org/15929
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com
(cherry picked from commit a7b926243b300daf195467111e10a7bd481828a0)
Reviewed-on: https://gerrit.libreoffice.org/15999
Tested-by: Jan Holesovsky ke...@collabora.com
Reviewed-by: Jan Holesovsky ke...@collabora.com

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index 0c41e09..86f2afd 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -436,7 +436,6 @@ SlideTransitionPane::SlideTransitionPane(
 get(mpMF_ADVANCE_AUTO_AFTER, auto_after_value);
 get(mpPB_APPLY_TO_ALL, apply_to_all);
 get(mpPB_PLAY, play);
-get(mpPB_SLIDE_SHOW, slide_show);
 get(mpCB_AUTO_PREVIEW, auto_preview);
 
 
mpLB_SLIDE_TRANSITIONS-set_width_request(mpLB_SLIDE_TRANSITIONS-approximate_char_width()
 * 16);
@@ -460,7 +459,6 @@ SlideTransitionPane::SlideTransitionPane(
 // set handlers
 mpPB_APPLY_TO_ALL-SetClickHdl( LINK( this, SlideTransitionPane, 
ApplyToAllButtonClicked ));
 mpPB_PLAY-SetClickHdl( LINK( this, SlideTransitionPane, PlayButtonClicked 
));
-mpPB_SLIDE_SHOW-SetClickHdl( LINK( this, SlideTransitionPane, 
SlideShowButtonClicked ));
 
 mpLB_SLIDE_TRANSITIONS-SetSelectHdl( LINK( this, SlideTransitionPane, 
TransitionSelected ));
 
@@ -501,7 +499,6 @@ void SlideTransitionPane::dispose()
 mpMF_ADVANCE_AUTO_AFTER.clear();
 mpPB_APPLY_TO_ALL.clear();
 mpPB_PLAY.clear();
-mpPB_SLIDE_SHOW.clear();
 mpCB_AUTO_PREVIEW.clear();
 PanelLayout::dispose();
 }
@@ -1007,12 +1004,6 @@ IMPL_LINK_NOARG(SlideTransitionPane, PlayButtonClicked)
 return 0;
 }
 
-IMPL_LINK_NOARG(SlideTransitionPane, SlideShowButtonClicked)
-{
-mrBase.StartPresentation();
-return 0;
-}
-
 IMPL_LINK_NOARG(SlideTransitionPane, TransitionSelected)
 {
 applyToSelectedPages();
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx 
b/sd/source/ui/animations/SlideTransitionPane.hxx
index 654ce2e..fbfc3cf 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -89,7 +89,6 @@ private:
 
 DECL_LINK( ApplyToAllButtonClicked, void * );
 DECL_LINK( PlayButtonClicked, void * );
-DECL_LINK( SlideShowButtonClicked, void * );
 DECL_LINK( AutoPreviewClicked, void * );
 
 DECL_LINK( TransitionSelected, void * );
@@ -116,7 +115,6 @@ private:
 VclPtrMetricField  mpMF_ADVANCE_AUTO_AFTER;
 VclPtrPushButton   mpPB_APPLY_TO_ALL;
 VclPtrPushButton   mpPB_PLAY;
-VclPtrPushButton   mpPB_SLIDE_SHOW;
 VclPtrCheckBox mpCB_AUTO_PREVIEW;
 
 ::com::sun::star::uno::Reference ::com::sun::star::drawing::XDrawView
  mxView;
diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui 
b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 13a300c..9e046fe 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -2,6 +2,11 @@
 !-- Generated with glade 3.18.3 --
 interface
   requires lib=gtk+ version=3.0/
+  object class=GtkImage id=image1
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=pixbufsd/res/playblue_16.png/property
+  /object
   object class=GtkBox id=SlideTransitionsPanel
 property name=visibleTrue/property
 property name=can_focusFalse/property
@@ -26,8 +31,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=vexpandTrue/property
-property name=top_padding6/property
-property name=left_padding12/property
 child
   object class=GtkTreeView id=transitions_list:border
 property name=visibleTrue/property
@@ -40,15 +43,8 @@
 /child
   /object
 /child
-child type=label
-  object class=GtkLabel id=label3
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=label translatable=yesApply to Selected 
Slides/property
-attributes
-  attribute name=weight value=bold

[Libreoffice-commits] core.git: sc/source sc/uiconfig

2015-06-02 Thread Rishabh Kumar
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |   55 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx  |3 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |   28 --
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx |2 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx   |6 
 sc/uiconfig/scalc/ui/sidebaralignment.ui |  179 +-
 sc/uiconfig/scalc/ui/sidebarcellappearance.ui|   47 
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui  |  187 +++
 8 files changed, 167 insertions(+), 340 deletions(-)

New commits:
commit 1c18deee371ae21088383b2a2ddc55c7a7fd41b7
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Thu May 28 01:37:00 2015 +0530

tdf#90888:Shrink the properties sidebar sections in Calc

Removal of less used controls

Change-Id: I2948e6582031db1f743af59fb1ae02c1a86467f4
Reviewed-on: https://gerrit.libreoffice.org/15935
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index c27d0e9..d572ffd 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -45,7 +45,6 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
   maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this),
   maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this),
   maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this),
-  maStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this),
   mbMultiDisable(false),
   mxFrame(rxFrame),
   maContext(),
@@ -56,9 +55,7 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
 get(mpCBXWrapText, wraptext);
 get(mpCBXMergeCell, mergecells);
 get(mpFtRotate, orientationlabel);
-get(mpCtrlDial, orientationcontrol);
 get(mpMtrAngle, orientationdegrees);
-get(mpCbStacked, verticallystacked);
 
 Initialize();
 
@@ -78,16 +75,13 @@ void AlignmentPropertyPanel::dispose()
 mpCBXWrapText.clear();
 mpCBXMergeCell.clear();
 mpFtRotate.clear();
-mpCtrlDial.clear();
 mpMtrAngle.clear();
-mpCbStacked.clear();
 
 maAlignHorControl.dispose();
 maLeftIndentControl.dispose();
 maMergeCellControl.dispose();
 maWrapTextControl.dispose();
 maAngleControl.dispose();
-maStackControl.dispose();
 
 PanelLayout::dispose();
 }
@@ -107,8 +101,6 @@ void AlignmentPropertyPanel::Initialize()
 mpCBXWrapText-SetClickHdl ( aLink );
 
 //rotation control
-mpCtrlDial-SetAccessibleName(OUString( Text Orientation));   //wj acc
-mpCtrlDial-SetModifyHdl(LINK( this, AlignmentPropertyPanel, RotationHdl));
 
 //rotation
 mpMtrAngle-SetAccessibleName(OUString( Text Orientation));   //wj acc
@@ -116,7 +108,6 @@ void AlignmentPropertyPanel::Initialize()
 mpMtrAngle-EnableAutocomplete( false );
 
 //Vertical stacked
-mpCbStacked-SetClickHdl( LINK( this, AlignmentPropertyPanel, 
ClickStackHdl ) );
 
 mpMtrAngle-InsertValue(0, FUNIT_CUSTOM);
 mpMtrAngle-InsertValue(45, FUNIT_CUSTOM);
@@ -170,27 +161,6 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl )
 SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, aAngleItem, 0L );
 return 0;
 }
-
-IMPL_LINK_NOARG( AlignmentPropertyPanel, RotationHdl )
-{
-sal_Int32 nTmp = mpCtrlDial-GetRotation();
-SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,(sal_uInt32) nTmp);
-
-GetBindings()-GetDispatcher()-Execute(
-SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, aAngleItem, 0L );
-
-return 0;
-}
-
-IMPL_LINK_NOARG( AlignmentPropertyPanel, ClickStackHdl )
-{
-bool bVertical = mpCbStacked-IsChecked();
-SfxBoolItem  aStackItem( SID_ATTR_ALIGN_STACKED, bVertical );
-GetBindings()-GetDispatcher()-Execute(
-SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, aStackItem, 0L );
-return 0;
-}
-
 IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl)
 {
 mpCBXWrapText-EnableTriState(false);
@@ -282,17 +252,14 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
 if( meHorAlignState == SVX_HOR_JUSTIFY_REPEAT )
 {
 mpFtRotate-Disable();
-mpCtrlDial-Disable();
 mpMtrAngle-Disable();
 }
 else
 {
 mpFtRotate-Enable(!mbMultiDisable);
-mpCtrlDial-Enable(!mbMultiDisable);
 mpMtrAngle-Enable(!mbMultiDisable);
 }
 
-mpCbStacked-Enable( meHorAlignState != SVX_HOR_JUSTIFY_REPEAT );
 mpFTLeftIndent-Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
 mpMFLeftIndent-Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
 }
@@ -352,7 +319,6 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
 {
 long nTmp = static_castconst SfxInt32Item*(pState)-GetValue

[Libreoffice-commits] core.git: sd/source sd/uiconfig

2015-05-31 Thread Rishabh Kumar
 sd/source/ui/animations/SlideTransitionPane.cxx  |9 -
 sd/source/ui/animations/SlideTransitionPane.hxx  |2 
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui |  155 ++-
 3 files changed, 69 insertions(+), 97 deletions(-)

New commits:
commit a7b926243b300daf195467111e10a7bd481828a0
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Wed May 27 19:26:43 2015 +0530

tdf#87862: Rearranging the lower half of slide transition tab

Follow up commit for the minor tweaks

Change-Id: I9f274e38c7d0adfc431dc9a11000c3ce9fad3a3e
Reviewed-on: https://gerrit.libreoffice.org/15929
Reviewed-by: Yousuf Philips philip...@hotmail.com
Tested-by: Yousuf Philips philip...@hotmail.com

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index 0c41e09..86f2afd 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -436,7 +436,6 @@ SlideTransitionPane::SlideTransitionPane(
 get(mpMF_ADVANCE_AUTO_AFTER, auto_after_value);
 get(mpPB_APPLY_TO_ALL, apply_to_all);
 get(mpPB_PLAY, play);
-get(mpPB_SLIDE_SHOW, slide_show);
 get(mpCB_AUTO_PREVIEW, auto_preview);
 
 
mpLB_SLIDE_TRANSITIONS-set_width_request(mpLB_SLIDE_TRANSITIONS-approximate_char_width()
 * 16);
@@ -460,7 +459,6 @@ SlideTransitionPane::SlideTransitionPane(
 // set handlers
 mpPB_APPLY_TO_ALL-SetClickHdl( LINK( this, SlideTransitionPane, 
ApplyToAllButtonClicked ));
 mpPB_PLAY-SetClickHdl( LINK( this, SlideTransitionPane, PlayButtonClicked 
));
-mpPB_SLIDE_SHOW-SetClickHdl( LINK( this, SlideTransitionPane, 
SlideShowButtonClicked ));
 
 mpLB_SLIDE_TRANSITIONS-SetSelectHdl( LINK( this, SlideTransitionPane, 
TransitionSelected ));
 
@@ -501,7 +499,6 @@ void SlideTransitionPane::dispose()
 mpMF_ADVANCE_AUTO_AFTER.clear();
 mpPB_APPLY_TO_ALL.clear();
 mpPB_PLAY.clear();
-mpPB_SLIDE_SHOW.clear();
 mpCB_AUTO_PREVIEW.clear();
 PanelLayout::dispose();
 }
@@ -1007,12 +1004,6 @@ IMPL_LINK_NOARG(SlideTransitionPane, PlayButtonClicked)
 return 0;
 }
 
-IMPL_LINK_NOARG(SlideTransitionPane, SlideShowButtonClicked)
-{
-mrBase.StartPresentation();
-return 0;
-}
-
 IMPL_LINK_NOARG(SlideTransitionPane, TransitionSelected)
 {
 applyToSelectedPages();
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx 
b/sd/source/ui/animations/SlideTransitionPane.hxx
index 654ce2e..fbfc3cf 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -89,7 +89,6 @@ private:
 
 DECL_LINK( ApplyToAllButtonClicked, void * );
 DECL_LINK( PlayButtonClicked, void * );
-DECL_LINK( SlideShowButtonClicked, void * );
 DECL_LINK( AutoPreviewClicked, void * );
 
 DECL_LINK( TransitionSelected, void * );
@@ -116,7 +115,6 @@ private:
 VclPtrMetricField  mpMF_ADVANCE_AUTO_AFTER;
 VclPtrPushButton   mpPB_APPLY_TO_ALL;
 VclPtrPushButton   mpPB_PLAY;
-VclPtrPushButton   mpPB_SLIDE_SHOW;
 VclPtrCheckBox mpCB_AUTO_PREVIEW;
 
 ::com::sun::star::uno::Reference ::com::sun::star::drawing::XDrawView
  mxView;
diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui 
b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 13a300c..9e046fe 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -2,6 +2,11 @@
 !-- Generated with glade 3.18.3 --
 interface
   requires lib=gtk+ version=3.0/
+  object class=GtkImage id=image1
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=pixbufsd/res/playblue_16.png/property
+  /object
   object class=GtkBox id=SlideTransitionsPanel
 property name=visibleTrue/property
 property name=can_focusFalse/property
@@ -26,8 +31,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=vexpandTrue/property
-property name=top_padding6/property
-property name=left_padding12/property
 child
   object class=GtkTreeView id=transitions_list:border
 property name=visibleTrue/property
@@ -40,15 +43,8 @@
 /child
   /object
 /child
-child type=label
-  object class=GtkLabel id=label3
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=label translatable=yesApply to Selected 
Slides/property
-attributes
-  attribute name=weight value=bold/
-/attributes
-  /object
+child type=label_item
+  placeholder/
 /child
   /object
   packing
@@ -67,8 +63,8 @@
   object class

Gsoc Student Introduction

2015-05-11 Thread Rishabh Kumar
Hello,

I am Rishabh Kumar, a second year undergraduate at IIT Roorkee, India. I am
pursuing a degree in Applied Mathematics. I have been selected to
participate in this year's Gsoc program and my project is Review of the
sidebar and its functionality. The project aims to improve the user
interface and usability of sidebar by rearranging the existing controls and
creation of new tabs.  It is based on the meta bug - 65138 and it will
include sub tasks of solving some of the high priority enhancement requests
listed in the meta bug. Looking forward to a great summer .
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/sdi

2015-04-05 Thread Rishabh Kumar
 sw/sdi/swriter.sdi |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae79991e76f029adcd8bdb5cbc2889419be157f2
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Sun Apr 5 17:40:20 2015 +0530

tdf#51287: Personalisation of keyboard shortcuts incoherence

To Document Begin moved to Navigate from View

Change-Id: I16061d8d10de42e5eac462bd970dc49a7a4291ce
Reviewed-on: https://gerrit.libreoffice.org/15162
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 7e4cd2b..deea1c0 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2877,7 +2877,7 @@ SfxBoolItem GoToStartOfDoc FN_START_OF_DOCUMENT
 MenuConfig = TRUE,
 StatusBarConfig = FALSE,
 ToolBoxConfig = TRUE,
-GroupId = GID_VIEW;
+GroupId = GID_NAVIGATOR;
 ]
 
 SfxBoolItem GoToStartOfLine FN_START_OF_LINE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx svx/source sw/source

2015-03-26 Thread Rishabh Kumar
 include/svx/dialogs.hrc  |   11 ++-
 svx/source/stbctrls/stbctrls.src |   45 +
 sw/source/uibase/ribbar/workctrl.cxx |   54 ---
 3 files changed, 87 insertions(+), 23 deletions(-)

New commits:
commit 97f08e0632b2a947848223f862dd89a36386cb71
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Fri Mar 13 19:38:31 2015 +0530

tdf#81073 :Addition of text zoom levels to print preview zoom

SvxZoomItem includes text zoom level Ids unlike SfxUInt16Iem which only
includes zoom percent id.SfxUInt16Item is the base class for SvxZoomItem.

Change-Id: I8ad2a8cf48632853538aa2d3f8dfccf49f4c
Reviewed-on: https://gerrit.libreoffice.org/14488
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 63963d0..e6abab7 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -1087,9 +1087,18 @@
 #define RID_SVXIMG_SHADOW_SIZE   (RID_SVX_START + 1379)
 #define RID_SVXIMG_SHADOW_XDIST  (RID_SVX_START + 1380)
 #define RID_SVXIMG_SHADOW_YDIST  (RID_SVX_START + 1381)
+#define RID_SVXSTR_ZOOM_25   (RID_SVX_START + 1382)
+#define RID_SVXSTR_ZOOM_50   (RID_SVX_START + 1383)
+#define RID_SVXSTR_ZOOM_75   (RID_SVX_START + 1384)
+#define RID_SVXSTR_ZOOM_100  (RID_SVX_START + 1385)
+#define RID_SVXSTR_ZOOM_150  (RID_SVX_START + 1386)
+#define RID_SVXSTR_ZOOM_200  (RID_SVX_START + 1387)
+#define RID_SVXSTR_ZOOM_WHOLE_PAGE   (RID_SVX_START + 1388)
+#define RID_SVXSTR_ZOOM_PAGE_WIDTH   (RID_SVX_START + 1389)
+#define RID_SVXSTR_ZOOM_OPTIMAL_VIEW (RID_SVX_START + 1390)
 
 // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new 
RIDs for Strings !!!
-#define RID_SVXSTR_NEXTFREE  (RID_SVX_START + 1382)
+#define RID_SVXSTR_NEXTFREE  (RID_SVX_START + 1391)
 
 // if we have _a_lot_ time, we should group the resource ids by type, instead
 // of grouping them by semantics. The reason is that resource ids have to be
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index ac26b26..a31e6d4 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -141,6 +141,51 @@ String RID_SVXSTR_ZOOM_OUT
 Text [ en-US ] = Zoom Out;
 };
 
+String RID_SVXSTR_ZOOM_25
+{
+Text [ en-US ] = 25% ;
+};
+
+String RID_SVXSTR_ZOOM_50
+{
+Text [ en-US ] = 50% ;
+};
+
+String RID_SVXSTR_ZOOM_75
+{
+Text [ en-US ] = 75% ;
+};
+
+String RID_SVXSTR_ZOOM_100
+{
+Text [ en-US ] = 100% ;
+};
+
+String RID_SVXSTR_ZOOM_150
+{
+Text [ en-US ] = 150% ;
+};
+
+String RID_SVXSTR_ZOOM_200
+{
+Text [ en-US ] = 200% ;
+};
+
+String RID_SVXSTR_ZOOM_WHOLE_PAGE
+{
+Text [ en-US ] = Entire Page ;
+};
+
+String RID_SVXSTR_ZOOM_PAGE_WIDTH
+{
+Text [ en-US ] = Page Width ;
+};
+
+String RID_SVXSTR_ZOOM_OPTIMAL_VIEW
+{
+Text [ en-US ] = Optimal View ;
+};
+
  // PopupMenu -
 Menu RID_SVXMNU_ZOOM
 {
diff --git a/sw/source/uibase/ribbar/workctrl.cxx 
b/sw/source/uibase/ribbar/workctrl.cxx
index 7cbb8b9..b04dd47 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -46,8 +46,10 @@
 #include rtl/ustring.hxx
 #include swabstdlg.hxx
 #include misc.hrc
-
+#include sfx2/zoomitem.hxx
 #include vcl/svapp.hxx
+#include svx/dialmgr.hxx
+#include svx/dialogs.hrc
 
 // Size check
 #define NAVI_ENTRIES 20
@@ -55,6 +57,8 @@
 #error SwScrollNaviPopup-CTOR static array wrong size. Are new IDs added?
 #endif
 
+#define ZOOM_ENTRIES 9
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
@@ -563,13 +567,17 @@ SwZoomBox_Impl::SwZoomBox_Impl(
 {
 EnableAutocomplete( false );
 sal_uInt16 aZoomValues[] =
-{   25, 50, 75, 100, 150, 200 };
-for(sal_uInt16 i = 0; i  sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
+{ RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 ,
+  RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 ,
+  RID_SVXSTR_ZOOM_150 , RID_SVXSTR_ZOOM_200 ,
+  RID_SVXSTR_ZOOM_WHOLE_PAGE, RID_SVXSTR_ZOOM_PAGE_WIDTH ,
+  RID_SVXSTR_ZOOM_OPTIMAL_VIEW };
+for(sal_uInt16 i = 0; i  ZOOM_ENTRIES ; i++)
 {
-OUString sEntry = unicode::formatPercent(aZoomValues[i],
-Application::GetSettings().GetUILanguageTag());
+OUString sEntry = SVX_RESSTR( aZoomValues[i] );
 InsertEntry(sEntry);
 }
+
 }
 
 SwZoomBox_Impl::~SwZoomBox_Impl()
@@ -580,26 +588,28 @@ voidSwZoomBox_Impl::Select()
 if ( !IsTravelSelect() )
 {
 OUString sEntry(comphelper::string::remove(GetText(), '%'));
-sal_uInt16 nZoom = (sal_uInt16)sEntry.toInt32();
-if(nZoom  MINZOOM)
-nZoom = MINZOOM

[Libreoffice-commits] core.git: cui/source

2015-03-19 Thread Rishabh Kumar
 cui/source/tabpages/page.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 0b76f7ee3f7ac7c37c62b4d91307a20d9faca01a
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Tue Mar 10 08:33:53 2015 +0530

tdf#86787: Page style margin limited to 99.99mm

Normailizes MarginEdit before assigning values to SetMax and SetLast

Change-Id: I2aa1eca75c36e8dd4ac5905b49d6802b5c763f85
Reviewed-on: https://gerrit.libreoffice.org/14821
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 80880c6..d321103 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -354,14 +354,14 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, 
const SfxItemSet rAttr
 
m_pPaperHeightEdit-SetLast(m_pPaperHeightEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperHeight()),
 FUNIT_CM);
 
 // #i4219# also for margins (1/100th cm). Was: , keeping.
-m_pLeftMarginEdit-SetMax(aDrawinglayerOpt.GetMaximumPaperLeftMargin());
-m_pLeftMarginEdit-SetLast(aDrawinglayerOpt.GetMaximumPaperLeftMargin());
-m_pRightMarginEdit-SetMax(aDrawinglayerOpt.GetMaximumPaperRightMargin());
-m_pRightMarginEdit-SetLast(aDrawinglayerOpt.GetMaximumPaperRightMargin());
-m_pTopMarginEdit-SetMax(aDrawinglayerOpt.GetMaximumPaperTopMargin());
-m_pTopMarginEdit-SetLast(aDrawinglayerOpt.GetMaximumPaperTopMargin());
-
m_pBottomMarginEdit-SetMax(aDrawinglayerOpt.GetMaximumPaperBottomMargin());
-
m_pBottomMarginEdit-SetLast(aDrawinglayerOpt.GetMaximumPaperBottomMargin());
+
m_pLeftMarginEdit-SetMax(m_pLeftMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()),
 FUNIT_MM);
+
m_pLeftMarginEdit-SetLast(m_pLeftMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()),
 FUNIT_MM);
+
m_pRightMarginEdit-SetMax(m_pRightMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperRightMargin()),
 FUNIT_MM);
+
m_pRightMarginEdit-SetLast(m_pRightMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperRightMargin()),
 FUNIT_MM);
+
m_pTopMarginEdit-SetMax(m_pTopMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperTopMargin()),
 FUNIT_MM);
+
m_pTopMarginEdit-SetLast(m_pTopMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperTopMargin()),
 FUNIT_MM);
+
m_pBottomMarginEdit-SetMax(m_pBottomMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperBottomMargin()),
 FUNIT_MM);
+
m_pBottomMarginEdit-SetLast(m_pBottomMarginEdit-Normalize(aDrawinglayerOpt.GetMaximumPaperBottomMargin()),
 FUNIT_MM);
 
 m_pPortraitBtn-SetAccessibleRelationMemberOf(m_pOrientationFT);
 m_pLandscapeBtn-SetAccessibleRelationMemberOf(m_pOrientationFT);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2015-03-18 Thread Rishabh Kumar
 vcl/unx/generic/app/keysymnames.cxx |2 ++
 vcl/unx/generic/app/saldisp.cxx |   12 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 144ab285566afa18790356b5497573290ee710bf
Author: Rishabh Kumar kris.kr...@gmail.com
Date:   Sun Mar 8 03:41:16 2015 +0530

tdf#74591 : Changes shortcut key prior and next to PgUp and PgDn

Adds new handler for Page_Up and Page_Down

Change-Id: If4c40fb920d85996872f0ec9becd1d544c0e5e36
Reviewed-on: https://gerrit.libreoffice.org/14788
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index c07dd00..746eaad 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -62,6 +62,8 @@ namespace vcl_sal {
 { XK_Control_R, Ctrl },
 { XK_Escape, Esc },
 { XK_space, Space },
+{ XK_Page_Up, PgUp},
+{ XK_Page_Down, PgDn}
 };
 
 static const struct KeysymNameReplacement aImplReplacements_Turkish[] =
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 29c786d..5e74cff 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -841,10 +841,10 @@ OUString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) 
const
 nKeySym = XK_End;
 break;
 case KEY_PAGEUP:
-nKeySym = XK_Prior;
+nKeySym = XK_Page_Up;
 break;
 case KEY_PAGEDOWN:
-nKeySym = XK_Next;
+nKeySym = XK_Page_Down;
 break;
 case KEY_RETURN:
 nKeySym = XK_Return;
@@ -1039,10 +1039,10 @@ sal_uInt16 SalDisplay::GetKeyCode( KeySym keysym, 
char*pcPrintable ) const
 case XK_KP_Down:
 nKey = KEY_DOWN;
 break;
-case XK_KP_Prior: // XK_KP_Page_Up
+case XK_KP_Page_Up: // XK_KP_Page_Up
 nKey = KEY_PAGEUP;
 break;
-case XK_KP_Next: // XK_KP_Page_Down
+case XK_KP_Page_Down: // XK_KP_Page_Down
 nKey = KEY_PAGEDOWN;
 break;
 case XK_KP_End:
@@ -1182,10 +1182,10 @@ sal_uInt16 SalDisplay::GetKeyCode( KeySym keysym, 
char*pcPrintable ) const
 case XK_Down:
 nKey = KEY_DOWN;
 break;
-case XK_Prior: // XK_Page_Up
+case XK_Page_Up: // XK_Page_Up
 nKey = KEY_PAGEUP;
 break;
-case XK_Next: // XK_Page_Down
+case XK_Page_Down: // XK_Page_Down
 nKey = KEY_PAGEDOWN;
 break;
 case XK_End:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >