| /************************************************************** |
| * |
| * 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 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| *************************************************************/ |
| |
| |
| |
| // MARKER(update_precomp.py): autogen include statement, do not remove |
| #include "precompiled_sw.hxx" |
| |
| #include "swtypes.hxx" |
| #include "tools/string.hxx" |
| #include <vcl/svapp.hxx> |
| #include <vcl/window.hxx> |
| #include <vcl/graph.hxx> |
| #include <editeng/unolingu.hxx> |
| #include <pagefrm.hxx> |
| #include <swatrset.hxx> |
| #include <frmfmt.hxx> |
| #include <frmtool.hxx> |
| #include <ndtxt.hxx> |
| #include <UndoDelete.hxx> |
| #include <UndoInsert.hxx> |
| #include <swtable.hxx> |
| #include <viscrs.hxx> |
| #include <fntcache.hxx> |
| #include <swfntcch.hxx> |
| #include <hffrm.hxx> |
| #include <colfrm.hxx> |
| #include <bodyfrm.hxx> |
| #include <tabfrm.hxx> |
| #include <txtfrm.hxx> |
| #include <swtblfmt.hxx> |
| #include <rowfrm.hxx> |
| #include <cellfrm.hxx> |
| #include <sectfrm.hxx> |
| |
| using namespace com::sun::star; |
| |
| ByteString aEmptyByteStr; // Konstante Strings |
| String aEmptyStr; // Konstante Strings |
| String aDotStr('.'); // Konstante Strings |
| |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwAttrSet, 25, 25 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwStartNode, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwEndNode, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBox, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoDelete, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwUndoInsert, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwPaM, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwCursor, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtNode, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwpHints, 25, 25 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwFntObj, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwFontObj, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwBorderAttrs, 100, 100 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwCellFrm, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwRowFrm, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwColumnFrm, 40, 40 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwSectionFrm, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTabFrm, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwPageFrm, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwBodyFrm, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwHeaderFrm, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwFooterFrm, 20, 20 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtFrm, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTableFmt, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTableLineFmt, 10, 10 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( SwTableBoxFmt, 50, 50 ) |
| IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos, 20, 20 ) |
| |
| |
| Size GetGraphicSizeTwip( const Graphic& rGraphic, OutputDevice* pOutDev ) |
| { |
| const MapMode aMapTwip( MAP_TWIP ); |
| Size aSize( rGraphic.GetPrefSize() ); |
| if( MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit() ) |
| { |
| if( !pOutDev ) |
| pOutDev = Application::GetDefaultDevice(); |
| aSize = pOutDev->PixelToLogic( aSize, aMapTwip ); |
| } |
| else |
| aSize = OutputDevice::LogicToLogic( aSize, |
| rGraphic.GetPrefMapMode(), aMapTwip ); |
| return aSize; |
| } |
| |
| |
| uno::Reference< linguistic2::XSpellChecker1 > GetSpellChecker() |
| { |
| return LinguMgr::GetSpellChecker(); |
| } |
| |
| |
| uno::Reference< linguistic2::XHyphenator > GetHyphenator() |
| { |
| return LinguMgr::GetHyphenator(); |
| } |
| |
| |
| uno::Reference< linguistic2::XThesaurus > GetThesaurus() |
| { |
| return LinguMgr::GetThesaurus(); |
| } |
| |
| |
| uno::Reference< beans::XPropertySet > GetLinguPropertySet() |
| { |
| return LinguMgr::GetLinguPropertySet(); |
| } |
| |
| |