diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-09-29 09:15:47 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-09-29 14:49:42 +0200 |
commit | ed25f39a72e02a5f30652f9ad55fcfe5551c3026 (patch) | |
tree | a2e0fa3ba2a50482d8e2235ba341730892c7fe40 /cui/source/options | |
parent | 8b949134441056a1455d67ddfdd7e0bc5f2ee682 (diff) |
Convert optfltr page to .ui + adapt code.
Change-Id: I4a854862059b531fa8e07c5cd938f776408e8c81
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optfltr.cxx | 55 | ||||
-rw-r--r-- | cui/source/options/optfltr.hrc | 36 | ||||
-rw-r--r-- | cui/source/options/optfltr.hxx | 5 | ||||
-rw-r--r-- | cui/source/options/optfltr.src | 76 |
4 files changed, 52 insertions, 120 deletions
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 384fccd103be..3243842f428d 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -20,7 +20,6 @@ #include <unotools/moduleoptions.hxx> #include <unotools/fltrcfg.hxx> #include "optfltr.hxx" -#include "optfltr.hrc" #include <cuires.hrc> #include "helpid.hrc" #include <dialmgr.hxx> @@ -129,38 +128,40 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet& ) aPBasicStgCB->SaveValue(); } -OfaMSFilterTabPage2::OfaMSFilterTabPage2( Window* pParent, - const SfxItemSet& rSet ) - : SfxTabPage( pParent, CUI_RES( RID_OFAPAGE_MSFILTEROPT2 ), rSet ), - m_aCheckLBContainer(this, CUI_RES( CLB_SETTINGS)), - aCheckLB(m_aCheckLBContainer), - aHeader1FT ( this, CUI_RES( FT_HEADER1_EXPLANATION )), - aHeader2FT ( this, CUI_RES( FT_HEADER2_EXPLANATION )), - sHeader1 ( CUI_RES( ST_HEADER1 )), - sHeader2 ( CUI_RES( ST_HEADER2 )), - sChgToFromMath ( CUI_RES( ST_CHG_MATH )), - sChgToFromWriter ( CUI_RES( ST_CHG_WRITER )), - sChgToFromCalc ( CUI_RES( ST_CHG_CALC )), - sChgToFromImpress ( CUI_RES( ST_CHG_IMPRESS )), +OfaMSFilterTabPage2::OfaMSFilterTabPage2( Window* pParent, const SfxItemSet& rSet ) : + SfxTabPage( pParent, "OptFilterPage", "cui/ui/optfltrembedpage.ui", rSet ), + sHeader1(CUI_RES(RID_SVXSTR_HEADER1)), + sHeader2(CUI_RES(RID_SVXSTR_HEADER2)), + sChgToFromMath(CUI_RES(RID_SVXSTR_CHG_MATH)), + sChgToFromWriter(CUI_RES(RID_SVXSTR_CHG_WRITER)), + sChgToFromCalc(CUI_RES(RID_SVXSTR_CHG_CALC)), + sChgToFromImpress(CUI_RES(RID_SVXSTR_CHG_IMPRESS)), pCheckButtonData(0) { - FreeResource(); + get(m_pCheckLBContainer, "checklbcontainer"); + Size aControlSize(248, 55); + aControlSize = LogicToPixel(aControlSize, MAP_APPFONT); + m_pCheckLBContainer->set_width_request(aControlSize.Width()); + m_pCheckLBContainer->set_height_request(aControlSize.Height()); + + m_pCheckLB = new MSFltrSimpleTable(*m_pCheckLBContainer); static long aStaticTabs[] = { 3, 0, 20, 40 }; - aCheckLB.SvSimpleTable::SetTabs( aStaticTabs ); + m_pCheckLB->SvSimpleTable::SetTabs( aStaticTabs ); String sHeader( sHeader1 ); (( sHeader += '\t' ) += sHeader2 ) += '\t'; - aCheckLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, + m_pCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED ); - aCheckLB.SetHelpId( HID_OFAPAGE_MSFLTR2_CLB ); - aCheckLB.SetStyle( aCheckLB.GetStyle()|WB_HSCROLL| WB_VSCROLL ); + m_pCheckLB->SetHelpId( HID_OFAPAGE_MSFLTR2_CLB ); + m_pCheckLB->SetStyle( m_pCheckLB->GetStyle()|WB_HSCROLL| WB_VSCROLL ); } OfaMSFilterTabPage2::~OfaMSFilterTabPage2() { delete pCheckButtonData; + delete m_pCheckLB; } SfxTabPage* OfaMSFilterTabPage2::Create( Window* pParent, @@ -225,8 +226,8 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) { SvtFilterOptions& rOpt = SvtFilterOptions::Get(); - aCheckLB.SetUpdateMode(sal_False); - aCheckLB.Clear(); + m_pCheckLB->SetUpdateMode(sal_False); + m_pCheckLB->Clear(); SvtModuleOptions aModuleOpt; @@ -270,11 +271,11 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) pItem->SetStateChecked(); else pItem->SetStateUnchecked(); - aCheckLB.InvalidateEntry( pEntry ); + m_pCheckLB->InvalidateEntry( pEntry ); } } } - aCheckLB.SetUpdateMode( sal_True ); + m_pCheckLB->SetUpdateMode( sal_True ); } void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType ) @@ -282,7 +283,7 @@ void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType SvTreeListEntry* pEntry = new SvTreeListEntry; if( !pCheckButtonData ) - pCheckButtonData = new SvLBoxButtonData( &aCheckLB ); + pCheckButtonData = new SvLBoxButtonData( m_pCheckLB ); pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, @@ -292,17 +293,17 @@ void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType pEntry->AddItem( new SvLBoxString( pEntry, 0, _rTxt ) ); pEntry->SetUserData( (void*)_nType ); - aCheckLB.Insert( pEntry ); + m_pCheckLB->Insert( pEntry ); } SvTreeListEntry* OfaMSFilterTabPage2::GetEntry4Type( sal_IntPtr _nType ) const { - SvTreeListEntry* pEntry = aCheckLB.First(); + SvTreeListEntry* pEntry = m_pCheckLB->First(); while ( pEntry ) { if ( _nType == sal_IntPtr( pEntry->GetUserData() ) ) return pEntry; - pEntry = aCheckLB.Next( pEntry ); + pEntry = m_pCheckLB->Next( pEntry ); } return NULL; } diff --git a/cui/source/options/optfltr.hrc b/cui/source/options/optfltr.hrc deleted file mode 100644 index f1bf33a4ee0d..000000000000 --- a/cui/source/options/optfltr.hrc +++ /dev/null @@ -1,36 +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 _SVX_OPTFLTR_HRC -#define _SVX_OPTFLTR_HRC - -// defines ------------------------------------------------------------------ - -#define CLB_SETTINGS 1 -#define ST_CHG_MATH 1 -#define ST_CHG_WRITER 2 -#define ST_CHG_CALC 3 -#define ST_CHG_IMPRESS 4 -#define ST_HEADER1 5 -#define ST_HEADER2 6 -#define FT_HEADER1_EXPLANATION 1 -#define FT_HEADER2_EXPLANATION 2 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index 81a965068c12..9340ec33eeae 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -73,9 +73,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage } }; - SvSimpleTableContainer m_aCheckLBContainer; - MSFltrSimpleTable aCheckLB; - FixedText aHeader1FT, aHeader2FT; + SvSimpleTableContainer* m_pCheckLBContainer; + MSFltrSimpleTable* m_pCheckLB; String sHeader1, sHeader2; String sChgToFromMath, sChgToFromWriter, diff --git a/cui/source/options/optfltr.src b/cui/source/options/optfltr.src index f1d3ae371cf7..628b26df8b57 100644 --- a/cui/source/options/optfltr.src +++ b/cui/source/options/optfltr.src @@ -17,63 +17,31 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "optfltr.hrc" #include <cuires.hrc> -// RID_OFAPAGE_MSFILTEROPT2 ----------------------------------------------------- -TabPage RID_OFAPAGE_MSFILTEROPT2 +String RID_SVXSTR_HEADER1 { - HelpID = "cui:TabPage:RID_OFAPAGE_MSFILTEROPT2"; - OutputSize = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - SVLook = TRUE ; - Hide = TRUE ; - - Control CLB_SETTINGS - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 248 , 147 ) ; - Border = TRUE ; - TabStop = TRUE ; - }; - String ST_HEADER1 - { - Text [ en-US ] = "[L]"; - }; - String ST_HEADER2 - { - Text [ en-US ] = "[S]"; - }; - FixedText FT_HEADER1_EXPLANATION - { - Pos = MAP_APPFONT ( 6 , 160 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "[L]: Load and convert the object"; - }; - FixedText FT_HEADER2_EXPLANATION - { - Pos = MAP_APPFONT ( 6 , 171 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "[S]: Convert and save the object"; - }; - String ST_CHG_MATH - { - Text [ en-US ] = "MathType to %PRODUCTNAME Math or reverse"; - }; - String ST_CHG_WRITER - { - Text [ en-US ] = "WinWord to %PRODUCTNAME Writer or reverse"; - }; - String ST_CHG_CALC - { - Text [ en-US ] = "Excel to %PRODUCTNAME Calc or reverse"; - }; - String ST_CHG_IMPRESS - { - Text [ en-US ] = "PowerPoint to %PRODUCTNAME Impress or reverse"; - }; + Text [ en-US ] = "[L]"; +}; +String RID_SVXSTR_HEADER2 +{ + Text [ en-US ] = "[S]"; +}; +String RID_SVXSTR_CHG_MATH +{ + Text [ en-US ] = "MathType to %PRODUCTNAME Math or reverse"; +}; +String RID_SVXSTR_CHG_WRITER +{ + Text [ en-US ] = "WinWord to %PRODUCTNAME Writer or reverse"; +}; +String RID_SVXSTR_CHG_CALC +{ + Text [ en-US ] = "Excel to %PRODUCTNAME Calc or reverse"; +}; +String RID_SVXSTR_CHG_IMPRESS +{ + Text [ en-US ] = "PowerPoint to %PRODUCTNAME Impress or reverse"; }; - - // ******************************************************************* EOF /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |