summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-09-29 09:15:47 +0200
committerJan Holesovsky <kendy@collabora.com>2013-09-29 14:49:42 +0200
commited25f39a72e02a5f30652f9ad55fcfe5551c3026 (patch)
treea2e0fa3ba2a50482d8e2235ba341730892c7fe40
parent8b949134441056a1455d67ddfdd7e0bc5f2ee682 (diff)
Convert optfltr page to .ui + adapt code.
Change-Id: I4a854862059b531fa8e07c5cd938f776408e8c81
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/inc/cuires.hrc7
-rw-r--r--cui/source/options/optfltr.cxx55
-rw-r--r--cui/source/options/optfltr.hrc36
-rw-r--r--cui/source/options/optfltr.hxx5
-rw-r--r--cui/source/options/optfltr.src76
-rw-r--r--cui/uiconfig/ui/optfltrembedpage.ui94
7 files changed, 154 insertions, 120 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 04a842a21a9f..2fae5da5f40e 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optchartcolorspage \
cui/uiconfig/ui/optemailpage \
cui/uiconfig/ui/optfltrpage \
+ cui/uiconfig/ui/optfltrembedpage \
cui/uiconfig/ui/optfontspage \
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 53d7cc6e78f8..0ccdd9c6633f 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -438,6 +438,13 @@
#define RID_SVXSTR_LINGU_DICS_EDIT_DIC (RID_SVX_START + 1236)
#define RID_SVXSTR_LINGU_OPTIONS_EDIT (RID_SVX_START + 1237)
+#define RID_SVXSTR_CHG_MATH (RID_SVX_START + 1238)
+#define RID_SVXSTR_CHG_WRITER (RID_SVX_START + 1239)
+#define RID_SVXSTR_CHG_CALC (RID_SVX_START + 1240)
+#define RID_SVXSTR_CHG_IMPRESS (RID_SVX_START + 1241)
+#define RID_SVXSTR_HEADER1 (RID_SVX_START + 1242)
+#define RID_SVXSTR_HEADER2 (RID_SVX_START + 1243)
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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: */
diff --git a/cui/uiconfig/ui/optfltrembedpage.ui b/cui/uiconfig/ui/optfltrembedpage.ui
new file mode 100644
index 000000000000..07ddc5c460d7
--- /dev/null
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkGrid" id="OptFilterPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">6</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="svtlo-SvSimpleTableContainer" id="checklbcontainer">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">[L]: Load and convert the object</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">[S]: Convert and save the object</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Embedded objects</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>