/* -*- 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_SW_SOURCE_UI_INC_FRMPAGE_HXX #define INCLUDED_SW_SOURCE_UI_INC_FRMPAGE_HXX #include #include #include #include #include #include #include #include #include #include #include namespace sfx2{class FileDialogHelper;} class SwWrtShell; struct FrmMap; // OD 12.11.2003 #i22341# struct SwPosition; /*-------------------------------------------------------------------- Description: frame dialog --------------------------------------------------------------------*/ class SwFrmPage: public SfxTabPage { // size FixedText* m_pWidthFT; FixedText* m_pWidthAutoFT; PercentField m_aWidthED; CheckBox* m_pRelWidthCB; CheckBox* m_pAutoWidthCB; FixedText* m_pHeightFT; FixedText* m_pHeightAutoFT; PercentField m_aHeightED; CheckBox* m_pRelHeightCB; CheckBox* m_pAutoHeightCB; CheckBox* m_pFixedRatioCB; PushButton* m_pRealSizeBT; // anchor VclContainer* m_pAnchorFrame; RadioButton* m_pAnchorAtPageRB; RadioButton* m_pAnchorAtParaRB; RadioButton* m_pAnchorAtCharRB; RadioButton* m_pAnchorAsCharRB; RadioButton* m_pAnchorAtFrameRB; // position FixedText* m_pHorizontalFT; ListBox* m_pHorizontalDLB; FixedText* m_pAtHorzPosFT; MetricField* m_pAtHorzPosED; FixedText* m_pHoriRelationFT; ListBox* m_pHoriRelationLB; CheckBox* m_pMirrorPagesCB; FixedText* m_pVerticalFT; ListBox* m_pVerticalDLB; FixedText* m_pAtVertPosFT; MetricField* m_pAtVertPosED; FixedText* m_pVertRelationFT; ListBox* m_pVertRelationLB; // #i18732# - check box for new option 'FollowTextFlow' CheckBox* m_pFollowTextFlowCB; // example SvxSwFrameExample* m_pExampleWN; //'string provider' SvxSwFramePosString aFramePosString; sal_Bool bAtHorzPosModified; sal_Bool bAtVertPosModified; sal_Bool bFormat; sal_Bool bNew; sal_Bool bNoModifyHdl; bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged // --> OD 2009-08-31 #mongolianlayou# sal_Bool bIsVerticalL2R; sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged sal_Bool bHtmlMode; sal_uInt16 nHtmlMode; OString sDlgType; Size aGrfSize; Size aWrap; SwTwips nUpperBorder; SwTwips nLowerBorder; double fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button // OD 12.11.2003 #i22341# - keep content position of character for // to character anchored objects. const SwPosition* mpToCharCntntPos; // old alignment short nOldH; short nOldHRel; short nOldV; short nOldVRel; FrmMap* pVMap; FrmMap* pHMap; bool m_bAllowVertPositioning; bool m_bIsMathOLE; bool m_bIsMathBaselineAlignment; virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); DECL_LINK(RangeModifyHdl, void *); DECL_LINK(AnchorTypeHdl, void *); DECL_LINK( PosHdl, ListBox * ); DECL_LINK( RelHdl, ListBox * ); void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel, sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); DECL_LINK(RealSizeHdl, void *); DECL_LINK( RelSizeClickHdl, CheckBox * ); DECL_LINK(MirrorHdl, void *); DECL_LINK( AutoWidthClickHdl, void* ); DECL_LINK( AutoHeightClickHdl, void* ); // update example void UpdateExample(); DECL_LINK( ModifyHdl, Edit * ); void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False); // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in the alignment. sal_uInt16 FillPosLB( const FrmMap* _pMap, const sal_uInt16 _nAlign, const sal_uInt16 _nRel, ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. sal_uLong FillRelLB( const FrmMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_uInt16 _nAlign, sal_uInt16 _nRel, ListBox& _rLB, FixedText& _rFT ); sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); short GetRelation(FrmMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); void setOptimalFrmWidth(); void setOptimalRelWidth(); void EnableGraficMode( void ); // hides auto check boxes and re-org controls for "Real Size" button SwFrmPage(Window *pParent, const SfxItemSet &rSet); ~SwFrmPage(); SwWrtShell *getFrmDlgParentShell(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); static sal_uInt16* GetRanges(); virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } void SetFormatUsed(sal_Bool bFmt); void SetFrmType(const OString &rType) { sDlgType = rType; } inline sal_Bool IsInGraficMode( void ) { return sDlgType == "PictureDialog" || sDlgType == "ObjectDialog"; } void EnableVerticalPositioning( bool bEnable ); }; class SwGrfExtPage: public SfxTabPage { // mirror VclContainer* m_pMirror; CheckBox* m_pMirrorVertBox; CheckBox* m_pMirrorHorzBox; RadioButton* m_pAllPagesRB; RadioButton* m_pLeftPagesRB; RadioButton* m_pRightPagesRB; BmpWindow* m_pBmpWin; Edit* m_pConnectED; PushButton* m_pBrowseBT; OUString aFilterName; OUString aGrfName, aNewGrfName; ::sfx2::FileDialogHelper* pGrfDlg; sal_Bool bHtmlMode; // handler for mirroring DECL_LINK(MirrorHdl, void *); DECL_LINK(BrowseHdl, void *); virtual void ActivatePage(const SfxItemSet& rSet); SwGrfExtPage(Window *pParent, const SfxItemSet &rSet); ~SwGrfExtPage(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); virtual int DeactivatePage(SfxItemSet *pSet); }; class SwFrmURLPage : public SfxTabPage { // hyperlink Edit* pURLED; PushButton* pSearchPB; Edit* pNameED; ComboBox* pFrameCB; // image map CheckBox* pServerCB; CheckBox* pClientCB; DECL_LINK(InsertFileHdl, void *); SwFrmURLPage(Window *pParent, const SfxItemSet &rSet); ~SwFrmURLPage(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; public: static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); }; class SwFrmAddPage : public SfxTabPage { VclContainer* pNameFrame; FixedText* pNameFT; Edit* pNameED; FixedText* pAltNameFT; Edit* pAltNameED; FixedText* pPrevFT; ListBox* pPrevLB; FixedText* pNextFT; ListBox* pNextLB; VclContainer* pProtectFrame; CheckBox* pProtectContentCB; CheckBox* pProtectFrameCB; CheckBox* pProtectSizeCB; VclContainer* pPropertiesFrame; CheckBox* pEditInReadonlyCB; CheckBox* pPrintFrameCB; FixedText* pTextFlowFT; ListBox* pTextFlowLB; SwWrtShell* pWrtSh; OString sDlgType; sal_Bool bHtmlMode; sal_Bool bFormat; sal_Bool bNew; DECL_LINK(EditModifyHdl, void *); DECL_LINK(ChainModifyHdl, ListBox*); SwFrmAddPage(Window *pParent, const SfxItemSet &rSet); ~SwFrmAddPage(); public: static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet); static sal_uInt16* GetRanges(); virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset(const SfxItemSet &rSet); void SetFormatUsed(sal_Bool bFmt); void SetFrmType(const OString &rType) { sDlgType = rType; } void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; } void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; } }; #endif // INCLUDED_SW_SOURCE_UI_INC_FRMPAGE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ion value='feature/RotateFlyFrame2'>feature/RotateFlyFrame2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-26C++11: disable ctors instead of not implementing them (sc)Jochen Nitschke
replace the old declare and don't implement pattern with C++11 delete keyword Change-Id: I96c71d512d8dab4ad7c806c2e871604163fc49c1 Reviewed-on: https://gerrit.libreoffice.org/24399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-04-05tdf#94306 Replace boost::noncopyable with plain C++11 deleted copy ctorsSteven Guo
Replaced boost::noncopyable with play C++11 deleted copy ctors in sc/inc/* files. Change-Id: I2e6310f2f2bac673dd3b5d14e80ce80a98795672 Reviewed-on: https://gerrit.libreoffice.org/23059 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-11loplugin:privatebase: Make derivation from noncopyable explicitly privateStephan Bergmann
Change-Id: Ia410950353aec0106ea82d025ed3ee89c79ca127
2015-09-18boost->stdCaolán McNamara
Change-Id: I7f3bb094f116103c1146a7d60e3af94c0b37d9ea Reviewed-on: https://gerrit.libreoffice.org/18677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17revert for mac and win unit case crashes after boost->stdCaolán McNamara
Change-Id: I82c7084f203a834c2d42f9527705288e6036019b
2015-09-17boost->stdCaolán McNamara
Change-Id: I1e6a7fd66f90e6acd803c6cd464f1d73252f7bcb
2015-01-03boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I2c65709cda6f10810452dfb8aa1a247cb3a5564f
2014-12-10Deteremine the script type of source cell during paste replication.Kohei Yoshida
Doing this ahead of time eliminates the need to update script types of all replicated cells after the paste. This makes significant performance impact. Change-Id: Ic4f7d7b2fe152bd5640ddb1dae01cc2ed757657e
2014-11-25Adjust ref undo to ensure group area listeners are used.Kohei Yoshida
When undoing row deletion (and possibly other similar undo's). And write test for it. Change-Id: I04b4fd9932f4236f124dcd25967355c6055dec33
2014-11-18Move this code to the context class.Kohei Yoshida
Change-Id: I387dba24993d418a2b3923eac992ad2506229704
2014-11-18Speed up pasting of single row onto multiple destination rows.Kohei Yoshida
This is an extension of the earlier paste optimization of a single cell across multiple destination cells. Change-Id: I3a60300d3d0e11420d997bea8f7f540e948f56cc
2014-11-18Make these methods non-inline again.Kohei Yoshida
Change-Id: I34e18fa1607d56351e1c3656b1f37a823b7a5609
2014-09-04create type-safe bitfield for sc insert/delete flagsNoel Grandin
The most important part of the change is in sc/inc/global.hxx It creates a type-safe struct that prevents the accidental interaction between regular integer types and the flags struct. It also provides utility methods that make combining and testing the flags type-safe. Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d Reviewed-on: https://gerrit.libreoffice.org/11071 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-11fix-includes.pl: scThomas Arnhold
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
2014-02-18fdo#74573: Delete ranges that are non-empty before pasting from clipboard.Kohei Yoshida
The conditional formatting part is still not working. But other bits appear to be working now. Change-Id: Ia8a2cbe57cd2fa9ca9ad46635a91a1d8b99b0e7d
2014-01-27Handle note instances during copy-n-pasting of single cell.Kohei Yoshida
Change-Id: Ib258556414fd94b5156b65777478a8fd37abfd9e
2014-01-24Optimize copy-n-pasting of single cell replicated over a range.Kohei Yoshida
This is a very common operation. Let's speed it up a bit. TODO : Handle cell comments. Change-Id: I5442bf19008475a9427b889c1eb641cacd8ff161
2013-10-23Re-implement cell note storage using mdds::multi_type_vector.Laurent Godard
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
2013-06-24Reduce dependency on mtvelements.hxx header.Kohei Yoshida
Because that header includes lots of template definitions which would undoubtedly slow down compilation speed. Change-Id: Ifdd686a250d341a7a6877cca41f042f8dfdbbaf9
2013-05-20A bit of a cleanup.Kohei Yoshida
Change-Id: Iaa7003cabee4630e4fbb8fb1cd114d04b4e9e33c
2013-05-20Same with MixDocument(). But this one has additional bottleneck...Kohei Yoshida
With the removal of existing cells. So, this change is not enough to make this operation fly. Change-Id: Ic468375f6d0c28e2cc7d5391fb0565d53ee7fb4e
2013-05-20Do the same thing for CopyToDocument.Kohei Yoshida
This removes O(n^2) slowness from undo and redo of a large array of cells with empty cells in between. Change-Id: Id87c8ac8986c97ddf305f849a4752f0f92cc5899
2013-05-20Move the boolean flags to the context bucket.Kohei Yoshida
To reduce the number of function parameters lower. Change-Id: I816bd7c27070597f5fcdf69bdc7d981279390ca6
2013-05-20Do the same optimization for CopyToClip.Kohei Yoshida
The basic idea is the same as the one I did for CopyFromClip. This prevents the O(n^2) algorithm from being invoked during undo object creation. Change-Id: Iac46663b0c25db2f00ffa3ab95a4dcf2857252ce
2013-05-20Cleaned up a bit to remove the need to initialize the block positions.Kohei Yoshida
Change-Id: Iad2e69e4eb61167ad85581a83b19e3798c5edfd0
2013-05-20Keep track of current block position when pasting a range of cells.Kohei Yoshida
This avoids re-starting the search for insertion position in the cell text attribute array, on every single cell insertion. Instead of always searching from the first position, it starts the seaarch from the previous insertion position. This reduces the paste time from the previous 3.5 seconds to 1.7 seconds on my machine. Here is the scenario. 1) Put =A1 in B1, and leave B2 empty. 2) Select B1:B2 and copy it via Ctrl-C. 3) Select B3:B50000, and paste via Ctrl-V. Because of the empty cells interspersing the destination range, this makes the data array highly partitioned, which makes the position lookup very very expensive without the position hint. Still, I was hoping the duration would become a fraction of a second. 1.7 seconds still seems a bit too slow... Change-Id: I7742ce7e22935b6d0e082e4569d53dbd2072c4e5
2013-05-20Move the column element block definitions out of ScColumn.Kohei Yoshida
so that I can reference it in another class. Change-Id: I035cc1d37ec219c3e3da2e180a0337fb3c6fba8a
2013-05-20Move all clip params into the new context class. We don't need two buckets.Kohei Yoshida
Change-Id: Ida0542583242ebcdd7f1448931e31656aa542457
2013-05-20Introduce copy-from-clip context for copy handling code.Kohei Yoshida
It's not used yet, and is currently empty. Change-Id: Ia377994ae042fc8b19d269adc2f94830422770f1