convert picture frame to .ui
Change-Id: I624a4cfa8a5e8c3c72833ff0c3545deadbe4435d
This commit is contained in:
@@ -469,6 +469,10 @@
|
||||
generic-name="TabWin_Impl" parent="GtkDrawingArea"
|
||||
icon-name="widget-gtk-drawingarea"/>
|
||||
|
||||
<glade-widget-class title="BmpWindow" name="swuilo-BmpWindow"
|
||||
generic-name="BmpWindow" parent="GtkDrawingArea"
|
||||
icon-name="widget-gtk-drawingarea"/>
|
||||
|
||||
<glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView"
|
||||
generic-name="Icon View" parent="GtkIconView"
|
||||
icon-name="widget-gtk-iconview"/>
|
||||
|
@@ -102,7 +102,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
|
||||
sw/source/ui/envelp/labfmt.src \
|
||||
sw/source/ui/envelp/mailmrge.src \
|
||||
sw/source/ui/fldui/fldui.src \
|
||||
sw/source/ui/frmdlg/frmpage.src \
|
||||
sw/source/ui/frmdlg/frmui.src \
|
||||
sw/source/ui/globdoc/globdoc.src \
|
||||
sw/source/ui/index/cnttab.src \
|
||||
|
@@ -148,6 +148,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
|
||||
sw/uiconfig/swriter/ui/queryshowchangesdialog \
|
||||
sw/uiconfig/swriter/ui/paradialog \
|
||||
sw/uiconfig/swriter/ui/picturedialog \
|
||||
sw/uiconfig/swriter/ui/picturepage \
|
||||
sw/uiconfig/swriter/ui/previewzoomdialog \
|
||||
sw/uiconfig/swriter/ui/printeroptions \
|
||||
sw/uiconfig/swriter/ui/printmonitordialog \
|
||||
|
@@ -127,8 +127,6 @@
|
||||
#define TP_OPTTEST_PAGE (RC_GLOBALS_BEGIN + 25)
|
||||
#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26)
|
||||
|
||||
#define TP_GRF_EXT (RC_GLOBALS_BEGIN + 35)
|
||||
|
||||
#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45)
|
||||
#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47)
|
||||
#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48)
|
||||
|
@@ -136,7 +136,6 @@
|
||||
|
||||
// TabPage Help-IDs
|
||||
|
||||
#define HID_GRF_EXT "SW_HID_GRF_EXT"
|
||||
#define HID_COND_COLL "SW_HID_COND_COLL"
|
||||
|
||||
#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
|
||||
|
@@ -59,7 +59,6 @@
|
||||
#include <fmtfollowtextflow.hxx>
|
||||
|
||||
#include <frmui.hrc>
|
||||
#include <frmpage.hrc>
|
||||
#include <sfx2/filedlghelper.hxx>
|
||||
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
|
||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||
@@ -2336,29 +2335,26 @@ void SwFrmPage::EnableVerticalPositioning( bool bEnable )
|
||||
}
|
||||
|
||||
|
||||
SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
|
||||
SfxTabPage( pParent, SW_RES(TP_GRF_EXT), rSet ),
|
||||
aMirrorFL (this, SW_RES( FL_MIRROR )),
|
||||
aMirrorVertBox (this, SW_RES( CB_VERT )),
|
||||
aMirrorHorzBox (this, SW_RES( CB_HOR )),
|
||||
aAllPagesRB (this, SW_RES( RB_MIRROR_ALL_PAGES )),
|
||||
aLeftPagesRB (this, SW_RES( RB_MIRROR_LEFT_PAGES )),
|
||||
aRightPagesRB (this, SW_RES( RB_MIRROR_RIGHT_PAGES )),
|
||||
aBmpWin (this, WN_BMP, Graphic(), BitmapEx(SW_RES(BMP_EXAMPLE))),
|
||||
aConnectFL (this, SW_RES( FL_CONNECT )),
|
||||
aConnectFT (this, SW_RES( FT_CONNECT )),
|
||||
aConnectED (this, SW_RES( ED_CONNECT )),
|
||||
aBrowseBT (this, SW_RES( PB_BROWSE )),
|
||||
pGrfDlg ( 0 )
|
||||
SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet)
|
||||
: SfxTabPage(pParent, "PicturePage",
|
||||
"modules/swriter/ui/picturepage.ui", rSet)
|
||||
, pGrfDlg(0)
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
aBrowseBT.SetAccessibleRelationMemberOf(&aConnectFL);
|
||||
get(m_pMirror, "flipframe");
|
||||
get(m_pMirrorVertBox, "vert");
|
||||
get(m_pMirrorHorzBox, "hori");
|
||||
get(m_pAllPagesRB, "allpages");
|
||||
get(m_pLeftPagesRB, "leftpages");
|
||||
get(m_pRightPagesRB, "rightpages");
|
||||
get(m_pConnectED, "entry");
|
||||
get(m_pBrowseBT, "browse");
|
||||
get(m_pBmpWin, "preview");
|
||||
m_pBmpWin->SetBitmapEx(get<FixedImage>("fallback")->GetImage().GetBitmapEx());
|
||||
|
||||
SetExchangeSupport();
|
||||
aMirrorHorzBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
|
||||
aMirrorVertBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
|
||||
aBrowseBT.SetClickHdl ( LINK(this, SwGrfExtPage, BrowseHdl));
|
||||
m_pMirrorHorzBox->SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
|
||||
m_pMirrorVertBox->SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
|
||||
m_pBrowseBT->SetClickHdl ( LINK(this, SwGrfExtPage, BrowseHdl));
|
||||
}
|
||||
|
||||
SwGrfExtPage::~SwGrfExtPage()
|
||||
@@ -2380,8 +2376,8 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet)
|
||||
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, sal_True, &pItem)
|
||||
&& ((const SfxBoolItem *)pItem)->GetValue() )
|
||||
{
|
||||
aBrowseBT.Enable();
|
||||
aConnectED.SetReadOnly(sal_False);
|
||||
m_pBrowseBT->Enable();
|
||||
m_pConnectED->SetReadOnly(sal_False);
|
||||
}
|
||||
|
||||
ActivatePage(rSet);
|
||||
@@ -2408,10 +2404,10 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
|
||||
switch( eMirror )
|
||||
{
|
||||
case RES_MIRROR_GRAPH_DONT: break;
|
||||
case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(sal_True); break;
|
||||
case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(sal_True); break;
|
||||
case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(sal_True);
|
||||
aMirrorVertBox.Check(sal_True);
|
||||
case RES_MIRROR_GRAPH_VERT: m_pMirrorHorzBox->Check(sal_True); break;
|
||||
case RES_MIRROR_GRAPH_HOR: m_pMirrorVertBox->Check(sal_True); break;
|
||||
case RES_MIRROR_GRAPH_BOTH: m_pMirrorHorzBox->Check(sal_True);
|
||||
m_pMirrorVertBox->Check(sal_True);
|
||||
break;
|
||||
default:
|
||||
;
|
||||
@@ -2426,17 +2422,17 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
|
||||
switch (nPos)
|
||||
{
|
||||
case 1: // mirror at left / even pages
|
||||
aLeftPagesRB.Check();
|
||||
aMirrorHorzBox.Check(sal_True);
|
||||
m_pLeftPagesRB->Check();
|
||||
m_pMirrorHorzBox->Check(sal_True);
|
||||
break;
|
||||
case 2: // mirror on all pages
|
||||
aAllPagesRB.Check();
|
||||
m_pAllPagesRB->Check();
|
||||
break;
|
||||
case 3: // mirror on right / odd pages
|
||||
aRightPagesRB.Check();
|
||||
m_pRightPagesRB->Check();
|
||||
break;
|
||||
default:
|
||||
aAllPagesRB.Check();
|
||||
m_pAllPagesRB->Check();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2447,64 +2443,62 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
|
||||
if( rBrush.GetGraphicLink() )
|
||||
{
|
||||
aGrfName = aNewGrfName = *rBrush.GetGraphicLink();
|
||||
aConnectED.SetText( aNewGrfName );
|
||||
m_pConnectED->SetText( aNewGrfName );
|
||||
}
|
||||
const Graphic* pGrf = rBrush.GetGraphic();
|
||||
if( pGrf )
|
||||
aBmpWin.SetGraphic( *pGrf );
|
||||
m_pBmpWin->SetGraphic( *pGrf );
|
||||
}
|
||||
|
||||
aAllPagesRB .Enable(bEnableMirrorRB);
|
||||
aLeftPagesRB.Enable(bEnableMirrorRB);
|
||||
aRightPagesRB.Enable(bEnableMirrorRB);
|
||||
aMirrorHorzBox.Enable(bEnable);
|
||||
aMirrorVertBox.Enable(bEnable);
|
||||
aMirrorFL.Enable(bEnable);
|
||||
m_pAllPagesRB->Enable(bEnableMirrorRB);
|
||||
m_pLeftPagesRB->Enable(bEnableMirrorRB);
|
||||
m_pRightPagesRB->Enable(bEnableMirrorRB);
|
||||
m_pMirror->Enable(bEnable);
|
||||
|
||||
aAllPagesRB .SaveValue();
|
||||
aLeftPagesRB.SaveValue();
|
||||
aRightPagesRB.SaveValue();
|
||||
aMirrorHorzBox.SaveValue();
|
||||
aMirrorVertBox.SaveValue();
|
||||
m_pAllPagesRB->SaveValue();
|
||||
m_pLeftPagesRB->SaveValue();
|
||||
m_pRightPagesRB->SaveValue();
|
||||
m_pMirrorHorzBox->SaveValue();
|
||||
m_pMirrorVertBox->SaveValue();
|
||||
|
||||
aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() );
|
||||
aBmpWin.MirrorVert( aMirrorHorzBox.IsChecked() );
|
||||
aBmpWin.Invalidate();
|
||||
m_pBmpWin->MirrorHorz( m_pMirrorVertBox->IsChecked() );
|
||||
m_pBmpWin->MirrorVert( m_pMirrorHorzBox->IsChecked() );
|
||||
m_pBmpWin->Invalidate();
|
||||
}
|
||||
|
||||
sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
|
||||
{
|
||||
sal_Bool bModified = sal_False;
|
||||
if ( aMirrorHorzBox.GetSavedValue() != aMirrorHorzBox.IsChecked() ||
|
||||
aMirrorVertBox.GetSavedValue() != aMirrorVertBox.IsChecked() ||
|
||||
aAllPagesRB .GetSavedValue() != aAllPagesRB .IsChecked() ||
|
||||
aLeftPagesRB.GetSavedValue() != aLeftPagesRB.IsChecked() ||
|
||||
aRightPagesRB.GetSavedValue() != aRightPagesRB.IsChecked())
|
||||
if ( m_pMirrorHorzBox->GetSavedValue() != m_pMirrorHorzBox->IsChecked() ||
|
||||
m_pMirrorVertBox->GetSavedValue() != m_pMirrorVertBox->IsChecked() ||
|
||||
m_pAllPagesRB->GetSavedValue() != m_pAllPagesRB->IsChecked() ||
|
||||
m_pLeftPagesRB->GetSavedValue() != m_pLeftPagesRB->IsChecked() ||
|
||||
m_pRightPagesRB->GetSavedValue() != m_pRightPagesRB->IsChecked())
|
||||
{
|
||||
bModified = sal_True;
|
||||
|
||||
bool bHori = false;
|
||||
|
||||
if (aMirrorHorzBox.IsChecked() &&
|
||||
!aLeftPagesRB.IsChecked())
|
||||
if (m_pMirrorHorzBox->IsChecked() &&
|
||||
!m_pLeftPagesRB->IsChecked())
|
||||
bHori = true;
|
||||
|
||||
MirrorGraph eMirror;
|
||||
eMirror = aMirrorVertBox.IsChecked() && bHori ?
|
||||
eMirror = m_pMirrorVertBox->IsChecked() && bHori ?
|
||||
RES_MIRROR_GRAPH_BOTH : bHori ?
|
||||
RES_MIRROR_GRAPH_VERT : aMirrorVertBox.IsChecked() ?
|
||||
RES_MIRROR_GRAPH_VERT : m_pMirrorVertBox->IsChecked() ?
|
||||
RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
|
||||
|
||||
sal_Bool bMirror = !aAllPagesRB.IsChecked();
|
||||
sal_Bool bMirror = !m_pAllPagesRB->IsChecked();
|
||||
SwMirrorGrf aMirror( eMirror );
|
||||
aMirror.SetGrfToggle(bMirror );
|
||||
rSet.Put( aMirror );
|
||||
}
|
||||
|
||||
if( aGrfName != aNewGrfName || aConnectED.IsModified() )
|
||||
if( aGrfName != aNewGrfName || m_pConnectED->IsModified() )
|
||||
{
|
||||
bModified = sal_True;
|
||||
aGrfName = aConnectED.GetText();
|
||||
aGrfName = m_pConnectED->GetText();
|
||||
rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT,
|
||||
SID_ATTR_GRAF_GRAPHIC ));
|
||||
}
|
||||
@@ -2525,9 +2519,9 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl)
|
||||
pGrfDlg = new FileDialogHelper(
|
||||
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
|
||||
SFXWB_GRAPHIC );
|
||||
pGrfDlg->SetTitle(SW_RESSTR(STR_EDIT_GRF ));
|
||||
pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label());
|
||||
}
|
||||
pGrfDlg->SetDisplayDirectory( aConnectED.GetText() );
|
||||
pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
|
||||
uno::Reference < ui::dialogs::XFilePicker > xFP = pGrfDlg->GetFilePicker();
|
||||
uno::Reference < ui::dialogs::XFilePickerControlAccess > xCtrlAcc(xFP, uno::UNO_QUERY);
|
||||
sal_Bool bTrue = sal_True;
|
||||
@@ -2541,46 +2535,46 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl)
|
||||
INET_HEX_ESCAPE,
|
||||
INetURLObject::DECODE_UNAMBIGUOUS,
|
||||
RTL_TEXTENCODING_UTF8 );
|
||||
aConnectED.SetModifyFlag();
|
||||
aConnectED.SetText( aNewGrfName );
|
||||
m_pConnectED->SetModifyFlag();
|
||||
m_pConnectED->SetText( aNewGrfName );
|
||||
//reset mirrors because maybe a Bitmap was swapped with
|
||||
//another type of graphic that cannot be mirrored.
|
||||
aMirrorVertBox.Check(sal_False);
|
||||
aMirrorHorzBox.Check(sal_False);
|
||||
aAllPagesRB .Enable(sal_False);
|
||||
aLeftPagesRB.Enable(sal_False);
|
||||
aRightPagesRB.Enable(sal_False);
|
||||
aBmpWin.MirrorHorz(sal_False);
|
||||
aBmpWin.MirrorVert(sal_False);
|
||||
m_pMirrorVertBox->Check(sal_False);
|
||||
m_pMirrorHorzBox->Check(sal_False);
|
||||
m_pAllPagesRB->Enable(sal_False);
|
||||
m_pLeftPagesRB->Enable(sal_False);
|
||||
m_pRightPagesRB->Enable(sal_False);
|
||||
m_pBmpWin->MirrorHorz(sal_False);
|
||||
m_pBmpWin->MirrorVert(sal_False);
|
||||
|
||||
Graphic aGraphic;
|
||||
GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
|
||||
aBmpWin.SetGraphic(aGraphic);
|
||||
m_pBmpWin->SetGraphic(aGraphic);
|
||||
|
||||
sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
|
||||
GRAPHIC_GDIMETAFILE == aGraphic.GetType();
|
||||
aMirrorVertBox.Enable(bEnable);
|
||||
aMirrorHorzBox.Enable(bEnable);
|
||||
aAllPagesRB .Enable(bEnable);
|
||||
aLeftPagesRB.Enable(bEnable);
|
||||
aRightPagesRB.Enable(bEnable);
|
||||
m_pMirrorVertBox->Enable(bEnable);
|
||||
m_pMirrorHorzBox->Enable(bEnable);
|
||||
m_pAllPagesRB->Enable(bEnable);
|
||||
m_pLeftPagesRB->Enable(bEnable);
|
||||
m_pRightPagesRB->Enable(bEnable);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SwGrfExtPage, MirrorHdl)
|
||||
{
|
||||
sal_Bool bEnable = aMirrorHorzBox.IsChecked();
|
||||
sal_Bool bEnable = m_pMirrorHorzBox->IsChecked();
|
||||
|
||||
aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() );
|
||||
aBmpWin.MirrorVert( bEnable );
|
||||
m_pBmpWin->MirrorHorz( m_pMirrorVertBox->IsChecked() );
|
||||
m_pBmpWin->MirrorVert( bEnable );
|
||||
|
||||
aAllPagesRB .Enable(bEnable);
|
||||
aLeftPagesRB.Enable(bEnable);
|
||||
aRightPagesRB.Enable(bEnable);
|
||||
m_pAllPagesRB->Enable(bEnable);
|
||||
m_pLeftPagesRB->Enable(bEnable);
|
||||
m_pRightPagesRB->Enable(bEnable);
|
||||
|
||||
if (!aAllPagesRB.IsChecked() && !aLeftPagesRB.IsChecked() && !aRightPagesRB.IsChecked())
|
||||
aAllPagesRB.Check();
|
||||
if (!m_pAllPagesRB->IsChecked() && !m_pLeftPagesRB->IsChecked() && !m_pRightPagesRB->IsChecked())
|
||||
m_pAllPagesRB->Check();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2588,20 +2582,27 @@ IMPL_LINK_NOARG(SwGrfExtPage, MirrorHdl)
|
||||
/*--------------------------------------------------------------------
|
||||
Description: example window
|
||||
--------------------------------------------------------------------*/
|
||||
BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId,
|
||||
const Graphic& rGraphic, const BitmapEx& rBmp ) :
|
||||
Window(pPar, SW_RES(nId)),
|
||||
aGraphic(rGraphic),
|
||||
aBmp(rBmp),
|
||||
bHorz(sal_False),
|
||||
bVert(sal_False),
|
||||
bGraphic(sal_False),
|
||||
bLeftAlign(false)
|
||||
BmpWindow::BmpWindow(Window* pPar, WinBits nStyle)
|
||||
: Window(pPar, nStyle)
|
||||
, bHorz(false)
|
||||
, bVert(false)
|
||||
, bGraphic(false)
|
||||
, bLeftAlign(false)
|
||||
{
|
||||
// #i119307# use background, the graphic might have transparency
|
||||
SetBackground(Wallpaper(Color(COL_WHITE)));
|
||||
}
|
||||
|
||||
Size BmpWindow::GetOptimalSize() const
|
||||
{
|
||||
return LogicToPixel(Size(127 , 66), MapMode(MAP_APPFONT));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeBmpWindow(Window *pParent, VclBuilder::stringmap &)
|
||||
{
|
||||
return new BmpWindow(pParent, 0);
|
||||
}
|
||||
|
||||
void BmpWindow::Paint( const Rectangle& )
|
||||
{
|
||||
Point aPntPos;
|
||||
@@ -2669,6 +2670,12 @@ void BmpWindow::SetGraphic(const Graphic& rGrf)
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
void BmpWindow::SetBitmapEx(const BitmapEx& rBmp)
|
||||
{
|
||||
aBmp = rBmp;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Description: set URL and ImageMap at frames
|
||||
***************************************************************************/
|
||||
|
@@ -1,74 +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 .
|
||||
*/
|
||||
|
||||
#include <svtools/controldims.hrc>
|
||||
|
||||
// metrics
|
||||
#define SWFRMPG_COL_0 RSC_SP_TBPG_INNERBORDER_LEFT
|
||||
#define SWFRMPG_COL_1 (SWFRMPG_COL_0+RSC_SP_FLGR_INNERBORDER_LEFT)
|
||||
#define SWFRMPG_COL_2 (SWFRMPG_COL_1+RSC_SP_FLGR_INNERBORDER_LEFT)
|
||||
#define SWFRMPG_COL_3 76
|
||||
#define SWFRMPG_COL_4 109
|
||||
|
||||
#define SWFRMPG_ROW_CONDENSE 1
|
||||
#define SWFRMPG_ROW_0 RSC_SP_TBPG_INNERBORDER_TOP
|
||||
#define SWFRMPG_ROW_1 (SWFRMPG_ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_INNERBORDER_TOP-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_2 (SWFRMPG_ROW_1+((RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2))
|
||||
#define SWFRMPG_ROW_3 (SWFRMPG_ROW_1+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_4 (SWFRMPG_ROW_3+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_5 (SWFRMPG_ROW_4+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_6 (SWFRMPG_ROW_5+((RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2))
|
||||
#define SWFRMPG_ROW_7 (SWFRMPG_ROW_5+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_8 (SWFRMPG_ROW_7+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_9 (SWFRMPG_ROW_8+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
|
||||
#define SWFRMPG_ROW_10 (SWFRMPG_ROW_9+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_CTRL_Y-SWFRMPG_ROW_CONDENSE)
|
||||
#define SWFRMPG_ROW_11 (SWFRMPG_ROW_10+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_INNERBORDER_TOP)
|
||||
#define SWFRMPG_ROW_12 (SWFRMPG_ROW_11+((RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2))
|
||||
#define SWFRMPG_ROW_13 (SWFRMPG_ROW_11+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
|
||||
#define SWFRMPG_ROW_14 (SWFRMPG_ROW_13+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
|
||||
#define SWFRMPG_ROW_15 (SWFRMPG_ROW_14+((RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2))
|
||||
#define SWFRMPG_ROW_16 (SWFRMPG_ROW_14+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
|
||||
|
||||
|
||||
#define CB_HOR 46
|
||||
#define CB_VERT 47
|
||||
#define FL_MIRROR 51
|
||||
#define WN_BMP 52
|
||||
#define PB_BROWSE 53
|
||||
#define ED_CONNECT 54
|
||||
#define FL_CONNECT 55
|
||||
#define FT_CONNECT 57
|
||||
|
||||
#define BMP_EXAMPLE 62
|
||||
#define RB_MIRROR_ALL_PAGES 64
|
||||
#define RB_MIRROR_LEFT_PAGES 65
|
||||
#define RB_MIRROR_RIGHT_PAGES 66
|
||||
|
||||
#define CB_REL_WIDTH 100
|
||||
#define CB_REL_HEIGHT 101
|
||||
#define CB_FIXEDRATIO 102
|
||||
|
||||
#define CB_ANCHOR_ONLY 103
|
||||
|
||||
#define FT_NAME 110
|
||||
#define ED_NAME 111
|
||||
#define FL_TYPE_SEP 126
|
||||
#define CB_FOLLOWTEXTFLOW 129
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -1,126 +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 .
|
||||
*/
|
||||
|
||||
#include "frmui.hrc"
|
||||
#include "frmpage.hrc"
|
||||
#include "globals.hrc"
|
||||
#include "helpid.h"
|
||||
#include "svx/dialogs.hrc"
|
||||
|
||||
TabPage TP_GRF_EXT
|
||||
{
|
||||
Hide = TRUE ;
|
||||
HelpID = HID_GRF_EXT ;
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 0 , 0 ) ;
|
||||
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
|
||||
Bitmap BMP_EXAMPLE
|
||||
{
|
||||
File = "image-example.bmp" ;
|
||||
};
|
||||
FixedLine FL_CONNECT
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6 , 87 ) ;
|
||||
Size = MAP_APPFONT ( 248 , 8 ) ;
|
||||
Text [ en-US ] = "Link" ;
|
||||
};
|
||||
FixedText FT_CONNECT
|
||||
{
|
||||
Pos = MAP_APPFONT ( 13 , 98 ) ;
|
||||
Size = MAP_APPFONT ( 80 , 8 ) ;
|
||||
Text [ en-US ] = "~File name" ;
|
||||
};
|
||||
Edit ED_CONNECT
|
||||
{
|
||||
HelpID = "sw:Edit:TP_GRF_EXT:ED_CONNECT";
|
||||
Pos = MAP_APPFONT ( 13 , 109 ) ;
|
||||
Size = MAP_APPFONT ( 200 , 12 ) ;
|
||||
Text [ en-US ] = "[None]" ;
|
||||
Readonly = TRUE ;
|
||||
Left = TRUE ;
|
||||
Border = TRUE ;
|
||||
};
|
||||
PushButton PB_BROWSE
|
||||
{
|
||||
HelpID = "sw:PushButton:TP_GRF_EXT:PB_BROWSE";
|
||||
Disable = TRUE ;
|
||||
Pos = MAP_APPFONT ( 230 , 109 ) ;
|
||||
Size = MAP_APPFONT ( 12 , 12 ) ;
|
||||
Disable = TRUE ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "~..." ;
|
||||
};
|
||||
CheckBox CB_VERT
|
||||
{
|
||||
HelpID = "sw:CheckBox:TP_GRF_EXT:CB_VERT";
|
||||
Pos = MAP_APPFONT ( 12 , 14 ) ;
|
||||
Size = MAP_APPFONT ( 48 , 10 ) ;
|
||||
TabStop = TRUE ;
|
||||
Group = TRUE ;
|
||||
Text [ en-US ] = "~Vertically" ;
|
||||
};
|
||||
CheckBox CB_HOR
|
||||
{
|
||||
HelpID = "sw:CheckBox:TP_GRF_EXT:CB_HOR";
|
||||
Pos = MAP_APPFONT ( 12 , 28 ) ;
|
||||
Size = MAP_APPFONT ( 70 , 10 ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "Hori~zontally";
|
||||
};
|
||||
RadioButton RB_MIRROR_ALL_PAGES
|
||||
{
|
||||
HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_ALL_PAGES";
|
||||
Pos = MAP_APPFONT ( 18 , 42 ) ;
|
||||
Size = MAP_APPFONT ( 100 , 10 ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "On all pages" ;
|
||||
};
|
||||
RadioButton RB_MIRROR_LEFT_PAGES
|
||||
{
|
||||
HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_LEFT_PAGES";
|
||||
Pos = MAP_APPFONT ( 18 , 56 ) ;
|
||||
Size = MAP_APPFONT ( 100 , 10 ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "On left pages" ;
|
||||
};
|
||||
RadioButton RB_MIRROR_RIGHT_PAGES
|
||||
{
|
||||
HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_RIGHT_PAGES";
|
||||
Pos = MAP_APPFONT ( 18 , 70 ) ;
|
||||
Size = MAP_APPFONT ( 100 , 10 ) ;
|
||||
TabStop = TRUE ;
|
||||
Text [ en-US ] = "On right pages" ;
|
||||
};
|
||||
Window WN_BMP
|
||||
{
|
||||
Pos = MAP_APPFONT ( 120 , 14 ) ;
|
||||
Size = MAP_APPFONT ( 127 , 66 ) ;
|
||||
};
|
||||
FixedLine FL_MIRROR
|
||||
{
|
||||
Pos = MAP_APPFONT ( 6 , 3 ) ;
|
||||
Size = MAP_APPFONT ( 248 , 8 ) ;
|
||||
Text [ en-US ] = "Flip" ;
|
||||
};
|
||||
};
|
||||
String STR_EDIT_GRF
|
||||
{
|
||||
Text [ en-US ] = "Link" ;
|
||||
};
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -38,18 +38,17 @@ private:
|
||||
sal_Bool bGraphic : 1;
|
||||
bool bLeftAlign : 1;
|
||||
|
||||
void Paint(const Rectangle& rRect);
|
||||
virtual void Paint(const Rectangle& rRect);
|
||||
|
||||
virtual Size GetOptimalSize() const;
|
||||
|
||||
public:
|
||||
BmpWindow(Window* pPar, sal_uInt16 nId,
|
||||
const Graphic& rGraphic, const BitmapEx& rBmp);
|
||||
BmpWindow(Window* pParent, const ResId rResId) :
|
||||
Window(pParent, rResId),
|
||||
bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(true) {}
|
||||
BmpWindow(Window* pPar, WinBits nStyle);
|
||||
~BmpWindow();
|
||||
void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
|
||||
void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
|
||||
void SetGraphic(const Graphic& rGrf);
|
||||
void SetBitmapEx(const BitmapEx& rGrf);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -202,18 +202,16 @@ public:
|
||||
class SwGrfExtPage: public SfxTabPage
|
||||
{
|
||||
// mirror
|
||||
FixedLine aMirrorFL;
|
||||
CheckBox aMirrorVertBox;
|
||||
CheckBox aMirrorHorzBox;
|
||||
RadioButton aAllPagesRB;
|
||||
RadioButton aLeftPagesRB;
|
||||
RadioButton aRightPagesRB;
|
||||
BmpWindow aBmpWin;
|
||||
VclContainer* m_pMirror;
|
||||
CheckBox* m_pMirrorVertBox;
|
||||
CheckBox* m_pMirrorHorzBox;
|
||||
RadioButton* m_pAllPagesRB;
|
||||
RadioButton* m_pLeftPagesRB;
|
||||
RadioButton* m_pRightPagesRB;
|
||||
BmpWindow* m_pBmpWin;
|
||||
|
||||
FixedLine aConnectFL;
|
||||
FixedText aConnectFT;
|
||||
Edit aConnectED;
|
||||
PushButton aBrowseBT;
|
||||
Edit* m_pConnectED;
|
||||
PushButton* m_pBrowseBT;
|
||||
|
||||
String aFilterName;
|
||||
String aGrfName, aNewGrfName;
|
||||
|
@@ -51,8 +51,6 @@
|
||||
#define STR_OLE_EDIT (STR_FRMDLG_BEGIN + 46)
|
||||
#define STR_COLL_HEADER (STR_FRMDLG_BEGIN + 47)
|
||||
|
||||
#define STR_EDIT_GRF (STR_FRMDLG_BEGIN + 49)
|
||||
|
||||
#define STR_LINE_TOP (STR_FRMDLG_BEGIN + 50)
|
||||
#define STR_LINE_BOTTOM (STR_FRMDLG_BEGIN + 51)
|
||||
#define STR_LINE_CENTER (STR_FRMDLG_BEGIN + 52)
|
||||
|
263
sw/uiconfig/swriter/ui/picturepage.ui
Normal file
263
sw/uiconfig/swriter/ui/picturepage.ui
Normal file
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkGrid" id="PicturePage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="row_spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="linkframe">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="browse">
|
||||
<property name="label" translatable="yes">...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_File name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">entry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Link</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="flipframe">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="vert">
|
||||
<property name="label" translatable="yes">_Vertically</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</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>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="hori">
|
||||
<property name="label" translatable="yes">Hori_zontally</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="allpages">
|
||||
<property name="label" translatable="yes">On all pages</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">leftpages</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="leftpages">
|
||||
<property name="label" translatable="yes">On left pages</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">rightpages</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="rightpages">
|
||||
<property name="label" translatable="yes">On right pages</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">allpages</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="swuilo-BmpWindow" id="preview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="fallback">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="pixbuf">sw/res/image-example.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Flip</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>
|
Reference in New Issue
Block a user